Skip to content
Snippets Groups Projects
Commit eb5a019f authored by Paulus Kruger's avatar Paulus Kruger
Browse files

Update README.md explaining library usage

parent bab14722
Branches
Tags
No related merge requests found
Pipeline #28710 passed
......@@ -31,16 +31,31 @@ deactivate
# And finally install the module dependencies
python3 -m pip install -r requirements.txt
```
# Install it
The software is installed by executing: `python3 setup.py install`
# Execute it
The software can be simply executed with Python3: `python3 pypcc2.py -c RCU,CLK,UNB2`
The software can be executed using commandline parameters, for example specifying the config yaml file (RECVTR.yaml) and OPC-UA port (4840): `hwtr -c RECVTR -p 4840`
Optional parameters are explained when the `-h` or `--help` parameter is supplied:
Alternativly the 4 hardware translators can be executed, using it's default parameters as:
- `apscttr`
- `recvtr`
- `unb2tr`
- `apsputr`
# Install it as a service
The translators can also be installed as services:
- `cp bin/*.service /lib/systemd/system/.`
- `systemctl daemon-reload`
- `systemctl enable recvtr.service` so it is startup at boot
- `systemctr start recvtr.service` start the translator
The log can then be monited by `journalctl -f -u recvtr.service`
```bash
python3 pypcc2.py --help
usage: pypcc2.py [-h] [-s] [-t] [-p PORT] [-l {DEBUG,INFO,WARNING,ERROR}] [-c CONFIG]
hwtr --help
usage: hwtr [-h] [-s] [-t] [-p PORT] [-l {DEBUG,INFO,WARNING,ERROR}] [-c CONFIG]
optional arguments:
-h, --help show this help message and exit
......@@ -49,6 +64,7 @@ optional arguments:
-p PORT, --port PORT Port number to listen on [4842].
-l {DEBUG,INFO,WARNING,ERROR}, --loglevel {DEBUG,INFO,WARNING,ERROR}
Log level [INFO].
--loghost LOGHOST Logstash host to which to forward logs []
-c CONFIG, --config CONFIG
YAML config files, comma seperated [RCU]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment