Package intera_io :: Module io_interface :: Class IODeviceInterface
[hide private]
[frames] | no frames]

Class IODeviceInterface

source code

 object --+    
          |    
IOInterface --+
              |
             IODeviceInterface

IO Device interface to config, status and command topics

Instance Methods [hide private]
 
__init__(self, node_name, dev_name)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
list_signal_names(self)
return a list of all signals
source code
 
get_signal_type(self, signal_name)
return the status for the given signal, or none
source code
 
get_signal_value(self, signal_name)
return the status for the given signal, or none
source code
 
set_signal_value(self, signal_name, signal_value, signal_type=None, timeout=5.0)
set the value for the given signal return True if the signal value is set, False if the requested signal is invalid
source code
 
list_port_names(self)
return a list of all ports
source code
 
get_port_type(self, port_name)
return the status for the given port, or none
source code
 
get_port_value(self, port_name)
return the status for the given port, or none
source code
 
set_port_value(self, port_name, port_value, port_type=None, timeout=5.0)
set the value for the given port return True if the port value is set, False if the requested port is invalid
source code
str
register_callback(self, callback_function, signal_name, poll_rate=10)
Registers a supplied callback to a change in state of supplied signal_name's value.
source code
bool
deregister_callback(self, callback_id)
Deregisters a callback based on the supplied callback_id.
source code
 
handle_config(self, msg)
config topic callback (Inherited from intera_io.io_interface.IOInterface)
source code
 
handle_state(self, msg)
state topic callback (Inherited from intera_io.io_interface.IOInterface)
source code
 
invalidate_config(self)
mark the config topic data as invalid (Inherited from intera_io.io_interface.IOInterface)
source code
 
invalidate_state(self)
mark the state topic data as invalid (Inherited from intera_io.io_interface.IOInterface)
source code
 
is_config_valid(self)
return true if the config topic data is valid (Inherited from intera_io.io_interface.IOInterface)
source code
 
is_state_valid(self)
return true if the state topic data is valid (Inherited from intera_io.io_interface.IOInterface)
source code
 
is_valid(self)
return true if both the state and config topic data are valid (Inherited from intera_io.io_interface.IOInterface)
source code
 
load_state(self, current_state, incoming_state) (Inherited from intera_io.io_interface.IOInterface) source code
 
publish_command(self, op, args, timeout=2.0)
publish on the command topic return true if the command is acknowleged within the timeout (Inherited from intera_io.io_interface.IOInterface)
source code
 
revalidate(self, timeout, invalidate_state=True, invalidate_config=True)
invalidate the state and config topics, then wait up to timeout seconds for them to become valid again. (Inherited from intera_io.io_interface.IOInterface)
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, node_name, dev_name)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

register_callback(self, callback_function, signal_name, poll_rate=10)

source code 

Registers a supplied callback to a change in state of supplied signal_name's value. Spawns a thread that will call the callback with the updated value.

Returns: str
callback_id retuned if the callback was registered, and an empty string if the requested signal_name does not exist in the Navigator

deregister_callback(self, callback_id)

source code 

Deregisters a callback based on the supplied callback_id.

Returns: bool
returns bool True if the callback was successfully deregistered, and False otherwise.