Skip to content
Snippets Groups Projects
Commit bf08d813 authored by kpetridis's avatar kpetridis
Browse files

Removed unused functions and variables

parent 8c9efdcd
No related branches found
No related tags found
No related merge requests found
......@@ -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])
......
......@@ -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.
......
......@@ -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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment