OpenCPN Partial API docs
Loading...
Searching...
No Matches
Nmea0183Msg Class Reference

A regular Nmea0183 message. More...

#include <comm_navmsg.h>

Inheritance diagram for Nmea0183Msg:
NavMsg KeyProvider

Public Member Functions

 Nmea0183Msg (const std::string &id, const std::string &_payload, std::shared_ptr< const NavAddr > src)
 
 Nmea0183Msg (const std::string &id)
 
 Nmea0183Msg (const Nmea0183Msg &other, const std::string &t)
 
std::string key () const
 Return unique key used by observable to notify/listen.
 
std::string to_string () const override
 Return printable string for logging etc without trailing nl.
 
std::string to_vdr () const override
 Return message in unquoted format used by VDR plugin, see https://opencpn-manuals.github.io/main/vdr/log_format.html.
 
- Public Member Functions inherited from NavMsg
std::string GetKey () const
 Alias for key().
 

Static Public Member Functions

static std::string MessageKey (const char *type="ALL")
 Return key which should be used to listen to given message type.
 

Public Attributes

const std::string talker
 For example 'GP'.
 
const std::string type
 For example 'GGA'.
 
const std::string payload
 Complete NMEA0183 sentence, also prefix.
 
- Public Attributes inherited from NavMsg
const NavAddr::Bus bus
 
std::shared_ptr< const NavAddrsource
 Source address is set by drivers when receiving, unused and should be empty when sending.
 

Additional Inherited Members

- Protected Member Functions inherited from NavMsg
 NavMsg (const NavAddr::Bus &_bus, std::shared_ptr< const NavAddr > src)
 

Detailed Description

A regular Nmea0183 message.

Definition at line 294 of file comm_navmsg.h.

Constructor & Destructor Documentation

◆ Nmea0183Msg() [1/4]

Nmea0183Msg::Nmea0183Msg ( const std::string & id,
const std::string & _payload,
std::shared_ptr< const NavAddr > src )
inline

Definition at line 296 of file comm_navmsg.h.

◆ Nmea0183Msg() [2/4]

Nmea0183Msg::Nmea0183Msg ( )
inline

Definition at line 303 of file comm_navmsg.h.

◆ Nmea0183Msg() [3/4]

Nmea0183Msg::Nmea0183Msg ( const std::string & id)
inline

Definition at line 306 of file comm_navmsg.h.

◆ Nmea0183Msg() [4/4]

Nmea0183Msg::Nmea0183Msg ( const Nmea0183Msg & other,
const std::string & t )
inline

Definition at line 310 of file comm_navmsg.h.

Member Function Documentation

◆ key()

std::string Nmea0183Msg::key ( ) const
inlinevirtual

Return unique key used by observable to notify/listen.

Implements NavMsg.

Definition at line 318 of file comm_navmsg.h.

◆ MessageKey()

static std::string Nmea0183Msg::MessageKey ( const char * type = "ALL")
inlinestatic

Return key which should be used to listen to given message type.

Definition at line 325 of file comm_navmsg.h.

◆ to_string()

std::string Nmea0183Msg::to_string ( ) const
overridevirtual

Return printable string for logging etc without trailing nl.

Reimplemented from NavMsg.

Definition at line 104 of file comm_navmsg.cpp.

◆ to_vdr()

std::string Nmea0183Msg::to_vdr ( ) const
overridevirtual

Return message in unquoted format used by VDR plugin, see https://opencpn-manuals.github.io/main/vdr/log_format.html.

Reimplemented from NavMsg.

Definition at line 110 of file comm_navmsg.cpp.

Member Data Documentation

◆ payload

const std::string Nmea0183Msg::payload

Complete NMEA0183 sentence, also prefix.

Definition at line 332 of file comm_navmsg.h.

◆ talker

const std::string Nmea0183Msg::talker

For example 'GP'.

Definition at line 330 of file comm_navmsg.h.

◆ type

const std::string Nmea0183Msg::type

For example 'GGA'.

Definition at line 331 of file comm_navmsg.h.


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