Skip to content

← utilities package

ApproximateChunkRate

Approximate a particular rate of chunks per second in the output.

This node can be used to reduce the effective update rate of a streaming pipeline, for example to 5 Hz. As a result, the node will only output new data 5 times a second. However, since the input to this node comes in at a certain update rate, if the two rates are not divisors of each other, the output will not be exactly 5 Hz (e.g., every 3 cycles, the data may be empty). To get a more regular chunk rate, the node Regulate Chunk Sizes can be used after this node. Version 1.0.0

Ports/Properties

data

Data to process.

  • verbose name: Data
  • default value: None
  • port type: DataPort
  • value type: Packet (can be None)
  • data direction: INOUT

desired_rate

Number of chunks per second. This node will output approximately this many chunks per second.

  • verbose name: Chunks Per Second
  • default value: 1
  • port type: FloatPort
  • value type: float (can be None)

set_breakpoint

Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.

  • verbose name: Set Breakpoint (Debug Only)
  • default value: False
  • port type: BoolPort
  • value type: bool (can be None)

metadata

User-definable meta-data associated with the node. Usually reserved for technical purposes.

  • verbose name: Metadata
  • default value: {}
  • port type: DictPort
  • value type: dict (can be None)