Although, ring buffers make no restrictions on the format of the data they deal with, the applications that produce for and consume from them operate according to a well-defined data format. The generic data format is referred to as a ring item. A ring item encapsulates a complete set of data elements for a specific type of data record. NSCLDAQ supports a set of record types, otherwise referred to as the ring item types. In this section, we will provide a general overview of the basic structure of ring item as is common to all types as well as a the detailed structure of each ring item type.
Reference material is provided in in the 3daq section that describes the class library. Furthermore, an overview of the software implementation of the data format can be is provided here.
Ring items are variable length entities that consist of a header section followed immediately by a body section. The header is composed of two 32-bit integers identifying the total size of the ring item and the type of content it stores in the body. The header structure is the same for every type of ring item. The content of the body, on the other hand, is specific to the type of the item and has either a predefined or an undefined structure.
The most commonly sized data element in the ring item is the 32-bit integer. Byte ordering information is actually encoded in the type identifier. The type identifier is a 16-bit integer stored in a 32-bit integer. Since the top 16 bits of this integer must be zero, byte ordering can be inferred by noting which 16-bit field of that 32-bit integer is non-zero.