ekmmeters.py
def initWorkFormat(self):
        """ Initialize :class:`~ekmmeters.SerialBlock` for V3 read. """
        self.m_blk_a["reserved_10"] = [1, FieldType.Hex, ScaleType.No, "", 0, False, False]
        self.m_blk_a[Field.Model] = [2, FieldType.Hex, ScaleType.No, "", 0, False, True]
        self.m_blk_a[Field.Firmware] = [1, FieldType.Hex, ScaleType.No, "", 0, False, True]
        self.m_blk_a[Field.Meter_Address] = [12, FieldType.String, ScaleType.No, "", 0, False, True]
        self.m_blk_a[Field.kWh_Tot] = [8, FieldType.Float, ScaleType.KWH, "", 0, False, False]
        self.m_blk_a[Field.kWh_Tariff_1] = [8, FieldType.Float, ScaleType.KWH, "", 0, False, False]
        self.m_blk_a[Field.kWh_Tariff_2] = [8, FieldType.Float, ScaleType.KWH, "", 0, False, False]
        self.m_blk_a[Field.kWh_Tariff_3] = [8, FieldType.Float, ScaleType.KWH, "", 0, False, False]
        self.m_blk_a[Field.kWh_Tariff_4] = [8, FieldType.Float, ScaleType.KWH, "", 0, False, False]
        self.m_blk_a[Field.Rev_kWh_Tot] = [8, FieldType.Float, ScaleType.KWH, "", 0, False, False]
        self.m_blk_a[Field.Rev_kWh_Tariff_1] = [8, FieldType.Float, ScaleType.KWH, "", 0, False, False]
        self.m_blk_a[Field.Rev_kWh_Tariff_2] = [8, FieldType.Float, ScaleType.KWH, "", 0, False, False]
        self.m_blk_a[Field.Rev_kWh_Tariff_3] = [8, FieldType.Float, ScaleType.KWH, "", 0, False, False]
        self.m_blk_a[Field.Rev_kWh_Tariff_4] = [8, FieldType.Float, ScaleType.KWH, "", 0, False, False]
        self.m_blk_a[Field.RMS_Volts_Ln_1] = [4, FieldType.Float, ScaleType.Div10, "", 0, False, False]
        self.m_blk_a[Field.RMS_Volts_Ln_2] = [4, FieldType.Float, ScaleType.Div10, "", 0, False, False]
        self.m_blk_a[Field.RMS_Volts_Ln_3] = [4, FieldType.Float, ScaleType.Div10, "", 0, False, False]
        self.m_blk_a[Field.Amps_Ln_1] = [5, FieldType.Float, ScaleType.Div10, "", 0, False, False]
        self.m_blk_a[Field.Amps_Ln_2] = [5, FieldType.Float, ScaleType.Div10, "", 0, False, False]
        self.m_blk_a[Field.Amps_Ln_3] = [5, FieldType.Float, ScaleType.Div10, "", 0, False, False]
        self.m_blk_a[Field.RMS_Watts_Ln_1] = [7, FieldType.Int, ScaleType.No, "", 0, False, False]
        self.m_blk_a[Field.RMS_Watts_Ln_2] = [7, FieldType.Int, ScaleType.No, "", 0, False, False]
        self.m_blk_a[Field.RMS_Watts_Ln_3] = [7, FieldType.Int, ScaleType.No, "", 0, False, False]
        self.m_blk_a[Field.RMS_Watts_Tot] = [7, FieldType.Int, ScaleType.No, "", 0, False, False]
        self.m_blk_a[Field.Cos_Theta_Ln_1] = [4, FieldType.PowerFactor, ScaleType.No, "", 0, False, False]
        self.m_blk_a[Field.Cos_Theta_Ln_2] = [4, FieldType.PowerFactor, ScaleType.No, "", 0, False, False]
        self.m_blk_a[Field.Cos_Theta_Ln_3] = [4, FieldType.PowerFactor, ScaleType.No, "", 0, False, False]
        self.m_blk_a[Field.Max_Demand] = [8, FieldType.Float, ScaleType.KWH, "", 0, False, True]
        self.m_blk_a[Field.Max_Demand_Period] = [1, FieldType.Int, ScaleType.No, "", 0, False, True]
        self.m_blk_a[Field.Meter_Time] = [14, FieldType.String, ScaleType.No, "", 0, False, False]
        self.m_blk_a[Field.CT_Ratio] = [4, FieldType.Int, ScaleType.No, "", 0, False, True]
        self.m_blk_a[Field.Pulse_Cnt_1] = [8, FieldType.Int, ScaleType.No, "", 0, False, False]
        self.m_blk_a[Field.Pulse_Cnt_2] = [8, FieldType.Int, ScaleType.No, "", 0, False, False]
        self.m_blk_a[Field.Pulse_Cnt_3] = [8, FieldType.Int, ScaleType.No, "", 0, False, False]
        self.m_blk_a[Field.Pulse_Ratio_1] = [4, FieldType.Int, ScaleType.No, "", 0, False, True]
        self.m_blk_a[Field.Pulse_Ratio_2] = [4, FieldType.Int, ScaleType.No, "", 0, False, True]
        self.m_blk_a[Field.Pulse_Ratio_3] = [4, FieldType.Int, ScaleType.No, "", 0, False, True]
        self.m_blk_a[Field.State_Inputs] = [3, FieldType.Int, ScaleType.No, "", 0, False, True]
        self.m_blk_a["reserved_11"] = [19, FieldType.Hex, ScaleType.No, "", 0, False, False]
        self.m_blk_a[Field.Status_A] = [1, FieldType.Hex, ScaleType.No, "", 0, False, False]
        self.m_blk_a["reserved_12"] = [4, FieldType.Hex, ScaleType.No, "", 0, False, False]
        self.m_blk_a["crc16"] = [2, FieldType.Hex, ScaleType.No, "", 0, False, False]
        self.m_blk_a[Field.Power_Factor_Ln_1] = [4, FieldType.Int, ScaleType.No, "0", 0, True, False]
        self.m_blk_a[Field.Power_Factor_Ln_2] = [4, FieldType.Int, ScaleType.No, "0", 0, True, False]
        self.m_blk_a[Field.Power_Factor_Ln_3] = [4, FieldType.Int, ScaleType.No, "0", 0, True, False]
