Skip to content

Merge branch 'master' of github.com:haisamido/quickstartAdded Yamcs r… - #48

Open
haisamido wants to merge 2 commits into
yamcs:masterfrom
haisamido:master
Open

Merge branch 'master' of github.com:haisamido/quickstartAdded Yamcs r…#48
haisamido wants to merge 2 commits into
yamcs:masterfrom
haisamido:master

Conversation

@haisamido

@haisamido haisamido commented Feb 19, 2026

Copy link
Copy Markdown
Contributor

Readiness 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.

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:

make yamcs-simulator YAMCS_INSTANCE=myinstance

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: None

closes #47

…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.
@haisamido

Copy link
Copy Markdown
Contributor Author

@xpromache @fqqb ^^^^

@clement-igonet clement-igonet left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-up dropped its | yamcs-down order-only prerequisite, so make yamcs-up no 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)".

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.

Add logic to simulator.py to wait for instance to be ready prior to sending packets

2 participants