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.

rpdos: list[Rpdo]

RPDOs for the card.

std_objects: list[str]

Standard object to include in OD.

tpdos: list[Tpdo]

TPDOs for the card.

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.

data_type: str = 'uint32'

Data type of the object.

default: Any = None

Default value of object.

description: str = ''

Description of object.

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.

index: int = 0

Index of object, fw/sw common object are in 0x3000, card objects are in 0x4000.

length: int = 1

Length of an octet string object (only used when data_type is set to "octet_str").

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.

name: str = ''

Name of object, must be in lower_snake_case.

object_type: str = 'variable'

Object type; must be "variable", "array", or "record".

scale_factor: float = 1

Can be used to scale a integer value to a engineering (float) value.

subindexes: list[SubindexObject]

Defines subindexes for records and arrays.

unit: str = ''

Optional engineering unit for the object.

value_descriptions: dict[str, int]

Optional: Can be used to define enum values for an unsigned integer data types.

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.

data_type: str = 'uint32'

Data type of the object.

default: Any = None

Default value of object.

description: str = ''

Description of object.

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.

length: int = 1

Length of an octet string object (only used when data_type is set to "octet_str").

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.

name: str = ''

Name of object, must be in lower_snake_case.

scale_factor: float = 1

Can be used to scale a integer value to a engineering (float) value.

subindex: int = 0

Subindex of object, start at subindex 1 (subindex 0 aka highest_index_supported will be generated).

unit: str = ''

Optional engineering unit for the object.

value_descriptions: dict[str, int]

Optional: Can be used to define enum values for an unsigned integer data types.

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.

data_type: str = 'uint32'

Data type of the object.

default: Any = None

Default value of object.

description: str = ''

Description of object.

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.

length: int = 1

Length of an octet string object (only used when data_type is set to "octet_str").

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.

name: str = ''

Names of objects to generate.

scale_factor: float = 1

Can be used to scale a integer value to a engineering (float) value.

subindexes: str | int = 0

Subindexes of objects to generate.

unit: str = ''

Optional engineering unit for the object.

value_descriptions: dict[str, int]

Optional: Can be used to define enum values for an unsigned integer data types.

class Tpdo

TPDO.

Example:

tpdos:
  - num: 1
    fields:
      - [system, storage_percent]
      - [system, ram_percent]
    event_timer_ms: 30000
event_timer_ms: int = 0

Send the TPDO periodicly in milliseconds.

fields: list[list[str]]

Index and subindexes of objects to map to the TPDO.

inhibit_time_ms: int = 0

Delay after boot before the event timer starts in milliseconds.

num: int

TPDO number, 1-16.

rtr: bool = False

TPDO supports RTR.

sync: int = 0

Send this TPDO every x SYNCs. 0 for acycle. Max 240.

sync_start_value: int = 0

When set to 0, the count of sync is not process for this TPDO. When set to 1, the count of sync is processed for this TPDO .

transmission_type: str = 'timer'

Transmission type of TPDO. Must be "timer" or "sync".

class Rpdo

RPDO section.

Example:

rpdos:
  - num: 1
    card: c3
    tpdo_num: 1
card: str

Card the TPDO is from.

num: int

TPDO number to use, 1-16.

tpdo_num: int

TPDO number, 1-16.