def initWorkFormat(self):
        """ Initialize :class:`~ekmmeters.SerialBlock` for V3 read. """
        self.m_blk_a["reserved_10"] = [1, FieldType.Hex, ScaleType.No, "", 0, False, False]
        self.m_blk_a[Field.Model] = [2, FieldType.Hex, ScaleType.No, "", 0, False, True]
        self.m_blk_a[Field.Firmware] = [1, FieldType.Hex, ScaleType.No, "", 0, False, True]
        self.m_blk_a[Field.Meter_Address] = [12, FieldType.String, ScaleType.No, "", 0, False, True]
        self.m_blk_a[Field.kWh_Tot] = [8, FieldType.Float, ScaleType.KWH, "", 0, False, False]
        self.m_blk_a[Field.kWh_Tariff_1] = [8, FieldType.Float, ScaleType.KWH, "", 0, False, False]
        self.m_blk_a[Field.kWh_Tariff_2] = [8, FieldType.Float, ScaleType.KWH, "", 0, False, False]
        self.m_blk_a[Field.kWh_Tariff_3] = [8, FieldType.Float, ScaleType.KWH, "", 0, False, False]
        self.m_blk_a[Field.kWh_Tariff_4] = [8, FieldType.Float, ScaleType.KWH, "", 0, False, False]
        self.m_blk_a[Field.Rev_kWh_Tot] = [8, FieldType.Float, ScaleType.KWH, "", 0, False, False]
        self.m_blk_a[Field.Rev_kWh_Tariff_1] = [8, FieldType.Float, ScaleType.KWH, "", 0, False, False]
        self.m_blk_a[Field.Rev_kWh_Tariff_2] = [8, FieldType.Float, ScaleType.KWH, "", 0, False, False]
        self.m_blk_a[Field.Rev_kWh_Tariff_3] = [8, FieldType.Float, ScaleType.KWH, "", 0, False, False]
        self.m_blk_a[Field.Rev_kWh_Tariff_4] = [8, FieldType.Float, ScaleType.KWH, "", 0, False, False]
        self.m_blk_a[Field.RMS_Volts_Ln_1] = [4, FieldType.Float, ScaleType.Div10, "", 0, False, False]
        self.m_blk_a[Field.RMS_Volts_Ln_2] = [4, FieldType.Float, ScaleType.Div10, "", 0, False, False]
        self.m_blk_a[Field.RMS_Volts_Ln_3] = [4, FieldType.Float, ScaleType.Div10, "", 0, False, False]
        self.m_blk_a[Field.Amps_Ln_1] = [5, FieldType.Float, ScaleType.Div10, "", 0, False, False]
        self.m_blk_a[Field.Amps_Ln_2] = [5, FieldType.Float, ScaleType.Div10, "", 0, False, False]
        self.m_blk_a[Field.Amps_Ln_3] = [5, FieldType.Float, ScaleType.Div10, "", 0, False, False]
        self.m_blk_a[Field.RMS_Watts_Ln_1] = [7, FieldType.Int, ScaleType.No, "", 0, False, False]
        self.m_blk_a[Field.RMS_Watts_Ln_2] = [7, FieldType.Int, ScaleType.No, "", 0, False, False]
        self.m_blk_a[Field.RMS_Watts_Ln_3] = [7, FieldType.Int, ScaleType.No, "", 0, False, False]
        self.m_blk_a[Field.RMS_Watts_Tot] = [7, FieldType.Int, ScaleType.No, "", 0, False, False]
        self.m_blk_a[Field.Cos_Theta_Ln_1] = [4, FieldType.PowerFactor, ScaleType.No, "", 0, False, False]
        self.m_blk_a[Field.Cos_Theta_Ln_2] = [4, FieldType.PowerFactor, ScaleType.No, "", 0, False, False]
        self.m_blk_a[Field.Cos_Theta_Ln_3] = [4, FieldType.PowerFactor, ScaleType.No, "", 0, False, False]
        self.m_blk_a[Field.Max_Demand] = [8, FieldType.Float, ScaleType.KWH, "", 0, False, True]
        self.m_blk_a[Field.Max_Demand_Period] = [1, FieldType.Int, ScaleType.No, "", 0, False, True]
        self.m_blk_a[Field.Meter_Time] = [14, FieldType.String, ScaleType.No, "", 0, False, False]
        self.m_blk_a[Field.CT_Ratio] = [4, FieldType.Int, ScaleType.No, "", 0, False, True]
        self.m_blk_a[Field.Pulse_Cnt_1] = [8, FieldType.Int, ScaleType.No, "", 0, False, False]
        self.m_blk_a[Field.Pulse_Cnt_2] = [8, FieldType.Int, ScaleType.No, "", 0, False, False]
        self.m_blk_a[Field.Pulse_Cnt_3] = [8, FieldType.Int, ScaleType.No, "", 0, False, False]
        self.m_blk_a[Field.Pulse_Ratio_1] = [4, FieldType.Int, ScaleType.No, "", 0, False, True]
        self.m_blk_a[Field.Pulse_Ratio_2] = [4, FieldType.Int, ScaleType.No, "", 0, False, True]
        self.m_blk_a[Field.Pulse_Ratio_3] = [4, FieldType.Int, ScaleType.No, "", 0, False, True]
        self.m_blk_a[Field.State_Inputs] = [3, FieldType.Int, ScaleType.No, "", 0, False, True]
        self.m_blk_a["reserved_11"] = [19, FieldType.Hex, ScaleType.No, "", 0, False, False]
        self.m_blk_a[Field.Status_A] = [1, FieldType.Hex, ScaleType.No, "", 0, False, False]
        self.m_blk_a["reserved_12"] = [4, FieldType.Hex, ScaleType.No, "", 0, False, False]
        self.m_blk_a["crc16"] = [2, FieldType.Hex, ScaleType.No, "", 0, False, False]
        self.m_blk_a[Field.Power_Factor_Ln_1] = [4, FieldType.Int, ScaleType.No, "0", 0, True, False]
        self.m_blk_a[Field.Power_Factor_Ln_2] = [4, FieldType.Int, ScaleType.No, "0", 0, True, False]
        self.m_blk_a[Field.Power_Factor_Ln_3] = [4, FieldType.Int, ScaleType.No, "0", 0, True, False]
