fsfw/osal/FreeRTOS/QueueFactory.cpp

35 lines
813 B
C++
Raw Normal View History

2020-08-13 20:53:35 +02:00
#include "../../ipc/QueueFactory.h"
2018-07-13 15:56:37 +02:00
2020-08-13 20:53:35 +02:00
#include "MessageQueue.h"
2018-07-13 15:56:37 +02:00
QueueFactory* QueueFactory::factoryInstance = NULL;
ReturnValue_t MessageQueueSenderIF::sendMessage(MessageQueueId_t sendTo,
MessageQueueMessage* message, MessageQueueId_t sentFrom,bool ignoreFault) {
return MessageQueue::sendMessageFromMessageQueue(sendTo,message,sentFrom,ignoreFault);
2018-07-13 15:56:37 +02:00
}
QueueFactory* QueueFactory::instance() {
if (factoryInstance == NULL) {
factoryInstance = new QueueFactory;
}
return factoryInstance;
}
QueueFactory::QueueFactory() {
}
QueueFactory::~QueueFactory() {
}
MessageQueueIF* QueueFactory::createMessageQueue(uint32_t message_depth,
size_t maxMessageSize) {
return new MessageQueue(message_depth, maxMessageSize);
2018-07-13 15:56:37 +02:00
}
void QueueFactory::deleteMessageQueue(MessageQueueIF* queue) {
delete queue;
}