class documentation
What is on the ROS2 graph, read on a timer while anything is watching (see Runtime.graph).
| Method | __init__ |
Describe a facet without reading anything. |
| Method | __repr__ |
Return a representation naming the poll state and how often it has read. |
| Async Method | close |
End every watch and stop the poll, which is what stopping the Runtime does to it. |
| Async Method | refresh |
Read the graph once, now, and hold the result. Counts as a poll. |
| Async Method | settle |
Stop the poll if nothing is watching any more. Called by a watch as it closes. |
| Method | watch |
Register interest in the graph, starting the poll if it was not running. |
| Property | interval |
Return the seconds between reads while anything is watching. |
| Property | polling |
Return whether the poll is running, which is exactly while a watch is open. |
| Property | polls |
Return how often the graph has been read (0 for a fully declared Machine). |
| Property | snapshot |
Return the graph as the last read left it (empty before the first one). |
| Async Method | _poll |
Read the graph on the interval and wake every watch, until cancelled. |
| Method | _start |
Start the poll loop, unless it is already running or nothing is watching. |
| Instance Variable | _interval |
Undocumented |
| Instance Variable | _polls |
Undocumented |
| Instance Variable | _read |
Undocumented |
| Instance Variable | _snapshot |
Undocumented |
| Instance Variable | _task |
Undocumented |
| Instance Variable | _watches |
Undocumented |
def __init__(self, *, read:
Callable[ [], Awaitable[ GraphSnapshot]], interval: float = POLL_INTERVAL):
¶
Describe a facet without reading anything.
| Parameters | |
read:Callable[ | How to read the graph once. |
interval:float | Seconds between reads while anything is watching. |
Register interest in the graph, starting the poll if it was not running.
| Returns | |
GraphWatch | A handle carrying the deltas. The poll stops when the last watch closes. |