Skip to content
Snippets Groups Projects
Unverified Commit 6f78e625 authored by Dimitrios Stoupis's avatar Dimitrios Stoupis
Browse files

Added vector definitions and some constatns

- The vector header is included and the corresponding vector is defined
- Some definitions were added, as required by the standard, but a
further discussion for the final values is required
parent c8c94bfd
No related branches found
No related tags found
No related merge requests found
......@@ -2,17 +2,35 @@
#define ECSS_SERVICES_TIMEBASEDCOMMANDSCHEDULINGSERVICE_HPP
#include <iostream>
#include <vector>
#include "Service.hpp"
#include "Helpers/CRCHelper.hpp"
#include "ErrorHandler.hpp"
// Define whether groups and/or sub-schedules are in use
#define GROUPS_ENABLED 0
#define SUB_SCHEDULES_ENABLED 0
#define MAX_NUMBER_OF_ACTIVITIES 10 // todo: define the maximum number of activities
#define TIME_MARGIN_FOR_ACTIVATION 60 // todo: define the time margin for the command activation
class TimeBasedCommandSchedulingService : public Service {
public:
private:
bool executionFunctionStatus; // True indicates "enabled" and False "disabled" state
uint8_t currentNumberOfActivities = 0; // Keep track of the number of activities
// Hold the data for the scheduled activity definition
struct ScheduledActivity {
//Message request; // Hold the received command request
uint32_t requestReleaseTime = 0; // Keep the command release time
// todo: If we decide to use sub-schedules, the ID of that has to be defined
// todo: If groups are used, then the group ID has to be defined here
};
std::vector<ScheduledActivity> scheduledActivities; // Scheduled activity definitions
public:
......@@ -40,6 +58,14 @@ public:
*/
void resetSchedule(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,15] time-shift all scheduled activities
*
......@@ -57,14 +83,6 @@ public:
*/
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
*
......
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