added getter for reject reply
This commit is contained in:
@ -120,3 +120,14 @@ void CommandMessage::setReplyRejected(ReturnValue_t reason,
|
||||
setParameter(reason);
|
||||
setParameter2(initialCommand);
|
||||
}
|
||||
|
||||
ReturnValue_t CommandMessage::getReplyRejectedReason(
|
||||
Command_t *initialCommand) const {
|
||||
ReturnValue_t reason = HasReturnvaluesIF::RETURN_FAILED;
|
||||
std::memcpy(&reason, getData(), sizeof(reason));
|
||||
if(initialCommand != nullptr) {
|
||||
std::memcpy(initialCommand, getData() + sizeof(reason),
|
||||
sizeof(Command_t));
|
||||
}
|
||||
return reason;
|
||||
}
|
||||
|
Reference in New Issue
Block a user