diff --git a/inc/ECSS_Definitions.hpp b/inc/ECSS_Definitions.hpp index 5c8ee8af2cdeb6aac81ae6e9f63cc733fa215ccd..af4e33b20e791dce1c7164bf0e47b70e4f30e240 100644 --- a/inc/ECSS_Definitions.hpp +++ b/inc/ECSS_Definitions.hpp @@ -186,6 +186,13 @@ inline const uint8_t ECSSMaxReportTypeDefinitions = 20; */ inline const uint8_t ECSSMaxServiceTypeDefinitions = 10; +/** + * The number of possible combinations between application processes and service types, i.e. the number of all + * possible (applicationID, serviceType) pairs. + */ +inline const uint8_t ECSSMaxApplicationsServicesCombinations = ECSSMaxControlledApplicationProcesses * + ECSSMaxServiceTypeDefinitions; + /** * The max number of event definition IDs per event report blocking type definition in the event report blocking * configuration diff --git a/inc/Helpers/ForwardControlConfiguration.hpp b/inc/Helpers/ForwardControlConfiguration.hpp index dfd0e58bdc0fcc586f57c8526c0a0348e8d79d21..da573dd1ff4979caaa4ed8953fb88874ee3a1e35 100644 --- a/inc/Helpers/ForwardControlConfiguration.hpp +++ b/inc/Helpers/ForwardControlConfiguration.hpp @@ -39,9 +39,7 @@ public: * already exist in the map, and the requested report type is located in the vector of report types, which corresponds * to the appID and service type. */ - etl::map<AppServiceKey, ReportTypeDefinitions, - ECSSMaxControlledApplicationProcesses * ECSSMaxServiceTypeDefinitions> - definitions; + etl::map<AppServiceKey, ReportTypeDefinitions, ECSSMaxApplicationsServicesCombinations> definitions; ApplicationProcessConfiguration() = default; }; diff --git a/src/Services/RealTimeForwardingControlService.cpp b/src/Services/RealTimeForwardingControlService.cpp index d7ff81d70f6c93fc8326eb157e44f531d159e064..72303f2becf46f13b8b872ba5f284b843493a114 100644 --- a/src/Services/RealTimeForwardingControlService.cpp +++ b/src/Services/RealTimeForwardingControlService.cpp @@ -43,7 +43,7 @@ bool RealTimeForwardingControlService::isAppControlled(Message& request, uint8_t bool RealTimeForwardingControlService::checkApplicationOfAppProcessConfig(Message& request, uint8_t applicationID, uint8_t numOfServices) { if (not isAppControlled(request, applicationID) or allServiceTypesAllowed(request, applicationID)) { - for (uint8_t l = 0; l < numOfServices; l++) { + for (uint8_t i = 0; i < numOfServices; i++) { request.skipBytes(1); uint8_t numOfMessages = request.readUint8(); request.skipBytes(numOfMessages);