2018-07-13 15:56:37 +02:00
|
|
|
#include <framework/ipc/QueueFactory.h>
|
|
|
|
|
2020-02-15 15:37:00 +01:00
|
|
|
#include <framework/osal/FreeRTOS/MessageQueue.h>
|
2018-07-13 15:56:37 +02:00
|
|
|
|
|
|
|
|
|
|
|
QueueFactory* QueueFactory::factoryInstance = NULL;
|
|
|
|
|
|
|
|
|
|
|
|
ReturnValue_t MessageQueueSenderIF::sendMessage(MessageQueueId_t sendTo,
|
2019-08-28 14:50:24 +02:00
|
|
|
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,
|
2020-06-06 15:47:33 +02:00
|
|
|
size_t maxMessageSize) {
|
|
|
|
return new MessageQueue(message_depth, maxMessageSize);
|
2018-07-13 15:56:37 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void QueueFactory::deleteMessageQueue(MessageQueueIF* queue) {
|
|
|
|
delete queue;
|
|
|
|
}
|