Skip to content

sgaisser/tmtccmd

 
 

Repository files navigation

TMTC Commander Documentation Status package codecov PyPI version

Overview

This is a small Python framework targeted towards remote system software developers to perform TMTC (Telemetry and Telecommand) handling and testing via different communication interfaces. Examples for such systems are CubeSats or Rovers. 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.

The TMTC commander also includes some telemetry handling components and telecommand packaging helpers. Some of those components are tailored towards usage with the Flight Software Framework (FSFW).

Features

  • Special support for Packet Utilisation Standard (PUS) packets and CCSDS Space Packets. This library uses the spacepackets library for most packet implementations.
  • Support for both CLI and GUI usage
  • Flexibility 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 sequences
  • Listener mode to only listen to incoming telemetry
  • Basic logger components which can be used to store sent Telecommands and incoming Telemetry in files
  • Some components are tailored towards usage with the Flight Software Framework (FSFW)

This has a communication interface abstraction which allows to exchange TMTC through different channels. The framework currently supports the following communication interfaces:

  1. TCP/IP with UDP and TCP
  2. Serial Communication using fixed frames or a simple ASCII based transport layer
  3. QEMU, using a virtual serial interface

It is also possible to supply custom interfaces.

Examples

The examples folder 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 the installation chapter, it can be run like this for the CLI mode:

cd examples
./tmtcc.py

or like this for the GUI mode:

cd examples
./tmtcc.py -g

The EIVE and SOURCE project implementation of the TMTC commander provide more complex implementations.

Tests

To run the tests, install the test requirements first with the following command, assuming a virtual environment:

pip install .[gui,test]

All tests are provided in the src/test folder and can be run with coverage information by running

coverage run -m pytest

provided that pytest and coverage were installed with

python3 -m pip install coverage pytest

Installation

It is recommended to use a virtual environment when installing this library. The steps here assume you have set up and activated the environment.

To install the full version with GUI support, run the following command to install from the cloned source code

pip install .[gui]

You can omit [gui] for a CLI only installation. Alternatively you can also install the package from PyPI with pip install -e tmtccmd[gui].

Using PyCharm

When using PyCharm and running the application from PyCharm, it is recommended to set the Emulate terminal in output console option. This is because packages like prompt-toolkit require a complete terminal for features like auto-complete to work.

About

TMTC Commander Core

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%