From 333b5f16929079f3abfa8a9447ae0ad872686fd9 Mon Sep 17 00:00:00 2001 From: pavlidic <pavlidic@ece.auth.gr> Date: Thu, 6 Jul 2023 19:46:20 +0300 Subject: [PATCH] Change the name of the functions that check whether something exists in the configuration --- inc/Services/RealTimeForwardingControlService.hpp | 6 +++--- src/Services/RealTimeForwardingControlService.cpp | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/inc/Services/RealTimeForwardingControlService.hpp b/inc/Services/RealTimeForwardingControlService.hpp index a675f7d9..ebe27755 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 6fca6aa4..ff3f503b 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); -- GitLab