necst.web.live_telemetry

Best-effort live ROS telemetry cache for the Operator Console.

This module is intentionally read-only. It subscribes to NECST status topics and exposes a compact dictionary that can be merged by status_model. It is safe to import outside a ROS environment; ROS imports happen only when the cache is started.

class LiveTelemetryCache(*, enabled=True, node_name='necst_operator_console_status')[source]

Bases: object

Read-only ROS status cache for current antenna/chopper console display.

Parameters:
  • enabled (bool) –

  • node_name (str) –

has_position()[source]
Return type:

bool

wait_for_initial_position(timeout_sec=2.0)[source]

Wait briefly for the first encoder/pointing sample after startup.

This prevents the console from starting with empty/demo Current Az/El simply because subscriptions have not yet received their first samples. It is read-only and does not send any telescope command.

Parameters:

timeout_sec (float) –

Return type:

bool

spin_once(timeout_sec=0.0)[source]
Parameters:

timeout_sec (float) –

Return type:

None

ros_node_names()[source]

Return fully qualified ROS node names from the current graph.

This is read-only and uses the same rclpy node/context as the live telemetry subscriptions so the operator console does not create another ROS node just for health monitoring.

Return type:

List[str]

snapshot()[source]
Return type:

Dict[str, Any]

close()[source]
Return type:

None