OpenCPN Partial API docs
|
Nmea0183 serial communications wrapper, possibly running a thread. More...
#include <serial_io.h>
Public Member Functions | |
virtual void | Start ()=0 |
Start IO operations including input, possibly in separate thread. | |
virtual bool | SetOutMsg (const wxString &msg)=0 |
Send a message to remote peer. | |
virtual void | RequestStop () override=0 |
Request that thread stops operation. | |
virtual DriverStats | GetStats () const =0 |
Retrieve updated driver statistics. | |
![]() | |
bool | IsRunning () const |
Return true if thread is running. | |
void | WaitUntilStopped () |
Block until thread invokes SignalExit(). | |
bool | WaitUntilStopped (std::chrono::duration< int > timeout) |
Block until thread invokes SignalExit() or timeout. | |
bool | WaitUntilStopped (std::chrono::duration< int > timeout, std::chrono::milliseconds &elapsed) |
Block until thread invokes SignalExit() or timeout. | |
Static Public Member Functions | |
static std::unique_ptr< SerialIo > | Create (SendMsgFunc send_msg_func, const std::string &port, unsigned baud) |
Factory. | |
Protected Member Functions | |
SerialIo (SendMsgFunc send_msg_func, const std::string &port, unsigned baud) | |
![]() | |
bool | KeepGoing () const |
If true continue thread operation, else exit and invoke SignalExit() | |
void | SignalExit () |
Signal that thread has exited. | |
Protected Attributes | |
const wxString | m_portname |
const unsigned | m_baud |
const SendMsgFunc | m_send_msg_func |
DriverStats | m_stats |
std::mutex | m_stats_mutex |
TimedLogFilter | m_open_log_filter |
Nmea0183 serial communications wrapper, possibly running a thread.
Definition at line 54 of file serial_io.h.
|
inlineprotected |
Definition at line 82 of file serial_io.h.
|
static |
Factory.
Definition at line 85 of file android_serial_io.cpp.
|
pure virtual |
Retrieve updated driver statistics.
Implemented in AndroidSerialIo, and StdSerialIo.
|
overridepure virtual |
Request that thread stops operation.
Reimplemented from ThreadCtrl.
Implemented in AndroidSerialIo.
Definition at line 213 of file std_serial_io.cpp.
|
pure virtual |
Send a message to remote peer.
Implemented in AndroidSerialIo, and StdSerialIo.
|
pure virtual |
Start IO operations including input, possibly in separate thread.
Implemented in AndroidSerialIo, and StdSerialIo.
|
protected |
Definition at line 76 of file serial_io.h.
|
protected |
Definition at line 80 of file serial_io.h.
|
protected |
Definition at line 75 of file serial_io.h.
|
protected |
Definition at line 77 of file serial_io.h.
|
protected |
Definition at line 78 of file serial_io.h.
|
mutableprotected |
Definition at line 79 of file serial_io.h.