DequeInMemoryPublisher#
- class DequeInMemoryPublisher(maxlen: int)[source]#
Bases:
ChannelBufferPublisherAttributes
Return an insertion-ordered snapshot of all channel names currently in the buffer.
Return the current memory in bytes.
Methods
Close the publisher and clear all buffers with thread synchronization.
Return the trailing
lengthsamples forchannel_name.Publish measurement data to the buffers with thread synchronization.
- property channel_names: tuple[str, ...]#
Return an insertion-ordered snapshot of all channel names currently in the buffer.
Names are complete after one full daemon iteration: {name}.loop_time publishes every iteration, so call get_channel(“loop_time”, wait_for_new_samples=True) then read channel_names to ensure the complete set has arrived.
- get( ) Measurement#
Return the trailing
lengthsamples forchannel_name.With
wait_for_new_samples=Trueblocks forlengthnew samples; otherwise waits for the buffer to already holdlength.- Raises:
ChannelNotFoundError – Channel did not appear within
timeout.ChannelValueTimeoutError – Values did not arrive within
timeout.
- publish(
- data: Measurement | Command,
- **kwargs,
Publish measurement data to the buffers with thread synchronization.