added static function to create command id
This commit is contained in:
parent
9e9113912b
commit
cc84d542c8
@ -20,9 +20,12 @@ public:
|
|||||||
* to set a rejected reply, which contains a returnvalue and the initial
|
* to set a rejected reply, which contains a returnvalue and the initial
|
||||||
* command.
|
* command.
|
||||||
*/
|
*/
|
||||||
static constexpr size_t MINIMUM_COMMAND_MESSAGE_SIZE =
|
static constexpr size_t MINIMUM_COMMAND_MESSAGE_SIZE = CommandMessageIF::HEADER_SIZE +
|
||||||
CommandMessageIF::HEADER_SIZE + sizeof(ReturnValue_t) +
|
sizeof(ReturnValue_t) + sizeof(Command_t);
|
||||||
sizeof(Command_t);
|
|
||||||
|
static Command_t makeCommandId(uint8_t messageId, uint8_t uniqueId) {
|
||||||
|
return ((messageId << 8) | uniqueId);
|
||||||
|
}
|
||||||
|
|
||||||
static const uint8_t INTERFACE_ID = CLASS_ID::COMMAND_MESSAGE;
|
static const uint8_t INTERFACE_ID = CLASS_ID::COMMAND_MESSAGE;
|
||||||
static const ReturnValue_t UNKNOWN_COMMAND = MAKE_RETURN_CODE(0x01);
|
static const ReturnValue_t UNKNOWN_COMMAND = MAKE_RETURN_CODE(0x01);
|
||||||
|
Loading…
Reference in New Issue
Block a user