diff --git a/inc/Services/ParameterService.hpp b/inc/Services/ParameterService.hpp index f0761bea2a11cb725f20c95d751ced978dc28983..43987f7c1b8df4349d2e511eb9785ccbc150b490 100644 --- a/inc/Services/ParameterService.hpp +++ b/inc/Services/ParameterService.hpp @@ -31,7 +31,7 @@ struct Parameter { }; /** - * Parameter manager + * Parameter manager - ST[20] * Holds the list with the parameters and provides functions * for parameter reporting and modification. * diff --git a/src/Services/ParameterService.cpp b/src/Services/ParameterService.cpp index 4fa0e1b200d6981a97852c4b8e199d8063940d8f..3329d685e677df228aa9066a13eb42d3a923e6f4 100644 --- a/src/Services/ParameterService.cpp +++ b/src/Services/ParameterService.cpp @@ -73,7 +73,7 @@ Message ParameterService::reportParameterIds(Message paramIds) { reqParam.appendUint32(paramsList[currId].settingData); } else { - // generate failure of execution notification for ST[06] + // generate failure of execution notification for ST[06] continue; //ignore the invalid ID } } @@ -110,7 +110,7 @@ void ParameterService::setParameterIds(Message newParamValues) { paramsList[currId].settingData = newParamValues.readUint32(); } else { - // generate failure of execution notification for ST[06] + // generate failure of execution notification for ST[06] continue; // ignore the invalid ID } } @@ -119,7 +119,7 @@ void ParameterService::setParameterIds(Message newParamValues) { uint16_t ParameterService::numOfValidIds(Message idMsg) { - idMsg.readPosition = 0; + idMsg.resetRead(); // start reading from the beginning of the idMsg object // (original obj. will not be influenced if this is called by value) diff --git a/test/Services/ParameterService.cpp b/test/Services/ParameterService.cpp index c87cd7734c4b043078f61689324064b52c06a10a..43038dbe2730585baca1c536541302a1472b69b2 100644 --- a/test/Services/ParameterService.cpp +++ b/test/Services/ParameterService.cpp @@ -20,7 +20,7 @@ TEST_CASE("Parameter Report Subservice") { request.appendUint16(3); // valid report = pserv.reportParameterIds(request); - request.readPosition = 0; + request.resetRead(); uint16_t repIdCount = report.readUint16(); uint16_t reqIdCount = request.readUint16();