Open Model Railroad Network (OpenMRN)
Loading...
Searching...
No Matches
dcc::LogonFeedbackCallbacks Class Referenceabstract

Abstract class to get callbacks for recognized feedback messages. More...

#include <LogonFeedback.hxx>

Inheritance diagram for dcc::LogonFeedbackCallbacks:
dcc::LogonHandler< Module >

Public Types

enum  PacketType {
  UNKNOWN = 0 , GET_DATA_START , GET_DATA_CONT , LOGON_ENABLE ,
  SELECT_SHORTINFO , LOGON_ASSIGN , MISC_254
}
 

Public Member Functions

virtual PacketType classify_packet (uintptr_t feedback_key)=0
 Determines based on feedback key what the given DCC packet was.
 
virtual void process_select_shortinfo (uintptr_t feedback_key, bool error, uint64_t data)=0
 Handles a Select ShortInfo feedback message.
 
virtual void process_logon_assign (uintptr_t feedback_key, bool error, uint64_t data)=0
 Handles a Logon Assign feedback message.
 
virtual void process_decoder_id (uintptr_t feedback_key, bool error, uint64_t data)=0
 Handles a Decoder ID feedback message.
 

Detailed Description

Abstract class to get callbacks for recognized feedback messages.

Definition at line 44 of file LogonFeedback.hxx.

Member Enumeration Documentation

◆ PacketType

Enumerator
UNKNOWN 

Non-254 packet or not known (not relevant) 254 packet type.

GET_DATA_START 

Get Data Start packet.

GET_DATA_CONT 

Get Data Continue packet.

LOGON_ENABLE 

Logon Enable packet.

SELECT_SHORTINFO 

Select packet with Get Short Info command.

LOGON_ASSIGN 

Logon Assign packet.

MISC_254 

Misc 254 packet (ID based responses)

Definition at line 47 of file LogonFeedback.hxx.

Member Function Documentation

◆ classify_packet()

virtual PacketType dcc::LogonFeedbackCallbacks::classify_packet ( uintptr_t  feedback_key)
pure virtual

Determines based on feedback key what the given DCC packet was.

Parameters
feedback_keyfrom the railcom packet.
Returns
the packet classification wrt the logon feature.

Implemented in dcc::LogonHandler< Module >.

◆ process_decoder_id()

virtual void dcc::LogonFeedbackCallbacks::process_decoder_id ( uintptr_t  feedback_key,
bool  error,
uint64_t  data 
)
pure virtual

Handles a Decoder ID feedback message.

Parameters
feedback_keyrefers to the packet it came from.
errortrue if there was a transmission error or the data came in incorrect format.
data48 bits of payload. The low 44 bits of this is a decoder ID.

Implemented in dcc::LogonHandler< Module >.

◆ process_logon_assign()

virtual void dcc::LogonFeedbackCallbacks::process_logon_assign ( uintptr_t  feedback_key,
bool  error,
uint64_t  data 
)
pure virtual

Handles a Logon Assign feedback message.

Parameters
feedback_keyrefers to the packet it came from.
errortrue if there was a transmission error or the data came in incorrect format.
data48 bits of payload.

Implemented in dcc::LogonHandler< Module >.

◆ process_select_shortinfo()

virtual void dcc::LogonFeedbackCallbacks::process_select_shortinfo ( uintptr_t  feedback_key,
bool  error,
uint64_t  data 
)
pure virtual

Handles a Select ShortInfo feedback message.

Parameters
feedback_keyrefers to the packet it came from.
errortrue if there was a transmission error or the data came in incorrect format.
data48 bits of payload.

Implemented in dcc::LogonHandler< Module >.


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