Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into eive
Browse files Browse the repository at this point in the history
  • Loading branch information
robamu committed Jul 4, 2022
2 parents f87032a + dd56396 commit 82962b9
Show file tree
Hide file tree
Showing 171 changed files with 7,255 additions and 4,904 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/package.yml
Expand Up @@ -5,16 +5,17 @@ on: [push]
jobs:
build:

runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
python-version: ['3.8', '3.9', '3.10']

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -32,11 +33,11 @@ jobs:
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Run tests and generate coverage data
run: |
python3 -m pip install coverage pytest
python3 -m pip install coverage pytest pyfakefs
coverage run -m pytest
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v3
with:
flags: unittests
name: codecov-umbrella
Expand Down
7 changes: 5 additions & 2 deletions .gitignore
Expand Up @@ -12,11 +12,14 @@ build
*.egg-info

/examples/log
/src/log
/src/tests/log
/log
/tests/log
/tmtccmd/log

.idea
venv

/misc/.xdp-*

# CodeCov
.coverage
17 changes: 17 additions & 0 deletions CHANGELOG.md
Expand Up @@ -7,6 +7,23 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/).

## [unreleased]

## [v3.0.0rc1] 03.07.2022

- 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, added separate TM listening button
- 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

## [v2.2.2]

- Improve internal structure of sequential sender receiver object
Expand Down
17 changes: 10 additions & 7 deletions MANIFEST.in
@@ -1,12 +1,15 @@
include LICENSE
include NOTICE
include CHANGELOG.md

