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

Public Member Functions

def __init__ (self, calculation, input_keys)
 
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 multiple userdata inputs
provided as a list to the calculation function.

-- 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[0]^2 + x[1]^2).
-- input_keys   string[]    List of available input keys.

># input_keys   object[]    Input(s) to the calculation function as a list of userdata.
                            The individual inputs can be accessed as list elements (see lambda expression example).

#> output_value object      The result of the calculation.

<= done                     Indicates completion of the calculation.

Definition at line 5 of file flexible_calculation_state.py.

Constructor & Destructor Documentation

def flexbe_states.flexible_calculation_state.FlexibleCalculationState.__init__ (   self,
  calculation,
  input_keys 
)

Definition at line 23 of file flexible_calculation_state.py.

Member Function Documentation

def flexbe_states.flexible_calculation_state.FlexibleCalculationState.execute (   self,
  userdata 
)

Definition at line 30 of file flexible_calculation_state.py.

def flexbe_states.flexible_calculation_state.FlexibleCalculationState.on_enter (   self,
  userdata 
)

Definition at line 35 of file flexible_calculation_state.py.

Member Data Documentation

flexbe_states.flexible_calculation_state.FlexibleCalculationState._calculation
private

Definition at line 27 of file flexible_calculation_state.py.

flexbe_states.flexible_calculation_state.FlexibleCalculationState._calculation_result
private

Definition at line 28 of file flexible_calculation_state.py.


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


flexbe_states
Author(s): Philipp Schillinger
autogenerated on Sun Dec 13 2020 04:01:46