From bd83e558f024e610b55129d299e5baee957e1e73 Mon Sep 17 00:00:00 2001
From: hiluluk <thodkatz@gmail.com>
Date: Thu, 4 Apr 2019 19:54:26 +0300
Subject: [PATCH] Declare the execute() for the current services that execute
 TC packets

---
 inc/Services/EventActionService.hpp         |  9 ++++++++-
 inc/Services/EventReportService.hpp         | 10 ++++++++++
 inc/Services/FunctionManagementService.hpp  | 11 ++++++++++-
 inc/Services/MemoryManagementService.hpp    |  9 +++++++++
 inc/Services/ParameterService.hpp           |  9 +++++++++
 inc/Services/RequestVerificationService.hpp |  9 ---------
 inc/Services/TimeBasedSchedulingService.hpp |  9 +++++++++
 inc/Services/TimeManagementService.hpp      |  9 +++++++++
 8 files changed, 64 insertions(+), 11 deletions(-)

diff --git a/inc/Services/EventActionService.hpp b/inc/Services/EventActionService.hpp
index 3b561617..974a6526 100644
--- a/inc/Services/EventActionService.hpp
+++ b/inc/Services/EventActionService.hpp
@@ -5,7 +5,6 @@
 #define ECSS_EVENT_ACTION_STRUCT_ARRAY_SIZE 256
 
 #include "Service.hpp"
-#include "MessageParser.hpp"
 #include "etl/String.hpp"
 #include <Services/EventReportService.hpp>
 
@@ -120,6 +119,14 @@ public:
 		return eventActionFunctionStatus;
 	}
 
+	/**
+	 * It is responsible to call the suitable function that executes a telecommand packet. The source of that packet
+	 * is the ground station.
+	 *
+	 * @note This function is called from the main execute() that is defined in the file MessageParser.hpp
+	 * @param message Contains the necessary parameters to call the suitable subservice
+	 */
+	void execute(const Message &message);
 };
 
 #endif //ECSS_SERVICES_EVENTACTIONSERVICE_HPP
diff --git a/inc/Services/EventReportService.hpp b/inc/Services/EventReportService.hpp
index fdb32c0c..842afe02 100644
--- a/inc/Services/EventReportService.hpp
+++ b/inc/Services/EventReportService.hpp
@@ -3,6 +3,7 @@
 
 #include "Service.hpp"
 #include <etl/bitset.h>
+
 /**
  * Implementation of ST[05] event reporting service
  *
@@ -173,6 +174,15 @@ public:
 	etl::bitset<numberOfEvents> getStateOfEvents() {
 		return stateOfEvents;
 	}
+
+	/**
+	 * It is responsible to call the suitable function that executes a telecommand packet. The source of that packet
+	 * is the ground station.
+	 *
+	 * @note This function is called from the main execute() that is defined in the file MessageParser.hpp
+	 * @param param Contains the necessary parameters to call the suitable subservice
+	 */
+	void execute(const Message &message);
 };
 
 #endif //ECSS_SERVICES_EVENTREPORTSERVICE_HPP
diff --git a/inc/Services/FunctionManagementService.hpp b/inc/Services/FunctionManagementService.hpp
index 2267f7ea..a4887439 100644
--- a/inc/Services/FunctionManagementService.hpp
+++ b/inc/Services/FunctionManagementService.hpp
@@ -81,7 +81,7 @@ public:
 
 	/**
 	 * Includes a new function in the pointer map. This enables it to be called by way of a valid
-	 * TC [8,1] message.
+	 * TC[8,1] message.
 	 *
 	 * @param funcName the function's name. Max. length is FUNC_NAME_LENGTH bytes.
 	 * @param ptr pointer to a function of void return type and a MAX_ARG_LENGTH-lengthed byte
@@ -90,6 +90,15 @@ public:
 	void include(String<FUNC_NAME_LENGTH> funcName, void(*ptr)(String<MAX_ARG_LENGTH>));
 
 	int getMapSize() { return funcPtrIndex.size(); }
+
+	/**
+	 * It is responsible to call the suitable function that executes a telecommand packet. The source of that packet
+	 * is the ground station.
+	 *
+	 * @note This function is called from the main execute() that is defined in the file MessageParser.hpp
+	 * @param param Contains the necessary parameters to call the suitable subservice
+	 */
+	void execute(Message &param);
 };
 
 #endif //ECSS_SERVICES_FUNCTIONMANAGEMENTSERVICE_HPP
