From a7105c457f233399886f95f4fcaf21fb919d9d3a Mon Sep 17 00:00:00 2001 From: Dimitrios Stoupis <dimitris.apple@gmail.com> Date: Tue, 12 Mar 2019 21:26:50 +0000 Subject: [PATCH] Fixed a wrong assertion and defined the remaining functions --- .../TimeBasedCommandSchedulingService.cpp | 32 +++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/src/Services/TimeBasedCommandSchedulingService.cpp b/src/Services/TimeBasedCommandSchedulingService.cpp index ca74ef9b..23b80683 100644 --- a/src/Services/TimeBasedCommandSchedulingService.cpp +++ b/src/Services/TimeBasedCommandSchedulingService.cpp @@ -69,7 +69,7 @@ void TimeBasedCommandSchedulingService::timeShiftAllActivities(Message &request) // Check if the correct packet is being processed assert(request.serviceType == 11); - assert(request.messageType == 5); + assert(request.messageType == 15); uint16_t iterationCount = request.readUint16(); // Get the iteration count, (N) for (std::size_t i = 0; i < iterationCount; i++) { @@ -87,7 +87,7 @@ void TimeBasedCommandSchedulingService::timeShiftActivitiesByID(Message &request // Check if the correct packet is being processed assert(request.serviceType == 11); - assert(request.messageType == 5); + assert(request.messageType == 7); uint32_t relativeOffset = request.readUint32(); // Get the offset first /* @@ -106,4 +106,32 @@ void TimeBasedCommandSchedulingService::timeShiftActivitiesByID(Message &request } } +void TimeBasedCommandSchedulingService::deleteActivitiesByID(Message &request) { + + // Check if the correct packet is being processed + assert(request.serviceType == 11); + assert(request.messageType == 5); + +} + +void TimeBasedCommandSchedulingService::detailReportAllActivities(Message &request) { + + // Check if the correct packet is being processed + assert(request.serviceType == 11); + assert(request.messageType == 16); + + // todo: add an extra check for the vector size to make sure it matches with + // currentNumberOfActivities? + for (auto const& activity : scheduledActivities) { + // Create the report message object of telemetry message subtype 10 for each activity + Message report = createTM(10); + // todo: append sub-schedule and group ID if they are defined + // todo: append the release time of the current activity "activity.requestReleaseTime;" + // todo: append the request contained in the activity "activity.request;" + storeMessage(report); // Save the report + request.resetRead(); // todo: define if this statement is required + } + +} + -- GitLab