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

Driver for NMEA0183 over serial connections. More...

#include <comm_drv_n0183_serial.h>

Inheritance diagram for CommDriverN0183Serial:
CommDriverN0183 AbstractCommDriver

Public Member Functions

 CommDriverN0183Serial (const ConnectionParams *params, DriverListener &l)
 
void Activate () override
 Register driver and possibly do other post-ctor steps. More...
 
bool Open ()
 
void Close ()
 
void SetSecThreadActive (void)
 
void SetSecThreadInActive (void)
 
bool IsSecThreadActive () const
 
void SetSecondaryThread (CommDriverN0183SerialThread *secondary_Thread)
 
CommDriverN0183SerialThreadGetSecondaryThread ()
 
void SetThreadRunFlag (int run)
 
ConnectionParams GetParams () const
 
bool SendMessage (std::shared_ptr< const NavMsg > msg, std::shared_ptr< const NavAddr > addr) override
 
- Public Member Functions inherited from CommDriverN0183
 CommDriverN0183 (NavAddr::Bus b, const std::string &s)
 
virtual bool SendMessage (std::shared_ptr< const NavMsg > msg, std::shared_ptr< const NavAddr > addr) override=0
 
void SetListener (DriverListener &l) override
 Set the entity which will receive incoming data. More...
 
virtual std::shared_ptr< NavAddrGetAddress ()
 
void Activate () override
 Register driver in the driver Registry. More...
 
- 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)
 

Detailed Description

Driver for NMEA0183 over serial connections.

Definition at line 43 of file comm_drv_n0183_serial.h.

Constructor & Destructor Documentation

◆ CommDriverN0183Serial()

CommDriverN0183Serial::CommDriverN0183Serial ( const ConnectionParams params,
DriverListener l 
)

Definition at line 220 of file comm_drv_n0183_serial.cpp.

◆ ~CommDriverN0183Serial()

CommDriverN0183Serial::~CommDriverN0183Serial ( )
virtual

Definition at line 239 of file comm_drv_n0183_serial.cpp.

Member Function Documentation

◆ Activate()

void CommDriverN0183Serial::Activate ( )
overridevirtual

Register driver and possibly do other post-ctor steps.

Reimplemented from CommDriverN0183.

Definition at line 300 of file comm_drv_n0183_serial.cpp.

◆ Close()

void CommDriverN0183Serial::Close ( )

Definition at line 256 of file comm_drv_n0183_serial.cpp.

◆ GetParams()

ConnectionParams CommDriverN0183Serial::GetParams ( ) const
inline

Definition at line 72 of file comm_drv_n0183_serial.h.

◆ GetSecondaryThread()

CommDriverN0183SerialThread * CommDriverN0183Serial::GetSecondaryThread ( )
inline

Definition at line 65 of file comm_drv_n0183_serial.h.

◆ IsSecThreadActive()

bool CommDriverN0183Serial::IsSecThreadActive ( ) const
inline

Definition at line 60 of file comm_drv_n0183_serial.h.

◆ Open()

bool CommDriverN0183Serial::Open ( )

Definition at line 241 of file comm_drv_n0183_serial.cpp.

◆ SendMessage()

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

Implements CommDriverN0183.

Definition at line 305 of file comm_drv_n0183_serial.cpp.

◆ SetSecondaryThread()

void CommDriverN0183Serial::SetSecondaryThread ( CommDriverN0183SerialThread secondary_Thread)
inline

Definition at line 62 of file comm_drv_n0183_serial.h.

◆ SetSecThreadActive()

void CommDriverN0183Serial::SetSecThreadActive ( void  )
inline

Definition at line 58 of file comm_drv_n0183_serial.h.

◆ SetSecThreadInActive()

void CommDriverN0183Serial::SetSecThreadInActive ( void  )
inline

Definition at line 59 of file comm_drv_n0183_serial.h.

◆ SetThreadRunFlag()

void CommDriverN0183Serial::SetThreadRunFlag ( int  run)
inline

Definition at line 68 of file comm_drv_n0183_serial.h.

Member Data Documentation

◆ m_Thread_run_flag

int CommDriverN0183Serial::m_Thread_run_flag

Definition at line 70 of file comm_drv_n0183_serial.h.


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