bugfix hk message size
This commit is contained in:
parent
b68ad9e4f9
commit
d5ae74f860
@ -4,8 +4,8 @@
|
|||||||
HousekeepingMessage::HousekeepingMessage(MessageQueueMessageIF* message):
|
HousekeepingMessage::HousekeepingMessage(MessageQueueMessageIF* message):
|
||||||
CommandMessageBase(message) {
|
CommandMessageBase(message) {
|
||||||
if(message->getMaximumMessageSize() < HK_MESSAGE_SIZE) {
|
if(message->getMaximumMessageSize() < HK_MESSAGE_SIZE) {
|
||||||
sif::error << "CommandMessage::ComandMessage: Passed message buffer"
|
sif::error << "HousekeepingMessage::HousekeepingMessage: Passed "
|
||||||
" can not hold minimum "<< HK_MESSAGE_SIZE
|
"message buffer can not hold minimum " << HK_MESSAGE_SIZE
|
||||||
<< " bytes!" << std::endl;
|
<< " bytes!" << std::endl;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -36,8 +36,8 @@ union sid_t {
|
|||||||
class HousekeepingMessage : public CommandMessageBase {
|
class HousekeepingMessage : public CommandMessageBase {
|
||||||
public:
|
public:
|
||||||
|
|
||||||
static constexpr size_t HK_MESSAGE_SIZE = sizeof(MessageQueueId_t)
|
static constexpr size_t HK_MESSAGE_SIZE = CommandMessageIF::HEADER_SIZE +
|
||||||
+ sizeof(Command_t) + sizeof(sid_t) * sizeof(uint32_t);
|
sizeof(sid_t) + sizeof(uint32_t);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The HK message is initialized with a pointer to a message which holds
|
* The HK message is initialized with a pointer to a message which holds
|
||||||
|
@ -12,7 +12,7 @@ CommandMessage::CommandMessage(MessageQueueMessageIF* receiverMessage):
|
|||||||
if(receiverMessage->getMaximumMessageSize() <
|
if(receiverMessage->getMaximumMessageSize() <
|
||||||
getMinimumMessageSize()) {
|
getMinimumMessageSize()) {
|
||||||
sif::error << "CommandMessage::ComandMessage: Passed message buffer"
|
sif::error << "CommandMessage::ComandMessage: Passed message buffer"
|
||||||
" can not hold minimum "<< MINIMUM_COMMAND_MESSAGE_SIZE
|
" can not hold minimum "<< getMinimumMessageSize()
|
||||||
<< " bytes!" << std::endl;
|
<< " bytes!" << std::endl;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user