titus.util.callfcn

titus.util.callfcn(state, scope, fcn, args)[source]

Helper function for calling function callbacks.

Used in library functions that have been given functions as arguments.

Parameters:
  • state (titus.genpy.ExecutionState) – execution state
  • scope (titus.util.DynamicScope) – dynamic scope object
  • fcn (callable) – function to call (must be a PFA user-defined function or library function)
  • args (list of values) – arguments to pass to the function (other than the state and scope)
Return type:

anything

Returns:

whatever fcn returns