From 4551cbab8f9a90adb4fdfc5b92b33791b2464cd4 Mon Sep 17 00:00:00 2001 From: athatheo <vostidi@hotmail.com> Date: Wed, 3 Apr 2019 15:25:10 +0300 Subject: [PATCH] Reformatted code --- inc/Services/EventActionService.hpp | 5 ++--- src/Services/EventActionService.cpp | 15 +++++---------- 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/inc/Services/EventActionService.hpp b/inc/Services/EventActionService.hpp index c2a8cd55..890c7c07 100644 --- a/inc/Services/EventActionService.hpp +++ b/inc/Services/EventActionService.hpp @@ -56,7 +56,7 @@ public: friend EventReportService; etl::map<uint16_t, EventActionDefinition, ECSS_EVENT_ACTION_STRUCT_ARRAY_SIZE> - eventActionDefinitionMap; + eventActionDefinitionMap; EventActionService() { serviceType = 19; @@ -123,10 +123,9 @@ public: * Getter for event-action function status * @return eventActionFunctionStatus */ - bool getEventActionFunctionStatus(){ + bool getEventActionFunctionStatus() { return eventActionFunctionStatus; } - }; #endif //ECSS_SERVICES_EVENTACTIONSERVICE_HPP diff --git a/src/Services/EventActionService.cpp b/src/Services/EventActionService.cpp index c147456b..697e2f2b 100644 --- a/src/Services/EventActionService.cpp +++ b/src/Services/EventActionService.cpp @@ -29,8 +29,7 @@ void EventActionService::addEventActionDefinitions(Message &message) { } else { char data[ECSS_TC_REQUEST_STRING_SIZE]; message.readString(data, message.dataSize - 4); - eventActionDefinitionMap[eventDefinitionID].request = - String<ECSS_TC_REQUEST_STRING_SIZE>(data); + eventActionDefinitionMap[eventDefinitionID].request = String<ECSS_TC_REQUEST_STRING_SIZE>(data); } } else { ErrorHandler::reportError(message, ErrorHandler::EventActionAddEnabledDefinitionError); @@ -50,8 +49,7 @@ void EventActionService::deleteEventActionDefinitions(Message &message) { // use it anywhere eventActionDefinitionMap[eventDefinitionID].applicationId = applicationID; if (eventActionDefinitionMap[eventDefinitionID].enabled == true) { - ErrorHandler::reportError(message, - ErrorHandler::EventActionDeleteEnabledDefinitionError); + ErrorHandler::reportError(message, ErrorHandler::EventActionDeleteEnabledDefinitionError); } else { eventActionDefinitionMap.erase(eventDefinitionID); } @@ -78,15 +76,13 @@ void EventActionService::enableEventActionDefinitions(Message &message) { for (uint16_t i = 0; i < numberOfEventActionDefinitions; i++) { uint16_t applicationID = message.readEnum16(); uint16_t eventDefinitionID = message.readEnum16(); - if (eventActionDefinitionMap.find(eventDefinitionID) != eventActionDefinitionMap - .end()) { + if (eventActionDefinitionMap.find(eventDefinitionID) != eventActionDefinitionMap.end()) { // This is need to pass the cpp check. The applicationId should be used // somewhere eventActionDefinitionMap[eventDefinitionID].applicationId = applicationID; eventActionDefinitionMap[eventDefinitionID].enabled = true; } else { - ErrorHandler::reportError(message, - ErrorHandler::EventActionUnknownDefinitionError); + ErrorHandler::reportError(message, ErrorHandler::EventActionUnknownDefinitionError); } } } else { @@ -113,8 +109,7 @@ void EventActionService::disableEventActionDefinitions(Message &message) { eventActionDefinitionMap[eventDefinitionID].applicationId = applicationID; eventActionDefinitionMap[eventDefinitionID].enabled = false; } else { - ErrorHandler::reportError(message, - ErrorHandler::EventActionUnknownDefinitionError); + ErrorHandler::reportError(message, ErrorHandler::EventActionUnknownDefinitionError); } } } else { -- GitLab