NMEA2000 Library  0.1
Library to handle NMEA 2000 Communication written in C++
tNMEA2000::tMsgHandler Class Referenceabstract

Message handler class. More...

#include <NMEA2000.h>

Inheritance diagram for tNMEA2000::tMsgHandler:

Public Member Functions

 tMsgHandler (unsigned long _PGN=0, tNMEA2000 *_pNMEA2000=0)
 Construct a new Message Handler object. More...
 
virtual ~tMsgHandler ()
 Destroys the Message Handler object. More...
 
unsigned long GetPGN () const
 Return the PGN that is handled by this message handler. More...
 

Protected Member Functions

tNMEA2000GetNMEA2000 ()
 Returns the tNMEA2000 object of this handler. More...
 
virtual void HandleMsg (const tN2kMsg &N2kMsg)=0
 Handles a given message *. More...
 

Protected Attributes

unsigned long PGN
 

Friends

class tNMEA2000
 

Detailed Description

Message handler class.

Definition at line 616 of file NMEA2000.h.

Constructor & Destructor Documentation

◆ tMsgHandler()

tNMEA2000::tMsgHandler::tMsgHandler ( unsigned long  _PGN = 0,
tNMEA2000 _pNMEA2000 = 0 
)
inline

Construct a new Message Handler object.

Attaches this message handler to a tNMEA2000 object.

Parameters
_PGNPGN of the message that should be handled
_pNMEA2000Pointer to tNMEA2000 object, where the handle should be attached

Definition at line 644 of file NMEA2000.h.

◆ ~tMsgHandler()

virtual tNMEA2000::tMsgHandler::~tMsgHandler ( )
inlinevirtual

Destroys the Message Handler object.

Definition at line 651 of file NMEA2000.h.

Member Function Documentation

◆ GetNMEA2000()

tNMEA2000 * tNMEA2000::tMsgHandler::GetNMEA2000 ( )
inlineprotected

Returns the tNMEA2000 object of this handler.

Returns
tNMEA2000

Definition at line 633 of file NMEA2000.h.

◆ GetPGN()

unsigned long tNMEA2000::tMsgHandler::GetPGN ( ) const
inline

Return the PGN that is handled by this message handler.

Returns
unsigned long

Definition at line 656 of file NMEA2000.h.

◆ HandleMsg()

virtual void tNMEA2000::tMsgHandler::HandleMsg ( const tN2kMsg N2kMsg)
protectedpure virtual

Handles a given message *.

Parameters
N2kMsgReference to a N2kMsg Object

Implemented in tN2kDeviceList.

Friends And Related Function Documentation

◆ tNMEA2000

friend class tNMEA2000
friend

Definition at line 618 of file NMEA2000.h.

Member Data Documentation

◆ PGN

unsigned long tNMEA2000::tMsgHandler::PGN
protected

Parameter Group Number

Definition at line 625 of file NMEA2000.h.


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