Skip to content
Tom Barbette edited this page Oct 3, 2018 · 2 revisions

Clipboard Element Documentation

NAME

Clipboard — Click element; copies data from one packet to another

SYNOPSIS

Clipboard(RANGE_1, ..., RANGE_N)

Ports: 2 inputs, 2 outputs
Processing: agnostic

DESCRIPTION

Takes as arguments one or more byte ranges to copy. When Clipboard receives a packet on input 0, it copies the selected bytes to the clipboard buffer and emits the packet unchanged on output 0. When receiving a packet on input 1, Clipboard updates the packet with the bytes from the buffer and outputs the modified packet on output 1. This way, data from a single packet can be copied to 0 or more packets.

Each RANGE is on the form x/n, where x is the offset and n the number of bytes.

Each Clipboard input/output pair can work in either a push or a pull context.

Clipboard can also be used to copy data from one place in a packet to another, by looping the same packet back through Clipboard and using Strip and Unstrip to offset the packet data.

Passing a packet through input/output 1 before any packets have passed through input/output 0 will cause undefined data to be written into the packet. Passing a packet through input/output 1 which is too small for any one of the ranges will cause the packet contents to be undefined.

SEE ALSO

StoreData, Strip, Unstrip

Generated by click-elem2man from ../elements/standard/clipboard.hh:7 on 2018/10/03.

Clone this wiki locally