F´ Flight Software - C/C++ Documentation
devel
A framework for building embedded system applications to NASA flight quality standards.
|
This document describes the format of FPP JSON dictionaries.
A Type Descriptor is a JSON Dictionary that describes a type.
Field | Description | Options | Required |
---|---|---|---|
name | String representing the FPP type name | U8 , U16 , U32 , U64 , I8 , I16 , I32 , I64 | true |
kind | String representing the kind of type | integer | true |
size | Number of bits supported by the data type | 8 , 16 , 32 , 64 | true |
signed | Boolean indicating whether the integer is signed or unsigned | Boolean | true |
Example: Type Descriptor for U64
Example: Type Descriptor for I8
Field | Description | Options | Required |
---|---|---|---|
name | String representing the FPP type name | F32 , F64 | true |
kind | String representing the kind of type | float | true |
size | Number of bits supported by the data type | 32 , 64 | true |
Example: Type Descriptor for F64
Field | Description | Options | Required |
---|---|---|---|
name | String representing the FPP type name | bool | true |
kind | String representing the kind of type | bool | true |
size | Number of bits supported by the data type | 8 | true |
Example: Type Descriptor for booleans
Field | Description | Options | Required |
---|---|---|---|
name | String representing the FPP type name | string | true |
kind | String representing the kind of type | string | true |
size | Number representing the maximum string size in bytes | Number in the range [1, 231) | true |
Any sequence of characters
Example Type Descriptor for string
A Qualified Identifier is a kind of Type Descriptor that refers to a Type Definition.
Field | Description | Options | Required |
---|---|---|---|
name | String representing the fully qualified FPP type name | Period-separated String | true |
kind | String representing the kind of type | qualifiedIdentifier | true |
Example JSON of qualified name
Field | Description | Options | Required |
---|---|---|---|
kind | The kind of type | array | true |
qualifiedName | Fully qualified name of element in FPP model | Period-separated String | true |
size | Size of the data structure | Number | true |
elementType | The type of the array's elements | Type Descriptor | true |
default | Default array value | Value of type specified in elementType | true |
annotation | User-defined annotation | String | false |
Example FPP model with JSON representation:
Field | Description | Options | Required |
---|---|---|---|
kind | The kind of type | enum | true |
qualifiedName | Fully qualified name of element in FPP model | Period-separated String | true |
representationType | Type of the enumerated values | Type Descriptor | true |
enumeratedConstants | The enumerated constants | JSON Dictionary of enumerated constants (keys) to Enumerated Constant Descriptor (values) | true |
default | Qualified name of the enumeration's default value | String | true |
annotation | User-defined annotation | String | false |
Field | Description | Options | Required |
---|---|---|---|
name | Name of the enumerated constant | String | true |
value | Value associated to the enumerated constant | Number | true |
annotation | User-defined annotation for the enumerated constant | String | false |
Example FPP model with JSON representation:
Field | Description | Options | Required |
---|---|---|---|
kind | The kind of type | struct | true |
qualifiedName | Fully qualified name of element in FPP model | Period-separated String | true |
members | The members of the struct | JSON dictionary of Member Name (key) to Struct Member Descriptor (value) | true |
default | The default value of the struct | JSON dictionary of Member Name (key) to default value (value) | true |
annotation | User-defined annotation | String extracted from FPP model | false |
Field | Description | Options | Required |
---|---|---|---|
type | Type Descriptor of member | Type Descriptor | true |
index | Index of the struct member | Number | true |
size | Size of the struct member | Number | false |
format | Format specifier | String | false |
annotation | User-defined annotation | String extracted from FPP model | false |
Example FPP model with JSON representation:
Number representing integer value
Example JSON of type U8 with a value of 2:
Example JSON of type I8 with a value of -2:
Number representing float value
Example JSON of type F32 with a value of 10.0
Boolean value
Example JSON of type bool with a value of true
String containing sequence of characters
Example JSON of type string with a value of "Hello World!"
Array with elements
Example JSON of an array of type U32 consisting of 10 elements
String qualified identifier name of enumeration value
Example JSON of an enum
JSON Dictionary consisting of String qualified identifier names (keys) and values (values)
Example JSON of a struct:
Field | Description | Options | Required |
---|---|---|---|
name | String indicating that the value is null | null | true |
kind | String indicating that the kind of value is invalid | invalid | true |
Field | Description | Options | Required |
---|---|---|---|
name | String indicating that the value is infinity | infinity | true |
kind | String indicating that the kind of value is invalid | invalid | true |
Field | Description | Options | Required |
---|---|---|---|
name | String indicating that the value is negative infinity | negativeInfinity | true |
kind | String indicating that the kind of value is invalid | invalid | true |
Formal Parameters are used in Commands and Events definitions.
Field | Description | Options | Required |
---|---|---|---|
name | Name of parameter | String | true |
type | Type Descriptor of parameter | Type Descriptor | true |
ref | Boolean indicating whether the formal parameter is to be passed by referenced when it is used in a synchronous port invocation | Boolean | true |
annotation | User-defined annotation of parameter | String | false |
Field | Description | Options | Required |
---|---|---|---|
name | Fully qualified name of the command | Period-separated String | true |
commandKind | The kind of command | async , guarded , sync , set , save | true |
opcode | Command opcode | Number | true |
formalParams | Parameters of the command | Array of Formal Parameters | true |
annotation | User-defined annotation of command | String | false |
priority | Priority for the command on the input queue | Number | required for async command kinds |
queueFullBehavior | Behavior of the command when the input full is queue | assert , block , drop | required for async command kinds |
Example Command in FPP:
JSON representation:
Field | Description | Options | Required |
---|---|---|---|
name | Fully qualified name of the telemetry channel | Period-separated String | true |
type | Type Descriptor of the telemetry channel | Type Descriptor | true |
id | Numeric identifier of the channel | Number | true |
telemetryUpdate | Update specifier of the telemetry channel | always , on change | true |
format | Format string of the channel | String | false |
annotation | User-defined annotation of channel | String | false |
limit | Low and high limits of the channel | JSON dictionary | false |
Example FPP model with JSON representation:
Field | Description | Options | Required |
---|---|---|---|
name | Fully qualified name of the event | Period-separated String | true |
severity | Severity of the event | ACTIVITY_HI , ACTIVITY_LO , COMMAND , DIAGNOSTIC , FATAL , WARNING_HI , WARNING_LO | true |
formalParams | Parameters of the event | Array of Formal Parameters | true |
id | Numeric identifier of the event | Number | true |
format | Format string of the event | String | true |
throttle | Maximum number of times to emit the event before throttling it | Number | false |
annotation | User-defined annotation of the event | String | false |
Example FPP model with JSON representation:
Example FPP model with JSON representation:
Field | Description | Options | Required |
---|---|---|---|
name | Fully qualified name of the parameter | Period-separated String | true |
type | Type Descriptor of the parameter | Type Descriptor | true |
id | Numeric identifier of the parameter | Number | true |
default | Default value (of type specified in type ) of the parameter | Value of type specified in type | false |
annotation | User-defined annotation of parameter | String | false |
Example FPP model with JSON representation:
Field | Description | Options | Required |
---|---|---|---|
name | Fully qualified name of the record | Period-separated String | true |
type | Type Descriptor the record | Type Descriptor | true |
array | Boolean specifying whether the record stores a variable number of elements | Boolean | true |
id | The numeric identifier of the record | Number | true |
annotation | User-defined annotation of record | String | false |
Example FPP model with JSON representation:
Field | Description | Options | Required |
---|---|---|---|
name | Fully qualified name of the container | Period-separated String | true |
id | The numeric identifier of the record | Number | true |
defaultPriority | The downlink priority for the container | Number | false |
annotation | User-defined annotation of container | String | false |
Example FPP model with JSON representation:
Field | Description | Options | Required |
---|---|---|---|
deploymentName | String representing the deployment name | String | true |
frameworkVersion | String representing the F´ framework version (semantic versioning) | String | true |
projectVersion | String representing the project version (semantic versioning) | String | true |
libraryVersions | Array of Strings corresponding to the version (semantic versioning) of libraries used by the F´ project | Array of Strings | true |
dictionarySpecVersion | String representing the JSON dictionary specification version | String | true |
Field | Content | Required |
---|---|---|
metadata | Dictionary Metadata | true |
typeDefinitions | Array of Type Definitions | true |
commands | Array of Commands | true |
events | Array of Events | true |
telemetryChannels | Array of Telemetry Channels | true |
parameters | Array of Parameters | true |
records | Array of Records | true |
containers | Array of Containers | true |