diff --git a/inc/Services/RealTimeForwardingControlService.hpp b/inc/Services/RealTimeForwardingControlService.hpp index a675f7d965dc50431fa0bf0d192eed2905b5fd80..ebe27755061bc6ee7511d19c1129fa6a86e29c89 100644 --- a/inc/Services/RealTimeForwardingControlService.hpp +++ b/inc/Services/RealTimeForwardingControlService.hpp @@ -139,19 +139,19 @@ private: * Checks whether the requested application is present in the application process configuration. * Reports an error if one exist, skipping the necessary amount of bytes in the request. */ - bool applicationExists(Message& request, uint8_t applicationID, uint8_t numOfServices); + bool isApplicationInConfiguration(Message& request, uint8_t applicationID, uint8_t numOfServices); /** * Checks whether the requested service type is present in the application process configuration. * Reports an error if one exist, skipping the necessary amount of bytes in the request. */ - bool serviceTypeExists(Message& request, uint8_t applicationID, uint8_t serviceType, uint8_t numOfMessages); + bool isServiceTypeInConfiguration(Message& request, uint8_t applicationID, uint8_t serviceType, uint8_t numOfMessages); /** * Checks whether the requested report type is present in the application process configuration. * Reports an error if one exist. */ - bool reportTypeExists(Message& request, uint8_t applicationID, uint8_t serviceType, uint8_t messageType); + bool isReportTypeInConfiguration(Message& request, uint8_t applicationID, uint8_t serviceType, uint8_t messageType); /** * Deletes the requested service type from the application process configuration. If the deletion results in an diff --git a/src/Services/RealTimeForwardingControlService.cpp b/src/Services/RealTimeForwardingControlService.cpp index 6fca6aa46203f9b38d6014a13e5c5ee60affec00..ff3f503b23b7ae880d02f4c1607263098be87b13 100644 --- a/src/Services/RealTimeForwardingControlService.cpp +++ b/src/Services/RealTimeForwardingControlService.cpp @@ -175,7 +175,7 @@ void RealTimeForwardingControlService::deleteApplicationProcess(uint8_t applicat } } -bool RealTimeForwardingControlService::applicationExists(Message& request, uint8_t applicationID, +bool RealTimeForwardingControlService::isApplicationInConfiguration(Message& request, uint8_t applicationID, uint8_t numOfServices) { if (not isApplicationEnabled(applicationID)) { ErrorHandler::reportError(request, ErrorHandler::ExecutionStartErrorType::NonExistentApplicationProcess); @@ -189,7 +189,7 @@ bool RealTimeForwardingControlService::applicationExists(Message& request, uint8 return true; } -bool RealTimeForwardingControlService::serviceTypeExists(Message& request, uint8_t applicationID, uint8_t serviceType, +bool RealTimeForwardingControlService::isServiceTypeInConfiguration(Message& request, uint8_t applicationID, uint8_t serviceType, uint8_t numOfMessages) { if (not isServiceTypeEnabled(applicationID, serviceType)) { ErrorHandler::reportError(request, ErrorHandler::ExecutionStartErrorType::NonExistentServiceTypeDefinition); @@ -199,7 +199,7 @@ bool RealTimeForwardingControlService::serviceTypeExists(Message& request, uint8 return true; } -bool RealTimeForwardingControlService::reportTypeExists(Message& request, uint8_t applicationID, uint8_t serviceType, +bool RealTimeForwardingControlService::isReportTypeInConfiguration(Message& request, uint8_t applicationID, uint8_t serviceType, uint8_t messageType) { if (not isReportTypeEnabled(messageType, applicationID, serviceType)) { ErrorHandler::reportError(request, ErrorHandler::ExecutionStartErrorType::NonExistentReportTypeDefinition); @@ -242,7 +242,7 @@ void RealTimeForwardingControlService::deleteReportTypesFromAppProcessConfigurat uint8_t applicationID = request.readUint8(); uint8_t numOfServices = request.readUint8(); - if (not applicationExists(request, applicationID, numOfServices)) { + if (not isApplicationInConfiguration(request, applicationID, numOfServices)) { continue; } if (numOfServices == 0) { @@ -254,7 +254,7 @@ void RealTimeForwardingControlService::deleteReportTypesFromAppProcessConfigurat uint8_t serviceType = request.readUint8(); uint8_t numOfMessages = request.readUint8(); - if (not serviceTypeExists(request, applicationID, serviceType, numOfMessages)) { + if (not isServiceTypeInConfiguration(request, applicationID, serviceType, numOfMessages)) { continue; } if (numOfMessages == 0) { @@ -265,7 +265,7 @@ void RealTimeForwardingControlService::deleteReportTypesFromAppProcessConfigurat for (uint8_t currentMessageNumber = 0; currentMessageNumber < numOfMessages; currentMessageNumber++) { uint8_t messageType = request.readUint8(); - if (not reportTypeExists(request, applicationID, serviceType, messageType)) { + if (not isReportTypeInConfiguration(request, applicationID, serviceType, messageType)) { continue; } deleteReportRecursive(applicationID, serviceType, messageType);