From c8c94bfd33111b1000a331e605edddf8b84e2425 Mon Sep 17 00:00:00 2001 From: Dimitrios Stoupis <dimitris.apple@gmail.com> Date: Wed, 6 Mar 2019 13:24:44 +0000 Subject: [PATCH] Add initial service files --- .idea/codeStyles/Project.xml | 19 ---- CMakeLists.txt | 2 +- .../TimeBasedCommandSchedulingService.hpp | 90 +++++++++++++++++++ .../TimeBasedCommandSchedulingService.cpp | 4 + 4 files changed, 95 insertions(+), 20 deletions(-) create mode 100644 inc/Services/TimeBasedCommandSchedulingService.hpp create mode 100644 src/Services/TimeBasedCommandSchedulingService.cpp diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml index 86ab48c8..f25060c0 100644 --- a/.idea/codeStyles/Project.xml +++ b/.idea/codeStyles/Project.xml @@ -3,25 +3,6 @@ <option name="RIGHT_MARGIN" value="100" /> <option name="WRAP_WHEN_TYPING_REACHES_RIGHT_MARGIN" value="true" /> <Objective-C-extensions> - <file> - <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Import" /> - <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Macro" /> - <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Typedef" /> - <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Enum" /> - <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Constant" /> - <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Global" /> - <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Struct" /> - <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="FunctionPredecl" /> - <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Function" /> - </file> - <class> - <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Property" /> - <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Synthesize" /> - <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="InitMethod" /> - <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="StaticMethod" /> - <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="InstanceMethod" /> - <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="DeallocMethod" /> - </class> <extensions> <pair source="cpp" header="hpp" fileNamingConvention="PASCAL_CASE" /> <pair source="c" header="h" fileNamingConvention="NONE" /> diff --git a/CMakeLists.txt b/CMakeLists.txt index d9e456e6..fa8d932f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -26,7 +26,7 @@ add_library(common OBJECT src/Services/RequestVerificationService.cpp src/Services/TestService.cpp src/Services/TimeManagementService.cpp - ) + src/Services/TimeBasedCommandSchedulingService.cpp) # Specify the .cpp files for the executables add_executable(ecss_services diff --git a/inc/Services/TimeBasedCommandSchedulingService.hpp b/inc/Services/TimeBasedCommandSchedulingService.hpp new file mode 100644 index 00000000..933816a3 --- /dev/null +++ b/inc/Services/TimeBasedCommandSchedulingService.hpp @@ -0,0 +1,90 @@ +#ifndef ECSS_SERVICES_TIMEBASEDCOMMANDSCHEDULINGSERVICE_HPP +#define ECSS_SERVICES_TIMEBASEDCOMMANDSCHEDULINGSERVICE_HPP + +#include <iostream> +#include "Service.hpp" +#include "Helpers/CRCHelper.hpp" +#include "ErrorHandler.hpp" + +class TimeBasedCommandSchedulingService : public Service { +public: + + + +private: + + + +public: + /** + * TC[11,1] enable the time-based schedule execution function + * + * @details Enables the time-based command execution scheduling + * @param request Provide the received message as a parameter + */ + void enableScheduleExecution(Message &request); + + /** + * TC[11,2] disable the time-based schedule execution function + * + * @details Disables the time-based command execution scheduling + * @param request Provide the received message as a parameter + */ + void disableScheduleExecution(Message &request); + + /** + * TC[11,3] reset the time-based schedule + * + * @details Resets the time-based command execution schedule (deletes the schedule) + * @param request Provide the received message as a parameter + */ + void resetSchedule(Message &request); + + /** + * TC[11,15] time-shift all scheduled activities + * + * @details All scheduled activities are shifted per user request + * @param request Provide the received message as a parameter + */ + void timeShiftAllActivities(Message &request); + + /** + * TC[11,16] detail-report all activities + * + * @details Send a detailed report about the status of all the activities + on the current schedule + * @param request Provide the received message as a parameter + */ + void detailReportAllActivities(Message &request); + + /** + * TC[11,4] insert activities into the time based schedule + * + * @details Add activities into the schedule for future execution + * @param request Provide the received message as a parameter + */ + void insertActivities(Message &request); + + /** + * TC[11,5] delete time-based scheduled activities identified by a request identifier + * + * @details Delete certain activities by using the unique request identifier + * @param request Provide the received message as a parameter + */ + void deleteActivitiesByID(Message &request); + + /** + * TC[11,7] time-shift scheduled activities identified by a request identifier + * + * @details Time-shift certain activities by using the unique request identifier + * @param request Provide the received message as a parameter + */ + void timeShiftActivitiesByID(Message &request); + + +private: + + +}; + +#endif //ECSS_SERVICES_TIMEBASEDCOMMANDSCHEDULINGSERVICE_HPP diff --git a/src/Services/TimeBasedCommandSchedulingService.cpp b/src/Services/TimeBasedCommandSchedulingService.cpp new file mode 100644 index 00000000..7419f005 --- /dev/null +++ b/src/Services/TimeBasedCommandSchedulingService.cpp @@ -0,0 +1,4 @@ +#include "Services/TimeBasedCommandSchedulingService.hpp" + + + -- GitLab