pyrtma.parser

Message definition YAML parser

Functions

asdict

Return the fields of a dataclass instance as a new dictionary mapping field names to field values.

copy

Shallow copy operation on arbitrary Python objects.

dataclass

Returns the same class as was passed in, with dunder methods added based on the fields defined in the class.

field

Return an object to identify dataclass fields.

is_dataclass

Returns True if obj is a dataclass or an instance of a dataclass.

sha256

Returns a sha256 hash object; optionally initialized with a string

Classes

CompilerOptions

ConstantExpr

ConstantString

CustomEncoder

Constructor for JSONEncoder, with sensible defaults.

Field

HID

Import

MDF

MID

MT

Metadata

NativeType

Parser

Parser class

SDF

TypeAlias

YAML

typ: 'rt'/None -> RoundTripLoader/RoundTripDumper, (default)

Exceptions

AlignmentError

Raised when a struct is not 64-bit aligned

CircularRefError

Raised when an expression contains a circular reference

DuplicateNameError

Raised when the a name is already in use

ExpressionExpansionError

Raised when an expression can not be expanded.

FileFormatError

Raised when the wrong file extension is referenced.

HostIDError

Raised when the a host id is already in use

InvalidMessageSize

Raised when a message is too large

InvalidTypeError

Raised when a field contains the wrong type of data

MessageIDError

Raised when the a message id is already in use

ModuleIDError

Raised when the a module id is already in use

ParserError

Base class for all parser exceptions

RTMASyntaxError

Raised when the parser encounters invalid RTMA syntax

RecurisionError

Raised when recursion limit is exceeded evaluating aliases and expressions.

YAMLSyntaxError

Raised when the parser encounters invalid YAML