Card YAML Config Files
Name |
C Data Type |
Description |
|---|---|---|
bool |
bool |
A true / false value |
int8 |
int8_t |
8-bit signed integer |
int16 |
int16_t |
16-bit signed integer |
int32 |
int32_t |
32-bit signed integer |
int64 |
int64_t |
64-bit signed integer |
uint8 |
uint8_t |
8-bit unsigned integer |
uint16 |
uint16_t |
16-bit unsigned integer |
uint32 |
uint32_t |
32-bit unsigned integer |
uint64 |
uint64_t |
64-bit unsigned integer |
float32 |
float |
32-bit floating point number |
float64 |
double |
64-bit (double-precision) floating point number |
visable_str |
char [] |
An ASCII string |
octet_str |
uint8_t [] |
An octet string |
domain |
void * |
A null value that must be have callback function(s) |
- class CardConfig
YAML card config.
Example:
std_objects: - device_type - error_register ... objects: - index: 0x3000 name: satellite_id ... tpdos: - num: 1 fields: - [satellite_id] ... rpdos: - num: 1 card: c3 tpdo_num: 1 ...
- fram: list[list[str]]
C3 only. List of index and subindex for the c3 to save the values of to F-RAM.
- classmethod from_yaml(config_path: Path) CardConfig
Load a card YAML config file.
- objects: list[IndexObject]
Unique card objects.
- class IndexObject
Object at index.
Example:
tpdos: - num: 1 fields: - [system, storage_percent] - [system, ram_percent] event_timer_ms: 30000
- access_type: str = 'rw'
Access type of object over the CAN bus, can be
"rw","ro","wo", or"const".
- bit_definitions: dict[str, int | str]
Optional: Can be used to define bitfield of an unsigned integer data types.
- generate_subindexes: GenerateSubindex | None = None
Used to generate subindexes for arrays.
- high_limit: int | None = None
The higher raw limit for value. No need to set this if it limit is the higher limit of the data type.
- low_limit: int | None = None
The lower raw limit for value. No need to set this if it limit is the lower limit of the data type.
- subindexes: list[SubindexObject]
Defines subindexes for records and arrays.
- class SubindexObject
Object at subindex.
Example:
subindex: 0x1 name: length data_type: uint8 description: number of files in fread cache access_type: ro
- access_type: str = 'rw'
Access type of object over the CAN bus, can be
"rw","ro","wo", or"const".
- bit_definitions: dict[str, int | str]
Optional: Can be used to define bitfield of an unsigned integer data types.
- high_limit: int | None = None
The higher raw limit for value. No need to set this if it limit is the higher limit of the data type.
- low_limit: int | None = None
The lower raw limit for value. No need to set this if it limit is the lower limit of the data type.
- class GenerateSubindex
Used to generate subindexes for an array.
Example:
- index: 0x4000 name: my_array object_type: array generate_subindexes: subindexes: fixed_length name: item length: 10 data_type: uint16 access_type: ro unit: C scale_factor: 0.001
will generate the equivalent of
- index: 0x4000 name: my_array object_type: array subindexes: generate_subindexes: - subindex: 1 name: item_1 data_type: uint16 access_type: ro unit: C scale_factor: 0.001 - subindex: 2 name: item_2 data_type: uint16 access_type: ro unit: C scale_factor: 0.001 ... - subindex: 9 name: item_9 data_type: uint16 access_type: ro unit: C scale_factor: 0.001 - subindex: 10 name: item_10 data_type: uint16 access_type: ro unit: C scale_factor: 0.001
- access_type: str = 'rw'
Access type of object over the CAN bus, can be
"rw","ro","wo", or"const".
- bit_definitions: dict[str, int | str]
Optional: Can be used to define bitfield of an unsigned integer data types.
- high_limit: int | None = None
The higher raw limit for value. No need to set this if it limit is the higher limit of the data type.