Next: , Previous: Header packet data fields, Up: The Data Stream


3.2 Data packet data fields

Data fields in data packets are a bit more complicated to work with. Data packet field names must be unique. Data packets actually pass through three states as they are processed by the bpipe library:

input
The image of the data packet as it exists in the input data stream.
core
The image of the data packet in memory, in the form available to the program. This may differ from the input image because of additions, deletions, or resizes of data fields requested by the program
output
The image of the data packet as written to the output stream. It may differ from the core image if the program has requested field deletions or resizing. Each output stream may have a different set of field deletions or resizes and thus different output images.

The program has great flexibility in determining how data packet fields are passed on. A few scenarios may provide illumination:

The bpipe library takes care of the transformations from one state to the next. There are a few simple rules for the data packet field manipulations:

All manipulations of data packet field definitions take place before any data packets are passed to the application by the bpipe interface. Because all packets on a data stream have the same format, the definitions must be frozen before reading and writing data packets.