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
fd2c0b69
Commit
fd2c0b69
authored
6 years ago
by
athatheocsd
Browse files
Options
Downloads
Patches
Plain Diff
Added disabling of report generation
parent
d292309e
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
inc/Services/EventReportService.hpp
+9
-3
9 additions, 3 deletions
inc/Services/EventReportService.hpp
src/Services/EventReportService.cpp
+33
-23
33 additions, 23 deletions
src/Services/EventReportService.cpp
with
42 additions
and
26 deletions
inc/Services/EventReportService.hpp
+
9
−
3
View file @
fd2c0b69
...
...
@@ -20,14 +20,18 @@ private:
static
const
uint16_t
numberOfEvents
=
7
;
std
::
bitset
<
numberOfEvents
>
stateOfEvents
;
public:
// Variables that count the event
occurrence
s per severity level
// Variables that count the event
report
s per severity level
uint16_t
lowSeverityReportsCount
;
uint16_t
mediumSeverityReportCount
;
uint16_t
highSeverityReportCount
;
// Variables that count the event occurences per severity level
uint16_t
lowSeverityEventCount
;
uint16_t
mediumSeverityEventCount
;
uint16_t
highSeverityEventCount
;
uint16_t
disabledEventsCount
;
uint16_t
lastInformativeEventReportID
;
uint16_t
lastLowSeverityReportID
;
uint16_t
lastMediumSeverityReportID
;
uint16_t
lastHighSeverityReportID
;
...
...
@@ -39,7 +43,9 @@ public:
mediumSeverityReportCount
=
0
;
highSeverityReportCount
=
0
;
disabledEventsCount
=
0
;
lastInformativeEventReportID
=
-
1
;
lowSeverityEventCount
=
0
;
mediumSeverityEventCount
=
0
;
highSeverityEventCount
=
0
;
lastLowSeverityReportID
=
-
1
;
lastMediumSeverityReportID
=
-
1
;
lastHighSeverityReportID
=
-
1
;
...
...
This diff is collapsed.
Click to expand it.
src/Services/EventReportService.cpp
+
33
−
23
View file @
fd2c0b69
...
...
@@ -9,50 +9,60 @@
void
EventReportService
::
informativeEventReport
(
Event
eventID
,
const
uint8_t
*
data
,
uint8_t
length
)
{
// TM[5,1]
Message
report
=
createTM
(
1
)
;
report
.
appendEnum16
(
eventID
);
report
.
append
String
(
length
,
data
);
lastInformativeEventReportID
=
static_cast
<
uint16_t
>
(
eventID
);
if
(
stateOfEvents
[
static_cast
<
uint16_t
>
(
eventID
)]
==
1
)
{
Message
report
=
createTM
(
1
);
report
.
append
Enum16
(
eventID
);
report
.
appendString
(
length
,
data
);
storeMessage
(
report
);
storeMessage
(
report
);
}
}
void
EventReportService
::
lowSeverityAnomalyReport
(
Event
eventID
,
const
uint8_t
*
data
,
uint8_t
length
)
{
lowSeverityEventCount
++
;
// TM[5,2]
lowSeverityReportsCount
++
;
Message
report
=
createTM
(
2
);
report
.
appendEnum16
(
eventID
);
report
.
appendString
(
length
,
data
);
lastLowSeverityReportID
=
static_cast
<
uint16_t
>
(
eventID
);
if
(
stateOfEvents
[
static_cast
<
uint16_t
>
(
eventID
)]
==
1
)
{
lowSeverityReportsCount
++
;
Message
report
=
createTM
(
2
);
report
.
appendEnum16
(
eventID
);
report
.
appendString
(
length
,
data
);
lastLowSeverityReportID
=
static_cast
<
uint16_t
>
(
eventID
);
storeMessage
(
report
);
storeMessage
(
report
);
}
}
void
EventReportService
::
mediumSeverityAnomalyReport
(
Event
eventID
,
const
uint8_t
*
data
,
uint8_t
length
)
{
mediumSeverityEventCount
++
;
// TM[5,3]
mediumSeverityReportCount
++
;
Message
report
=
createTM
(
3
);
report
.
appendEnum16
(
eventID
);
report
.
appendString
(
length
,
data
);
lastMediumSeverityReportID
=
static_cast
<
uint16_t
>
(
eventID
);
if
(
stateOfEvents
[
static_cast
<
uint16_t
>
(
eventID
)]
==
1
)
{
mediumSeverityReportCount
++
;
Message
report
=
createTM
(
3
);
report
.
appendEnum16
(
eventID
);
report
.
appendString
(
length
,
data
);
lastMediumSeverityReportID
=
static_cast
<
uint16_t
>
(
eventID
);
storeMessage
(
report
);
storeMessage
(
report
);
}
}
void
EventReportService
::
highSeverityAnomalyReport
(
Event
eventID
,
const
uint8_t
*
data
,
uint8_t
length
)
{
highSeverityEventCount
++
;
// TM[5,4]
highSeverityReportCount
++
;
Message
report
=
createTM
(
4
);
report
.
appendEnum16
(
eventID
);
report
.
appendString
(
length
,
data
);
lastHighSeverityReportID
=
static_cast
<
uint16_t
>
(
eventID
);
if
(
stateOfEvents
[
static_cast
<
uint16_t
>
(
eventID
)]
==
1
)
{
highSeverityReportCount
++
;
Message
report
=
createTM
(
4
);
report
.
appendEnum16
(
eventID
);
report
.
appendString
(
length
,
data
);
lastHighSeverityReportID
=
static_cast
<
uint16_t
>
(
eventID
);
storeMessage
(
report
);
storeMessage
(
report
);
}
}
void
EventReportService
::
enableReportGeneration
(
uint16_t
length
,
Event
*
eventID
)
{
...
...
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