include docs/*.rst
include docs/logo_tmtccmd.png
include docs/conf.py
include docs/Makefile
include docs/*.md
graft docs
prune docs/_build

include tests/*
graft tests
prune tests/log

include pycharm/*
include requirements.txt

recursive-exclude * *.pyc *.pyo

include misc/logo-tiny.png
108 changes: 59 additions & 49 deletions README.md
@@ -1,56 +1,85 @@
<p align="center"> <img src="docs/logo_tmtccmd_smaller.png" width="40%"> </p>
<p align="center"> <img src="misc/logo.png" width="50%"> </p>

TMTC Commander Core [![Documentation Status](https://readthedocs.org/projects/tmtccmd/badge/?version=latest)](https://tmtccmd.readthedocs.io/en/latest/?badge=latest)
[![package](https://github.com/spacefisch/tmtccmd/actions/workflows/package.yml/badge.svg)](https://github.com/spacefisch/tmtccmd/actions/workflows/package.yml)
[![codecov](https://codecov.io/gh/robamu-org/tmtccmd/branch/develop/graph/badge.svg?token=BVOE3A4WE4)](https://codecov.io/gh/robamu-org/tmtccmd)
TMTC Commander [![Documentation Status](https://readthedocs.org/projects/tmtccmd/badge/?version=latest)](https://tmtccmd.readthedocs.io/en/latest/?badge=latest)
[![package](https://github.com/robamu-org/tmtccmd/actions/workflows/package.yml/badge.svg)](https://github.com/robamu-org/tmtccmd/actions/workflows/package.yml)
[![codecov](https://codecov.io/gh/robamu-org/tmtccmd/branch/main/graph/badge.svg?token=BVOE3A4WE4)](https://codecov.io/gh/robamu-org/tmtccmd)
[![PyPI version](https://badge.fury.io/py/tmtccmd.svg)](https://badge.fury.io/py/tmtccmd)
====

## Overview

- Documentation: https://tmtccmd.readthedocs.io/en/latest/
- Project Homepage: https://github.com/robamu-org/tmtccmd
- [Documentation](https://tmtccmd.readthedocs.io/en/latest/)
- [Project Homepage](https://github.com/robamu-org/tmtccmd)

This commander application was first developed by KSat for the
[SOURCE](https://www.ksat-stuttgart.de/en/our-missions/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 is a small Python framework for satellite developers to perform TMTC
(Telemetry and Telecommand) handling and testing via different communication interfaces.
This tool can be used either as a command line tool or as a GUI tool. The GUI features require a
PyQt5 installation. This package also has dedicated support to send and receive ECSS PUS packets
or other generic CCSDS packets.

This client currently supports the following communication interfaces:
The TMTC commander also includes some telemetry handling components and telecommand packaging
helpers. Some of those components are tailored towards usage with the
[Flight Software Framework (FSFW)](https://egit.irs.uni-stuttgart.de/fsfw/fsfw/).

## Features

- Special support for [Packet Utilisation Standard (PUS)](https://ecss.nl/standard/ecss-e-st-70-41c-space-engineering-telemetry-and-telecommand-packet-utilization-15-april-2016/)
packets and [CCSDS Space Packets](https://public.ccsds.org/Pubs/133x0b2e1.pdf).
This library uses the [spacepackets](https://github.com/us-irs/py-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
- Basic logger components which can be used to store sent Telecommands and incoming Telemetry
in files
- Some components are tailored towards usage with the
[Flight Software Framework (FSFW)](https://egit.irs.uni-stuttgart.de/fsfw/fsfw/)

This has a communication interface abstraction which allows to exchange TMTC through different
channels. The framework 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 some telemetry handling components and telecommand packaging
helpers. Some of those components are tailored towards usage with the
[Flight Software Framework (FSFW)](https://egit.irs.uni-stuttgart.de/fsfw/fsfw/).
It is also possible to supply custom interfaces.

## Examples

The `example` folder contains a simple example using a dummy communication interface.
It can be run like this on Linux
The [`examples`](https://github.com/robamu-org/tmtccmd/tree/main/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. It can be run like this
on Linux:

```sh
cd example
./tmtccli.py
cd examples
./tmtcc.py
```

or on Windows
or on Windows:

```sh
cd example
py tmtccli.py
cd examples
py tmtcc.py
```

You can run the GUI mode by supplying `-g` to the commands above.

The [EIVE](https://egit.irs.uni-stuttgart.de/eive/eive-tmtc) and
[SOURCE](https://git.ksat-stuttgart.de/source/tmtc) 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:

```sh
pip install .[gui,test]
```

All tests are provided in the `src/test` folder and can be run with coverage information
by running

Expand All @@ -66,37 +95,18 @@ python3 -m pip install coverage pytest

## Installation

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

```sh
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:

```sh
git submodule add https://github.com/robamu-org/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:

```sh
cd tmtccmd
python3 -m pip install -e .
```
It is recommended to use a virtual environment when installing this library. The steps here
assume you have [set up and activated the environment](https://docs.python.org/3/tutorial/venv.html).

To also install the requirements for the GUI mode, run this command instead
To install the full version with GUI support, run the following command to install from the cloned
source code

```sh
cd tmtccmd
python3 -m pip install -e .[gui]
pip install .[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]`.
You can omit `[gui]` for a CLI only installation. Alternatively you can also install the package
from PyPI with `pip install -e tmtccmd[gui]`.

## Using PyCharm

Expand Down
9 changes: 4 additions & 5 deletions docs/README_PyPI.md
@@ -1,13 +1,12 @@
![](https://github.com/rmspacefish/tmtccmd/blob/source/docs/logo_tmtccmd_smaller.png)
![](https://github.com/robamu-org/tmtccmd/blob/main/misc/logo.png)

TMTC Commander Core [![Documentation Status](https://readthedocs.org/projects/tmtccmd/badge/?version=latest)](https://tmtccmd.readthedocs.io/en/latest/?badge=latest)
[![package](https://github.com/spacefisch/tmtccmd/actions/workflows/package.yml/badge.svg)](https://github.com/spacefisch/tmtccmd/actions/workflows/package.yml)
[![codecov](https://codecov.io/gh/robamu-org/tmtccmd/branch/develop/graph/badge.svg?token=BVOE3A4WE4)](https://codecov.io/gh/robamu-org/tmtccmd)
TMTC Commander[![Documentation Status](https://readthedocs.org/projects/tmtccmd/badge/?version=latest)](https://tmtccmd.readthedocs.io/en/latest/?badge=latest)
[![package](https://github.com/robamu-org/tmtccmd/actions/workflows/package.yml/badge.svg)](https://github.com/robamu-org/tmtccmd/actions/workflows/package.yml)
[![codecov](https://codecov.io/gh/robamu-org/tmtccmd/branch/main/graph/badge.svg?token=BVOE3A4WE4)](https://codecov.io/gh/robamu-org/tmtccmd)
[![PyPI version](https://badge.fury.io/py/tmtccmd.svg)](https://badge.fury.io/py/tmtccmd)
====

## Overview

- Project Homepage: https://github.com/robamu-org/tmtccmd
- Documentation: https://tmtccmd.readthedocs.io/en/latest/

11 changes: 5 additions & 6 deletions docs/api.rst
Expand Up @@ -5,10 +5,10 @@ API
Core Submodules
===============

tmtccmd.runner module
tmtccmd module
---------------------

.. automodule:: tmtccmd.runner
.. automodule:: tmtccmd
:members:
:undoc-members:
:show-inheritance:
Expand All @@ -17,7 +17,6 @@ tmtccmd.runner module
:maxdepth: 4

api/tmtccmd.core
api/tmtccmd.sendreceive

Configuration Submodules
=========================
Expand All @@ -34,11 +33,10 @@ CCSDS & ECSS Submodules
.. toctree::
:maxdepth: 4

api/tmtccmd.ccsds
api/tmtccmd.cfdp
api/tmtccmd.pus
api/tmtccmd.tc
api/tmtccmd.tm
api/tmtccmd.cfdp

Other Submodules
=========================
Expand All @@ -47,4 +45,5 @@ Other Submodules
:maxdepth: 4

api/tmtccmd.utility
api/tmtccmd.logging
api/tmtccmd.logging
api/tmtccmd.fsfw
21 changes: 0 additions & 21 deletions docs/api/tmtccmd.ccsds.rst

This file was deleted.

0 comments on commit 82962b9

Please sign in to comment.