updating code from Flying Laptop
This is the framework of Flying Laptop OBSW version A.13.0.
This commit is contained in:
33
ipc/QueueFactory.h
Normal file
33
ipc/QueueFactory.h
Normal file
@ -0,0 +1,33 @@
|
||||
#ifndef FRAMEWORK_IPC_QUEUEFACTORY_H_
|
||||
#define FRAMEWORK_IPC_QUEUEFACTORY_H_
|
||||
|
||||
#include <framework/ipc/MessageQueueIF.h>
|
||||
#include <stdint.h>
|
||||
/**
|
||||
* Creates message queues.
|
||||
* This class is a "singleton" interface, i.e. it provides an
|
||||
* interface, but also is the base class for a singleton.
|
||||
*/
|
||||
class QueueFactory {
|
||||
public:
|
||||
virtual ~QueueFactory();
|
||||
/**
|
||||
* Returns the single instance of QueueFactory.
|
||||
* The implementation of #instance is found in its subclasses.
|
||||
* Thus, we choose link-time variability of the instance.
|
||||
*/
|
||||
static QueueFactory* instance();
|
||||
|
||||
MessageQueueIF* createMessageQueue(uint32_t message_depth = 3,
|
||||
uint32_t max_message_size = MessageQueueMessage::MAX_MESSAGE_SIZE);
|
||||
|
||||
void deleteMessageQueue(MessageQueueIF* queue);
|
||||
private:
|
||||
/**
|
||||
* External instantiation is not allowed.
|
||||
*/
|
||||
QueueFactory();
|
||||
static QueueFactory* factoryInstance;
|
||||
};
|
||||
|
||||
#endif /* FRAMEWORK_IPC_QUEUEFACTORY_H_ */
|
Reference in New Issue
Block a user