コード例 #1
0
 def __init__(self, node, data):
     CommandClass.__init__(self, node, data)
     if 'sensorMaps' in data: self.sensorMaps = data['sensorMaps']
     else: self.sensorMaps = []
     self._log.write(
         LogLevel.Detail, self,
         "SensorMaps = {0}, With DATA : {1}".format(self.sensorMaps, data))
コード例 #2
0
 def __init__(self, node, data):
     CommandClass.__init__(self, node, data)
     self.m_numGroups = data['associations']['num_groups']
     self.groups = data['associations']['groups']
     # Add multiInstance if necessary
     for group in self.groups:
         for node in group['nodes']:
             if 'instance' not in node: node['instance'] = 0x00
コード例 #3
0
 def __init__(self, node, data):
     CommandClass.__init__(self, node, data)
     self.runChange = False
     self.extraParams = {
         0: {
             'switchtype1': {
                 'name': 'Switch type 1',
                 'values': c_switchLabel
             },
             'switchtype2': {
                 'name': 'Switch type 2',
                 'values': c_switchLabel
             }
         },
         1: {
             'switchtype1': 1,
             'switchtype2': 2
         }
     }  # set instance 1 for debug and defaults value
コード例 #4
0
    def __init__(self, node, data):
        import random

        CommandClass.__init__(self, node, data)
        if self._node.emulData:
            self.timeoutWakeUp = self._node.emulData['timeoutwakeup']
            self.WakeupDuration = self._node.emulData['wakeupduration']
        else:
            self.timeoutWakeUp = random.randint(30, 120)
            self.WakeupDuration = random.randint(10, 30)
        self._running = False
        self._lastTime = time.time()

        self.m_mutex = None
        self.m_pollRequired = False
        self.m_notification = False
        find, self.m_awake = self._node._manager._options.GetOptionAsBool(
            "AssumeAwake")
        if not find: self.m_awake = True
        self.m_pendingQueue = []
        self.SetStaticRequest(self.StaticRequest_Values)
        threading.Thread(None, self.handleWakeCycle,
                         "th_handleWakeCycle_node_{0}.".format(self.nodeId),
                         (), {}).start()
コード例 #5
0
 def __init__(self, node, data):
     CommandClass.__init__(self, node, data)
コード例 #6
0
 def __init__(self, node, data):
     CommandClass.__init__(self, node, data)
     self.pointBase = 1 if 'base' not in data else int(data['base'])
コード例 #7
0
 def __init__(self, node, data):
     CommandClass.__init__(self, node, data)
     self.meterType = {}
     self._lastTime = time.time()