Package: tmtccmd
TMTC CommanderOverviewDocumentationProject HomepageThis is a small Python framework targeted towards the testing of remote systems like satellites
and rovers. It simplifies sending and receiving TMTCs (Telemetry and Telecommands)
and testing via different communication interfaces. This tool can be
used either as a command line tool or as a GUI tool. The GUI features require a PyQt5 installation.
This package also has dedicated support to send and receive ECSS PUS packets or other generic
CCSDS packets.FeaturesGeneric communication interface abstraction which can also be used without the other components
of the library if the goal is to separate the packet logic from the communication interface.
The dedicated documentation chapter contains a more information and examples.Special support forPacket Utilisation Standard (PUS)packets andCCSDS Space Packets.
This library uses thespacepacketslibrary for most
packet implementations.High level CFDP components which allow to buildCFDP standard conformantCFDP handlers.Support for both CLI and GUI usageFlexibility in the way to specify telecommands to send and how to handle incoming telemetry.
This is done by requiring the user to specify callbacks for both TC specification and TM handling.One-Queue Mode for simple command sequences and Multi-Queue for more complex command sequencesListener mode to only listen to incoming telemetryBasic logger components which can be used to store sent Telecommands and incoming Telemetry
in filesSome components are tailored towards usage with theFlight Software Framework (FSFW)The framework currently supports the following communication interfaces:TCP/IP with UDP and TCP. The TCP interface currently only supports sending CCSDS space packets
and is able to parse those packets from the received data stream.Serial Communication with a transport layer using eitherCOBSencoded packets or DLE as a simpleASCII based transport layer.QEMU, using a virtual serial interfaceIt is also possible to supply custom interfaces.ExamplesTheexamplesfolder contains a simple
example using a  dummy communication interface. It sends a PUS ping telecommand and then reads the
ping reply and  the verification replies back from the dummy interface. Assuming, the package was
installed in a virtual environment like shown in theinstallation chapter, it can be
run like this for the CLI mode:cdexamples
./tmtcc.pyor like this for the GUI mode:cdexamples
./tmtcc.py-gTheEIVEandSOURCEproject implementation of the TMTC commander
provide more complex implementations.TestsTo run the tests, install the test requirements first with the following command, assuming
a virtual environment:pipinstall.[gui,test]All tests are provided in thesrc/testfolder and can be run with coverage information
by runningcoveragerun-mpytestprovided thatpytestandcoveragewere installed withpipinstallcoveragepytestInstallationIt is recommended to use a virtual environment when installing this library. The steps here
assume you haveset up and activated the environment.To install the full version with GUI support, run the following command to install from the cloned
source codepipinstall.[gui]You can omit[gui]for a CLI only installation. Alternatively you can also install the package
from PyPI withpip install -e tmtccmd[gui].DocumentationThe documentation is built with SphinxInstall the required dependencies first:pipinstall-rdocs/requirements.txtThen the documentation can be built withcddocs
makehtmlThe doctests can be run with the following commandcddocs
makedoctestUsing PyCharmWhen using PyCharm and running the application from PyCharm, it is recommended to set
theEmulate terminal in output consoleoption. This is because packages likeprompt-toolkitrequire a complete terminal for features like auto-complete to work.