OpenLcbCLib 1.0 Alpha
OpenSource C Library to create OpenLcb/Lcc Nodes
Loading...
Searching...
No Matches
openlcb_msg_t Struct Reference

Core OpenLCB message structure. More...

Data Fields

openlcb_msg_state_t state
 
uint16_t mti
 
uint16_t source_alias
 
uint16_t dest_alias
 
node_id_t source_id
 
node_id_t dest_id
 
payload_type_enum payload_type
 
uint16_t payload_count
 
openlcb_payload_tpayload
 
openlcb_msg_timer_t timer
 
uint8_t reference_count
 

Detailed Description

Core OpenLCB message structure.

Holds MTI, source/dest addressing, payload pointer, and reference count. Multi-frame messages are assembled with state.inprocess = 1 until the final frame arrives.

Warning
Reference count must be managed correctly to prevent leaks.

Field Documentation

◆ state

Message state flags

◆ mti

uint16_t mti

Message Type Indicator

◆ source_alias

uint16_t source_alias

Source node 12-bit CAN alias

◆ dest_alias

uint16_t dest_alias

Destination node 12-bit CAN alias (0 if global)

◆ source_id

node_id_t source_id

Source node 48-bit Node ID

◆ dest_id

node_id_t dest_id

Destination node 48-bit Node ID (0 if global)

◆ payload_type

payload_type_enum payload_type

Payload buffer size category

◆ payload_count

uint16_t payload_count

Valid bytes currently in payload

◆ payload

Pointer to payload buffer

◆ timer

Timer/retry union (assembly or datagram)

◆ reference_count

uint8_t reference_count

Number of active references to this message


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

Copyright (c) 2026 Jim Kueneman all rights reserved. See the License