Merge remote-tracking branch 'origin/development' into mueller/master
This commit is contained in:
commit
b06113993c
@ -5,6 +5,8 @@
|
|||||||
#include "../../ipc/MutexFactory.h"
|
#include "../../ipc/MutexFactory.h"
|
||||||
#include "../../ipc/MutexGuard.h"
|
#include "../../ipc/MutexGuard.h"
|
||||||
|
|
||||||
|
#include <cstring>
|
||||||
|
|
||||||
MessageQueue::MessageQueue(size_t messageDepth, size_t maxMessageSize):
|
MessageQueue::MessageQueue(size_t messageDepth, size_t maxMessageSize):
|
||||||
messageSize(maxMessageSize), messageDepth(messageDepth) {
|
messageSize(maxMessageSize), messageDepth(messageDepth) {
|
||||||
queueLock = MutexFactory::instance()->createMutex();
|
queueLock = MutexFactory::instance()->createMutex();
|
||||||
@ -126,8 +128,7 @@ ReturnValue_t MessageQueue::sendMessageFromMessageQueue(MessageQueueId_t sendTo,
|
|||||||
internalErrorReporter->queueMessageNotSent();
|
internalErrorReporter->queueMessageNotSent();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// TODO: Better returnvalue
|
return MessageQueueIF::DESTINATION_INVALID;
|
||||||
return HasReturnvaluesIF::RETURN_FAILED;
|
|
||||||
}
|
}
|
||||||
if(targetQueue->messageQueue.size() < targetQueue->messageDepth) {
|
if(targetQueue->messageQueue.size() < targetQueue->messageDepth) {
|
||||||
MutexGuard mutexLock(targetQueue->queueLock, MutexIF::TimeoutType::WAITING, 20);
|
MutexGuard mutexLock(targetQueue->queueLock, MutexIF::TimeoutType::WAITING, 20);
|
||||||
|
@ -217,15 +217,15 @@ private:
|
|||||||
* @brief The class stores the queue id it got assigned.
|
* @brief The class stores the queue id it got assigned.
|
||||||
* If initialization fails, the queue id is set to zero.
|
* If initialization fails, the queue id is set to zero.
|
||||||
*/
|
*/
|
||||||
MessageQueueId_t mqId = 0;
|
MessageQueueId_t mqId = MessageQueueIF::NO_QUEUE;
|
||||||
size_t messageSize = 0;
|
size_t messageSize = 0;
|
||||||
size_t messageDepth = 0;
|
size_t messageDepth = 0;
|
||||||
|
|
||||||
MutexIF* queueLock;
|
MutexIF* queueLock;
|
||||||
|
|
||||||
bool defaultDestinationSet = false;
|
bool defaultDestinationSet = false;
|
||||||
MessageQueueId_t defaultDestination = 0;
|
MessageQueueId_t defaultDestination = MessageQueueIF::NO_QUEUE;
|
||||||
MessageQueueId_t lastPartner = 0;
|
MessageQueueId_t lastPartner = MessageQueueIF::NO_QUEUE;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* FRAMEWORK_OSAL_HOST_MESSAGEQUEUE_H_ */
|
#endif /* FRAMEWORK_OSAL_HOST_MESSAGEQUEUE_H_ */
|
||||||
|
@ -19,7 +19,10 @@
|
|||||||
class SerializeIF {
|
class SerializeIF {
|
||||||
public:
|
public:
|
||||||
enum class Endianness : uint8_t {
|
enum class Endianness : uint8_t {
|
||||||
BIG, LITTLE, MACHINE
|
BIG,
|
||||||
|
LITTLE,
|
||||||
|
MACHINE,
|
||||||
|
NETWORK = BIG // Added for convenience like htons on sockets
|
||||||
};
|
};
|
||||||
|
|
||||||
static const uint8_t INTERFACE_ID = CLASS_ID::SERIALIZE_IF;
|
static const uint8_t INTERFACE_ID = CLASS_ID::SERIALIZE_IF;
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
#include <FSFWConfig.h>
|
#include <FSFWConfig.h>
|
||||||
#include "../returnvalues/HasReturnvaluesIF.h"
|
#include "../returnvalues/HasReturnvaluesIF.h"
|
||||||
|
#include <FSFWConfig.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A class implementing this IF provides facilities to add a time stamp to the
|
* A class implementing this IF provides facilities to add a time stamp to the
|
||||||
|
Loading…
Reference in New Issue
Block a user