OpenCPN Partial API docs
|
Common interface for all drivers. More...
#include <comm_driver.h>
Public Member Functions | |
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. | |
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 | |
const NavAddr::Bus | bus |
const std::string | iface |
Physical device for 0183, else a unique string. | |
std::unordered_map< std::string, std::string > | attributes |
Protected Member Functions | |
AbstractCommDriver (NavAddr::Bus b) | |
AbstractCommDriver (NavAddr::Bus b, const std::string &s) | |
|
inlinevirtual |
Create a new virtual interface using a new instance of this driver.
A successful return guarantees that the new driver is registered in the device registry and activated.
Definition at line 81 of file comm_driver.h.
|
inlinevirtual |
Set the entity which will receive incoming data.
By default, such data is ignored
Reimplemented in CommDriverSignalK, CommDriverN2KSocketCAN, CommDriverN2KSerial, CommDriverN2KNet, CommDriverN2K, and CommDriverN0183.
Definition at line 72 of file comm_driver.h.