diff --git a/inc/ErrorHandler.hpp b/inc/ErrorHandler.hpp index c5409e1cda17127e178f2e931b49a94e02f6c557..bb49070a504d9a9b1128800f5d0599c7bf16eb6a 100644 --- a/inc/ErrorHandler.hpp +++ b/inc/ErrorHandler.hpp @@ -279,11 +279,6 @@ public: * Attempt to set a packet store size to a value that the available memory cannot handle (ST[15]). */ UnableToHandlePacketStoreSize = 36, - /** - * Attempt to add a new report type, when the addition of all report types is already enabled in the - * Application Process configuration (ST[14]) - */ - AllReportTypesAlreadyAllowed = 20, /** * Attempt to add a new service type, when the addition of all service types is already enabled in the * Application Process configuration (ST[14]) diff --git a/inc/Services/RealTimeForwardingControlService.hpp b/inc/Services/RealTimeForwardingControlService.hpp index 7d20fdf5232cb884fdf43a7f67d891b2648cb810..abeea61ba4c8d73f1a42294ab03b1e48a460421d 100644 --- a/inc/Services/RealTimeForwardingControlService.hpp +++ b/inc/Services/RealTimeForwardingControlService.hpp @@ -95,13 +95,7 @@ private: * * @return True: if the service type is valid and passes all the necessary error checking. */ - bool checkService(Message& request, uint8_t applicationID, uint8_t serviceType, uint8_t numOfMessages); - - /** - * Checks if all report types are allowed already, i.e. if the service type definition contains no report type - * definitions. - */ - bool allReportTypesAllowed(Message& request, uint8_t applicationID, uint8_t serviceType); + bool checkService(Message& request, uint8_t applicationID, uint8_t numOfMessages); /** * Checks if the maximum number of report type definitions per service type definition is reached. diff --git a/src/Services/RealTimeForwardingControlService.cpp b/src/Services/RealTimeForwardingControlService.cpp index 75c20e69fa461244f994bf72a1345af7b3eac03b..848f58ebc05640d60a3941e1a68e37b7f6d52f22 100644 --- a/src/Services/RealTimeForwardingControlService.cpp +++ b/src/Services/RealTimeForwardingControlService.cpp @@ -69,8 +69,7 @@ bool RealTimeForwardingControlService::maxServiceTypesReached(Message& request, return false; } -bool RealTimeForwardingControlService::checkService(Message& request, uint8_t applicationID, uint8_t serviceType, - uint8_t numOfMessages) { +bool RealTimeForwardingControlService::checkService(Message& request, uint8_t applicationID, uint8_t numOfMessages) { if (maxServiceTypesReached(request, applicationID)) { request.skipBytes(numOfMessages); return false; @@ -78,15 +77,6 @@ bool RealTimeForwardingControlService::checkService(Message& request, uint8_t ap return true; } -bool RealTimeForwardingControlService::allReportTypesAllowed(Message& request, uint8_t applicationID, - uint8_t serviceType) { - if (countReportsOfService(applicationID, serviceType) >= AllMessageTypes::messagesOfService[serviceType].size()) { - ErrorHandler::reportError(request, ErrorHandler::ExecutionStartErrorType::AllReportTypesAlreadyAllowed); - return true; - } - return false; -} - bool RealTimeForwardingControlService::maxReportTypesReached(Message& request, uint8_t applicationID, uint8_t serviceType) { if (countReportsOfService(applicationID, serviceType) >= AllMessageTypes::messagesOfService[serviceType].size()) { @@ -134,7 +124,7 @@ void RealTimeForwardingControlService::addReportTypesToAppProcessConfiguration(M uint8_t serviceType = request.readUint8(); uint8_t numOfMessages = request.readUint8(); - if (not checkService(request, applicationID, serviceType, numOfMessages)) { + if (not checkService(request, applicationID, numOfMessages)) { continue; }