TMTC Commander Core

Overview

TMTC Commander Core Documentation Status package codecov PyPI version

Overview

This commander application was first developed by KSat for the SOURCE project to test the on-board software but has evolved into a more generic tool for satellite developers to perform TMTC (Telemetry and Telecommand) handling and testing via different communication interfaces. Currently, only the PUS standard is implemented as a packet standard. This tool can be used either as a command line tool or as a GUI tool. The GUI features require a PyQt5 installation.

This client 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

The TMTC commander also includes a Space Packet and a ECSS PUS packet stack. Some of these components might be moved to an own library soon, so they were decoupled from the rest of the TMTC commander components.

Examples

The example folder contains a simple example using a dummy communication interface. It can be run like this on Linux

cd example
./tmtc_cli.py

or on Windows

cd example
py tmtc_cli.py

The SOURCE implementation of the TMTC commander provides a more complex implementation.

Tests

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

On Ubuntu, if pip is not installed yet, you can install it with

sudo apt-get install python3-pip

The minimum allowed Python version is 3.8. For developers, it is recommended to add this repostiory as a submodule with the following command:

git submodule add https://github.com/rmspacefish/tmtccmd.git

For the following commands, replace python3 with py on Windows. After that, you can install the package in an editable mode with the following command:

cd tmtccmd
python3 -m pip install -e .

To also install the requirements for the GUI mode, run this command instead

cd tmtccmd
python3 -m pip install -e .[gui]

Omit the -e for a regular installation. Alternatively you can now install the package from PyPI with python3 -m pip install -e tmtccmd[gui].

Comments
  • v3.0.0

    v3.0.0

    • Overhaul of application architecture
    • Significant simplification of various modules to increase testability
    • Test coverage increased
    • Reduced number of modules significantly by moving code into the repective __init__ files where possible
    • GUI improved
    • Simplified general package structure, remove src folder and have tmtccmd package and tests package in repo root
    • First CFDP handler components
    • Reduce usage of globals. The end goal is to remove them altogether
    • Reduce overall number of spawned threads
    • Added Sequence Count handling modules
    opened by robamu 2
  • v3.0.0rc1

    v3.0.0rc1

    • Overhaul of application architecture
    • Significant simplification of various modules to increase testability
    • Test coverage increased
    • Reduced number of modules significantly by moving code into the repective __init__ files where possible
    • GUI improved
    • Documentation improved
    • New logo
    • Simplified general package structure, remove src folder and have tmtccmd package and tests package in repo root
    • First CFDP handler components
    • Reduce usage of globals. The end goal is to remove them altogether
    • Reduce overall number of spawned threads
    • Added Sequence Count handling modules
    opened by robamu 1
  • Keep listener running in GUI mode, Improved TCP handling

    Keep listener running in GUI mode, Improved TCP handling

    GUI:

    • until now it was not able to keep the listener running when using the GUI mode which leads to a full TC queue
    • the frontend has been adapted in a way that the mode is changed to listener mode as soon as the sending of a command sequence is finished

    TCP client:

    • when keeping the socket active while the OBSW acting as the TCP server has been stopped, relaunching the OBSW could result in the TCP error indicating the IP address is already in use
    • the change in the TCP Com IF ensures that the client detects the shutdown of the server and also closes its socket
    • this prevents the OBSW from running in the "address in use" error

    Wait command in command_sender_and_receiver:

    • a wait command was executed only when placed at the last position in the command queue
    • wait commands are now also considered when inserted between two telecommands
    opened by JakobMeier 1
  • Daemon mode support

    Daemon mode support

    For EIVE, I need the ability to continuously receive TM and still be able to send TCs at wish. Following adaptions were necessary:

    Changes to the TmTcHandler :

    • added a cached SequentialCommandSenderReceiver
    • added CONTINUOUS mode which will start the receiver thread in the SequentialCommandSenderReceiver instance and only send one TC

    Changes in runner.py:

    • added argument in __start_tmtc_commander_cli to defer sending of command
    • added two functions, init_and_start_daemons and performOperation, to allow separate calls to init TmTcHandler and send TCs

    Changes in SequentialCommandSenderReceiver:

    • added send_queue_tc_and_return function which does only that (and no tm checking)
    • added possibility to start a thread which checks tm
    opened by umohr-irs 1
  • Update from EIVE branch

    Update from EIVE branch

    • Improve lint.py: Add prefix and print out executed command
    • Architectural improvements for the TmListener component
      • Separate functions to set the internal mode
      • Moved mode enum outside of class scope
    • Call user send callback for both queue commands and regular telecommands
    opened by robamu 1
  • Major tmtccmd overhaul

    Major tmtccmd overhaul

    • Improve core API: Changes core functions to setup and run. Requirement to user to create backend. Makes it easier to directectly configure the backend and move to a generally more pythonic API
    • Simplified hook object, removed multiple obsolete functions
    • Exposed API to create two new file loggers: A raw PUS logger using rotating files and a generic TMTC logger which uses a new file for each TMTC session
    • Updated CCSDS Handler to make it more easily extensible by creating a new ApidHandler class
    • New Pre-Send Callback which is called by backend before sending each telecommand
    opened by robamu 1
  • v1.10.0

    v1.10.0

    • Update to v1.10.0
    • Spacepackets updates to v0.4.2
    • Replaced more setters and getters with properties
    • API changes, TCP ComIF takes list of space packet IDs now to allow multiple APIDs
    • Service 1 and Service 17 PUS TM components moved to spacepackets, extension for tmtccmd are now named Service1TMExtended and Service17TMExtended
    opened by robamu 1
  • Update from EIVE branch

    Update from EIVE branch

    • Bumped minimum required Python version to 3.8 so that TypedDicts can be used
    • Moved all packet related code to a separate spacepackets package. This includes CFDP, ECSS and CCSDS code
    opened by robamu 1
  • Update to v1.7.0

    Update to v1.7.0

    • Changes to architecture which allow easier incorporation of CFDP. The TM listener has an internal packet router now, which can use packet properties like the APID field to route packets inside an internal dictionary. This could later be used to have a different packet channel for CFDP
    • A lot of linter fixes
    • There are also some additional requirements now conerning the necessary calls for a minimal working program, because the user now has to add packet handlers manually. In the current case with CFDP still unimplemented, the only viable packet handler is a CCSDS space packet handler for certain APIDs. The user can add callbacks for certain APIDs in that space packet handler, which will be called when a PUS packet is received
    • lint.py added which allows to drive the GitHub linter from the command line as well
    • The PUS callback now receives an instance of the TmTcPrinter and the packet handler functions for PUS service 3/5/8 packets are soon all going to be member functions of the TMTC printer. This allows to keep the packet classes more clean and the user can use the TmTcPrinter instance to perform packet visualization inside the packet handler callback
    • pus_tc and pus_tm modules renamed to tc and tm to be more generic
    • get_logger renamed to get_console_logger because a proper file logger might be added soon
    • Documentation extended and improved
    documentation enhancement api-change 
    opened by robamu 1
  • Changes for 1.4.4

    Changes for 1.4.4

    A lot of refactoring was done, and some changes are still necessary for this refactoring. Most of it is form / documentation related, but some are also bugfixes. Changes are gathered here.

    opened by robamu 1
  • Update to v1.4.3

    Update to v1.4.3

    • Refactored Object ID manager
    • Added more tests
    • Project part of (personal) organization now, READMEs updated accordingly
    • Configurability increased: JSON config path is passed now instead of being hardcoded
    • Cleaned up GUI a bit, some additions still necessary for usability
    opened by robamu 1
  • Add PUS TM version not using Object ID

    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.

    opened by robamu 0
Releases(v3.0.0)
  • v3.0.0rc3(Dec 1, 2022)

  • v1.10.2(Jan 19, 2022)

  • v1.10.1(Dec 14, 2021)

  • v1.10.0(Oct 13, 2021)

    • Spacepackets updates to v0.4.2
    • Replaced more setters and getters with properties
    • API changes, TCP ComIF takes list of space packet IDs now to allow multiple APIDs
    • Service 1 and Service 17 PUS TM components moved to spacepackets, extension for tmtccmd are now named Service1TMExtended and Service17TMExtended
    Source code(tar.gz)
    Source code(zip)
  • v1.9.1(Oct 2, 2021)

  • v1.9.0(Oct 2, 2021)

    • Bugfixes for Service 1 telemetry unpacking
    • Simplified the TCP client by keeping the connection opened instead of closing it after ever transaction
    • Another bugfix should cause the core to prompt the service again if no service argument is specified for the CLI mode
    • Bumped minimum required Python version to 3.8 so that TypedDicts can be used
    • Moved all packet related code to a separate spacepackets package. This includes CFDP, ECSS and CCSDS code
    Source code(tar.gz)
    Source code(zip)
  • v1.8.0(Sep 7, 2021)

    • Some minor linter fixes
    • cfdp, ecss and ccsds modules have a seaprate log.py file now which currently defaults to the standard tmtccmd logger
    • Some example improvements
    • Increased robustness against invalid communication interface keys
    • Added function to extract the service ID from a raw PUS packet
    • Added a feature to specify a hint for a serial device, because COM ports can change but the serial device name usually doesn't.

    CFDP Init

    • First CCSDS CFDP base classes added

    Major Refactoring of TM handling

    1. No separate TM creator functions anymore. Instead, instances can be created from a raw bytestream with the unpack classmethod, and class instances can be created and packed with the regular constructor
    2. New module for time related CCSDS components
    3. New module and helper class for the Object ID
    4. flake8 script fixes for Windows, general improvements
    5. Using composition instead of inheritance for the TM classes.
    6. Two new interfaces added for handling of tm which are used by the tmtc_printer. These interfaces decouple the printer partially from concrete PUS classes
    7. Some import helpers added in the __init__ files
    Source code(tar.gz)
    Source code(zip)
  • v1.7.3(Jul 26, 2021)

    • TCP is stream based, so it is possible to get broken packets or multiple packets with one recv call
    • Added a way to parse for space packets in the TCP Communication Interface
    • The parser needs to know the start marker, which is the 16 bit space packet ID. It is passed to the parser function
    • Various smaller improvements
    Source code(tar.gz)
    Source code(zip)
  • v1.7.2(Jul 12, 2021)

  • v1.7.1(Jul 3, 2021)

  • v1.7.0(Jul 3, 2021)

    • Changes to architecture which allow easier incorporation of CFDP. The TM listener has an internal packet router now, which can use packet properties like the APID field to route packets inside an internal dictionary. This could later be used to have a different packet channel for CFDP
    • A lot of linter fixes
    • There are also some additional requirements now conerning the necessary calls for a minimal working program, because the user now has to add packet handlers manually. In the current case with CFDP still unimplemented, the only viable packet handler is a CCSDS space packet handler for certain APIDs. The user can add callbacks for certain APIDs in that space packet handler, which will be called when a PUS packet is received
    • lint.py added which allows to drive the GitHub linter from the command line as well
    • The PUS callback now receives an instance of the TmTcPrinter and the packet handler functions for PUS service 3/5/8 packets are soon all going to be member functions of the TMTC printer. This allows to keep the packet classes more clean and the user can use the TmTcPrinter instance to perform packet visualization inside the packet handler callback
    • pus_tc and pus_tm modules renamed to tc and tm to be more generic
    • get_logger renamed to get_console_logger because a proper file logger might be added soon
    • Documentation extended and improved
    Source code(tar.gz)
    Source code(zip)
  • v1.6.1(Jun 17, 2021)

  • v1.6.0(Jun 4, 2021)

  • v1.5.0(May 13, 2021)

    • Significant improvements to GUI.
    • Consolidation of some API component. default package removed and all modules moved to config package
    • Colored logs using colorama and colorlog , updated setup.cfg accordingly
    • Service and communication interface keys are now all strings by default. Some keys are still stored as enum.Enum values to have a programatic way of determining available options
    • A lot of obsolete code removed
    • File log output improved
    Source code(tar.gz)
    Source code(zip)
  • v1.4.4(May 9, 2021)

  • v1.4.3(May 4, 2021)

    • Refactored Object ID manager
    • Added more tests
    • Project part of (personal) organization now, READMEs updated accordingly
    • Configurability increased: JSON config path is passed now instead of being hardcoded
    • Cleaned up GUI a bit, some additions still necessary for usability
    Source code(tar.gz)
    Source code(zip)
  • v1.4.2(Apr 26, 2021)

  • v1.4.1(Apr 26, 2021)

Owner
robamu
robamu
Python module to work with Magneto Database directly without using broken Magento 2 core

Python module to work with Magneto Database directly without using broken Magento 2 core

Egor Shitikov 13 Nov 10, 2022
An Airflow operator to call the main function from the dbt-core Python package

airflow-dbt-python An Airflow operator to call the main function from the dbt-core Python package Motivation Airflow running in a managed environment

