From 7ee77c73bc585443bcfbf33feb8569d6e0f78cc6 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 3 Jun 2024 14:44:09 +0200 Subject: [PATCH] add documentation --- satrs-example/README.md | 19 +++++++++++++++++++ satrs-minisim/README.md | 28 ++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 satrs-minisim/README.md diff --git a/satrs-example/README.md b/satrs-example/README.md index 0503f622..b661423a 100644 --- a/satrs-example/README.md +++ b/satrs-example/README.md @@ -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`. diff --git a/satrs-minisim/README.md b/satrs-minisim/README.md new file mode 100644 index 00000000..ab87d569 --- /dev/null +++ b/satrs-minisim/README.md @@ -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.