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
Additional useful operations for Python

Pyteal Extensions Additional useful operations for Python Available Operations MulDiv64: calculate m1*m2/d with no overflow on multiplication (TEAL 3+

Ulam Labs 11 Dec 14, 2022
Shows a pixel art of any Pokémon in your terminal!

pokemon-icat This script is inspired by this project, but since the output heavily depends on the font of your terminal, i decided to make a script th

ph04 52 Dec 22, 2022
Linux GUI app to codon optimize many single-fasta files with coding sequences , using many taxonomy ids

codon_optimize_cds_with_many_taxids_singlefasta Linux GUI app to codon optimize many single-fasta files with coding sequences, using many taxonomy ids

Olga Tsiouri 1 Jan 23, 2022
Developer guide for Hivecoin project

Hivecoin-developer Developer guide for Hivecoin project. Install Content are writen in reStructuredText (RST) and rendered with Sphinx. Much of the co

tweetyf 1 Nov 22, 2021
Python Freecell Solver

freecell Python Freecell Solver Very early version right now. You can pick a board by changing the file path in freecell.py If you want to play a game

Ben Kaufman 1 Nov 26, 2021
This is a modified variation of abhiTronix's vidgear. In this variation, it is possible to write the output file anywhere regardless the permissions.

Info In order to download this package: Windows 10: Press Windows+S, Type PowerShell (cmd in older versions) and hit enter, Type pip install vidgear_n

Ege Akman 3 Jan 30, 2022
My attempt at this years Advent of Code!

Advent-of-code-2021 My attempt at this years Advent of Code! day 1: ** day 2: ** day 3: ** day 4: ** day 5: ** day 6: ** day 7: ** day 8: * day 9: day

1 Jul 06, 2022
A simple program to run through inputs for a 3n+1 problem

Author Tyler Windemuth Collatz_Conjecture A simple program to run through inputs for a 3n+1 problem Purpose: doesn't really have a purpose, did this t

0 Apr 22, 2022
A PowSyBl and Python integration based on GraalVM native image

PyPowSyBl The PyPowSyBl project gives access PowSyBl Java framework to Python developers. This Python integration relies on GraalVM to compile Java co

powsybl 23 Dec 14, 2022
Awesome Cheatsheet

Awesome Cheatsheet List of useful cheatsheets Inspired by @sindresorhus awesome and improved by these amazing contributors. If you see a link here is

detailyang 6.5k Jan 07, 2023
Life Dynamics for python

Daphny_counter run command must be like this: /usr/bin/python3 /home/nmakagonov/Daphny/daphny_counter/Daphny_counter.py -o /home/nmakagonov/Daphny/out

12 Sep 05, 2022
Binjago - Set of tools aiding in analysis of stripped Golang binaries with Binary Ninja

Binjago 🥷 Set of tools aiding in analysis of stripped Golang binaries with Bina

W3ndige 2 Jul 23, 2022
Unfinished Python library based on ndspy, for Zelda: Phantom Hourglass and Spirit Tracks.

zed An unfinished library and toolset by me, for viewing and editing files from The Legend of Zelda: Phantom Hourglass and The Legend of Zelda: Spirit

4 Oct 13, 2022
Digdata presented 'BrandX' as a clothing brand that wants to know the best places to set up a 'pop up' store.

Digdata presented 'BrandX' as a clothing brand that wants to know the best places to set up a 'pop up' store. I used the dataset given to write a program that ranks these places.

Mahmoud 1 Dec 11, 2021
Code needed for hybrid land cover change analysis for NASA IDS project

Documentation for the NASA IDS change analysis Poley 10/21/2021 Required python packages: whitebox numpy rasterio rasterio.mask os glob math itertools

Andrew Poley 2 Nov 12, 2021
Checks for Vaccine Availability at your district and notifies you using E-mail, subscribe to our website.

Vaccine Availability Notifier Project Description Checks for Vaccine Availability at your district and notifies you using E-mail every 10 mins. Kindly

Farhan Hai Khan 19 Jun 03, 2021
A lighweight screen color picker tool

tkpick A lighweigt screen color picker tool Availability Only GNU/Linux 🐧 Installing Install via pip (No auto-update): [sudo] pip install tkpick Usa

Adil Gürbüz 7 Aug 30, 2021
Python bindings for `ign-msgs` and `ign-transport`

Python Ignition This project aims to provide Python bindings for ignition-msgs and ignition-transport. It is a work in progress... C++ and Python libr

Rhys Mainwaring 3 Nov 08, 2022
A package selector for building your confy nest

Hornero A package selector for building your comfy nest About Hornero helps you to install your favourite packages on your fresh installed Linux distr

Santiago Soler 1 Nov 22, 2021
Github Star Tracking app with Streamlit

github-star-tracking-python-app Github Star Tracking app with Streamlit #8daysofstreamlit How to run it locally? Clone or Download & Unzip the Repo En

amrrs 4 Sep 22, 2022