Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 3 commits into from
Oct 8, 2024

Conversation

haisamido
Copy link
Contributor

@haisamido haisamido commented Oct 4, 2024

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

python3 ./simulator.py --rate 11
python3 ./simulator.py -h
python3 ./simulator.py --help
fixed TM to TC in message
fixed stdout write string
@fqqb fqqb merged commit 5832c3d into yamcs:master Oct 8, 2024
1 check passed
@fqqb
Copy link
Member

fqqb commented Oct 8, 2024

thx

@haisamido
Copy link
Contributor Author

thx

Thank you for merging the branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants