Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Private Member Functions | Private Attributes | List of all members
flexbe_core.core.operatable_state_machine.OperatableStateMachine Class Reference
Inheritance diagram for flexbe_core.core.operatable_state_machine.OperatableStateMachine:
Inheritance graph
[legend]

Public Member Functions

def __init__ (self, args, kwargs)
 
def confirm (self, name, id)
 
def destroy (self)
 
def get_required_autonomy (self, outcome)
 
def is_transition_allowed (self, label, outcome)
 
def on_exit (self, userdata)
 
- Public Member Functions inherited from flexbe_core.core.preemptable_state_machine.PreemptableStateMachine
def __init__ (self, args, kwargs)
 
- Public Member Functions inherited from flexbe_core.core.lockable_state_machine.LockableStateMachine
def __init__ (self, args, kwargs)
 
def execute (self, userdata)
 
def get_deep_state (self)
 
def get_locked_state (self)
 
def is_locked (self)
 
def is_locked_inside (self)
 
def lock (self, path)
 
def remove_state (self, state)
 
def replace_state (self, state)
 
def replace_userdata (self, userdata)
 
def transition_allowed (self, state, outcome)
 
def unlock (self, path)
 
- Public Member Functions inherited from flexbe_core.core.ros_state_machine.RosStateMachine
def __init__ (self, args, kwargs)
 
def wait (self, seconds=None, condition=None)
 
- Public Member Functions inherited from flexbe_core.core.state_machine.StateMachine
def __contains__ (self, label)
 
def __enter__ (self)
 
def __exit__ (self, args)
 
def __getitem__ (self, label)
 
def __init__ (self, args, kwargs)
 
def __iter__ (self)
 
def assert_consistent_transitions (self)
 
def current_state (self)
 
def current_state_label (self)
 
def execute (self, userdata)
 
def initial_state (self)
 
def initial_state_label (self)
 
def sleep (self)
 
def sleep_duration (self)
 
def spin (self, userdata=None)
 
def userdata (self)
 
- Public Member Functions inherited from flexbe_core.core.state.State
def __init__ (self, args, kwargs)
 
def execute (self, userdata)
 
def input_keys (self)
 
def name (self)
 
def outcomes (self)
 
def output_keys (self)
 
def parent (self)
 
def path (self)
 
def set_name (self, value)
 
def set_parent (self, value)
 
def sleep (self)
 
def sleep_duration (self)
 

Static Public Member Functions

def add (label, state, transitions, autonomy=None, remapping=None)
 
- Static Public Member Functions inherited from flexbe_core.core.preemptable_state_machine.PreemptableStateMachine
def add (label, state, transitions=None, remapping=None)
 
- Static Public Member Functions inherited from flexbe_core.core.state_machine.StateMachine
def add (label, state, transitions, remapping=None)
 
def get_opened_container ()
 

Public Attributes

 id
 

Static Public Attributes

int autonomy_level = 3
 
- Static Public Attributes inherited from flexbe_core.core.lockable_state_machine.LockableStateMachine
 path_for_switch = None
 

Private Member Functions

def _add_to_structure_msg (self, structure_msg)
 
def _attach_callback (self, msg)
 
def _build_structure_msg (self)
 
def _execute_current_state (self)
 
def _mirror_structure_callback (self, msg)
 
def _notify_start (self)
 
def _notify_stop (self)
 
def _set_autonomy_level (self, msg)
 
def _sync_callback (self, msg)
 

Private Attributes

 _autonomy
 
 _current_state
 
 _inner_sync_request
 
 _last_exception
 

Detailed Description

A state machine that can be operated.
It synchronizes its current state with the mirror and supports some control mechanisms.

Definition at line 14 of file operatable_state_machine.py.

Constructor & Destructor Documentation

def flexbe_core.core.operatable_state_machine.OperatableStateMachine.__init__ (   self,
  args,
  kwargs 
)

Definition at line 22 of file operatable_state_machine.py.

Member Function Documentation

def flexbe_core.core.operatable_state_machine.OperatableStateMachine._add_to_structure_msg (   self,
  structure_msg 
)
private
Adds this state machine and all children to the structure message.

@type structure_msg: ContainerStructure
@param structure_msg: The message that will finally contain the structure message.

Definition at line 64 of file operatable_state_machine.py.

def flexbe_core.core.operatable_state_machine.OperatableStateMachine._attach_callback (   self,
  msg 
)
private

Definition at line 185 of file operatable_state_machine.py.

def flexbe_core.core.operatable_state_machine.OperatableStateMachine._build_structure_msg (   self)
private
Creates a message to describe the structure of this state machine.

Definition at line 54 of file operatable_state_machine.py.

def flexbe_core.core.operatable_state_machine.OperatableStateMachine._execute_current_state (   self)
private

Definition at line 92 of file operatable_state_machine.py.

def flexbe_core.core.operatable_state_machine.OperatableStateMachine._mirror_structure_callback (   self,
  msg 
)
private

Definition at line 198 of file operatable_state_machine.py.

def flexbe_core.core.operatable_state_machine.OperatableStateMachine._notify_start (   self)
private

Definition at line 207 of file operatable_state_machine.py.

def flexbe_core.core.operatable_state_machine.OperatableStateMachine._notify_stop (   self)
private

Definition at line 214 of file operatable_state_machine.py.

def flexbe_core.core.operatable_state_machine.OperatableStateMachine._set_autonomy_level (   self,
  msg 
)
private
Sets the current autonomy level. 

Definition at line 164 of file operatable_state_machine.py.

def flexbe_core.core.operatable_state_machine.OperatableStateMachine._sync_callback (   self,
  msg 
)
private

Definition at line 174 of file operatable_state_machine.py.

def flexbe_core.core.operatable_state_machine.OperatableStateMachine.add (   label,
  state,
  transitions,
  autonomy = None,
  remapping = None 
)
static
Add a state to the opened state machine.

@type label: string
@param label: The label of the state being added.

@param state: An instance of a class implementing the L{State} interface.

@param transitions: A dictionary mapping state outcomes to other state
labels or container outcomes.

@param autonomy: A dictionary mapping state outcomes to their required
autonomy level

@param remapping: A dictionary mapping local userdata keys to userdata
keys in the container.

Definition at line 32 of file operatable_state_machine.py.

def flexbe_core.core.operatable_state_machine.OperatableStateMachine.confirm (   self,
  name,
  id 
)
Confirms the state machine and triggers the creation of the structural message.
It is mandatory to call this function at the top-level state machine
between building it and starting its execution.

@type name: string
@param name: The name of this state machine to identify it.

Definition at line 130 of file operatable_state_machine.py.

def flexbe_core.core.operatable_state_machine.OperatableStateMachine.destroy (   self)

Definition at line 121 of file operatable_state_machine.py.

def flexbe_core.core.operatable_state_machine.OperatableStateMachine.get_required_autonomy (   self,
  outcome 
)

Definition at line 118 of file operatable_state_machine.py.

def flexbe_core.core.operatable_state_machine.OperatableStateMachine.is_transition_allowed (   self,
  label,
  outcome 
)

Definition at line 115 of file operatable_state_machine.py.

def flexbe_core.core.operatable_state_machine.OperatableStateMachine.on_exit (   self,
  userdata 
)

Definition at line 223 of file operatable_state_machine.py.

Member Data Documentation

flexbe_core.core.operatable_state_machine.OperatableStateMachine._autonomy
private

Definition at line 25 of file operatable_state_machine.py.

flexbe_core.core.operatable_state_machine.OperatableStateMachine._current_state
private

Definition at line 230 of file operatable_state_machine.py.

flexbe_core.core.operatable_state_machine.OperatableStateMachine._inner_sync_request
private

Definition at line 26 of file operatable_state_machine.py.

flexbe_core.core.operatable_state_machine.OperatableStateMachine._last_exception
private

Definition at line 27 of file operatable_state_machine.py.

int flexbe_core.core.operatable_state_machine.OperatableStateMachine.autonomy_level = 3
static

Definition at line 20 of file operatable_state_machine.py.

flexbe_core.core.operatable_state_machine.OperatableStateMachine.id

Definition at line 24 of file operatable_state_machine.py.


The documentation for this class was generated from the following file:


flexbe_core
Author(s): Philipp Schillinger
autogenerated on Sun Dec 13 2020 04:01:39