monitorBuffer

class monitorBuffer : public kotekan::Stage

Watches a set of buffers to make sure they are getting data within a given timeout, otherwise exits.

Buffers

  • bufs An array of kotekan buffers

    • Format: Any

    • Metadata: Any

Note

This will not detect buffers which never get data, the buffer must get at least one frame before this system will start checking.

Param timeout:

Int, default 60. Time to wait in seconds for new frame before exiting. Must be > 1

Param fill_threshold:

Float, default 2.0 (disabled) The ratio of full to total frames, which if exceeded with trigger an exit.

Param graceful_shutdown:

Bool, default false. If true, instead of fatal error on timeout, send shutdown signals to all stages and wait for them to exit.

Param clean_exit_after_frames:

Int, default -1. If > 0 the stage registers as a lightweight consumer, counts frames on each buffer, and triggers a clean exit once every monitored buffer has seen at least this many frames.

Public Functions

monitorBuffer(kotekan::Config &config, const std::string &unique_name, kotekan::bufferContainer &buffer_container)

Common constructor.

virtual ~monitorBuffer()

Destructor.

virtual void main_thread() override

Watches the list of buffers for timeouts.