Queue of NMEA0183 messages which only holds a limited amount of each message type.  
 More...
#include <comm_out_queue.h>
|  | 
| virtual bool | push_back (const std::string &line) | 
|  | Insert valid line of NMEA0183 data in buffer. 
 | 
|  | 
| virtual std::string | pop () | 
|  | Return next line to send and remove it from buffer, throws exception if empty. 
 | 
|  | 
| virtual int | size () const | 
|  | Return number of lines in queue. 
 | 
|  | 
|  | 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 | 
|  | 
|  | 
| using | duration_ms = std::chrono::duration< unsigned, std::milli > | 
|  | 
Queue of NMEA0183 messages which only holds a limited amount of each message type. 
Definition at line 101 of file comm_out_queue.h.
◆ duration_ms
  
  | 
        
          | using CommOutQueue::duration_ms =  std::chrono::duration<unsigned, std::milli> |  | protected | 
 
 
◆ CommOutQueue() [1/3]
      
        
          | 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. 
- Parameters
- 
  
    | max_buffered | Max number of messages of a type kept in buffer without discarding data as overrun. |  | min_msg_gap | minimum time between two messages of the same type without applying rate limits. |  
 
Definition at line 98 of file comm_out_queue.cpp.
 
 
◆ CommOutQueue() [2/3]
  
  | 
        
          | CommOutQueue::CommOutQueue | ( | unsigned | max_buffered | ) |  |  | inline | 
 
Create a buffer which stores at most max_buffered items of each message. 
Definition at line 133 of file comm_out_queue.h.
 
 
◆ CommOutQueue() [3/3]
  
  | 
        
          | CommOutQueue::CommOutQueue | ( |  | ) |  |  | inline | 
 
Default buffer, allows 10 buffered messages of each type, applies rate limits when repeated with less than 600 ms intervals. 
Definition at line 139 of file comm_out_queue.h.
 
 
◆ pop()
  
  | 
        
          | std::string CommOutQueue::pop | ( |  | ) |  |  | virtual | 
 
 
◆ push_back()
  
  | 
        
          | bool CommOutQueue::push_back | ( | const std::string & | line | ) |  |  | virtual | 
 
 
◆ size()
  
  | 
        
          | int CommOutQueue::size | ( |  | ) | const |  | virtual | 
 
 
◆ m_buffer
◆ m_min_msg_gap
  
  | 
        
          | duration_ms CommOutQueue::m_min_msg_gap |  | protected | 
 
 
◆ m_mutex
  
  | 
        
          | std::mutex CommOutQueue::m_mutex |  | mutableprotected | 
 
 
◆ m_overrun_reported
  
  | 
        
          | bool CommOutQueue::m_overrun_reported |  | protected | 
 
 
◆ m_rate_limits_logged
  
  | 
        
          | std::set<uint64_t> CommOutQueue::m_rate_limits_logged |  | protected | 
 
 
◆ m_size
The documentation for this class was generated from the following files: