def configure(self, config): Formatter.configure(self, config) set_attribute(self,'data_delimiter', ',', config) set_attribute(self,'header_delimiter', self.data_delimiter, config, str) set_attribute(self,'prefix', '', config) set_attribute(self,'suffix', '', config) set_attribute(self, 'timestamp_format', '%Y-%m-%dT%H:%M:%S', config)
def start(self): self.prefix = '' for line in ('line_one','line_two','line_three', 'line_four','line_five','line_six', 'line_seven','line_eight','line_nine','line_ten'): self.prefix += string.replace(getattr(self,line),'\\n','\n') Formatter.start(self)
def start(self): self.prefix = '' for line in ('line_one', 'line_two', 'line_three', 'line_four', 'line_five', 'line_six', 'line_seven', 'line_eight', 'line_nine', 'line_ten'): self.prefix += string.replace(getattr(self, line), '\\n', '\n') Formatter.start(self)
def start(self): self._recorders = [] recorders = self.parent.parent.parent.get_child('recorders') for recorder in recorders.children_nodes(): if recorder.__class__ == Recorder: self._recorders.append(recorder) Formatter.start(self)
def __init__(self): Formatter.__init__(self) self._channels = {} # {name:{uom:,meastype:,Delta:,Totalized:,key:}} self._exception_log = None # NEVER CREATE A PDO BEFORE THE NODE IS INSERTED IN THE NODE TREE! self._PDO = None return
def configure(self, config): Formatter.configure(self, config) set_attribute(self, 'data_delimiter', ',', config) set_attribute(self, 'header_delimiter', self.data_delimiter, config, str) set_attribute(self, 'prefix', '', config) set_attribute(self, 'suffix', '', config) set_attribute(self, 'timestamp_format', '%Y-%m-%dT%H:%M:%S', config)
def start(self): self._columns = [] self.time_function = self.parent.time_function columns = self.parent.parent.parent.get_child("columns") for child in columns.children_nodes(): if child.name != "timestamp": self._columns.append(child) Formatter.start(self)
def start(self): self._columns = [] self.time_function = self.parent.time_function columns = self.parent.parent.parent.get_child('columns') for child in columns.children_nodes(): if child.name != 'timestamp': self._columns.append(child) Formatter.start(self)
def configure(self, config): Formatter.configure(self, config) self.period = self.parent.log.period set_attribute(self, 'sender_id', 'Envenergy', config) set_attribute(self, 'customer_id', '', config) set_attribute(self, 'receiver_id', 'Enerwise', config) set_attribute(self, 'commodity', 'E', config) set_attribute(self, 'timestamp_format', '%Y%m%d%H%M', config) set_attribute(self, 'max_count', 48, config, int)
def configure(self, config): Formatter.configure(self, config) self.period = self.parent.log.period set_attribute(self, "sender_id", "Envenergy", config) set_attribute(self, "customer_id", "", config) set_attribute(self, "receiver_id", "Enerwise", config) set_attribute(self, "commodity", "E", config) set_attribute(self, "timestamp_format", "%Y%m%d%H%M", config) set_attribute(self, "max_count", 48, config, int)
def configure(self, config): Formatter.configure(self, config) set_attribute(self, 'debug_lvl', 0, config, int) set_attribute(self, 'timestamp_format', '%Y-%m-%dT%H:%M:%S', config) set_attribute(self, 'pretty_format',0,config,as_boolean) set_attribute(self, 'location_info','DefaultLocationInfo',config) set_attribute(self, 'location_key','DefaultLocationKey',config) set_attribute(self, 'panel_info','DefaultPanelInfo',config) set_attribute(self, 'panel_key','DefaultPanelKey',config) set_attribute(self, 'capture_period',24.0,config,float) # capture period preceding data transmission time (hrs) set_attribute(self, 'exception_log_url','/services/logger/fsg_exception_log',config)
def configure(self, config): Formatter.configure(self, config) set_attribute(self, 'line_one', '"ACDIAG"\n', config) set_attribute(self, 'line_two', '"Diagnostics"\n', config) set_attribute(self, 'line_three', '"Average"\n\n\n', config) set_attribute(self, 'line_four', 'begindata\n', config) set_attribute(self, 'line_five', '', config) set_attribute(self, 'line_six', '', config) set_attribute(self, 'line_seven', '', config) set_attribute(self, 'line_eight', '', config) set_attribute(self, 'line_nine', '', config) set_attribute(self, 'line_ten', '', config) set_attribute(self, 'date_format', '"%m/%d/%y"', config) set_attribute(self, 'time_format', '"%H:%M:%S"', config) set_attribute(self, 'value_format', '"%14.3f"', config) set_attribute(self, 'max_value_length', 16, config, int)
def configure(self, config): Formatter.configure(self, config) set_attribute(self,'line_one', '"ACDIAG"\n', config) set_attribute(self,'line_two', '"Diagnostics"\n', config) set_attribute(self,'line_three', '"Average"\n\n\n', config) set_attribute(self,'line_four', 'begindata\n', config) set_attribute(self,'line_five', '', config) set_attribute(self,'line_six', '', config) set_attribute(self,'line_seven', '', config) set_attribute(self,'line_eight', '', config) set_attribute(self,'line_nine', '', config) set_attribute(self,'line_ten', '', config) set_attribute(self,'date_format', '"%m/%d/%y"', config) set_attribute(self,'time_format', '"%H:%M:%S"', config) set_attribute(self,'value_format', '"%14.3f"', config) set_attribute(self,'max_value_length', 16, config, int)
def configuration(self): config = Formatter.configuration(self) get_attribute(self, 'generated_by', config, str) get_attribute(self, 'generated_by_namespace', config, str) get_attribute(self, 'generated_by_type', config, str) get_attribute(self, 'generated_by_signature', config, str) # Not required according to Stephan Jones # get_attribute(self, 'configuration_template', config, str) # get_attribute(self, 'configuration_owner', config, str) # get_attribute(self, 'configuration_tag1', config, str) # get_attribute(self, 'configuration_tag2', config, str) # get_attribute(self, 'configuration_revision', config, str) # get_attribute(self, 'timezone_bias', config, str) # get_attribute(self, 'timezone_dst_bias', config, str) # get_attribute(self, 'timezone_dst_start', config, str) # get_attribute(self, 'timezone_dst_end', config, str) get_attribute(self, 'device_name', config, str) get_attribute(self, 'device_namespace', config, str) get_attribute(self, 'device_signature', config, str) get_attribute(self, 'device_type', config, str) get_attribute(self, 'device_configuration_template', config, str) get_attribute(self, 'device_configuration_owner', config, str) get_attribute(self, 'device_configuration_tag1', config, str) get_attribute(self, 'device_configuration_tag2', config, str) get_attribute(self, 'device_configuration_revision', config, str) # Now programmatically calculated: # get_attribute(self, 'device_timezone_bias', config, str) # get_attribute(self, 'device_timezone_dst_bias', config, str) # get_attribute(self, 'device_timezone_dst_start', config, str) # get_attribute(self, 'device_timezone_dst_end', config, str) get_attribute(self, 'data_recorder_id', config, str) get_attribute(self, 'data_recorder_label', config, str) get_attribute(self, 'data_recorder_handle', config, str) set_attribute(self, 'add_smtp_envelope', config, int) return config
def configuration(self): config = Formatter.configuration(self) get_attribute(self, 'timestamp_format', config) get_attribute(self, 'header_delimiter', config) get_attribute(self, 'data_delimiter', config) get_attribute(self, 'prefix', config) get_attribute(self, 'suffix', config) return config
def configuration(self): config = Formatter.configuration(self) get_attribute(self, 'timestamp_format', config) get_attribute(self,'header_delimiter',config) get_attribute(self,'data_delimiter',config) get_attribute(self,'prefix',config) get_attribute(self,'suffix',config) return config
def configure(self, config): Formatter.configure(self, config) set_attribute(self, 'timestamp_format', '%m/%d/%Y %I:%M:%S %p', config) set_attribute(self, 'info', '', config) set_attribute(self, 'pretty_format',0,config,as_boolean) set_attribute(self, 'prefix', 'do_method=notify&cdvalues=', config) set_attribute(self, 'suffix', '', config) set_attribute(self, 'station_code', '4', config) set_attribute(self, 'time_base', REQUIRED, config) set_attribute(self, 'status1', '', config) set_attribute(self, 'status2', '', config) set_attribute(self, 'status3', '', config) set_attribute(self, 'status4', '', config) set_attribute(self, 'status5', '', config) set_attribute(self, 'status6', '', config) set_attribute(self, 'status7', '', config) set_attribute(self, 'status8', '', config)
def configuration(self): config = Formatter.configuration(self) get_attribute(self, "customer_id", config) get_attribute(self, "sender_id", config) get_attribute(self, "receiver_id", config) get_attribute(self, "commodity", config) get_attribute(self, "timestamp_format", config) get_attribute(self, "max_count", config, str) return config
def configuration(self): config = Formatter.configuration(self) get_attribute(self, 'customer_id', config) get_attribute(self, 'sender_id', config) get_attribute(self, 'receiver_id', config) get_attribute(self, 'commodity', config) get_attribute(self, 'timestamp_format', config) get_attribute(self, 'max_count', config, str) return config
def configuration(self): config = Formatter.configuration(self) get_attribute(self, 'debug_lvl', config, int) get_attribute(self, 'timestamp_format', config) get_attribute(self, 'pretty_format',config,str) get_attribute(self, 'location_info',config) get_attribute(self, 'location_key',config) get_attribute(self, 'panel_info',config) get_attribute(self, 'panel_key',config) get_attribute(self, 'capture_period',config,float) # capture period preceding data transmission time (hrs) get_attribute(self, 'exception_log_url',config) return config
def configuration(self): config = Formatter.configuration(self) get_attribute(self, 'line_one', config) get_attribute(self, 'line_two', config) get_attribute(self, 'line_three', config) get_attribute(self, 'line_four', config) get_attribute(self, 'line_five', config) get_attribute(self, 'line_six', config) get_attribute(self, 'line_seven', config) get_attribute(self, 'line_eight', config) get_attribute(self, 'line_nine', config) get_attribute(self, 'line_ten', config) get_attribute(self, 'date_format', config) get_attribute(self,'time_format',config) get_attribute(self,'value_format',config) get_attribute(self,'max_value_length',config, str) return config
def configuration(self): config = Formatter.configuration(self) get_attribute(self, 'line_one', config) get_attribute(self, 'line_two', config) get_attribute(self, 'line_three', config) get_attribute(self, 'line_four', config) get_attribute(self, 'line_five', config) get_attribute(self, 'line_six', config) get_attribute(self, 'line_seven', config) get_attribute(self, 'line_eight', config) get_attribute(self, 'line_nine', config) get_attribute(self, 'line_ten', config) get_attribute(self, 'date_format', config) get_attribute(self, 'time_format', config) get_attribute(self, 'value_format', config) get_attribute(self, 'max_value_length', config, str) return config
def configuration(self): config = Formatter.configuration(self) get_attribute(self, 'timestamp_format', config) get_attribute(self, 'info', config) get_attribute(self, 'pretty_format',config,str) get_attribute(self, 'prefix',config,str) get_attribute(self, 'suffix',config,str) get_attribute(self, 'station_code', config) get_attribute(self, 'time_base', config) get_attribute(self, 'status1', config) get_attribute(self, 'status2', config) get_attribute(self, 'status3', config) get_attribute(self, 'status4', config) get_attribute(self, 'status5', config) get_attribute(self, 'status6', config) get_attribute(self, 'status7', config) get_attribute(self, 'status8', config) return config
def configuration(self): config = Formatter.configuration(self) get_attribute(self, 'prefix', config) get_attribute(self, 'suffix', config) return config
def configure(self, config): Formatter.configure(self, config) set_attribute(self, 'prefix', '', config) set_attribute(self, 'suffix', '', config) return
def configure(self, config): Formatter.configure(self, config) self.period = self.parent.parent.parent.period set_attribute(self, 'customer_name', REQUIRED, config) set_attribute(self, 'account_name', REQUIRED, config) set_attribute(self, 'commodity', 'E', config)
def configuration(self): config = Formatter.configuration(self) get_attribute(self, 'timestamp_format', config) get_attribute(self, 'info', config) get_attribute(self, 'pretty_format',config,str) return config
def configure(self, config): Formatter.configure(self, config) # # Usually hardcoded/calculated at runtime. # set_attribute(self, 'generated_by', '', config, stripped_str) if not self.generated_by: self.generated_by = 'Mediator MMA File v1.x' set_attribute(self, 'generated_by_namespace', '', config, stripped_str) if not self.generated_by_namespace: self.generated_by_namespace = 'Mediator Generated File' set_attribute(self, 'device_namespace', '', config, stripped_str) if not self.device_namespace: self.device_namespace = 'IONEnterprise' set_attribute(self, 'device_type', '', config, stripped_str) if not self.device_type: self.device_type = 'presumed downstream device' # Not required according to Stephan Jones # set_attribute(self, 'timezone_bias', '', config, stripped_str) # if not self.timezone_bias: # self.timezone_bias = mma_timezone.bias_text() # set_attribute(self, 'timezone_dst_bias', '', config, stripped_str) # if not self.timezone_dst_bias: # self.timezone_dst_bias = mma_timezone.dst_bias_text() # set_attribute(self, 'timezone_dst_start', '', config, stripped_str) # if not self.timezone_dst_start: # self.timezone_dst_start = mma_timezone.dst_start_text() # set_attribute(self, 'timezone_dst_end', '', config, str) # if not self.timezone_dst_end: # self.timezone_dst_end = mma_timezone.dst_end_text() # Now programmatically calculated: # set_attribute(self, 'device_timezone_bias', '', config, stripped_str) # if not self.device_timezone_bias: # self.device_timezone_bias = mma_timezone.bias_text() # set_attribute(self, 'device_timezone_dst_bias', '', # config, stripped_str) # if not self.device_timezone_dst_bias: # self.device_timezone_dst_bias = mma_timezone.dst_bias_text() # set_attribute(self, 'device_timezone_dst_start', '', # config, stripped_str) # if not self.device_timezone_dst_start: # self.device_timezone_dst_start = mma_timezone.dst_start_text() # set_attribute(self, 'device_timezone_dst_end', '', config, str) # if not self.device_timezone_dst_end: # self.device_timezone_dst_end = mma_timezone.dst_end_text() # # Optional # set_attribute(self, 'generated_by_type', '', config, stripped_str) set_attribute(self, 'generated_by_signature', '', config, stripped_str) set_attribute(self, 'device_signature', '', config, str) set_attribute(self, 'device_configuration_template', '', config, str) set_attribute(self, 'device_configuration_owner', '', config, str) set_attribute(self, 'device_configuration_tag1', '', config, str) set_attribute(self, 'device_configuration_tag2', '', config, str) set_attribute(self, 'device_configuration_revision', '', config, str) set_attribute(self, 'data_recorder_handle', '', config, str) set_attribute(self, 'add_smtp_envelope', '1', config, int) # Not required according to Stephan Jones # set_attribute(self, 'configuration_template', 'none', config, str) # set_attribute(self, 'configuration_owner', 'unknown', config, str) # set_attribute(self, 'configuration_tag1', 'n/a', config, str) # set_attribute(self, 'configuration_tag2', 'n/a', config, str) # set_attribute(self, 'configuration_revision', '2.0', config, str) # # REQUIRED # set_attribute(self, 'device_name', REQUIRED, config, str) set_attribute(self, 'data_recorder_id', REQUIRED, config, str) set_attribute(self, 'data_recorder_label', REQUIRED, config, str) return
def configuration(self): config = Formatter.configuration(self) get_attribute(self, 'customer_name', config) get_attribute(self, 'account_name', config) get_attribute(self, 'commodity', config) return config
def configuration(self): config = Formatter.configuration(self) get_attribute(self, 'timestamp_format', config) return config
def configuration(self): config = Formatter.configuration(self) get_attribute(self, "prefix", config) get_attribute(self, "suffix", config) return config
def start(self): content = 'application/x-www-form-urlencoded' self.parent.transporter.content_type = content Formatter.start(self)
def configure(self, config): Formatter.configure(self, config) set_attribute(self, "prefix", "", config) set_attribute(self, "suffix", "", config) return
def configure(self, config): Formatter.configure(self, config) set_attribute(self, 'timestamp_format', '%Y-%m-%dT%H:%M:%S', config) set_attribute(self, 'info', '', config) set_attribute(self, 'pretty_format', 0, config, as_boolean)
def configure(self, config): Formatter.configure(self, config) set_attribute(self, 'timestamp_format', '%Y-%m-%dT%H:%M:%S', config) set_attribute(self, 'info', '', config) set_attribute(self, 'pretty_format',0,config,as_boolean)
def configuration(self): config = Formatter.configuration(self) get_attribute(self, 'timestamp_format', config) get_attribute(self, 'info', config) get_attribute(self, 'pretty_format', config, str) return config
def configure(self, config): Formatter.configure(self, config) set_attribute(self, 'timestamp_format', '%Y-%m-%dT%H:%M:%S', config)
def configure(self, config): Formatter.configure(self, config) set_attribute(self, 'timestamp_format', '%Y/%m/%d %H:%M:%S', config)