Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
source
TMTC COMMANDER CORE
Commits
3749440b
Commit
3749440b
authored
Dec 08, 2020
by
Robin Mueller
Browse files
command prep formatz changed
parent
545778ac
Changes
2
Hide whitespace changes
Inline
Side-by-side
core/tmtcc_backend.py
View file @
3749440b
...
...
@@ -6,7 +6,7 @@ from typing import Tuple, Union
from
tmtc_core.core.tmtc_core_definitions
import
ComInterfaces
from
tmtc_core.utility.tmtcc_logger
import
get_logger
from
tmtc_core.pus_tc.tmtcc_pus_tc_base
import
PusTcInfo
from
tmtc_core.pus_tc.tmtcc_pus_tc_base
import
PusTcInfo
,
PusTelecommand
from
tmtc_core.sendreceive.tmtcc_single_command_sender_receiver
import
SingleCommandSenderReceiver
from
tmtc_core.sendreceive.tmtcc_sequential_sender_receiver
import
SequentialCommandSenderReceiver
from
tmtc_core.sendreceive.tmtcc_tm_listener
import
TmListener
...
...
@@ -146,10 +146,9 @@ class TmTcHandler:
self
.
tm_listener
.
clear_reply_event
()
elif
self
.
mode
==
ModeList
.
SingleCommandMode
:
if
self
.
single_command_package
is
None
:
pus_packet_tuple
=
command_preparation
()
if
self
.
single_command_package
[
1
]
is
None
:
pus_packet_tuple
=
command_preparation
()
.
pack_command_tuple
()
else
:
LOGGER
.
info
(
"Sending single packet from GUI.."
)
pus_packet_tuple
=
self
.
single_command_package
sender_and_receiver
=
SingleCommandSenderReceiver
(
com_interface
=
self
.
communication_interface
,
tmtc_printer
=
self
.
tmtc_printer
,
...
...
@@ -235,7 +234,7 @@ class TmTcHandler:
# tmtc_handler.perform_operation()
def
command_preparation
()
->
Tuple
[
bytearray
,
Union
[
None
,
PusTcInfo
]]
:
def
command_preparation
()
->
PusTelecommand
:
"""
Prepare command for single command testing
:return:
...
...
user/config/tmtcc_hooks.py
0 → 100644
View file @
3749440b
"""
@brief This file exposes hook functions to the user.
@details Template configuration file. Copy this folder to the TMTC commander root and adapt
it to your needs.
"""
from
tmtc_core.pus_tc.tmtcc_pus_tc_base
import
PusTelecommand
def
command_preparation_hook
()
->
PusTelecommand
:
"""
Can be used to pack user-defined commands by generating and returning a PusTelecommand
class instance
"""
return
PusTelecommand
(
service
=
17
,
subservice
=
1
,
ssc
=
20
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment