diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml index 86ab48c81e5496caa2fb05e7674831c28008b715..f25060c0a0ccdd77d361f71cffaeeb85e993991b 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 d9e456e694733af386d637fdc9dda03397959904..fa8d932f6d9598d372933f73c5370fcbc5a7515f 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 0000000000000000000000000000000000000000..933816a3a4807e999992abdb2bc6bb98ecd93ecd --- /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 0000000000000000000000000000000000000000..7419f005a7358f0698620538d1448d9a0772f942 --- /dev/null +++ b/src/Services/TimeBasedCommandSchedulingService.cpp @@ -0,0 +1,4 @@ +#include "Services/TimeBasedCommandSchedulingService.hpp" + + +