summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrust, Tobias (FWCC) - 111645 <t.frust@hzdr.de>2017-11-03 09:03:18 +0100
committerFrust, Tobias (FWCC) - 111645 <t.frust@hzdr.de>2017-11-03 09:03:18 +0100
commit41d41b7deb416167da5a0de2638ecea078c13ea6 (patch)
tree3a0f9145f59117ad79bcee65a2f7f23841dc4085
parenta723e267760679400734a9f3afc45432ba620ca5 (diff)
downloadods-41d41b7deb416167da5a0de2638ecea078c13ea6.tar.gz
ods-41d41b7deb416167da5a0de2638ecea078c13ea6.tar.bz2
ods-41d41b7deb416167da5a0de2638ecea078c13ea6.tar.xz
ods-41d41b7deb416167da5a0de2638ecea078c13ea6.zip
add usage instructions
-rw-r--r--README.md35
-rw-r--r--src/main_client.cpp2
2 files changed, 36 insertions, 1 deletions
diff --git a/README.md b/README.md
index 416e55b..872f3c0 100644
--- a/README.md
+++ b/README.md
@@ -31,3 +31,38 @@ This little tool will simulate the online capabilities of the new detector. Ther
`$ make`
5. In the `bin` directory there will be two executables (`onlineDetectorSimulatorClient`, `onlineDetectorSimulatorServer`).
+
+## Usage
+
+The executable `onlineDetectorSimulatorClient` sends the UDP packages and `onlineDetectorSimulatorServer` receives them.
+
+The usage of the program will be shown using `localhost`:
+
+1. Copy the file `config.cfg` into the binary directory of your executables and make sure you have test data around.
+2. Start `onlineDetectorSimulatorServer`:
+
+ ```bash
+ $ ./onlineDetectorSimulatorServer <address>
+ ```
+
+ In case of localhost it would be:
+
+ ```bash
+ $ ./onlineDetectorSimulatorServer localhost
+ ```
+
+3. Start `onlineDetectorSimulatorClient`:
+
+ ```bash
+ $ ./onlineDetectorSimulatorClient <packets_per_second> <address>
+ ```
+
+ Take into account, that currently `packets_per_secon`d value is not equal to the images per second sent out. If you reduce the packet size in `config.cfg` you need to increase the `packets_per_second` value by the same factor to keep the same images per second rate.
+
+ ```bash
+ $ ./onlineDetectorSimulatorClient 1000 localhost
+ ```
+
+ The above command using the standard configuration in the repository sends approximately 1000 images per second via UDP.
+
+ After some time, quit the client program using `ctrl+c`. The server program will stop after a timeout of `10 s` \ No newline at end of file
diff --git a/src/main_client.cpp b/src/main_client.cpp
index 38c065d..01b3aad 100644
--- a/src/main_client.cpp
+++ b/src/main_client.cpp
@@ -20,7 +20,7 @@ void initLog() {
int main (int argc, char *argv[]){
if(argc < 3){
- BOOST_LOG_TRIVIAL(error) << "Program usage: ./onlineDetectorSimulatorClient <images_per_second> <address>!";
+ BOOST_LOG_TRIVIAL(error) << "Program usage: ./onlineDetectorSimulatorClient <packets_per_second> <address>!";
return 0;
}