OpenCPN Partial API docs
|
Driver for SignalK messages over TCP/IP. More...
#include <comm_drv_signalk_net.h>
Public Member Functions | |
CommDriverSignalKNet (const ConnectionParams *params, DriverListener &l) | |
void | Open () |
void | Close () |
void | SetThreadRunning (bool active) |
void | SetThreadRunFlag (int run) |
void | ResetWatchdog () |
void | SetWatchdog (int n) |
void | Activate () override |
Register driver and possibly do other post-ctor steps. More... | |
void | handle_SK_sentence (CommDriverSignalKNetEvent &event) |
void | handleUpdate (const rapidjson::Value &update) |
void | updateItem (const rapidjson::Value &item, wxString &sfixtime) |
void | OpenWebSocket () |
void | CloseWebSocket () |
bool | IsThreadRunning () |
Public Member Functions inherited from CommDriverSignalK | |
CommDriverSignalK (const std::string &s="sk0") | |
virtual bool | SendMessage (std::shared_ptr< const NavMsg > msg, std::shared_ptr< const NavAddr > addr) override |
virtual void | SetListener (DriverListener &l) override |
Set the entity which will receive incoming data. More... | |
virtual std::shared_ptr< NavAddr > | GetAddress (const NavAddrSignalK &name) |
Public Member Functions inherited from AbstractCommDriver | |
virtual bool | SendMessage (std::shared_ptr< const NavMsg > msg, std::shared_ptr< const NavAddr > addr)=0 |
virtual void | Activate ()=0 |
Register driver in the driver Registry. More... | |
virtual void | SetListener (DriverListener &l) |
Set the entity which will receive incoming data. More... | |
virtual std::pair< CommStatus, std::string > | Clone () |
Create a new virtual interface using a new instance of this driver. More... | |
std::string | Key () const |
virtual std::unordered_map< std::string, std::string > | GetAttributes () const |
Static Public Member Functions | |
static bool | DiscoverSKServer (wxString &ip, int &port, int tSec) |
static bool | DiscoverSKServer (std::string serviceIdent, wxString &ip, int &port, int tSec) |
Public Attributes | |
std::string | m_self |
std::string | m_context |
bool | m_bsec_thread_active |
int | m_Thread_run_flag |
ConnectionParams | m_params |
DriverListener & | m_listener |
Public Attributes inherited from AbstractCommDriver | |
const NavAddr::Bus | bus |
const std::string | iface |
Physical device for 0183, else a unique string. More... | |
std::unordered_map< std::string, std::string > | attributes |
Additional Inherited Members | |
Protected Member Functions inherited from AbstractCommDriver | |
AbstractCommDriver (NavAddr::Bus b) | |
AbstractCommDriver (NavAddr::Bus b, const std::string &s) | |
Driver for SignalK messages over TCP/IP.
Definition at line 57 of file comm_drv_signalk_net.h.
CommDriverSignalKNet::CommDriverSignalKNet | ( | const ConnectionParams * | params, |
DriverListener & | l | ||
) |
Definition at line 214 of file comm_drv_signalk_net.cpp.
|
virtual |
Definition at line 234 of file comm_drv_signalk_net.cpp.
|
overridevirtual |
Register driver and possibly do other post-ctor steps.
Implements AbstractCommDriver.
Definition at line 238 of file comm_drv_signalk_net.cpp.
void CommDriverSignalKNet::Close | ( | ) |
Definition at line 272 of file comm_drv_signalk_net.cpp.
void CommDriverSignalKNet::CloseWebSocket | ( | ) |
Definition at line 298 of file comm_drv_signalk_net.cpp.
void CommDriverSignalKNet::handle_SK_sentence | ( | CommDriverSignalKNetEvent & | event | ) |
Definition at line 336 of file comm_drv_signalk_net.cpp.
|
inline |
Definition at line 83 of file comm_drv_signalk_net.h.
void CommDriverSignalKNet::Open | ( | void | ) |
Definition at line 242 of file comm_drv_signalk_net.cpp.
void CommDriverSignalKNet::OpenWebSocket | ( | ) |
Definition at line 276 of file comm_drv_signalk_net.cpp.
|
inline |
Definition at line 71 of file comm_drv_signalk_net.h.
|
inline |
Definition at line 70 of file comm_drv_signalk_net.h.
|
inline |
Definition at line 69 of file comm_drv_signalk_net.h.
|
inline |
Definition at line 72 of file comm_drv_signalk_net.h.
bool CommDriverSignalKNet::m_bsec_thread_active |
Definition at line 88 of file comm_drv_signalk_net.h.
std::string CommDriverSignalKNet::m_context |
Definition at line 86 of file comm_drv_signalk_net.h.
DriverListener& CommDriverSignalKNet::m_listener |
Definition at line 92 of file comm_drv_signalk_net.h.
ConnectionParams CommDriverSignalKNet::m_params |
Definition at line 91 of file comm_drv_signalk_net.h.
std::string CommDriverSignalKNet::m_self |
Definition at line 85 of file comm_drv_signalk_net.h.
int CommDriverSignalKNet::m_Thread_run_flag |
Definition at line 90 of file comm_drv_signalk_net.h.