diff --git a/src/Services/EventReportService.cpp b/src/Services/EventReportService.cpp index f7a0b227b70b7b8a978ed23981ecd1cd6b5f516f..4f9d50be6627a4ddc03c0e33629326b66aa1fccf 100644 --- a/src/Services/EventReportService.cpp +++ b/src/Services/EventReportService.cpp @@ -83,7 +83,7 @@ void EventReportService::listOfDisabledEventsReport() { Message report = createTM(8); uint16_t numberOfDisabledEvents = stateOfEvents.size() - stateOfEvents.count(); - report.appendByte(numberOfDisabledEvents); + report.appendHalfword(numberOfDisabledEvents); for (uint16_t i = 0; i < stateOfEvents.size(); i++) { if (stateOfEvents[i] == 0) { report.appendEnum16(i); diff --git a/test/Services/EventReportService.cpp b/test/Services/EventReportService.cpp index e666b2d439dc8504a34184cb25a41c4681b8a10e..e7e9cc23428bedf227932d393df66b420952d8d1 100644 --- a/test/Services/EventReportService.cpp +++ b/test/Services/EventReportService.cpp @@ -130,9 +130,9 @@ TEST_CASE("List of Disabled Events Report TM[5,8]", "[service][st05]") { CHECK(report.serviceType == 5); CHECK(report.messageType == 8); CHECK(report.packetType == Message::TM); // packet type(TM = 0, TC = 1) - REQUIRE(report.dataSize == 3); + REQUIRE(report.dataSize == 6); // Check for the information stored in report - CHECK(report.readHalfWord() == 2); + CHECK(report.readHalfword() == 2); CHECK(report.readEnum16() == 3); CHECK(report.readEnum16() == 6); }