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
9015042a
Commit
9015042a
authored
4 years ago
by
Robin.Mueller
Browse files
Options
Downloads
Patches
Plain Diff
rebuilding srv3 test
parent
71eb59d2
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tc/obsw_tc_service3.py
+31
-5
31 additions, 5 deletions
tc/obsw_tc_service3.py
with
31 additions
and
5 deletions
tc/obsw_tc_service3.py
+
31
−
5
View file @
9015042a
...
...
@@ -11,15 +11,17 @@ from tmtc_core.tc.obsw_pus_tc_base import PusTelecommand
import
config.obsw_config
as
g
def
make_sid
(
set_id
:
int
,
object_id
:
bytearray
)
->
bytearray
:
def
make_sid
(
object_id
:
bytearray
,
set_id
:
int
)
->
bytearray
:
set_id_bytearray
=
struct
.
pack
(
"
>I
"
,
set_id
)
return
object_id
+
set_id_bytearray
def
make_interval
(
interval_seconds
:
float
)
->
bytearray
:
return
bytearray
(
struct
.
pack
(
"
>f
"
,
interval_seconds
))
# adding custom defintion to hk using test pool variables
sid_thermalsensor
=
make_sid
(
0
,
g
.
THERMAL_SENSOR_DEVICE_ID
)
collection_interval_hk
=
struct
.
pack
(
'
>f
'
,
3
)
collection_interval_diag
=
struct
.
pack
(
'
>f
'
,
0.8
)
sid_thermalsensor
=
make_sid
(
g
.
THERMAL_SENSOR_DEVICE_ID
,
1
)
number_of_parameters
=
struct
.
pack
(
'
>B
'
,
5
)
...
...
@@ -32,11 +34,35 @@ def pack_service3_test_into(tc_queue: Deque) -> Deque:
tc_queue
.
appendleft
((
"
export
"
,
"
log/tmtc_log_service3.txt
"
))
return
tc_queue
def
pack_custom_tests
(
tc_queue
:
Deque
):
# deleting pre-defined test entry
tc_queue
.
appendleft
((
"
print
"
,
"
Testing Service 3:
"
))
command
=
PusTelecommand
(
service
=
3
,
subservice
=
3
,
ssc
=
3100
,
app_data
=
sid_thermalsensor
)
tc_queue
.
appendleft
((
"
print
"
,
"
Generate one Thermal Sensor packet:
"
))
command
=
PusTelecommand
(
service
=
3
,
subservice
=
27
,
ssc
=
3100
,
app_data
=
sid_thermalsensor
)
tc_queue
.
appendleft
(
command
.
pack_command_tuple
())
# tc_queue.appendleft(("print", "Enabling periodic Thermal Sensor packet generation: "))
# command = PusTelecommand(service=3, subservice=5, ssc=3101, app_data=sid_thermalsensor)
# tc_queue.appendleft(command.pack_command_tuple())
#
# new_interval = 1.0
# interval_app_data = sid_thermalsensor + make_interval(new_interval)
# tc_queue.appendleft(("print", "Setting interval to one second: "))
# command = PusTelecommand(service=3, subservice=31, ssc=3102, app_data=interval_app_data)
# tc_queue.appendleft(command.pack_command_tuple())
#
# tc_queue.appendleft(("wait", 2))
#
# tc_queue.appendleft(("print", "Disabling periodic Thermal Sensor packet generation: "))
# command = PusTelecommand(service=3, subservice=6, ssc=3103, app_data=sid_thermalsensor)
# tc_queue.appendleft(command.pack_command_tuple())
#
# tc_queue.appendleft(("print", "Generate one shot Thermal Sensor packet: "))
# command = PusTelecommand(service=3, subservice=27, ssc=3104, app_data=sid_thermalsensor)
# tc_queue.appendleft(command.pack_command_tuple())
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