From f82dc9b09c830c1e7c8552495e732d8a12665278 Mon Sep 17 00:00:00 2001
From: "Robin.Mueller" <robin.mueller.m@gmail.com>
Date: Tue, 28 Jan 2020 00:51:28 +0100
Subject: [PATCH] New info on run config, unit test init

---
 README.md | 47 +++++++++++++++++++++++++++++++++++------------
 1 file changed, 35 insertions(+), 12 deletions(-)

diff --git a/README.md b/README.md
index 600d039..bb3eef2 100644
--- a/README.md
+++ b/README.md
@@ -5,38 +5,49 @@ TMTC Client
 Manual installation of crcmod might be needed
  1. Install pip if it is not installed yet
  2. Install crcmod and all other reqiored packages:
-    Command: pip install crcmod
+    Command: python<version> -m pip<version> install crcmod
     or use IDE (interpreter settings -> pip in PyCharm)
 
 ## How To Use
 The script can be used by specifying command line parameters.
 Please run this script with the -h flag
-or without any command line parameters to display options. GUI is work-in-progress
+or without any command line parameters to display options. 
+
+GUI is work-in-progress.
 It might be necessary to set board or PC IP address if using ethernet communication.
 Default values should work normally though.
 
+## Examples
 Example command to test service 17,
 assuming no set client IP (set manually to PC IP Address if necessary) and default board IP 169.254.1.38:
-```sh
-OBSW_UdpClient.py -m 3 -s 17
+```shell script
+OBSW_TmTcClient.py -m 3 -s 17
 ```
 Example to run Unit Test:
-```sh
-OBSW_UdpClient.py -m 5
+```shell script
+OBSW_TmTcClient.py -m 5
+```
+Example to test service 3 with serial communication, printing all housekeeping packets,
+and exporting to a log file. COM port needs to be typed in manually (or set with --COM \<COM PORT>):
+```shell script
+OBSW_TmTcClient.py -m 3 -s 3 -p --hk -c 
 ```
 
+## Modes
 There are four different Modes:
 1. GUI Mode (-m 0): Experimental mode, also called if no input parameter are specified
 2. Listener Mode (-m 1): Only Listen for incoming TM packets
-3. SingleCommandMode: Send Single Command repeatedly until answer is received,
-only listen after that
-4. ServiceTestMode: Send all Telecommands belonging to a certain service
+3. SingleCommandMode (-m 2): Send Single Command repeatedly until answer is received,
+only listen after that. Single command needs to be packed (see function below main())
+4. ServiceTestMode (-m 3): Send all Telecommands belonging to a certain service
 and scan for replies for each telecommand. Listen after that
-5. SoftwareTestMode: Send all services and perform reply scanning like mode 3.
+5. SoftwareTestMode (-m 4): Send all services and perform reply scanning like mode 3.
 Listen after that
-6. Unit Test Mode: Performs a unit test which returns a simple OK or NOT OK. This mode
+6. Unit Test Mode (-m 5): Performs a unit test which returns a simple OK or NOT OK. This mode
 has the capability to send TCs in bursts, where applicable
 
+In sequential mode, the Client listens for a specified time before sending the next
+telecommand. This time has a default value but can be set with the -t parameter (e.g. -t 12).
 The TC timeout factor is mulitplied with the TM timeout to specifiy
 when a TC is sent again, if no reply is received. 
 
@@ -48,4 +59,16 @@ Please ensure that python.exe UDP packets are not blocked in advanced firewall s
 and create a rule to allow packets from port 2008.
 
 ## Serial Communication
-Work-In-Progress
\ No newline at end of file
+Implemented.
+
+## Unit Test
+Some more information will follow on how to write Unit Tests.
+
+## Import run configurations in PyCharm
+The PyCharm IDE can be used to comfortably manage a set of run configuations (for example tests for different
+services). These configurations were shared through the version control system Git
+ and should be imported automatically. If these configurations dont show up, try to open the tmtc folder as
+ a new PyCharm project in a new window. 
+ 
+ To add new configurations, go to Edit Configurations... at the top right corner in the drop-down menu.
+ Specify the new run configurations and set a tick at Share through VCS. 
\ No newline at end of file
-- 
GitLab