def __init__(self, acidev): self.acidev = acidev self.acidev.add_packet_recipient(self.__event_handler) self.logger = configure_logger(self.acidev.device_name) self.send = self.acidev.write_aci_cmd self._event_filter = [] self._event_filter_enabled = True self._other_events = [] # Increment the local unicast address range # for the next Interactive instance self.local_unicast_adress_start = ( self.DEFAULT_LOCAL_UNICAST_ADRESS_START) Interactive.DEFAULT_LOCAL_UNICAST_ADRESS_START += ( self.CONFIG.ACCESS_ELEMENT_COUNT) self.access = access.Access(self, self.local_unicast_adress_start, self.CONFIG.ACCESS_ELEMENT_COUNT) self.model_add = self.access.model_add
def __init__(self, acidev): self.acidev = acidev self._event_filter = [] self._event_filter_enabled = True self._other_events = [] self.logger = configure_logger(self.acidev.device_name) self.send = self.acidev.write_aci_cmd # Increment the local unicast address range # for the next Interactive instance self.local_unicast_address_start = ( self.DEFAULT_LOCAL_UNICAST_ADDRESS_START) Interactive.DEFAULT_LOCAL_UNICAST_ADDRESS_START += ( self.CONFIG.ACCESS_ELEMENT_COUNT) self.access = access.Access(self, self.local_unicast_address_start, self.CONFIG.ACCESS_ELEMENT_COUNT) self.model_add = self.access.model_add # Adding the packet recipient will start dynamic behavior. # We add it after all the member variables has been defined self.acidev.add_packet_recipient(self.__event_handler)