srv 20 fixes
This commit is contained in:
parent
8dc66784a8
commit
40a8c9a495
@ -133,6 +133,9 @@ ReturnValue_t Service20ParameterManagement::prepareLoadCommand(
|
|||||||
store_address_t storeAddress;
|
store_address_t storeAddress;
|
||||||
size_t parameterDataLen = tcDataLen - sizeof(object_id_t) - sizeof(ParameterId_t) -
|
size_t parameterDataLen = tcDataLen - sizeof(object_id_t) - sizeof(ParameterId_t) -
|
||||||
sizeof(uint32_t);
|
sizeof(uint32_t);
|
||||||
|
if(parameterDataLen == 0) {
|
||||||
|
return CommandingServiceBase::INVALID_TC;
|
||||||
|
}
|
||||||
ReturnValue_t result = IPCStore->getFreeElement(&storeAddress,
|
ReturnValue_t result = IPCStore->getFreeElement(&storeAddress,
|
||||||
parameterDataLen, &storePointer);
|
parameterDataLen, &storePointer);
|
||||||
if(result != HasReturnvaluesIF::RETURN_OK) {
|
if(result != HasReturnvaluesIF::RETURN_OK) {
|
||||||
|
@ -27,12 +27,11 @@ public:
|
|||||||
ParameterCommand(uint8_t* storePointer, size_t parameterDataLen):
|
ParameterCommand(uint8_t* storePointer, size_t parameterDataLen):
|
||||||
parameterBuffer(storePointer, parameterDataLen) {
|
parameterBuffer(storePointer, parameterDataLen) {
|
||||||
#if FSFW_VERBOSE_LEVEL >= 1
|
#if FSFW_VERBOSE_LEVEL >= 1
|
||||||
if(parameterDataLen < sizeof(object_id_t) + sizeof(ParameterId_t) + 4) {
|
if(parameterDataLen == 0) {
|
||||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||||
sif::warning << "ParameterCommand: Parameter data length is less than 12!"
|
sif::warning << "ParameterCommand: Parameter data length is 0" << std::endl;
|
||||||
<< std::endl;
|
|
||||||
#else
|
#else
|
||||||
sif::printWarning("ParameterCommand: Parameter data length is less than 12!\n");
|
sif::printWarning("ParameterCommand: Parameter data length is 0!\n");
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
#endif /* FSFW_VERBOSE_LEVEL >= 1 */
|
#endif /* FSFW_VERBOSE_LEVEL >= 1 */
|
||||||
|
Loading…
Reference in New Issue
Block a user