Skip to content

Commit

Permalink
add documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
robamu committed Jun 3, 2024
1 parent bcd2026 commit 7ee77c7
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
19 changes: 19 additions & 0 deletions satrs-example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,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`.
28 changes: 28 additions & 0 deletions satrs-minisim/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
sat-rs minisim
======

This crate contains a mini-simulator based on the open-source discrete-event simulation framework
[asynchronix](https://github.com/asynchronics/asynchronix).

Right now, this crate is primarily used together with the
[`satrs-example` application](https://egit.irs.uni-stuttgart.de/rust/sat-rs/src/branch/main/satrs-example)
to simulate the devices connected to the example application.

You can simply run this application using

```sh
cargo run
```

or

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

in the workspace. The mini simulator uses the UDP port 7303 to exchange simulation requests and
simulation replies with any other application.

The simulator was designed in a modular way to be scalable and adaptable to other communication
schemes. This might allow it to serve a mini-simulator for other example applications which
still have similar device handlers.

0 comments on commit 7ee77c7

Please sign in to comment.