ReceiveFlags

class ReceiveFlags : public kotekan::Stage

Receives input flags and adds them to the output buffer.

This stage registeres as a subscriber to an updatable config block. The full name of the block should be defined in the value <updatable_block>

Buffers

  • in_buf The input stream.

    • Format: VisBuffer.

    • Metadata: VisMetadata

  • out_buf The output stream.

    • Format: VisBuffer.

    • Metadata: VisMetadata

Metrics

  • kotekan_receiveflags_late_update_count The number of updates received too late (The start time of the update is older than the currently processed frame).

  • kotekan_receiveflags_late_frame_count The number of frames received late (The frames timestamp is older then all start times of stored updates).

  • kotekan_receiveflags_update_age_seconds The time difference in seconds between the current frame being processed and the time stamp of the flag update being applied.

Author

Rick Nitsche

Note

If there are no other consumers on the input buffer it will be able to do a much faster zero copy transfer of the frame from input to output buffer.

Param num_elements:

Int. The number of elements (i.e. inputs) in the correlator data.

Param updatable_block:

String. The full name of the updatable_block that will provide new flagging values (e.g. “/dynamic_block/flagging”).

Public Functions

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

Constructor.

virtual void main_thread() override

Main loop, saves flags in the frames.

bool flags_callback(nlohmann::json &json)

This will be called by configUpdater.