Package intera_interface :: Module lights :: Class Lights
[hide private]
[frames] | no frames]

Class Lights

source code

object --+
         |
        Lights

Interface class for the lights on the Intera robots.

Instance Methods [hide private]
 
__init__(self)
Constructor.
source code
list [str]
list_all_lights(self)
Returns a list of strings describing all available lights
source code
bool
set_light_state(self, name, on=True)
Sets the named light the desired state (on=True, off=False)
source code
bool
get_light_state(self, name)
Returns a boolean describing whether the requested light is 'ON'.
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)
(Constructor)

source code 

Constructor.

Overrides: object.__init__

list_all_lights(self)

source code 

Returns a list of strings describing all available lights

Returns: list [str]
a list of string representing light names Each light name of the following format: '<assembly>_<color>_light'

set_light_state(self, name, on=True)

source code 

Sets the named light the desired state (on=True, off=False)

Parameters:
  • name (str) - Light name of the following format: '<assembly>_<color>_light'
  • on (bool) - value to set the light (on=True, off=False)
Returns: bool
True if the light state is set, False otherwise

get_light_state(self, name)

source code 

Returns a boolean describing whether the requested light is 'ON'. (True: on, False: off)

Parameters:
  • name (str) - Light name of the following format: '<assembly>_<color>_light'
Returns: bool
a variable representing light state: (True: on, False: off)