Skip to content
Snippets Groups Projects
Commit 87dfde95 authored by Robin Mueller's avatar Robin Mueller
Browse files

Merge branch 'mueller/master' of https://git.ksat-stuttgart.de/source/tmtc into mueller/master

parents 55e7491c 7128c1b2
No related branches found
No related tags found
No related merge requests found
...@@ -25,7 +25,8 @@ class ModeList(enum.Enum): ...@@ -25,7 +25,8 @@ class ModeList(enum.Enum):
SingleCommandMode = 2 SingleCommandMode = 2
ServiceTestMode = 3 ServiceTestMode = 3
SoftwareTestMode = 4 SoftwareTestMode = 4
UnitTest = 5 BinaryUploadMode = 5
UnitTest = 6
class ComIF(enum.Enum): class ComIF(enum.Enum):
......
...@@ -153,6 +153,7 @@ class TmTcHandler: ...@@ -153,6 +153,7 @@ class TmTcHandler:
time.sleep(5) time.sleep(5)
except (IOError, KeyboardInterrupt): except (IOError, KeyboardInterrupt):
LOGGER.info("Closing TMTC client.") LOGGER.info("Closing TMTC client.")
sys.exit()
def handle_action(self): def handle_action(self):
""" """
...@@ -211,6 +212,11 @@ class TmTcHandler: ...@@ -211,6 +212,11 @@ class TmTcHandler:
suite = unittest.TestLoader().loadTestsFromModule(obsw_pus_service_test) suite = unittest.TestLoader().loadTestsFromModule(obsw_pus_service_test)
unittest.TextTestRunner(verbosity=2).run(suite) unittest.TextTestRunner(verbosity=2).run(suite)
elif self.mode == g.ModeList.BinaryUploadMode:
# Upload binary, prompt user for input, in the end prompt for new mode and enter that
# mode
self.command_received = True
else: else:
logging.error("Unknown Mode, Configuration error !") logging.error("Unknown Mode, Configuration error !")
sys.exit() sys.exit()
......
"""
@brief DLE Encoder Implementation
@details
DLE encoding can be used to provide a simple transport layer for serial data.
A give data stream is encoded by adding a STX char at the beginning and an ETX char at the end.
All STX and ETX occurences in the packet are encoded as well so the receiver can simply look
for STX and ETX occurences to identify packets.
"""
# TODO: Implementation / Translation of C code
"""
@brief Hamming Code Implementation
@details
Hamming codes belong to the family of linear error correcting codes.
Documentation: https://en.wikipedia.org/wiki/Hamming_code
They can be used to identify up to two bit error and correct on bit error.
"""
# TODO: Implementation / Translation of C code
#!/usr/bin/python3.8
"""
@brief Binary Uploader Module
@details
This module will be used to upload binaries to the OBC via a communication port, given
a supplied binary. The binary will be sent via the specified communication interface.
It will be possible to encode the data (for example using DLE encoding)
"""
...@@ -72,6 +72,7 @@ def set_tmtc_logger() -> logging.Logger: ...@@ -72,6 +72,7 @@ def set_tmtc_logger() -> logging.Logger:
logger.addHandler(console_error_handler) logger.addHandler(console_error_handler)
return logger return logger
def get_logger() -> logging.Logger: def get_logger() -> logging.Logger:
""" """
Get the global logger instance. Get the global logger instance.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment