Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
SRC OBDH TMTC
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
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
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
Robin Mueller
SRC OBDH TMTC
Commits
faf01c5a
Commit
faf01c5a
authored
5 years ago
by
Robin Mueller
Browse files
Options
Downloads
Patches
Plain Diff
service 3 testing first custom definition added
parent
b8052826
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tc/OBSW_TcService3.py
+18
-0
18 additions, 0 deletions
tc/OBSW_TcService3.py
with
18 additions
and
0 deletions
tc/OBSW_TcService3.py
+
18
−
0
View file @
faf01c5a
...
...
@@ -6,12 +6,28 @@ Description: PUS Custom Service 8: Device Access, Native low-level commanding
@author: R. Mueller
"""
import
struct
from
tc.OBSW_TcPacket
import
PUSTelecommand
def
packService3TestInto
(
tcQueue
):
tcQueue
.
put
((
"
print
"
,
"
Testing Service 3
"
))
# adding custom defintion to hk using test pool variables
tcQueue
.
put
((
"
print
"
,
"
\r\n
Testing Service 3: Adding custom definition
"
))
sid
=
bytearray
([
0x00
,
0x00
,
0x42
,
0x00
])
collectionInterval
=
struct
.
pack
(
'
>f
'
,
3
)
numberOfParameters
=
struct
.
pack
(
'
B
'
,
5
)
p1
=
bytearray
([
0x01
,
0x01
,
0x01
,
0x01
])
p2
=
bytearray
([
0x02
,
0x02
,
0x02
,
0x02
])
p3
=
bytearray
([
0x03
,
0x03
,
0x03
,
0x03
])
p4
=
bytearray
([
0x04
,
0x04
,
0x04
,
0x04
])
p5
=
bytearray
([
0x05
,
0x05
,
0x05
,
0x05
])
hkDefinition
=
sid
+
collectionInterval
+
numberOfParameters
+
p1
+
p2
+
p3
+
p4
+
p5
command
=
PUSTelecommand
(
service
=
3
,
subservice
=
1
,
SSC
=
3010
,
data
=
hkDefinition
)
tcQueue
.
put
(
command
.
packCommandTuple
())
# adding custom definition to diagnostics using test pool variables
command
=
PUSTelecommand
(
service
=
3
,
subservice
=
2
,
SSC
=
3010
,
data
=
hkDefinition
)
tcQueue
.
put
(
command
.
packCommandTuple
())
# enable custom hk definition
# enable custom diag definition
# disable custom hk definition
...
...
@@ -32,3 +48,5 @@ def packService3TestInto(tcQueue):
# delete custom diag definition
# do some basic testing on predefined structs too
# e.g. add one variable, change interval, report them....
tcQueue
.
put
((
"
export
"
,
"
log/tmtc_log_service3.txt
"
))
return
tcQueue
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