An abstract message queue. The concrete implementation (the STL queue or the IPC queue) depends on the deployment mode (mixed or split)
More...
#include <AbstractMsgQueue.h>
|
| AbstractMsgQueue (const std::string &name, MessageQueueType::MessageQueueType type, std::size_t maxNMessages, std::size_t nDiagMessages) |
| Constructor. More...
|
|
An abstract message queue. The concrete implementation (the STL queue or the IPC queue) depends on the deployment mode (mixed or split)
fesa::AbstractMsgQueue::AbstractMsgQueue |
( |
const std::string & |
name, |
|
|
MessageQueueType::MessageQueueType |
type, |
|
|
std::size_t |
maxNMessages, |
|
|
std::size_t |
nDiagMessages |
|
) |
| |
|
protected |
Constructor.
- Parameters
-
name | The name of the queue |
type | The type of the queue |
maxNMessages | The maximal number of messages the queue can contain |
nDiagMessages | The number of messages reserved for diagnostics |
void fesa::AbstractMsgQueue::checkState |
( |
uint32_t |
msgPrio | ) |
const |
Check if the queue is full or "almost" full.
- Parameters
-
msgPrio | If msgPrio is HIGH, notify will work even if the queue is "almost" full |
- Exceptions
-
Wait for the next message in the queue, retrieve the message and consume the message by resetting the message pointer.
- Returns
- The pointer to the consumed message
- Exceptions
-
Implemented in fesa::IpcMsgQueue, and fesa::LocalMsgQueue.
std::size_t fesa::AbstractMsgQueue::getMaxMessageSize |
( |
| ) |
const |
|
virtual |
Get the maximal size of a message in bytes.
- Returns
- The maximal size of a message
std::size_t fesa::AbstractMsgQueue::getMaxNMessages |
( |
| ) |
const |
|
inline |
Get the maximal number of messages the queue can contain.
- Returns
- The queue's maximal number of messages
const std::string & fesa::AbstractMsgQueue::getName |
( |
| ) |
const |
|
inline |
Get the queue's name.
- Returns
- The queue's name
virtual std::size_t fesa::AbstractMsgQueue::getNMessages |
( |
| ) |
const |
|
pure virtual |
bool fesa::AbstractMsgQueue::isAlmostFull |
( |
| ) |
const |
Check if the queue is "almost" full (i.e. only diagnostics messages are allowed)
- Returns
- true if the queue is "almost" full, false otherwise
bool fesa::AbstractMsgQueue::isFull |
( |
| ) |
const |
Check if the queue is full.
- Returns
- true if the queue is full, false otherwise
virtual void fesa::AbstractMsgQueue::postMsg |
( |
const AbstractMessage * |
msg | ) |
|
|
pure virtual |
virtual void fesa::AbstractMsgQueue::purge |
( |
| ) |
|
|
pure virtual |
The documentation for this class was generated from the following files:
- AbstractMsgQueue.h
- AbstractMsgQueue.cpp