Rate controled UDP source with idle frames ccsds_udp_source_rate_idle_b [ccsds] 1 import ccsds ccsds.udp_source_rate_idle_b($host_recv, $port_recv, $host_ctl, $port_ctl, $max_frame_length, $block_len, $num_blocks_floating, $idle_pattern) Hostname (data) host_recv 'localhost' string Port (data) port_recv int Hostname (control) host_ctl 'localhost' string Port (control) port_ctl int Max Frame length (Bytes) max_frame_length 1024 int Block size (Bytes) block_len 1024 int Num. blocks floating num_blocks_floating 10 int Idle pattern idle_pattern [0x00, 0xFF,]*12 raw $port_recv > 0 $port_ctl > 0 $max_frame_length > 0 $block_len > 0 $num_blocks_floating > 0 in message out byte UDP source with rate control and idle pattern insertion This block will keep 'Num. blocks floating' blocks of 'Block size' bytes in the downstream processing. It receives "block_out" messages from a downstream block to be notified once a block has left the processing chain at that block and a new one should be inserted by the source. It receives datagrams of a maximum size of 'Max Frame length' Bytes over the UDP socket listening to the data hostname and port and buffers them internally. If the internal buffer holds more data than what could be send out in 1 block, it sends a control datagram with the 's' Byte (encoded in ASCII) to the control hostname and port. Once the buffer contains less data than required to fill a complete block, it will send a 'g' Byte (encoded in ASCII) to the control hostname and port. If a new block has to be send out and there is not enough data in the internal buffer to complete the block, (multiple) copies of the idle patterns are inserted at the back of the buffer. If an element in the buffer does not completely fit into the current block to be send it is split, such that the rest of the element is send as first item of the next block. The only block so far that provides the "block_out" message is the output_counter block. 'Hostname (data)' and 'Port (data)': Hostname and port for the UDP socket on which the data arrives and is stored in the internal buffer. The block will bind to this socket (UDP Server). 'Hostname (control)' and 'Port (control)': Target hostname and port for the control datagrams 's' and 'g'. The block will only send to this socket, but not bind to it (UDP Client). 'Max Frame length': Maximum frame (datagram) length in Bytes that can be received over the data socket. This value is only used for buffer allocation. 'Block size': Number of bytes that constitute one data block. The value entered here must correspond to the block size parameter of the downstream block that provides the "block_out" messages or the flowgrapg between the two blocks will fill up, or run empty over time. 'Num. blocks floating': Number of data blocks that should be in the flowgraph at the same time. 'Idle pattern': Python vector of Bytes that form the idle pattern. Everytime a new data block has to be send out and there is not enough data in the internal buffer to fill this data block, one or multiple copies of the idle pattern are added to the end of the internal buffer in order to be able to complete the data block transmission. If transmitted, the idle pattern is always transmitted completely.