bufferSend

class bufferSend : public kotekan::Stage

Sends a buffer, metadata, and flag for whether config data was updated over TCP.

Will attempt to connect to a remote server (likely another kotekan instance) and send frames, metadata, and config status as it arrives.

If the remote server is down, or the connection breaks, this stage will drop incoming frames, and try to reconnect to the server after reconnect_time seconds.

Todo:

Add the rest of the comments here.

we might also add counters for dropped frames because the connection is down, and frames that are lost because of connection errors.

buffers

  • buf The buffer to send to the remote server.

    • Format: any

    • Metadata: any

Metrics

  • kotekan_buffer_send_dropped_frame_count The number of frames dropped because send() is running too slow.

Author

Andre Renard

Param server_ip:

String, the IP address of the server to send data too.

Param server_port:

Int, default 11024. The port number on the remote server.

Param send_timeout:

Int, default 20. The number of seconds before send() times out and closes the connection.

Param reconnect_time:

Int, default 5. The number of seconds between connection attempts to the remote server.

Param drop_frames:

Bool, default true. Whether to drop frames when buffer fills.

Param drop_threshold:

Float, default 0.6 Drop incoming frames if the fraction of full frames to empty frames exceeds this value. A value of 1.0 means only drop frames if the connection is down, otherwise generate back-pressure This setting has no effect if drop_frames is false

Public Functions

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

Standard constructor.

~bufferSend()

Destructor.

virtual void main_thread() override

Main loop for sending data.

virtual std::string dot_string(const std::string &prefix) const override

Adds the target server to the pipeline dot graph.