Public Member Functions | Private Attributes | List of all members
flexbe_states.calculation_state.CalculationState Class Reference
Inheritance diagram for flexbe_states.calculation_state.CalculationState:
Inheritance graph
[legend]

Public Member Functions

def __init__ (self, calculation)
 
def execute (self, userdata)
 
def on_enter (self, userdata)
 

Private Attributes

 _calculation
 
 _calculation_result
 

Detailed Description

Implements a state that can perform a calculation based on userdata.
calculation is a function which takes exactly one parameter, input_value from userdata,
and its return value is stored in output_value after leaving the state.

-- calculation  function        The function that performs the desired calculation.
                                                        It could be a private function (self.foo) manually defined in a behavior's source code
                                                        or a lambda function (e.g., lambda x: x^2, where x will be the input_value).

># input_value  object          Input to the calculation function.

#> output_value object          The result of the calculation.

<= done                                         Indicates completion of the calculation.

Definition at line 12 of file calculation_state.py.

Constructor & Destructor Documentation

def flexbe_states.calculation_state.CalculationState.__init__ (   self,
  calculation 
)
Constructor

Definition at line 31 of file calculation_state.py.

Member Function Documentation

def flexbe_states.calculation_state.CalculationState.execute (   self,
  userdata 
)
Execute this state

Definition at line 43 of file calculation_state.py.

def flexbe_states.calculation_state.CalculationState.on_enter (   self,
  userdata 
)

Definition at line 52 of file calculation_state.py.

Member Data Documentation

flexbe_states.calculation_state.CalculationState._calculation
private

Definition at line 39 of file calculation_state.py.

flexbe_states.calculation_state.CalculationState._calculation_result
private

Definition at line 40 of file calculation_state.py.


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


flexbe_states
Author(s): Philipp Schillinger
autogenerated on Wed Jun 5 2019 21:52:08