yamcs / quickstart

Get started with Yamcs
https://yamcs.org
22 stars 22 forks source link

Added arguments to simulator.py to generalize the ports and hosts in order to reuse #44

Closed haisamido closed 4 weeks ago

haisamido commented 1 month ago

Added arguments to simulator.py to generalize the ports and hosts in order to reuse at will for different hosts and ports.

Help

python3 ./simulator.py --help

yields:

usage: simulator.py [-h] [--testdata TESTDATA] [--tm_host TM_HOST] [--tm_port TM_PORT] [-r RATE] [--tc_host TC_HOST] [--tc_port TC_PORT]

Yamcs Simulator

options:
  -h, --help            show this help message and exit
  --testdata TESTDATA   simulated testdata.ccsds data
  --tm_host TM_HOST     TM host
  --tm_port TM_PORT     TM port
  -r RATE, --rate RATE  TM playback rate. 1 = 1Hz, 10 = 10Hz, etc.
  --tc_host TC_HOST     TC host
  --tc_port TC_PORT     TC port

examples:

This

python3 ./simulator.py

where the defaults are 1Hz, TM host=127.0.0.1, TM port=10015, TC host=127.0.0.1, TC port=10025

yields

Using playback rate of 1Hz, TM host=127.0.0.1, TM port=10015, TC host=127.0.0.1, TC port=10025
Sent: 7 packets. Received: 0 commands. Last command: None

This

python3 ./simulator.py --rate 11

yields

Using playback rate of 11Hz, TM host=127.0.0.1, TM port=10015, TC host=127.0.0.1, TC port=10025
Sent: 7 packets. Received: 0 commands. Last command: None

This

python3 ./simulator.py --tm_host 0.0.0.0 --tm_port 10500 --tc_host 0.0.0.0 --tc_port 10550 --rate 11

yields:

Using playback rate of 11Hz, TC host=0.0.0.0, TM port=10500, TC host=0.0.0.0, TC port=10550

fqqb commented 4 weeks ago

thx

haisamido commented 4 weeks ago

thx

Thank you for merging the branch