Package asmach :: Module state :: Class CBState

Class CBState

source code


Instance Methods
 
__init__(self, cb, cb_args=[], cb_kwargs={}, outcomes=[], input_keys=[], output_keys=[], io_keys=[])
Create s state from a single function.
source code
 
execute(self, ud) source code

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

    Inherited from State
 
execute_async(self, continuation, resume, ud) source code
 
get_registered_input_keys(self)
Get a tuple of registered input keys.
source code
tuple of string
get_registered_outcomes(self)
Get a list of registered outcomes.
source code
 
get_registered_output_keys(self)
Get a tuple of registered output keys.
source code
 
preempt_requested(self)
True if a preempt has been requested.
source code
 
recall_preempt(self)
Sets preempt_requested to False
source code
 
register_input_keys(self, keys)
Add keys to the set of keys from which this state may read.
source code
 
register_io_keys(self, keys)
Add keys to the set of keys from which this state may read and write.
source code
 
register_outcomes(self, new_outcomes)
Add outcomes to the outcome set.
source code
 
register_output_keys(self, keys)
Add keys to the set of keys to which this state may write.
source code
 
request_preempt(self)
Sets preempt_requested to True
source code
 
service_preempt(self)
Sets preempt_requested to False
source code
Properties

Inherited from object: __class__

Method Details

__init__(self, cb, cb_args=[], cb_kwargs={}, outcomes=[], input_keys=[], output_keys=[], io_keys=[])
(Constructor)

source code 

Create s state from a single function.

Parameters:
  • outcomes (array of strings) - Custom outcomes for this state.
  • input_keys (array of strings) - The userdata keys from which this state might read at runtime.
  • output_keys (array of strings) - The userdata keys to which this state might write at runtime.
  • io_keys (array of strings) - The userdata keys to which this state might write or from which it might read at runtime.
Overrides: object.__init__