Open Model Railroad Network (OpenMRN)
Loading...
Searching...
No Matches
dcc::RailcomPacket Struct Reference

Represents a single Railcom datagram. More...

#include <RailCom.hxx>

Public Types

enum  {
  GARBAGE , ACK , NACK , BUSY ,
  MOB_POM , MOB_ADRHIGH , MOB_ADRLOW , MOB_EXT ,
  MOB_DYN , MOB_XPOM0 , MOB_XPOM1 , MOB_XPOM2 ,
  MOB_XPOM3 , MOB_SUBID
}
 

Public Member Functions

 RailcomPacket (uint8_t _hw_channel, uint8_t _railcom_channel, uint8_t _type, uint32_t _argument)
 Constructor.
 

Public Attributes

uint8_t hw_channel
 which detector supplied this data
 
uint8_t railcom_channel
 which part of the railcom cutout (1 or 2)
 
uint8_t type
 packet type, see enum above
 
uint32_t argument
 payload of the railcom packet, justified to LSB.
 

Detailed Description

Represents a single Railcom datagram.

There can be multiple railcom datagrams in the cutout of one railcom packet: usually zero or one in channel 1 and up to four datagrams in channel 2.

Definition at line 214 of file RailCom.hxx.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

Definition at line 216 of file RailCom.hxx.

Constructor & Destructor Documentation

◆ RailcomPacket()

dcc::RailcomPacket::RailcomPacket ( uint8_t  _hw_channel,
uint8_t  _railcom_channel,
uint8_t  _type,
uint32_t  _argument 
)
inline

Constructor.

Parameters
_hw_channelwhich detector supplied this data
_railcom_channelwhich cutout (ch1 or ch2) this is coming from
_typesee enum
_argumentpayload of the railcom packet, justified to LSB.

Definition at line 247 of file RailCom.hxx.

Member Data Documentation

◆ argument

uint32_t dcc::RailcomPacket::argument

payload of the railcom packet, justified to LSB.

Definition at line 240 of file RailCom.hxx.

◆ hw_channel

uint8_t dcc::RailcomPacket::hw_channel

which detector supplied this data

Definition at line 234 of file RailCom.hxx.

◆ railcom_channel

uint8_t dcc::RailcomPacket::railcom_channel

which part of the railcom cutout (1 or 2)

Definition at line 236 of file RailCom.hxx.

◆ type

uint8_t dcc::RailcomPacket::type

packet type, see enum above

Definition at line 238 of file RailCom.hxx.


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