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
98876dfa
Commit
98876dfa
authored
6 years ago
by
athatheocsd
Browse files
Options
Downloads
Patches
Plain Diff
Data are appended on message
parent
fedaf5fb
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/Services/EventReportService.cpp
+9
-4
9 additions, 4 deletions
src/Services/EventReportService.cpp
src/main.cpp
+9
-0
9 additions, 0 deletions
src/main.cpp
with
18 additions
and
4 deletions
src/Services/EventReportService.cpp
+
9
−
4
View file @
98876dfa
#include
"Services/EventReportService.hpp"
#include
"Services/EventReportService.hpp"
#include
"Message.hpp"
#include
"Message.hpp"
void
EventReportService
::
informativeEventReport
(
uint16_t
eventID
,
const
uint8_t
*
data
,
void
EventReportService
::
informativeEventReport
(
uint16_t
eventID
,
const
uint8_t
*
data
,
uint8_t
length
){
uint8_t
length
){
// TM[5,1]
// TM[5,1]
Message
report
=
createTM
(
1
);
Message
report
=
createTM
(
1
);
report
.
appendBits
(
16
,
eventID
);
report
.
appendString
(
length
,(
char
*
)
data
);
storeMessage
(
report
);
storeMessage
(
report
);
}
}
...
@@ -13,7 +15,8 @@ void EventReportService::lowSeverityAnomalyReport(uint16_t eventID, const uint8_
...
@@ -13,7 +15,8 @@ void EventReportService::lowSeverityAnomalyReport(uint16_t eventID, const uint8_
uint8_t
length
){
uint8_t
length
){
// TM[5,2]
// TM[5,2]
Message
report
=
createTM
(
2
);
Message
report
=
createTM
(
2
);
report
.
appendBits
(
16
,
eventID
);
report
.
appendString
(
length
,(
char
*
)
data
);
storeMessage
(
report
);
storeMessage
(
report
);
}
}
...
@@ -21,7 +24,8 @@ void EventReportService::mediumSeverityAnomalyReport(uint16_t eventID, const uin
...
@@ -21,7 +24,8 @@ void EventReportService::mediumSeverityAnomalyReport(uint16_t eventID, const uin
uint8_t
length
){
uint8_t
length
){
// TM[5,3]
// TM[5,3]
Message
report
=
createTM
(
3
);
Message
report
=
createTM
(
3
);
report
.
appendBits
(
16
,
eventID
);
report
.
appendString
(
length
,(
char
*
)
data
);
storeMessage
(
report
);
storeMessage
(
report
);
}
}
...
@@ -29,6 +33,7 @@ void EventReportService::highSeverityAnomalyReport(uint16_t eventID, const uint8
...
@@ -29,6 +33,7 @@ void EventReportService::highSeverityAnomalyReport(uint16_t eventID, const uint8
uint8_t
length
){
uint8_t
length
){
// TM[5,4]
// TM[5,4]
Message
report
=
createTM
(
4
);
Message
report
=
createTM
(
4
);
report
.
appendBits
(
16
,
eventID
);
report
.
appendString
(
length
,(
char
*
)
data
);
storeMessage
(
report
);
storeMessage
(
report
);
}
}
This diff is collapsed.
Click to expand it.
src/main.cpp
+
9
−
0
View file @
98876dfa
#include
<iostream>
#include
<iostream>
#include
<Services/TestService.hpp>
#include
<Services/TestService.hpp>
#include
<Services/RequestVerificationService.hpp>
#include
<Services/RequestVerificationService.hpp>
#include
<Services/EventReportService.hpp>
#include
"Message.hpp"
#include
"Message.hpp"
int
main
()
{
int
main
()
{
...
@@ -38,5 +39,13 @@ int main() {
...
@@ -38,5 +39,13 @@ int main() {
reqVerifService
.
failExecutionVerification
(
Message
::
TC
,
true
,
2
,
2
,
10
,
6
);
reqVerifService
.
failExecutionVerification
(
Message
::
TC
,
true
,
2
,
2
,
10
,
6
);
reqVerifService
.
failRoutingVerification
(
Message
::
TC
,
true
,
2
,
2
,
10
,
7
);
reqVerifService
.
failRoutingVerification
(
Message
::
TC
,
true
,
2
,
2
,
10
,
7
);
// ST[05] test [works]
char
data
[
12
]
=
"Hello World"
;
EventReportService
eventReportService
;
eventReportService
.
informativeEventReport
(
1
,(
const
uint8_t
*
)
data
,
11
);
eventReportService
.
lowSeverityAnomalyReport
(
2
,(
const
uint8_t
*
)
data
,
11
);
eventReportService
.
mediumSeverityAnomalyReport
(
3
,(
const
uint8_t
*
)
data
,
11
);
eventReportService
.
highSeverityAnomalyReport
(
4
,(
const
uint8_t
*
)
data
,
11
);
return
0
;
return
0
;
}
}
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