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
e43a33ea
Commit
e43a33ea
authored
4 years ago
by
Robin Mueller
Browse files
Options
Downloads
Patches
Plain Diff
minor improvements and bugfixes
parent
ae4024e2
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
utility/tmtcc_binary_uploader.py
+9
-5
9 additions, 5 deletions
utility/tmtcc_binary_uploader.py
utility/tmtcc_file_transfer_helper.py
+3
-0
3 additions, 0 deletions
utility/tmtcc_file_transfer_helper.py
with
12 additions
and
5 deletions
utility/tmtcc_binary_uploader.py
+
9
−
5
View file @
e43a33ea
...
...
@@ -226,7 +226,9 @@ class BinaryFileUploader:
time
.
sleep
(
time_to_sleep
)
# handle last telemetry packets coming in.
time_till_wake
=
time
.
time
()
+
5
wait_time
=
4
LOGGER
.
info
(
"
Waiting
"
+
str
(
wait_time
)
+
"
more seconds for TM packets..
"
)
time_till_wake
=
time
.
time
()
+
wait_time
while
time
.
time
()
<
time_till_wake
:
new_packets_received
+=
self
.
__handle_tm_queue
(
reception_dict
)
time
.
sleep
(
1
)
...
...
@@ -259,15 +261,17 @@ class BinaryFileUploader:
reception_dict
.
update
({
tc_ssc
:
acceptance_list
})
elif
packet
.
get_service
()
==
5
:
# TODO: print event
print
(
"
Event received!
"
)
LOGGER
.
info
(
"
Event received!
"
)
else
:
print
(
"
Other TM packet with service ID
"
+
str
(
packet
.
get_service
())
+
"
received!
"
)
print_string
=
"
Other TM packet with service ID
"
+
str
(
packet
.
get_service
())
+
\
"
received!
"
LOGGER
.
info
(
print_string
)
clear_list
=
[]
for
key
,
reception_list
in
reception_dict
.
items
():
if
reception_list
[
1
]
and
reception_list
[
2
]
and
reception_list
[
3
]:
# All replies received, we can delete the entry and confirm succesfull handling
print
(
"
All replies received for upload packet with SSC
"
+
str
(
key
)
+
"
.
"
)
print_string
=
"
All replies received for upload packet with SSC
"
+
str
(
key
)
+
"
.
"
LOGGER
.
info
(
print_string
)
clear_list
.
append
(
key
)
elif
reception_list
[
0
]
>
5
:
# No replies for telecommand.
...
...
This diff is collapsed.
Click to expand it.
utility/tmtcc_file_transfer_helper.py
+
3
−
0
View file @
e43a33ea
...
...
@@ -223,6 +223,7 @@ class FileTransferHelper:
header
+=
data
[
number_of_packets
*
size_of_data_blocks
:
len
(
data
)]
commands
=
PusTelecommand
(
service
=
23
,
subservice
=
130
,
ssc
=
init_ssc
+
packet_sequence_number
,
app_data
=
header
)
self
.
__current_ssc
=
init_ssc
+
packet_sequence_number
self
.
tc_queue
.
appendleft
(
commands
.
pack_command_tuple
())
def
__handle_finish_and_lock_packet_generation
(
self
):
...
...
@@ -230,11 +231,13 @@ class FileTransferHelper:
last_command
=
generate_finish_append_to_file_srv23_131_packet
(
filename
=
self
.
target_filename
,
repository_path
=
self
.
target_repository
,
ssc
=
self
.
__current_ssc
,
lock_file
=
self
.
__lock_file
)
self
.
__current_ssc
+=
1
else
:
if
self
.
__lock_file
:
last_command
=
generate_lock_file_srv23_5_6_packet
(
filename
=
self
.
target_filename
,
repository_path
=
self
.
target_repository
,
object_id
=
self
.
object_id
,
lock
=
True
,
ssc
=
self
.
__current_ssc
)
self
.
__current_ssc
+=
1
else
:
self
.
__number_of_finish_packets
=
0
return
...
...
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