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
1f147c93
Commit
1f147c93
authored
6 years ago
by
kongr45gpen
Browse files
Options
Downloads
Patches
Plain Diff
Add response for TC[17,3]
parent
df07ef0b
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
inc/Services/TestService.hpp
+8
-1
8 additions, 1 deletion
inc/Services/TestService.hpp
src/Services/TestService.cpp
+14
-1
14 additions, 1 deletion
src/Services/TestService.cpp
src/main.cpp
+3
-0
3 additions, 0 deletions
src/main.cpp
with
25 additions
and
2 deletions
inc/Services/TestService.hpp
+
8
−
1
View file @
1f147c93
...
@@ -15,7 +15,14 @@ public:
...
@@ -15,7 +15,14 @@ public:
/**
/**
* TC[17,1] perform an are-you-alive connection test
* TC[17,1] perform an are-you-alive connection test
*/
*/
void
areYouAlive
(
const
Message
&
message
);
void
areYouAlive
(
const
Message
&
request
);
/**
* TC[17,3] perform an on-board connection test
*
* @todo Only respond if we have the correct APID
*/
void
onBoardConnection
(
const
Message
&
request
);
};
};
...
...
This diff is collapsed.
Click to expand it.
src/Services/TestService.cpp
+
14
−
1
View file @
1f147c93
#include
<Services/TestService.hpp>
#include
"Services/TestService.hpp"
#include
"Services/TestService.hpp"
void
TestService
::
areYouAlive
(
const
Message
&
message
)
{
void
TestService
::
areYouAlive
(
const
Message
&
request
)
{
// TM[17,2] are-you-alive connection test report
// TM[17,2] are-you-alive connection test report
Message
report
=
createTM
(
2
);
Message
report
=
createTM
(
2
);
storeMessage
(
report
);
storeMessage
(
report
);
}
}
void
TestService
::
onBoardConnection
(
const
Message
&
request
)
{
// TM[17,4] on-board connection test report
Message
report
=
createTM
(
4
);
// TODO: This is not the correct way to do this! Fetching functions will be added later
report
.
appendInteger
(
request
.
data
[
1
]);
storeMessage
(
report
);
}
This diff is collapsed.
Click to expand it.
src/main.cpp
+
3
−
0
View file @
1f147c93
...
@@ -18,6 +18,9 @@ int main() {
...
@@ -18,6 +18,9 @@ int main() {
TestService
testService
;
TestService
testService
;
Message
receivedPacket
=
Message
(
17
,
1
,
Message
::
TC
,
1
);
Message
receivedPacket
=
Message
(
17
,
1
,
Message
::
TC
,
1
);
testService
.
areYouAlive
(
receivedPacket
);
testService
.
areYouAlive
(
receivedPacket
);
receivedPacket
=
Message
(
17
,
3
,
Message
::
TC
,
1
);
receivedPacket
.
appendInteger
(
static_cast
<
uint16_t
>
(
7
));
testService
.
onBoardConnection
(
receivedPacket
);
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