Пример #1
0
		def on_get_property():
			"""A callback which will forward a 'get' from SHET to the device."""
			self.device_get_property(prop_id)
			
			deferred_return = Deferred()
			
			# Inject the return type so that the return-handler knows how to read it
			deferred_return.return_type = contained_type
			
			self._deferred_returns.append(deferred_return)
			
			# Return a deferred for the return value.
			return deferred_return
Пример #2
0
		def on_action(argument = None):
			"""A callback which will forward a call from SHET to the device."""
			self.device_call_action(action_id, argument, argument_type)
			
			deferred_return = Deferred()
			
			# Inject the return type so that the return-handler knows how to read it
			deferred_return.return_type = return_type
			
			self._deferred_returns.append(deferred_return)
			
			# Return a deferred for the return value.
			return deferred_return