def add_value(self, value_obj): logger.debug("Node:add_value: ValueID:%s" % value_obj.value_id) self.__values.insert(0, value_obj) notification = Notification( Notification.Type_ValueAdded ) notification.node_id = self._node_id notification.network_id = self._network_id notification.value_id = value_obj.value_id self.driver.queue_notification( notification )
def update(self, value): self._value = str(value) notification = Notification( Notification.Type_ValueChanged ) notification.node_id = self.__node_id notification.network_id = self.__network_id notification.value_id = self.__id from has.manager.manager import Manager driver = Manager.get_driver( self.__network_id ) driver.queue_notification( notification )