OpenCPN Partial API docs
Loading...
Searching...
No Matches
CommDriverN2KCanable Class Reference
Inheritance diagram for CommDriverN2KCanable:
CommDriverN2K DriverStatsProvider AbstractCommDriver

Public Member Functions

 CommDriverN2KCanable (const ConnectionParams *params, DriverListener &listener)
 
void SetListener (DriverListener &l) override
 Set the entity which will receive incoming data.
 
bool SendMessage (std::shared_ptr< const NavMsg > msg, std::shared_ptr< const NavAddr > addr) override
 
void Open ()
 
void Close ()
 
bool WriteFrame (const std::string &bytes)
 
bool SendAddressClaim (int proposed_source_address)
 
bool SendProductInfo ()
 
void UpdateAttrCanAddress ()
 
DriverStats GetDriverStats () const override
 Get the Driver Statistics.
 
- Public Member Functions inherited from CommDriverN2K
 CommDriverN2K (const std::string &s="n2k0")
 
virtual std::shared_ptr< NavAddr2000 > GetAddress (const N2kName &name)
 
virtual int SetTXPGN (int pgn)
 
- Public Member Functions inherited from AbstractCommDriver
virtual std::pair< CommStatus, std::string > Clone ()
 Create a new virtual interface using a new instance of this driver.
 
std::string Key () const
 
virtual std::unordered_map< std::string, std::string > GetAttributes () const
 
- Public Member Functions inherited from DriverStatsProvider
virtual ~DriverStatsProvider ()=default
 Destroy the Driver Stats Provider object.
 

Friends

class CanableSerialThread
 

Additional Inherited Members

- Public Attributes inherited from AbstractCommDriver
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 inherited from AbstractCommDriver
 AbstractCommDriver (NavAddr::Bus b)
 
 AbstractCommDriver (NavAddr::Bus b, const std::string &s)
 

Detailed Description

Definition at line 145 of file comm_drv_n2k_canable.h.

Constructor & Destructor Documentation

◆ CommDriverN2KCanable()

CommDriverN2KCanable::CommDriverN2KCanable ( const ConnectionParams *  params,
DriverListener &  listener 
)

Definition at line 432 of file comm_drv_n2k_canable.cpp.

◆ ~CommDriverN2KCanable()

CommDriverN2KCanable::~CommDriverN2KCanable ( )
override

Definition at line 462 of file comm_drv_n2k_canable.cpp.

Member Function Documentation

◆ Close()

void CommDriverN2KCanable::Close ( )

Definition at line 508 of file comm_drv_n2k_canable.cpp.

◆ GetDriverStats()

DriverStats CommDriverN2KCanable::GetDriverStats ( ) const
overridevirtual

Get the Driver Statistics.

Returns
DriverStats Object containing the driver statistics.

Implements DriverStatsProvider.

Definition at line 496 of file comm_drv_n2k_canable.cpp.

◆ Open()

void CommDriverN2KCanable::Open ( )

Definition at line 501 of file comm_drv_n2k_canable.cpp.

◆ SendAddressClaim()

bool CommDriverN2KCanable::SendAddressClaim ( int  proposed_source_address)

Definition at line 528 of file comm_drv_n2k_canable.cpp.

◆ SendMessage()

bool CommDriverN2KCanable::SendMessage ( std::shared_ptr< const NavMsg >  msg,
std::shared_ptr< const NavAddr >  addr 
)
overridevirtual

Implements CommDriverN2K.

Definition at line 819 of file comm_drv_n2k_canable.cpp.

◆ SendProductInfo()

bool CommDriverN2KCanable::SendProductInfo ( )

Definition at line 556 of file comm_drv_n2k_canable.cpp.

◆ SetListener()

void CommDriverN2KCanable::SetListener ( DriverListener &  l)
inlineoverridevirtual

Set the entity which will receive incoming data.

By default, such data is ignored

Reimplemented from CommDriverN2K.

Definition at line 153 of file comm_drv_n2k_canable.h.

◆ UpdateAttrCanAddress()

void CommDriverN2KCanable::UpdateAttrCanAddress ( )

Definition at line 491 of file comm_drv_n2k_canable.cpp.

◆ WriteFrame()

bool CommDriverN2KCanable::WriteFrame ( const std::string &  bytes)

Definition at line 518 of file comm_drv_n2k_canable.cpp.

Friends And Related Symbol Documentation

◆ CanableSerialThread

friend class CanableSerialThread
friend

Definition at line 146 of file comm_drv_n2k_canable.h.


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