fsfw/osal/FreeRTOS/QueueFactory.cpp

37 lines
880 B
C++
Raw Normal View History

2018-07-13 15:56:37 +02:00
#include <framework/ipc/QueueFactory.h>
2019-12-26 18:55:31 +01:00
#include <framework/osal/FreeRTOS/MessageQueue.h>
2018-07-13 15:56:37 +02:00
2020-05-16 20:58:48 +02:00
QueueFactory* QueueFactory::factoryInstance = nullptr;
2018-07-13 15:56:37 +02:00
ReturnValue_t MessageQueueSenderIF::sendMessage(MessageQueueId_t sendTo,
MessageQueueMessageIF* message, size_t maxSize,
MessageQueueId_t sentFrom, bool ignoreFault) {
return MessageQueue::sendMessageFromMessageQueue(sendTo,message, maxSize,
2020-05-16 20:58:48 +02:00
sentFrom,ignoreFault);
2018-07-13 15:56:37 +02:00
}
QueueFactory* QueueFactory::instance() {
2020-05-16 20:58:48 +02:00
if (factoryInstance == nullptr) {
2018-07-13 15:56:37 +02:00
factoryInstance = new QueueFactory;
}
return factoryInstance;
}
QueueFactory::QueueFactory() {
}
QueueFactory::~QueueFactory() {
}
MessageQueueIF* QueueFactory::createMessageQueue(uint32_t messageDepth,
2020-05-16 20:58:48 +02:00
size_t maxMessageSize) {
return new MessageQueue(messageDepth, maxMessageSize);
2018-07-13 15:56:37 +02:00
}
void QueueFactory::deleteMessageQueue(MessageQueueIF* queue) {
delete queue;
}