Skip to content

Commit

Permalink
Merge pull request 'Integrate Simulator into Example' (#185) from sim…
Browse files Browse the repository at this point in the history
…-mgm-update into main

Reviewed-on: https://egit.irs.uni-stuttgart.de/rust/sat-rs/pulls/185
  • Loading branch information
robamu committed Jun 3, 2024
2 parents a4c433a + 2e5d6a5 commit 97a6510
Show file tree
Hide file tree
Showing 43 changed files with 3,592 additions and 701 deletions.
260 changes: 260 additions & 0 deletions images/minisim-arch/minisim-arch.graphml

Large diffs are not rendered by default.

Binary file added images/minisim-arch/minisim-arch.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions satrs-example/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,13 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

# [unreleased]

# [v0.1.1] 2024-02-21

satrs v0.2.0-rc.0
satrs-mib v0.1.1

# [v0.1.0] 2024-02-13

satrs v0.1.1
satrs-mib v0.1.0
3 changes: 3 additions & 0 deletions satrs-example/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ serde_json = "1"
path = "../satrs"
features = ["test_util"]

[dependencies.satrs-minisim]
path = "../satrs-minisim"

[dependencies.satrs-mib]
version = "0.1.1"
path = "../satrs-mib"
Expand Down
24 changes: 22 additions & 2 deletions satrs-example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,17 @@ It is recommended to use a virtual environment to do this. To set up one in the
you can use `python3 -m venv venv` on Unix systems or `py -m venv venv` on Windows systems.
After doing this, you can check the [venv tutorial](https://docs.python.org/3/tutorial/venv.html)
on how to activate the environment and then use the following command to install the required
dependency:
dependency interactively:

```sh
pip install -r requirements.txt
pip install -e .
```

Alternatively, if you would like to use the GUI functionality provided by `tmtccmd`, you can also
install it manually with

```sh
pip install -e .
pip install tmtccmd[gui]
```

Expand All @@ -72,3 +73,22 @@ the `simpleclient`:
```

You can also simply call the script without any arguments to view the command tree.

## Adding the mini simulator application

This example application features a few device handlers. The
[`satrs-minisim`](https://egit.irs.uni-stuttgart.de/rust/sat-rs/src/branch/main/satrs-minisim)
can be used to simulate the physical devices managed by these device handlers.

The example application will attempt communication with the mini simulator on UDP port 7303.
If this works, the device handlers will use communication interfaces dedicated to the communication
with the mini simulator. Otherwise, they will be replaced by dummy interfaces which either
return constant values or behave like ideal devices.

In summary, you can use the following command command to run the mini-simulator first:

```sh
cargo run -p satrs-minisim
```

and then start the example using `cargo run -p satrs-example`.
134 changes: 134 additions & 0 deletions satrs-example/pytmtc/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/tmtc_conf.json
__pycache__

/venv
Expand All @@ -7,3 +8,136 @@ __pycache__

/seqcnt.txt
/.tmtc-history.txt

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
.python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# PyCharm
.idea
Loading

0 comments on commit 97a6510

Please sign in to comment.