Open Model Railroad Network (OpenMRN)
Loading...
Searching...
No Matches
DCCPacket Struct Reference

Stores a DCC packet in memory. More...

#include <packet.h>

Inheritance diagram for DCCPacket:
dcc::Packet

Classes

struct  cmd_t
 Specifies the meaning of the command byte for meta-commands to send. More...
 
struct  pkt_t
 Specifies the meaning of the command byte for packets to send. More...
 

Public Attributes

union { 
 
   uint8_t   header_raw_data 
 
   struct pkt_t   packet_header 
 
   struct cmd_t   command_header 
 
};  
 
uint8_t dlc
 Specifies the number of used payload bytes.
 
uint8_t payload [DCC_PACKET_MAX_PAYLOAD]
 Packet payload bytes.
 
uintptr_t feedback_key
 An opaque key used by the hardware driver to attribute feedback information to the source of the packet.
 

Detailed Description

Stores a DCC packet in memory.

Used to send data from the packet generation (usually the command station refresh loop flows) to the DCC track driver.

Definition at line 54 of file packet.h.

Member Data Documentation

◆ command_header

struct cmd_t DCCPacket::command_header

Definition at line 92 of file packet.h.

◆ dlc

uint8_t DCCPacket::dlc

Specifies the number of used payload bytes.

Definition at line 95 of file packet.h.

◆ feedback_key

uintptr_t DCCPacket::feedback_key

An opaque key used by the hardware driver to attribute feedback information to the source of the packet.

This key will be sent back in the dcc::Feedback structure. If the key is non-zero it is guaranteed that some feedback (maybe empty) will be sent back after the packet is transmitted to the track.

Definition at line 104 of file packet.h.

◆ header_raw_data

uint8_t DCCPacket::header_raw_data

Definition at line 90 of file packet.h.

◆ packet_header

struct pkt_t DCCPacket::packet_header

Definition at line 91 of file packet.h.

◆ payload

uint8_t DCCPacket::payload[DCC_PACKET_MAX_PAYLOAD]

Packet payload bytes.

Definition at line 97 of file packet.h.


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