PER Firmware
Loading...
Searching...
No Matches
parser.Message Class Reference
Collaboration diagram for parser.Message:
[legend]

Public Member Functions

str macro_name (self)
 
None resolve_layout (self, Dict custom_types)
 
None validate_semantics (self, Dict custom_types)
 
int get_total_bit_length (self, Optional[Dict] custom_types=None)
 
int get_dlc (self, Dict custom_types)
 

Public Attributes

 name
 
str byte_order = 0 or length not in (16, 32, 64)):
 

Static Public Attributes

str desc = ""
 
List signals = field(default_factory=list)
 
int priority = 0
 
int period = 0
 
Optional id_override = None
 
bool is_extended = False
 
Literal byte_order = "little_endian"
 
int final_id = 0
 
int dlc = 0
 
str layout_hash = ""
 

Member Function Documentation

◆ get_dlc()

int parser.Message.get_dlc ( self,
Dict custom_types )
Calculate the Data Length Code (DLC) in bytes.
Here is the call graph for this function:

◆ get_total_bit_length()

int parser.Message.get_total_bit_length ( self,
Optional[Dict] custom_types = None )
Here is the caller graph for this function:

◆ macro_name()

str parser.Message.macro_name ( self)

◆ resolve_layout()

None parser.Message.resolve_layout ( self,
Dict custom_types )
Calculate bit offsets, shifts, and masks for all signals.
This is intrinsic to the message definition.

For big-endian messages, generated firmware treats multi-byte signals as
byte-wise MSB-first fields located at byte boundaries. DBC output uses
the corresponding Motorola start bit, while C packing keeps the LSB
shift into the host-order uint64_t staging buffer.

◆ validate_semantics()

None parser.Message.validate_semantics ( self,
Dict custom_types )
Perform semantic checks that require external context (like custom types).
Raises ValueError if invalid.

Member Data Documentation

◆ byte_order [1/2]

Literal parser.Message.byte_order = "little_endian"
static

◆ byte_order [2/2]

str parser.Message.byte_order = 0 or length not in (16, 32, 64)):

◆ desc

str parser.Message.desc = ""
static

◆ dlc

int parser.Message.dlc = 0
static

◆ final_id

int parser.Message.final_id = 0
static

◆ id_override

parser.Message.id_override = None
static

◆ is_extended

bool parser.Message.is_extended = False
static

◆ layout_hash

str parser.Message.layout_hash = ""
static

◆ name

parser.Message.name

◆ period

int parser.Message.period = 0
static

◆ priority

int parser.Message.priority = 0
static

◆ signals

parser.Message.signals = field(default_factory=list)
static

The documentation for this class was generated from the following file: