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

A plugin to plugin json message over the REST interface. More...

#include <comm_navmsg.h>

Inheritance diagram for PluginMsg:
NavMsg KeyProvider

Public Member Functions

 PluginMsg (const std::string &_name, const std::string &_dest_host, const std::string &msg)
 
 PluginMsg (const std::string &_name, const std::string &msg)
 
std::string key () const
 Return unique key used by observable to notify/listen.
 
std::string to_string () const
 Return printable string for logging etc without trailing nl.
 
- Public Member Functions inherited from NavMsg
std::string GetKey () const
 Alias for key().
 

Public Attributes

const std::string name
 
const std::string message
 
const std::string dest_host
 hostname, ip address or 'localhost'
 
- 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 plugin to plugin json message over the REST interface.

Definition at line 315 of file comm_navmsg.h.

Constructor & Destructor Documentation

◆ PluginMsg() [1/3]

PluginMsg::PluginMsg ( )
inline

Definition at line 317 of file comm_navmsg.h.

◆ PluginMsg() [2/3]

PluginMsg::PluginMsg ( const std::string &  _name,
const std::string &  _dest_host,
const std::string &  msg 
)
inline

Definition at line 320 of file comm_navmsg.h.

◆ PluginMsg() [3/3]

PluginMsg::PluginMsg ( const std::string &  _name,
const std::string &  msg 
)
inline

Definition at line 328 of file comm_navmsg.h.

Member Function Documentation

◆ key()

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

Return unique key used by observable to notify/listen.

Implements NavMsg.

Definition at line 337 of file comm_navmsg.h.

◆ to_string()

std::string PluginMsg::to_string ( ) const
inlinevirtual

Return printable string for logging etc without trailing nl.

Reimplemented from NavMsg.

Definition at line 339 of file comm_navmsg.h.

Member Data Documentation

◆ dest_host

const std::string PluginMsg::dest_host

hostname, ip address or 'localhost'

Definition at line 335 of file comm_navmsg.h.

◆ message

const std::string PluginMsg::message

Definition at line 334 of file comm_navmsg.h.

◆ name

const std::string PluginMsg::name

Definition at line 333 of file comm_navmsg.h.


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