Giter Club home page Giter Club logo

tmtccmd's Introduction

TMTC Commander Documentation Status ci codecov PyPI version

Overview

This 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 which requires a PyQt6 installation.

Features

  • Generic 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 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.
  • Some components are tailored towards usage with the Flight Software Framework (FSFW) and the sat-rs framework

The framework currently supports the following communication interfaces (among others):

  1. 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.
  2. Serial Communication with a transport layer using COBS.

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 .[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

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 tmtccmd[gui].

Documentation

The documentation is built with Sphinx

Install the required dependencies first:

pip install -r docs/requirements.txt

Then the documentation can be built with

cd docs
make html

The doctests can be run with the following command

cd docs
make doctest

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.

tmtccmd's People

Contributors

dwood2020 avatar jakobmeier avatar ngusa1 avatar robamu avatar umohr-irs avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

tmtccmd's Issues

Add PUS TM version not using Object ID

The current version of PUS TM handling is still tightly bound to the Flight Software Framework using an object ID. An adaption to support packets without an object ID would be a good addition.

Allow command definitions specification as (string) tree

The current approach of specifying command definitions is quite inflexible because it only allows one sublayer (op codes as the sublayer of the service).

A more flexible approach which would also be possible to implement in the GUI would be to allow specifying the command definitions in a tree format, where the user can build build a command definition tree, where a command path consists of full path from root to a command leaf. For example, it could look like this

root

  • core (n)
    • reboot (l)
  • test (n)
    • ping (l)
  • acs_subsystem
  • tcs_subsystem
    • tcs_ctrl
      • set_mode
    • poll_all_temps

The full path is passed to the user feed callback, for example as a slash or colon separated string, for example: tcs_subsystem:tcs_ctrl:set_mode. A tree like that would also be traversable in both CLI and the GUI.

Get GUI to better state

The GUI still needs some updates to be usable properly

  • Proper implementation of communication interface handling. This includes a connect and disconnect button
  • A way to chose op codes depending on the selected service

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.