titus.genpy.pack

titus.genpy.pack(state, scope, exprsDeclareRes, pos)[source]

Helper function for pack as an expression.

Parameters:
  • state (titus.genpy.ExecutionState) – exeuction state
  • scope (titus.util.DynamicScope) – dynamic scope object
  • exprsDeclareRes (list of (object, (object, string, int)) structures) – list of (value to pack, (?, format, length)) structures
  • pos (string or None) – position from locator marks for error reporting
Return type:

string

Returns:

packed byte array