- Increased example modularization by moving the majority of app logic inside dedicated modules - Added a new `dyn_tmtc` feature for the satrs-example which is used to configure the heap as the backing store for TMTC packages instead of static stores. - Added dedicated satrs-example chapter in satrs-book
This commit is contained in:
@ -3,10 +3,32 @@ sat-rs example
|
||||
|
||||
This crate contains an example application which simulates an on-board software.
|
||||
It uses various components provided by the sat-rs framework to do this. As such, it shows how
|
||||
a more complex real on-board software could be built from these components.
|
||||
The application opens a UDP server on port 7301 to receive telecommands.
|
||||
a more complex real on-board software could be built from these components. It is recommended to
|
||||
read the dedicated
|
||||
[example chapters](https://absatsw.irs.uni-stuttgart.de/projects/sat-rs/book/example.html) inside
|
||||
the sat-rs book.
|
||||
|
||||
You can run the application using `cargo run`. The `simpleclient` binary target sends a
|
||||
The application opens a UDP and a TCP server on port 7301 to receive telecommands.
|
||||
|
||||
You can run the application using `cargo run`.
|
||||
|
||||
# Features
|
||||
|
||||
The example has the `dyn_tmtc` feature which is enabled by default. With this feature enabled,
|
||||
TMTC packets are exchanged using the heap as the backing memory instead of pre-allocated static
|
||||
stores.
|
||||
|
||||
You can run the application without this feature using
|
||||
|
||||
```sh
|
||||
cargo run --no-default-features
|
||||
```
|
||||
|
||||
# Interacting with the sat-rs example
|
||||
|
||||
## Simple Client
|
||||
|
||||
The `simpleclient` binary target sends a
|
||||
ping telecommand and then verifies the telemetry generated by the example application.
|
||||
It can be run like this:
|
||||
|
||||
@ -17,7 +39,7 @@ cargo run --bin simpleclient
|
||||
This repository also contains a more complex client using the
|
||||
[Python tmtccmd](https://github.com/robamu-org/tmtccmd) module.
|
||||
|
||||
# <a id="tmtccmd"></a> Using the tmtccmd Python client
|
||||
## <a id="tmtccmd"></a> Using the tmtccmd Python client
|
||||
|
||||
The python client requires a valid installation of the
|
||||
[tmtccmd package](https://github.com/robamu-org/tmtccmd).
|
||||
@ -46,31 +68,7 @@ as Python code. For example, you can use the following command to send a ping li
|
||||
the `simpleclient`:
|
||||
|
||||
```sh
|
||||
./main.py -s test -o ping
|
||||
./main.py -p /test/ping
|
||||
```
|
||||
|
||||
You can also simply call the script without any arguments to view a list of services (`-s` flag)
|
||||
and corresponding op codes (`-o` flag) for each service.
|
||||
|
||||
# Structure of the example project
|
||||
|
||||
The example project contains components which could also be expected to be part of a production
|
||||
On-Board Software.
|
||||
|
||||
1. A UDP and TCP server to receive telecommands and poll telemetry from. This might be an optional
|
||||
component for an OBSW which is only used during the development phase on ground. The TCP
|
||||
server parses space packets by using the CCSDS space packet ID as the packet start delimiter.
|
||||
2. A PUS service stack which exposes some functionality conformant with the ECSS PUS service. This
|
||||
currently includes the following services:
|
||||
- Service 1 for telecommand verification.
|
||||
- Service 3 for housekeeping telemetry handling.
|
||||
- Service 5 for management and downlink of on-board events.
|
||||
- Service 8 for handling on-board actions.
|
||||
- Service 11 for scheduling telecommands to be released at a specific time.
|
||||
- Service 17 for test purposes (pings)
|
||||
3. An event manager component which handles the event IPC mechanism.
|
||||
4. A TC source component which demultiplexes and routes telecommands based on parameters like
|
||||
packet APID or PUS service and subservice type.
|
||||
5. A TM sink sink component which is the target of all sent telemetry and sends it to downlink
|
||||
handlers like the UDP and TCP server.
|
||||
6. An AOCS example task which can also process some PUS commands.
|
||||
You can also simply call the script without any arguments to view the command tree.
|
||||
|
Reference in New Issue
Block a user