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
Jogo em redes similar ao clássico pedra papel e tesoura

Batalha Tática Tecnologias de Redes de Computadores-A-N-JOGOS DIGITAIS Professor Fabio Henrique Cabrini Alunos: Eric Henrique de Oliveira Silva - RA 1

Eric Henrique de Oliveira Silva 1 Dec 01, 2021
2021华为软件精英挑战赛 程序输出分析器

AutoGrader 0.2.0更新:加入资源分配溢出检测,如果发生资源溢出会输出溢出发生的位置。 如果通过检测,会显示通过符号 如果没有通过检测,会显示警告,并输出溢出发生的位置和操作

54 Aug 14, 2022
Compile Binary Ninja's HLIL IR to LLVM, for purposes of compiling it back to a binary again.

Compiles BinaryNinja's HLIL to LLVM Approach Sweep binary for global variables, create them Sweep binary for (used?) external functions, declare those

Kyle Martin 31 Nov 10, 2022
Programa que organiza pastas automaticamente

📂 Folder Organizer 📂 Programa que organiza pastas automaticamente Requisitos • Como usar • Melhorias futuras • Capturas de Tela Requisitos Antes de

João Victor Vilela dos Santos 1 Nov 02, 2021
Declarative and extensible library for configuration & code separation

ClassyConf ClassyConf is the configuration architecture solution for perfectionists with deadlines. It provides a declarative way to define settings f

83 Dec 07, 2022
Blender-miHoYo-Shaders - Shaders for Blender attempting to replicate the shading of games developed by miHoYo

Blender-miHoYo-Shaders - Shaders for Blender attempting to replicate the shading of games developed by miHoYo

Matsuri 449 Jan 07, 2023
Black-Scholes library implemented as a Cairo smart contract

Cairo Black-Scholes Library Black-Scholes library implemented as a Cairo smart contract. All inputs, outputs, and internal calculations use 27-digit f

Aditya Raghavan 47 Dec 19, 2022
Minimal, super readable string pattern matching for python.

simplematch Minimal, super readable string pattern matching for python. import simplematch simplematch.match("He* {planet}!", "Hello World!") {"p

Thomas Feldmann 147 Dec 01, 2022
Library support get vocabulary from MEM

Features: Support scraping the courses in MEM to take the vocabulary Translate the words to your own language Get the IPA for the English course Insta

Joseph Quang 4 Aug 13, 2022
Aesthetic NFT Generator

A E S T H E T I C Dependencies Pillow numpy OpenCV You can use pip to install any missing dependencies. Basic Usage Vaporwave artwork can be generated

Mentor Elezi 4 Mar 13, 2022
Fried Chicken Programming Language

Fried-Chicken Fried Chicken Programming Language How To Run Once downloaded and opened, choose any file for code. Any file extensions work. Just make

Attachment Studios 9 Jul 11, 2022
Official repository for the BPF Performance Tools book

BPF Performance Tools This is the official repository of BPF (eBPF) tools from the book BPF Performance Tools: Linux and Application Observability. Th

Brendan Gregg 1.2k Dec 28, 2022
Nuclei - Burp Extension allows to run nuclei scanner directly from burp and transforms json results into the issues

Nuclei - Burp Extension Simple extension that allows to run nuclei scanner directly from burp and transforms json results into the issues. Installatio

106 Dec 22, 2022
A framework that let's you compose websites in Python with ease!

Perry Perry = A framework that let's you compose websites in Python with ease! Perry works similar to Qt and Flutter, allowing you to create componen

Linkus 13 Oct 09, 2022
Darkflame Universe Account Manager

Darkflame Universe Account Manager This is a quick and simple web application intended for account creation and management for a DLU instance created

31 Nov 29, 2022
Predicting Global Crop Yield for World Hunger

Crop Yield And Global Famine - The fifth project I created during my time at General Assembly. I completed this project with three other classmates in the span of three weeks. Most of my work was dir

Adam Muhammad Klesc 2 Jun 19, 2022
use Notepad++ for real-time sync after python appending new log text

FTP远程log同步工具 使用Notepad++配合来获取实时更新的log文档效果 适用于FTP协议的log远程同步工具,配合MT管理器开启FTP服务器使用,通过Notepad++监听文本变化,更便捷的使用电脑查看方法注入打印后的信息 功能 过滤器 对每行要打印的文本使用回调函数筛选,支持链式调用

Liuhaixv 1 Oct 17, 2021
An easy FASTA object handler, reader, writer and translator for small to medium size projects without dependencies.

miniFASTA An easy FASTA object handler, reader, writer and translator for small to medium size projects without dependencies. Installation Using pip /

Jules Kreuer 3 Jun 30, 2022
Cool little Python scripts & projects I've made.

Little Python Projects A repository for neat little Python scripts I've made! How to run a script: *NOTE: You'll need to install Python v3 or higher.

dood 1 Jan 19, 2022
This library attempts to abstract the handling of Sigma rules in Python

This library attempts to abstract the handling of Sigma rules in Python. The rules are parsed using a schema defined with pydantic, and can be easily loaded from YAML files into a structured Python o

Caleb Stewart 44 Oct 29, 2022