OpenCPN Partial API docs
|
Driver for NMEA200 messages over serial connections. More...
#include <comm_drv_n2k_serial.h>
Public Member Functions | |
CommDriverN2KSerial (const ConnectionParams *params, DriverListener &listener) | |
void | Activate () override |
Register driver and possibly do other post-ctor steps. More... | |
void | SetListener (DriverListener &l) override |
Set the entity which will receive incoming data. More... | |
bool | Open () |
void | Close () |
bool | SendMessage (std::shared_ptr< const NavMsg > msg, std::shared_ptr< const NavAddr > addr) override |
int | SetTXPGN (int pgn) override |
void | SetSecThreadActive (void) |
void | SetSecThreadInActive (void) |
bool | IsSecThreadActive () const |
void | SetSecondaryThread (CommDriverN2KSerialThread *secondary_Thread) |
CommDriverN2KSerialThread * | GetSecondaryThread () |
void | SetThreadRunFlag (int run) |
void | handle_N2K_SERIAL_RAW (CommDriverN2KSerialEvent &event) |
Public Member Functions inherited from CommDriverN2K | |
CommDriverN2K (const std::string &s="n2k0") | |
virtual bool | SendMessage (std::shared_ptr< const NavMsg > msg, std::shared_ptr< const NavAddr > addr)=0 |
virtual void | SetListener (DriverListener &l) override |
Set the entity which will receive incoming data. More... | |
virtual std::shared_ptr< NavAddr > | GetAddress (const N2kName &name) |
virtual int | SetTXPGN (int pgn) |
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 |
Public Attributes | |
int | m_Thread_run_flag |
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 NMEA200 messages over serial connections.
Definition at line 55 of file comm_drv_n2k_serial.h.
CommDriverN2KSerial::CommDriverN2KSerial | ( | const ConnectionParams * | params, |
DriverListener & | listener | ||
) |
Definition at line 210 of file comm_drv_n2k_serial.cpp.
|
virtual |
Definition at line 271 of file comm_drv_n2k_serial.cpp.
|
overridevirtual |
Register driver and possibly do other post-ctor steps.
Implements AbstractCommDriver.
Definition at line 317 of file comm_drv_n2k_serial.cpp.
void CommDriverN2KSerial::Close | ( | ) |
Definition at line 290 of file comm_drv_n2k_serial.cpp.
|
inline |
Definition at line 85 of file comm_drv_n2k_serial.h.
void CommDriverN2KSerial::handle_N2K_SERIAL_RAW | ( | CommDriverN2KSerialEvent & | event | ) |
Definition at line 421 of file comm_drv_n2k_serial.cpp.
|
inline |
Definition at line 80 of file comm_drv_n2k_serial.h.
bool CommDriverN2KSerial::Open | ( | ) |
Definition at line 275 of file comm_drv_n2k_serial.cpp.
|
overridevirtual |
Implements CommDriverN2K.
Definition at line 322 of file comm_drv_n2k_serial.cpp.
|
inlineoverridevirtual |
Set the entity which will receive incoming data.
By default, such data is ignored
Reimplemented from CommDriverN2K.
Definition at line 65 of file comm_drv_n2k_serial.h.
|
inline |
Definition at line 82 of file comm_drv_n2k_serial.h.
|
inline |
Definition at line 78 of file comm_drv_n2k_serial.h.
|
inline |
Definition at line 79 of file comm_drv_n2k_serial.h.
|
inline |
Definition at line 88 of file comm_drv_n2k_serial.h.
|
overridevirtual |
Reimplemented from CommDriverN2K.
Definition at line 539 of file comm_drv_n2k_serial.cpp.
int CommDriverN2KSerial::m_Thread_run_flag |
Definition at line 92 of file comm_drv_n2k_serial.h.