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

Simple FIFO queue without added logic. More...

#include <comm_out_queue.h>

Inheritance diagram for DummyCommOutQueue:
CommOutQueue

Public Member Functions

bool push_back (const std::string &line) override
 Insert valid line of NMEA0183 data in buffer.
std::string pop () override
 Return next line to send and remove it from buffer, throws exception if empty.
int size () const override
 Return number of lines in queue.
Public Member Functions inherited from CommOutQueue
 CommOutQueue (unsigned max_buffered, std::chrono::duration< unsigned, std::milli > min_msg_gap)
 Create a buffer which stores at most max_buffered items of each message, applying rate limits if messages are entered "too" fast.
 CommOutQueue (unsigned max_buffered)
 Create a buffer which stores at most max_buffered items of each message.
 CommOutQueue ()
 Default buffer, allows 10 buffered messages of each type, applies rate limits when repeated with less than 600 ms intervals.
 CommOutQueue (const CommOutQueue &other)=delete
CommOutQueue & operator= (const CommOutQueue &)=delete

Additional Inherited Members

Protected Types inherited from CommOutQueue
using duration_ms = std::chrono::duration<unsigned, std::milli>
Protected Attributes inherited from CommOutQueue
std::vector< BufferItem > m_buffer
std::mutex m_mutex
int m_size
duration_ms m_min_msg_gap
bool m_overrun_reported
std::set< uint64_t > m_rate_limits_logged

Detailed Description

Simple FIFO queue without added logic.

Definition at line 198 of file comm_out_queue.h.

Constructor & Destructor Documentation

◆ DummyCommOutQueue()

DummyCommOutQueue::DummyCommOutQueue ( )
inline

Definition at line 200 of file comm_out_queue.h.

Member Function Documentation

◆ pop()

std::string DummyCommOutQueue::pop ( )
inlineoverridevirtual

Return next line to send and remove it from buffer, throws exception if empty.

Reimplemented from CommOutQueue.

Definition at line 208 of file comm_out_queue.h.

◆ push_back()

bool DummyCommOutQueue::push_back ( const std::string & line)
inlineoverridevirtual

Insert valid line of NMEA0183 data in buffer.

Returns
false on errors including invalid input, else true.

Reimplemented from CommOutQueue.

Definition at line 202 of file comm_out_queue.h.

◆ size()

int DummyCommOutQueue::size ( ) const
inlineoverridevirtual

Return number of lines in queue.

Reimplemented from CommOutQueue.

Definition at line 217 of file comm_out_queue.h.


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