diff --git a/inc/Services/MemoryManagementService.hpp b/inc/Services/MemoryManagementService.hpp
index 5cd3c16d..418a0cbd 100644
--- a/inc/Services/MemoryManagementService.hpp
+++ b/inc/Services/MemoryManagementService.hpp
@@ -71,6 +71,15 @@ public:
 		 * @todo Only allow aligned memory address to be start addresses
 		 */
 		void checkRawData(Message &request);
+
+		/**
+		 * It is responsible to call the suitable function that executes a telecommand packet. The source of that packet
+		 * is the ground station.
+		 *
+		 * @note This function is called from the main execute() that is defined in the file MessageParser.hpp
+		 * @param param Contains the necessary parameters to call the suitable subservice
+		 */
+		void execute(Message &message);
 	} rawDataMemorySubservice;
 
 private:
diff --git a/inc/Services/ParameterService.hpp b/inc/Services/ParameterService.hpp
index 5672b3c6..e6d1aa58 100644
--- a/inc/Services/ParameterService.hpp
+++ b/inc/Services/ParameterService.hpp
@@ -87,6 +87,15 @@ public:
 	 */
 	void setParameterIds(Message& newParamValues);
 
+	/**
+	 * It is responsible to call the suitable function that executes a telecommand packet. The source of that packet
+	 * is the ground station.
+	 *
+	 * @note This function is called from the main execute() that is defined in the file MessageParser.hpp
+	 * @param param Contains the necessary parameters to call the suitable subservice
+	 */
+	void execute(Message &message);
+
 };
 
 #endif //ECSS_SERVICES_PARAMETERSERVICE_HPP
diff --git a/inc/Services/RequestVerificationService.hpp b/inc/Services/RequestVerificationService.hpp
index 846695c3..571fb63a 100644
--- a/inc/Services/RequestVerificationService.hpp
+++ b/inc/Services/RequestVerificationService.hpp
@@ -120,15 +120,6 @@ public:
 	 * @param errorCode The cause of creating this type of report
  	 */
 	void failRoutingVerification(const Message &request, ErrorHandler::RoutingErrorType errorCode);
-
-	/**
-	 * It is responsible to call the suitable function that execute the proper subservice. The
-	 * way that the subservices are selected is for the time being based on the messageType(class
-	 * member of class Message) of the param message
-	 *
-	 * Note: The functions of this service takes dummy values as arguments for the time being
-	 */
-	void execute(const Message &message);
 };
 
 
diff --git a/inc/Services/TimeBasedSchedulingService.hpp b/inc/Services/TimeBasedSchedulingService.hpp
index 76343b5d..cd6b6e03 100644
--- a/inc/Services/TimeBasedSchedulingService.hpp
+++ b/inc/Services/TimeBasedSchedulingService.hpp
@@ -245,6 +245,15 @@ public:
 	 * start of execution for that specific instruction.
 	 */
 	void timeShiftActivitiesByID(Message &request);
+
+	/**
+	 * It is responsible to call the suitable function that executes a telecommand packet. The source of that packet
+	 * is the ground station.
+	 *
+	 * @note This function is called from the main execute() that is defined in the file MessageParser.hpp
+	 * @param message Contains the necessary parameters to call the suitable subservice
+	 */
+	void execute(Message &message);
 };
 
 #endif //ECSS_SERVICES_TIMEBASEDSCHEDULINGSERVICE_HPP
diff --git a/inc/Services/TimeManagementService.hpp b/inc/Services/TimeManagementService.hpp
index d50b0f74..073d2a50 100644
--- a/inc/Services/TimeManagementService.hpp
+++ b/inc/Services/TimeManagementService.hpp
@@ -62,6 +62,15 @@ public:
 	 * should be a fixed size of 48 bits
 	 */
 	 TimeAndDate cdsTimeRequest(Message &message);
+
+	/**
+	 * It is responsible to call the suitable function that executes a telecommand packet. The source of that packet
+	 * is the ground station.
+	 *
+	 * @note This function is called from the main execute() that is defined in the file MessageParser.hpp
+	 * @param message Contains the necessary parameters to call the suitable subservice
+	 */
+	void execute(Message &message);
 };
 
 
-- 
GitLab