Skip to content
GitLab
Explore
Sign in
Register
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
3a8fc58a
Commit
3a8fc58a
authored
4 years ago
by
Robin Mueller
Browse files
Options
Downloads
Patches
Plain Diff
some tweak to prevent crash
parent
6dc132a0
No related branches found
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
config/obsw_com_config.py
+2
-2
2 additions, 2 deletions
config/obsw_com_config.py
obsw_tmtc_client.py
+6
-8
6 additions, 8 deletions
obsw_tmtc_client.py
with
8 additions
and
10 deletions
config/obsw_com_config.py
+
2
−
2
View file @
3a8fc58a
...
...
@@ -47,8 +47,8 @@ def set_communication_interface(tmtc_printer: TmTcPrinter) -> Union[Communicatio
communication_interface
=
DummyComIF
(
tmtc_printer
=
tmtc_printer
)
if
not
communication_interface
.
valid
:
LOGGER
.
warning
(
"
Invalid communication interface!
"
)
return
None
communication_interface
.
initialize
()
else
:
communication_interface
.
initialize
()
return
communication_interface
except
(
IOError
,
OSError
):
LOGGER
.
error
(
"
Error setting up communication interface
"
)
...
...
This diff is collapsed.
Click to expand it.
obsw_tmtc_client.py
+
6
−
8
View file @
3a8fc58a
...
...
@@ -123,16 +123,12 @@ class TmTcHandler:
com_interface
=
self
.
communication_interface
,
tm_timeout
=
g
.
G_TM_TIMEOUT
,
tc_timeout_factor
=
g
.
G_TC_SEND_TIMEOUT_FACTOR
)
self
.
initialize_com_if_and_listener
()
atexit
.
register
(
keyboard_interrupt_handler
,
com_interface
=
self
.
communication_interface
)
def
initialize_com_if_and_listener
(
self
):
if
not
self
.
communication_interface
.
valid
:
if
self
.
communication_interface
.
valid
:
self
.
tm_listener
.
start
()
else
:
LOGGER
.
info
(
"
No communication interface set for now
"
)
LOGGER
.
info
(
"
TM listener will not be started
"
)
return
self
.
tm_listener
.
start
()
atexit
.
register
(
keyboard_interrupt_handler
,
com_interface
=
self
.
communication_interface
)
def
perform_operation
(
self
):
"""
...
...
@@ -185,6 +181,8 @@ class TmTcHandler:
service_queue
=
deque
()
service_queue_packer
=
ServiceQueuePacker
()
service_queue_packer
.
pack_service_queue
(
g
.
G_SERVICE
,
service_queue
)
if
not
self
.
communication_interface
.
valid
:
return
LOGGER
.
info
(
"
Performing service command operation
"
)
sender_and_receiver
=
SequentialCommandSenderReceiver
(
com_interface
=
self
.
communication_interface
,
tmtc_printer
=
self
.
tmtc_printer
,
...
...
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