fixed some message queue includes
This commit is contained in:
@ -1,21 +1,23 @@
|
||||
#ifndef FSFW_IPC_MESSAGEQUEUEIF_H_
|
||||
#define FSFW_IPC_MESSAGEQUEUEIF_H_
|
||||
|
||||
#include "MessageQueueMessageIF.h"
|
||||
#include "messageQueueDefintions.h"
|
||||
#include "../returnvalues/HasReturnvaluesIF.h"
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
|
||||
// COULDDO: We could support blocking calls
|
||||
// semaphores are being implemented, which makes this idea even more iteresting.
|
||||
|
||||
|
||||
/**
|
||||
* @defgroup message_queue Message Queue
|
||||
* @brief Message Queue related software components
|
||||
*/
|
||||
|
||||
#include "../ipc/MessageQueueMessage.h"
|
||||
#include "../ipc/MessageQueueSenderIF.h"
|
||||
#include "../returnvalues/HasReturnvaluesIF.h"
|
||||
class MessageQueueIF {
|
||||
public:
|
||||
static const MessageQueueId_t NO_QUEUE = MessageQueueMessageIF::NO_QUEUE; //!< Ugly hack.
|
||||
static const MessageQueueId_t NO_QUEUE = 0;
|
||||
|
||||
static const uint8_t INTERFACE_ID = CLASS_ID::MESSAGE_QUEUE_IF;
|
||||
//! No new messages on the queue
|
||||
|
@ -2,7 +2,6 @@
|
||||
#define FSFW_IPC_MESSAGEQUEUEMESSAGE_H_
|
||||
|
||||
#include "../ipc/MessageQueueMessageIF.h"
|
||||
#include "../ipc/MessageQueueSenderIF.h"
|
||||
#include <cstddef>
|
||||
|
||||
/**
|
||||
|
@ -1,24 +1,13 @@
|
||||
#ifndef FRAMEWORK_IPC_MESSAGEQUEUEMESSAGEIF_H_
|
||||
#define FRAMEWORK_IPC_MESSAGEQUEUEMESSAGEIF_H_
|
||||
|
||||
#include "messageQueueDefintions.h"
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
|
||||
/*
|
||||
* TODO: Actually, the definition of this ID to be a uint32_t is not ideal and
|
||||
* breaks layering. However, it is difficult to keep layering, as the ID is
|
||||
* stored in many places and sent around in MessageQueueMessage.
|
||||
* Ideally, one would use the (current) object_id_t only, however, doing a
|
||||
* lookup of queueIDs for every call does not sound ideal.
|
||||
* In a first step, I'll circumvent the issue by not touching it,
|
||||
* maybe in a second step. This also influences Interface design
|
||||
* (getCommandQueue) and some other issues..
|
||||
*/
|
||||
|
||||
typedef uint32_t MessageQueueId_t;
|
||||
|
||||
class MessageQueueMessageIF {
|
||||
public:
|
||||
static const MessageQueueId_t NO_QUEUE = -1;
|
||||
|
||||
/**
|
||||
* @brief This constants defines the size of the header,
|
||||
* which is added to every message.
|
||||
|
@ -1,6 +1,7 @@
|
||||
#ifndef FRAMEWORK_IPC_MESSAGEQUEUESENDERIF_H_
|
||||
#define FRAMEWORK_IPC_MESSAGEQUEUESENDERIF_H_
|
||||
|
||||
#include "../ipc/MessageQueueIF.h"
|
||||
#include "../ipc/MessageQueueMessageIF.h"
|
||||
#include "../objectmanager/ObjectManagerIF.h"
|
||||
|
||||
@ -15,7 +16,7 @@ public:
|
||||
*/
|
||||
static ReturnValue_t sendMessage(MessageQueueId_t sendTo,
|
||||
MessageQueueMessageIF* message,
|
||||
MessageQueueId_t sentFrom = MessageQueueMessageIF::NO_QUEUE,
|
||||
MessageQueueId_t sentFrom = MessageQueueIF::NO_QUEUE,
|
||||
bool ignoreFault = false);
|
||||
private:
|
||||
MessageQueueSenderIF() {}
|
||||
|
@ -2,7 +2,9 @@
|
||||
#define FRAMEWORK_IPC_QUEUEFACTORY_H_
|
||||
|
||||
#include "MessageQueueIF.h"
|
||||
#include "MessageQueueMessage.h"
|
||||
#include <cstdint>
|
||||
|
||||
/**
|
||||
* Creates message queues.
|
||||
* This class is a "singleton" interface, i.e. it provides an
|
||||
|
18
ipc/messageQueueDefintions.h
Normal file
18
ipc/messageQueueDefintions.h
Normal file
@ -0,0 +1,18 @@
|
||||
#ifndef FSFW_IPC_MESSAGEQUEUEDEFINTIONS_H_
|
||||
#define FSFW_IPC_MESSAGEQUEUEDEFINTIONS_H_
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
/*
|
||||
* TODO: Actually, the definition of this ID to be a uint32_t is not ideal and
|
||||
* breaks layering. However, it is difficult to keep layering, as the ID is
|
||||
* stored in many places and sent around in MessageQueueMessage.
|
||||
* Ideally, one would use the (current) object_id_t only, however, doing a
|
||||
* lookup of queueIDs for every call does not sound ideal.
|
||||
* In a first step, I'll circumvent the issue by not touching it,
|
||||
* maybe in a second step. This also influences Interface design
|
||||
* (getCommandQueue) and some other issues..
|
||||
*/
|
||||
using MessageQueueId_t = uint32_t;
|
||||
|
||||
#endif /* FSFW_IPC_MESSAGEQUEUEDEFINTIONS_H_ */
|
Reference in New Issue
Block a user