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

Local driver implementation, not visible outside this file. More...

Inheritance diagram for CommDriverN2KSocketCanImpl:
CommDriverN2KSocketCAN CommDriverN2K DriverStatsProvider AbstractCommDriver

Public Member Functions

 CommDriverN2KSocketCanImpl (const ConnectionParams *p, DriverListener &l)
bool Open ()
void Close ()
void SetN2K_Name ()
bool SendMessage (std::shared_ptr< const NavMsg > msg, std::shared_ptr< const NavAddr > addr)
int DoAddressClaim ()
bool SendAddressClaim (int proposed_source_address)
bool SendProductInfo ()
Worker & GetWorker ()
void UpdateAttrCanAddress ()
Public Member Functions inherited from CommDriverN2KSocketCAN
void SetListener (DriverListener &l) override
 Set the entity which will receive incoming data.
void UpdateAttrCanAddress ()
DriverStats GetDriverStats () const override
 Get the Driver Statistics.
void SetDriverStats (DriverStats _stats)
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 Worker

Additional Inherited Members

Static Public Member Functions inherited from CommDriverN2KSocketCAN
static std::unique_ptr< CommDriverN2KSocketCAN > Create (const ConnectionParams *params, DriverListener &listener)
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 CommDriverN2KSocketCAN
 CommDriverN2KSocketCAN (const ConnectionParams *params, DriverListener &listener)
Protected Member Functions inherited from AbstractCommDriver
 AbstractCommDriver (NavAddr::Bus b)
 AbstractCommDriver (NavAddr::Bus b, const std::string &s)
Protected Attributes inherited from CommDriverN2KSocketCAN
ConnectionParams m_params
DriverListener & m_listener
StatsTimer m_stats_timer

Detailed Description

Local driver implementation, not visible outside this file.

Definition at line 127 of file comm_drv_n2k_socketcan.cpp.

Constructor & Destructor Documentation

◆ CommDriverN2KSocketCanImpl()

CommDriverN2KSocketCanImpl::CommDriverN2KSocketCanImpl ( const ConnectionParams * p,
DriverListener & l )
inline

Definition at line 131 of file comm_drv_n2k_socketcan.cpp.

◆ ~CommDriverN2KSocketCanImpl()

CommDriverN2KSocketCanImpl::~CommDriverN2KSocketCanImpl ( )
inline

Definition at line 140 of file comm_drv_n2k_socketcan.cpp.

Member Function Documentation

◆ Close()

void CommDriverN2KSocketCanImpl::Close ( )
virtual

Implements CommDriverN2KSocketCAN.

Definition at line 211 of file comm_drv_n2k_socketcan.cpp.

◆ GetWorker()

Worker & CommDriverN2KSocketCanImpl::GetWorker ( )
inline

Definition at line 153 of file comm_drv_n2k_socketcan.cpp.

◆ Open()

bool CommDriverN2KSocketCanImpl::Open ( )
virtual

Implements CommDriverN2KSocketCAN.

Definition at line 205 of file comm_drv_n2k_socketcan.cpp.

◆ SendAddressClaim()

bool CommDriverN2KSocketCanImpl::SendAddressClaim ( int proposed_source_address)

Definition at line 217 of file comm_drv_n2k_socketcan.cpp.

◆ SendMessage()

bool CommDriverN2KSocketCanImpl::SendMessage ( std::shared_ptr< const NavMsg > msg,
std::shared_ptr< const NavAddr > addr )
virtual

Implements CommDriverN2KSocketCAN.

Definition at line 300 of file comm_drv_n2k_socketcan.cpp.

◆ SendProductInfo()

bool CommDriverN2KSocketCanImpl::SendProductInfo ( )

Definition at line 265 of file comm_drv_n2k_socketcan.cpp.

◆ SetN2K_Name()

void CommDriverN2KSocketCanImpl::SetN2K_Name ( )

Definition at line 179 of file comm_drv_n2k_socketcan.cpp.

◆ UpdateAttrCanAddress()

void CommDriverN2KSocketCanImpl::UpdateAttrCanAddress ( )

Definition at line 201 of file comm_drv_n2k_socketcan.cpp.

◆ Worker

friend class Worker
friend

Definition at line 128 of file comm_drv_n2k_socketcan.cpp.


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