Merge branch 'master' of github.com:haisamido/quickstartAdded Yamcs r… - #48
Merge branch 'master' of github.com:haisamido/quickstartAdded Yamcs r…#48haisamido wants to merge 2 commits into
Conversation
…eadiness check to simulator before sending telemetry
Extended simulator.py to poll the Yamcs HTTP REST API
(GET /api/instances/{instance}) before transmitting any CCSDS
packets over UDP. The simulator blocked until the target Yamcs
instance transitioned to a RUNNING state, preventing telemetry
packets from being dropped during Yamcs startup.
A threading.Event was introduced to coordinate between the TM
sender thread and the main status-printing loop, so the packet
counter display was suppressed until Yamcs was confirmed ready.
Three new CLI arguments were added to simulator.py:
--yamcs_host (default: 127.0.0.1)
--yamcs_port (default: 8090)
--yamcs_instance (default: myproject)
The Makefile in docker/ was updated to expose corresponding
overridable variables (YAMCS_HOST, YAMCS_PORT, YAMCS_INSTANCE)
and passed them through to simulator.py in the yamcs-simulator
and yamcs-simulator-10hz targets.
The docker-compose.yml was updated to name the built image
yamcs:latest, added proxy build args, mounted external XTCE MDB
and yamcs configuration files as volumes, and switched the
network from the local quickstart bridge to an external
openmct-yamcs network with a yamcs alias.
Status output was enhanced with ANSI colour: the waiting message
was rendered in yellow, the ready confirmation in green, and the
sent-packet count in blue.
README.md and docker/README.md were updated to document the
readiness-wait behaviour, the new CLI arguments, and the
corresponding Makefile variables.
|
@xpromache @fqqb ^^^^ |
clement-igonet
left a comment
There was a problem hiding this comment.
Thanks for this — waiting for the instance to be RUNNING before sending TM is a real improvement (and it pairs nicely with #50, where the compose gains a containerized simulator gated on the healthcheck).
One blocking problem: the committed simulator.py still contains unresolved merge conflict markers (<<<<<<< HEAD / ======= / >>>>>>> f331bfa) in three places — the imports, the new CLI argument block, and around wait_for_yamcs. As committed the script fails immediately with a SyntaxError. In each block the HEAD side (the readiness-check code) looks like the intended resolution, so it should just be a matter of deleting the marker lines and the empty other side, then force-pushing.
Two smaller notes:
yamcs-updropped its| yamcs-downorder-only prerequisite, somake yamcs-upno longer tears down a previous stack. If intentional, worth a line in the description.- The PR title looks like an accidental merge-commit title — maybe retitle to something like "simulator: wait for Yamcs instance to be RUNNING before sending TM (closes #47)".
Readiness check to simulator before sending telemetry
Extended
simulator.pyto poll the Yamcs HTTP REST API (GET /api/instances/{instance}) before transmitting any CCSDS packets over UDP. The simulator blocked until the target Yamcs instance transitioned to a RUNNING state, preventing telemetry packets from being dropped during Yamcs startup.A threading.Event was introduced to coordinate between the TM sender thread and the main status-printing loop, so the packet counter display was suppressed until Yamcs was confirmed ready.
Three new CLI arguments were added to
simulator.py:The Makefile in
./docker/was updated to expose corresponding overridable variables (YAMCS_HOST, YAMCS_PORT, YAMCS_INSTANCE) and passed them through tosimulator.pyin the yamcs-simulator and yamcs-simulator-10hz targets.Status output was enhanced with ANSI colour: the waiting message was rendered in yellow, the ready confirmation in green, and the sent-packet count in blue.
README.md was updated to document the readiness-wait behaviour, the new CLI arguments, and the corresponding Makefile variables.
Usage:
returns
Waiting for Yamcs at http://127.0.0.1:8090/api/instances/myinstance ... Using playback rate of 1Hz, TM host=127.0.0.1, TM port=10015, TC host=127.0.0.1, TC port=10025 Yamcs is ready. Sent: 8 packets. Received: 0 commands. Last command: Nonecloses #47