> ## Documentation Index
> Fetch the complete documentation index at: https://docs.generalrobotics.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# SubOnce

> Mark a method parameter as a one-shot Zenoh subscriber

```python theme={null}
from grid_nexus_program import SubOnce
```

Mark a method parameter as a one-shot Zenoh subscriber.

The parameter will subscribe to `robot/&#123;robot_id&#125;/&#123;topic&#125;`
but only needs to receive data once. After the first message,
the cached value is reused on every subsequent invocation.

Can be used as a bare class (`config=SubOnce`) in which case the topic
suffix defaults to the parameter name, or instantiated with a custom
topic suffix (`config=SubOnce("model/config")`).

## Constructor

```python Signature theme={null}
SubOnce(topic: str | None = None)
```


## Related topics

- [CortexHubClient](/python-api/grid-cortex-client/cortexhubclient.md)
- [VR Teleop Guide](/simulation/isaac/teleoperation/vr-teleop-guide.md)
- [Get started](/get-started/installation.md)
- [ROS2 Communication](/simulation/isaac/comms.md)
- [Policy Inference](/simulation/isaac/reinforcement-learning/inference.md)
