Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
E
ECSS Services
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
AcubeSat-OBC
ECSS Services
Commits
38e0fc45
Unverified
Commit
38e0fc45
authored
6 years ago
by
Dimitrios Stoupis
Browse files
Options
Downloads
Patches
Plain Diff
Overloaded an operator and added the RequestID struct
parent
54dadeb2
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
inc/Services/TimeBasedSchedulingService.hpp
+15
-1
15 additions, 1 deletion
inc/Services/TimeBasedSchedulingService.hpp
with
15 additions
and
1 deletion
inc/Services/TimeBasedSchedulingService.hpp
+
15
−
1
View file @
38e0fc45
...
...
@@ -3,6 +3,7 @@
#include
<iostream>
#include
"etl/vector.h"
#include
"etl/iterator.h"
#include
"etl/String.hpp"
#include
"Service.hpp"
#include
"ErrorHandler.hpp"
...
...
@@ -17,7 +18,7 @@
#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
#define MAX_DELTA_OF_RELEASE_TIME 60 // todo: Define the maximum delta between the specified
// release time and the actual release time
// release time and the actual release time
class
TimeBasedSchedulingService
:
public
Service
{
...
...
@@ -29,9 +30,22 @@ private:
uint8_t
currentNumberOfActivities
=
0
;
// Keep track of the number of activities
MessageParser
msgParser
;
// Parse TC packets
// Define the request ID structure
struct
RequestID
{
uint16_t
applicationID
=
0
;
uint16_t
sequenceCount
=
0
;
uint8_t
sourceID
=
0
;
bool
operator
!=
(
const
RequestID
&
rightSide
)
const
{
return
(
sequenceCount
!=
rightSide
.
sequenceCount
)
or
(
applicationID
!=
rightSide
.
applicationID
)
or
(
sourceID
!=
rightSide
.
sourceID
);
}
};
// Hold the data for the scheduled activity definition
struct
ScheduledActivity
{
Message
request
;
// Hold the received command request
RequestID
requestID
;
// Request ID, characteristic of the definition
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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment