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
6ea9cc3a
Commit
6ea9cc3a
authored
6 years ago
by
athatheocsd
Browse files
Options
Downloads
Patches
Plain Diff
Probably basic function of [5,5]-[5,8] completed. I'll have to check when !(sleepy).
parent
1582db45
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
inc/Services/EventReportService.hpp
+2
-2
2 additions, 2 deletions
inc/Services/EventReportService.hpp
src/Services/EventReportService.cpp
+18
-2
18 additions, 2 deletions
src/Services/EventReportService.cpp
with
20 additions
and
4 deletions
inc/Services/EventReportService.hpp
+
2
−
2
View file @
6ea9cc3a
...
...
@@ -16,7 +16,7 @@
#define ECSS_EVENTS_BITS 16
class
EventReportService
:
public
Service
{
p
ublic
:
p
rivate
:
static
const
uint8_t
numberOfEvents
=
7
;
std
::
bitset
<
numberOfEvents
>
stateOfEvents
;
public:
...
...
@@ -124,7 +124,7 @@ public:
/**
* TC[5,7] request to report the disabled event definitions
*
*
Note: No arguments, according to the standard.
*/
void
requestListOfDisabledEvents
();
...
...
This diff is collapsed.
Click to expand it.
src/Services/EventReportService.cpp
+
18
−
2
View file @
6ea9cc3a
#include
<Services/EventReportService.hpp>
#include
"Services/EventReportService.hpp"
#include
"Message.hpp"
/**
*
* @todo: this code is error prone, depending on parameters given, add fail safes
* @todo: this code is error prone, depending on parameters given, add fail safes
(probably?)
*/
void
EventReportService
::
informativeEventReport
(
Event
eventID
,
const
uint8_t
*
data
,
uint8_t
length
)
{
...
...
@@ -55,15 +56,30 @@ void EventReportService::enableReportGeneration(uint8_t length, Event *eventID)
}
void
EventReportService
::
disableReportGeneration
(
uint8_t
length
,
Event
*
eventID
)
{
// TC[5,6]
for
(
uint8_t
i
=
0
;
i
<
length
;
i
++
)
{
stateOfEvents
[
static_cast
<
uint8_t
>
(
eventID
[
i
])]
=
0
;
}
}
void
EventReportService
::
requestListOfDisabledEvents
()
{
// TC[5,7]
// I think this is all that is needed here.
listOfDisabledEventsReport
();
}
void
EventReportService
::
listOfDisabledEventsReport
()
{
// TC[5,8]
Message
report
=
createTM
(
8
);
// Any chance we'll have more than uint8_t (>255 events) ? This will produce an error!
uint8_t
numberOfDisabledEvents
=
stateOfEvents
.
size
()
-
stateOfEvents
.
any
();
report
.
appendByte
(
numberOfDisabledEvents
);
for
(
uint8_t
i
=
0
;
i
<
numberOfDisabledEvents
;
i
++
)
{
if
(
stateOfEvents
[
i
]
==
0
)
{
report
.
appendEnum8
(
i
);
}
}
storeMessage
(
report
);
}
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