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
Safely pass trusted data to untrusted environments and back.

ItsDangerous ... so better sign this Various helpers to pass data to untrusted environments and to get it back safe and sound. Data is cryptographical

The Pallets Projects 2.6k Jan 01, 2023
This repository contains a lot of short scripting programs implemented both in Python (Flask) and TypeScript (NodeJS).

fast-scripts This repository contains a lot of short scripting programs implemented both in Python (Flask) and TypeScript (NodeJS). In python These wi

Nahum Maurice 3 Dec 10, 2022
This directory gathers the tools developed by the Data Sourcing Working Group

BigScience Data Sourcing Code This directory gathers the tools developed by the Data Sourcing Working Group First Sourcing Sprint: October 2021 The co

BigScience Workshop 27 Nov 04, 2022
Data Science Course at Dept. of Computer Engineering, Chula 2022

2110446 Data Science Course at Chula 2022 Short links for exercises: Week1: Intro to Numpy, Pandas Numpy: https://colab.research.google.com/github/kao

Kao Panboonyuen 17 Nov 27, 2022
Mommas-cookbook - A Repository About Mom's Recipes

Mommas Cookbook A Repository for Mom's Recipes Contents bacalhau à Gomes de Sá Beef-Rendang bacalhau à Gomes de Sá, recommended by @s0undt3ch One of t

1 Jan 08, 2022
Online HackerRank problem solving challenges

LinkedListHackerRank Online HackerRank problem solving challenges This challenge is part of a tutorial track by MyCodeSchool You are given the pointer

Sefineh Tesfa 1 Nov 21, 2021
Backend Interview Challenge

Inspect HOA backend challenge This is a simple flask repository with some endpoints and requires a few more endpoints. It follows a simple MVP (model-

1 Jan 20, 2022
WorldsCollide - Final Fantasy VI Randomizer

FFVI Worlds Collide Worlds Collide is an open worlds randomizer for Final Fantas

8 Jun 13, 2022
Eros is an expiremental programming language built using simple Python code.

Eros is an expiremental programming language built using simple Python code. Featuring an easy syntax and unique features like type slicing, the language remains an expirement that grows in down time

zxro 2 Nov 21, 2021
Release for Improved Denoising Diffusion Probabilistic Models

improved-diffusion This is the codebase for Improved Denoising Diffusion Probabilistic Models. Usage This section of the README walks through how to t

OpenAI 1.2k Dec 30, 2022
A simple IDA Pro plugin to show all HexRays decompiler comments written by user

XRaysComments A simple IDA Pro plugin to show all HexRays decompiler comments written by user Installation Copy the file xray_comments.py to the plugi

Nox 20 Dec 27, 2022
Custom component to calculate estimated power consumption of lights and other appliances

Custom component to calculate estimated power consumption of lights and other appliances. Provides easy configuration to get virtual power consumption sensors in Home Assistant for all your devices w

Bram Gerritsen 552 Dec 28, 2022
Dev-meme - A repository that contains memes just for people like us

A repository that contains memes just for people like us. Coders are constantly

Padmashree Jha 4 Oct 31, 2022
This program can calculate the Aerial Distance between two cities.

Aerial_Distance_Calculator This program can calculate the Aerial Distance between two cities. This repository include both Jupyter notebook and Python

InvisiblePro 1 Apr 08, 2022
SECRET SANTA / KRIS KINGLE

SECRET SANTA / KRIS KINGLE Note: Before executing the script, make sure to turn

DEV_FINWIZ 10 Dec 06, 2022
Python Service for MISP Feed Management

Python Service for MISP Feed Management This set of scripts is designed to offer better reliability and more control over the fetching of feeds into M

Chris 7 Aug 24, 2022
Tesla App Update Differences Extractor

Tesla App Update Differences Extractor Python program that finds the differences between two versions of the Tesla App. When Tesla updates the app a l

Adrian 5 Apr 11, 2022
Python wrapper to different clients to determine how a particular term is used.

Python wrapper to different clients to determine how a particular term is used.

Chris Mungall 3 Oct 24, 2022
A simple desktop application to scan and export Genshin Impact Artifacts.

「天目」 -- Amenoma 简体中文 | English 「天目流的诀窍就是滴水穿石的耐心和全力以赴的意志」 扫描背包中的圣遗物,并导出至 json 格式。之后可导入圣遗物分析工具( 莫娜占卜铺 、 MingyuLab 、 Genshin Optimizer 进行计算与规划等。 已支持 原神2.

夏至 475 Dec 30, 2022
A very small (15 lines of code) and beautiful fetch script (exclusively for Arch Linux).

minifetch A very small (15 lines of code) and beautiful fetch script (exclusively for Arch Linux). There are many fetch scripts out there but I wanted

16 Jul 11, 2022