def initWorkFormat ( self ) : self . m_blk_a [ "reserved_10" ] = [ 1 , FieldType . Hex , ScaleType . No , "" , 0 , False , False ] self . m_blk_a [ Field . Model ] = [ 2 , FieldType . Hex , ScaleType . No , "" , 0 , False , True ] self . m_blk_a [ Field . Firmware ] = [ 1 , FieldType . Hex , ScaleType . No , "" , 0 , False , True ] self . m_blk_a [ Field . Meter_Address ] = [ 12 , FieldType . String , ScaleType . No , "" , 0 , False , True ] self . m_blk_a [ Field . kWh_Tot ] = [ 8 , FieldType . Float , ScaleType . KWH , "" , 0 , False , False ] self . m_blk_a [ Field . kWh_Tariff_1 ] = [ 8 , FieldType . Float , ScaleType . KWH , "" , 0 , False , False ] self . m_blk_a [ Field . kWh_Tariff_2 ] = [ 8 , FieldType . Float , ScaleType . KWH , "" , 0 , False , False ] self . m_blk_a [ Field . kWh_Tariff_3 ] = [ 8 , FieldType . Float , ScaleType . KWH , "" , 0 , False , False ] self . m_blk_a [ Field . kWh_Tariff_4 ] = [ 8 , FieldType . Float , ScaleType . KWH , "" , 0 , False , False ] self . m_blk_a [ Field . Rev_kWh_Tot ] = [ 8 , FieldType . Float , ScaleType . KWH , "" , 0 , False , False ] self . m_blk_a [ Field . Rev_kWh_Tariff_1 ] = [ 8 , FieldType . Float , ScaleType . KWH , "" , 0 , False , False ] self . m_blk_a [ Field . Rev_kWh_Tariff_2 ] = [ 8 , FieldType . Float , ScaleType . KWH , "" , 0 , False , False ] self . m_blk_a [ Field . Rev_kWh_Tariff_3 ] = [ 8 , FieldType . Float , ScaleType . KWH , "" , 0 , False , False ] self . m_blk_a [ Field . Rev_kWh_Tariff_4 ] = [ 8 , FieldType . Float , ScaleType . KWH , "" , 0 , False , False ] self . m_blk_a [ Field . RMS_Volts_Ln_1 ] = [ 4 , FieldType . Float , ScaleType . Div10 , "" , 0 , False , False ] self . m_blk_a [ Field . RMS_Volts_Ln_2 ] = [ 4 , FieldType . Float , ScaleType . Div10 , "" , 0 , False , False ] self . m_blk_a [ Field . RMS_Volts_Ln_3 ] = [ 4 , FieldType . Float , ScaleType . Div10 , "" , 0 , False , False ] self . m_blk_a [ Field . Amps_Ln_1 ] = [ 5 , FieldType . Float , ScaleType . Div10 , "" , 0 , False , False ] self . m_blk_a [ Field . Amps_Ln_2 ] = [ 5 , FieldType . Float , ScaleType . Div10 , "" , 0 , False , False ] self . m_blk_a [ Field . Amps_Ln_3 ] = [ 5 , FieldType . Float , ScaleType . Div10 , "" , 0 , False , False ] self . m_blk_a [ Field . RMS_Watts_Ln_1 ] = [ 7 , FieldType . Int , ScaleType . No , "" , 0 , False , False ] self . m_blk_a [ Field . RMS_Watts_Ln_2 ] = [ 7 , FieldType . Int , ScaleType . No , "" , 0 , False , False ] self . m_blk_a [ Field . RMS_Watts_Ln_3 ] = [ 7 , FieldType . Int , ScaleType . No , "" , 0 , False , False ] self . m_blk_a [ Field . RMS_Watts_Tot ] = [ 7 , FieldType . Int , ScaleType . No , "" , 0 , False , False ] self . m_blk_a [ Field . Cos_Theta_Ln_1 ] = [ 4 , FieldType . PowerFactor , ScaleType . No , "" , 0 , False , False ] self . m_blk_a [ Field . Cos_Theta_Ln_2 ] = [ 4 , FieldType . PowerFactor , ScaleType . No , "" , 0 , False , False ] self . m_blk_a [ Field . Cos_Theta_Ln_3 ] = [ 4 , FieldType . PowerFactor , ScaleType . No , "" , 0 , False , False ] self . m_blk_a [ Field . Max_Demand ] = [ 8 , FieldType . Float , ScaleType . KWH , "" , 0 , False , True ] self . m_blk_a [ Field . Max_Demand_Period ] = [ 1 , FieldType . Int , ScaleType . No , "" , 0 , False , True ] self . m_blk_a [ Field . Meter_Time ] = [ 14 , FieldType . String , ScaleType . No , "" , 0 , False , False ] self . m_blk_a [ Field . CT_Ratio ] = [ 4 , FieldType . Int , ScaleType . No , "" , 0 , False , True ] self . m_blk_a [ Field . Pulse_Cnt_1 ] = [ 8 , FieldType . Int , ScaleType . No , "" , 0 , False , False ] self . m_blk_a [ Field . Pulse_Cnt_2 ] = [ 8 , FieldType . Int , ScaleType . No , "" , 0 , False , False ] self . m_blk_a [ Field . Pulse_Cnt_3 ] = [ 8 , FieldType . Int , ScaleType . No , "" , 0 , False , False ] self . m_blk_a [ Field . Pulse_Ratio_1 ] = [ 4 , FieldType . Int , ScaleType . No , "" , 0 , False , True ] self . m_blk_a [ Field . Pulse_Ratio_2 ] = [ 4 , FieldType . Int , ScaleType . No , "" , 0 , False , True ] self . m_blk_a [ Field . Pulse_Ratio_3 ] = [ 4 , FieldType . Int , ScaleType . No , "" , 0 , False , True ] self . m_blk_a [ Field . State_Inputs ] = [ 3 , FieldType . Int , ScaleType . No , "" , 0 , False , True ] self . m_blk_a [ "reserved_11" ] = [ 19 , FieldType . Hex , ScaleType . No , "" , 0 , False , False ] self . m_blk_a [ Field . Status_A ] = [ 1 , FieldType . Hex , ScaleType . No , "" , 0 , False , False ] self . m_blk_a [ "reserved_12" ] = [ 4 , FieldType . Hex , ScaleType . No , "" , 0 , False , False ] self . m_blk_a [ "crc16" ] = [ 2 , FieldType . Hex , ScaleType . No , "" , 0 , False , False ] self . m_blk_a [ Field . Power_Factor_Ln_1 ] = [ 4 , FieldType . Int , ScaleType . No , "0" , 0 , True , False ] self . m_blk_a [ Field . Power_Factor_Ln_2 ] = [ 4 , FieldType . Int , ScaleType . No , "0" , 0 , True , False ] self . m_blk_a [ Field . Power_Factor_Ln_3 ] = [ 4 , FieldType . Int , ScaleType . No , "0" , 0 , True , False ]
Initialize :class:`~ekmmeters.SerialBlock` for V3 read.
Initialize : class : ~ekmmeters . SerialBlock for V3 read .