Tomás Farías Santana 93 Jan 8, 2023
An alternative app for core Armoury Crate functions.

NoROG DISCLAIMER: Use at your own risk. This is alpha-quality software. It has not been extensively tested, though I personally run it daily on my lap

null 12 Nov 29, 2022
MuMMI Core is the underlying infrastructure and generalizable component of the MuMMI framework

MuMMI Core is the underlying infrastructure and generalizable component of the MuMMI framework, which facilitates the coordination of massively parallel multiscale simulations.

null 4 Aug 17, 2022
This repository holds those infrastructure-level modules, that every application requires that follows the core 12-factor principles.

py-12f-common About This repository holds those infrastructure-level modules, that every application requires that follows the core 12-factor principl

Tamás Benke 1 Dec 15, 2022
This is the core of the program which takes 5k SYMBOLS and looks back N years to pull in the daily OHLC data of those symbols and saves them to disc.

This is the core of the program which takes 5k SYMBOLS and looks back N years to pull in the daily OHLC data of those symbols and saves them to disc.

Daniel Caine 1 Jan 31, 2022
Simple client for the Sirah Matisse Commander TCP server.

Simple client for the Sirah Matisse Commander TCP server.

Nelson Darkwah Oppong 1 Nov 2, 2021
An ZFS administration tool inspired on Midnight commander

ZC - ZFS Commander An ZFS administration tool inspired on Midnight commander Work in Progress Description ZFS Commander is a simple front-end for the

null 34 Dec 7, 2022
Core ML tools contain supporting tools for Core ML model conversion, editing, and validation.

Core ML Tools Use coremltools to convert machine learning models from third-party libraries to the Core ML format. The Python package contains the sup

Apple 3k Jan 8, 2023
Ajenti Core and stock plugins

Ajenti is a Linux & BSD modular server admin panel. Ajenti 2 provides a new interface and a better architecture, developed with Python3 and AngularJS.

Ajenti Project 7k Jan 7, 2023
cross-library (GStreamer + Core Audio + MAD + FFmpeg) audio decoding for Python

audioread Decode audio files using whichever backend is available. The library currently supports: Gstreamer via PyGObject. Core Audio on Mac OS X via

beetbox 419 Dec 26, 2022
GINO Is Not ORM - a Python asyncio ORM on SQLAlchemy core.

GINO - GINO Is Not ORM - is a lightweight asynchronous ORM built on top of SQLAlchemy core for Python asyncio. GINO 1.0 supports only PostgreSQL with

GINO Community 2.5k Dec 27, 2022
NLP Core Library and Model Zoo based on PaddlePaddle 2.0

PaddleNLP 2.0拥有丰富的模型库、简洁易用的API与高性能的分布式训练的能力,旨在为飞桨开发者提升文本建模效率,并提供基于PaddlePaddle 2.0的NLP领域最佳实践。

null 6.9k Jan 1, 2023
The low-level, core functionality of boto 3.

botocore A low-level interface to a growing number of Amazon Web Services. The botocore package is the foundation for the AWS CLI as well as boto3. On

the boto project 1.2k Jan 3, 2023
Core utilities for Python packages

packaging Reusable core utilities for various Python Packaging interoperability specifications. This library provides utilities that implement the int

Python Packaging Authority 451 Jan 4, 2023
cross-library (GStreamer + Core Audio + MAD + FFmpeg) audio decoding for Python

audioread Decode audio files using whichever backend is available. The library currently supports: Gstreamer via PyGObject. Core Audio on Mac OS X via

beetbox 359 Feb 15, 2021
The open-source core of Pinry, a tiling image board system for people who want to save, tag, and share images, videos and webpages in an easy to skim through format.

The open-source core of Pinry, a tiling image board system for people who want to save, tag, and share images, videos and webpages in an easy to skim

Pinry 2.7k Jan 8, 2023
Out-of-Core DataFrames for Python, ML, visualize and explore big tabular data at a billion rows per second 🚀

What is Vaex? Vaex is a high performance Python library for lazy Out-of-Core DataFrames (similar to Pandas), to visualize and explore big tabular data

vaex io 7.7k Jan 1, 2023
TrueNAS CORE/Enterprise/SCALE Middleware Git Repository

TrueNAS CORE/Enterprise/SCALE main source repo Want to contribute or collaborate? Join our Slack instance. IMPORTANT NOTE: This is the master branch o

TrueNAS 2k Jan 7, 2023