Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def __init__(self, mac, val):
PlugwiseRequest.__init__(self, mac)
self.args.append(SInt(val, length=4))
def __init__(self, seqnr = None):
PlugwiseResponse.__init__(self, seqnr)
self.logdate1 = DateTime()
self.pulses1 = SInt(0, 8)
self.logdate2 = DateTime()
self.pulses2 = SInt(0, 8)
self.logdate3 = DateTime()
self.pulses3 = SInt(0, 8)
self.logdate4 = DateTime()
self.pulses4 = SInt(0, 8)
self.logaddr = LogAddr(0, length=8)
self.params += [self.logdate1, self.pulses1, self.logdate2, self.pulses2,
self.logdate3, self.pulses3, self.logdate4, self.pulses4, self.logaddr
]
def __init__(self, seqnr = None):
PlugwiseResponse.__init__(self, seqnr)
self.logdate1 = DateTime()
self.pulses1 = SInt(0, 8)
self.logdate2 = DateTime()
self.pulses2 = SInt(0, 8)
self.logdate3 = DateTime()
self.pulses3 = SInt(0, 8)
self.logdate4 = DateTime()
self.pulses4 = SInt(0, 8)
self.logaddr = LogAddr(0, length=8)
self.params += [self.logdate1, self.pulses1, self.logdate2, self.pulses2,
self.logdate3, self.pulses3, self.logdate4, self.pulses4, self.logaddr
]
def __init__(self, idx, schedule_chunk):
# PrepareScedule doesn't send MAC address
PlugwiseRequest.__init__(self, '')
self.args.append(Int(16*idx, length=4))
for i in range(0,8):
self.args.append(SInt(schedule_chunk[i], length=4))
def __init__(self, seqnr = None):
PlugwiseResponse.__init__(self, seqnr)
self.logdate1 = DateTime()
self.pulses1 = SInt(0, 8)
self.logdate2 = DateTime()
self.pulses2 = SInt(0, 8)
self.logdate3 = DateTime()
self.pulses3 = SInt(0, 8)
self.logdate4 = DateTime()
self.pulses4 = SInt(0, 8)
self.logaddr = LogAddr(0, length=8)
self.params += [self.logdate1, self.pulses1, self.logdate2, self.pulses2,
self.logdate3, self.pulses3, self.logdate4, self.pulses4, self.logaddr
]
def __init__(self, seqnr = None):
PlugwiseResponse.__init__(self, seqnr)
self.pulse_1s = SInt(0, 4)
self.pulse_8s = SInt(0, 4)
self.pulse_hour = Int(0, 8)
self.pulse_prod_hour = SInt(0, 8)
self.unknown2 = Int(0, 4)
self.params += [self.pulse_1s, self.pulse_8s, self.pulse_hour, self.pulse_prod_hour, self.unknown2]
def __init__(self, seqnr = None):
PlugwiseResponse.__init__(self, seqnr)
self.logdate1 = DateTime()
self.pulses1 = SInt(0, 8)
self.logdate2 = DateTime()
self.pulses2 = SInt(0, 8)
self.logdate3 = DateTime()
self.pulses3 = SInt(0, 8)
self.logdate4 = DateTime()
self.pulses4 = SInt(0, 8)
self.logaddr = LogAddr(0, length=8)
self.params += [self.logdate1, self.pulses1, self.logdate2, self.pulses2,
self.logdate3, self.pulses3, self.logdate4, self.pulses4, self.logaddr
]
def __init__(self, seqnr = None):
PlugwiseResponse.__init__(self, seqnr)
self.pulse_1s = SInt(0, 4)
self.pulse_8s = SInt(0, 4)
self.pulse_hour = Int(0, 8)
self.pulse_prod_hour = SInt(0, 8)
self.unknown2 = Int(0, 4)
self.params += [self.pulse_1s, self.pulse_8s, self.pulse_hour, self.pulse_prod_hour, self.unknown2]
def __init__(self, seqnr = None):
PlugwiseResponse.__init__(self, seqnr)
self.pulse_1s = SInt(0, 4)
self.pulse_8s = SInt(0, 4)
self.pulse_hour = Int(0, 8)
self.pulse_prod_hour = SInt(0, 8)
self.unknown2 = Int(0, 4)
self.params += [self.pulse_1s, self.pulse_8s, self.pulse_hour, self.pulse_prod_hour, self.unknown2]