Type Support & Conversions
All data flowing between functions within the Flows system are strongly typed. When connecting backward input and output ports together, connections can only be made between ports with compatible types.
Types
Below are all types that are currently supported by the flow system.
Boolean Types
bool | Either true or false. |
Number Types
int8 | Number between -128 to 127. |
int16 | Number between -32,768 to 32,767. |
int32 | Number between -2,147,483,648 to 2,147,483,647. |
int64 | Number between -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807. |
uint8 | Number between 0 to 255. |
uint16 | Number between 0 to 65,535. |
uint32 | Number between 0 to 4,294,967,295. |
uint64 | Number between 0 to 18,446,744,073,709,551,615. |
float32 | Number that meets the IEEE-754 32-bit floating-point numbers specification. |
float64 | Number that meets the IEEE-754 64-bit floating-point numbers specification. |
String Types
string | An arbitrary sequence of characters. |
JSONString | A string containing JSON. |
Array Types
[]interface{} | Array of any type. |
[]string | Array of strings. |
[]TelemetryMessage | Array of telemetry messages. |
[]CommandResponse | Array of command responses. |
[]CallableResponse | Array of callable responses. |
[]ControlAck | Array of control acknowledgments. |
Map Types
map[string]interface{} | Collection of string keys with values of any type. |
map[string]string | Collection of string keys with string values. |
Duration Types
Duration | A duration represents a period of time. |
URI Types
RocosURI | A special type of URI used by the Rocos Agent. |
Composite Types
TelemetryMessage | Represents a telemetry message. |
CommandResponse | A response to the execution of a command. |
CallableResponse | A response to a service request. |
ControlAck | A response to a control message. |
PayloadValue | |
Transform | Represents the position and orientation. |
Marker |
Any Types
interface{} | This is a special type that can hold any other type. |
Conversions
The matrix below shows all types currently supported and the conversions from each type to all other types.