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, seqnr = None):
PlugwiseResponse.__init__(self, seqnr)
self.datetime = DateTime()
self.last_logaddr = LogAddr(0, length=8)
self.relay_state = Int(0, length=2)
self.hz = Int(0, length=2)
self.hw_ver = String(None, length=12)
self.fw_ver = UnixTimestamp(0)
self.type = Int(0, length=2)
self.params += [
self.datetime,
self.last_logaddr, self.relay_state,
self.hz, self.hw_ver, self.fw_ver, self.type
]
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, 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, mac, dt):
PlugwiseRequest.__init__(self, mac)
passed_days = dt.day - 1
month_minutes = (passed_days*24*60)+(dt.hour*60)+dt.minute
d = DateTime(dt.year, dt.month, month_minutes)
t = Time(dt.hour, dt.minute, dt.second)
day_of_week = Int(dt.weekday() + 1, 2)
# FIXME: use LogAddr instead
log_buf_addr = String('FFFFFFFF', 8)
self.args += [d, log_buf_addr, t, day_of_week]