Skip to main content

Structs Buffer Format Reference

Structs buffer files can contain mnemonic and/or event data. They are only intended to be imported with the STRUCT BUFFER IMPORT API action. They may either use the structs DSV format or the XBin format.

Mnemonics

Mnemonic data may either be denoted by the numeric mnemonic ID, or string name. The value will be interpretted as a numeric ID if it is numeric (in XBin encoding), or if it is a string containing only digit characters. If the ID is used, it must already be associated with an existing mnemonic, or an error will be thrown.

Otherwise, the name will be used for the mnemonic name lookup. The comparison is case insensitive and any whitespace is treated as a single underscore.  is optional. If provided, it must match the unit of an associated mnemonic definition, otherwise an error is thrown. The section after unit defines discrete value mapping.

Events

Event operations may also be embedded in structs buffer files. These are indicated by keys which start with the $ character. The supported operations are inserting, opening, and closing events.

For the purposes of the following examples, assume a model "m" contains a pipe "p" with 3 event databases, "e", "ef" (single file per event), and "efs" (multi-file per event).

Insert Events

The insert event macro uses the key $event.insert.<database name>, where the database name must be present in the associated pipe. The value may either be a JSON object or JSON array of JSON object(s), each of which defines a single complete event.

Open Event

Creates a single open event (interval with a start time and no end time). Uses the key $event.open.<database name>. The value must be a single JSON object, defining the content of the event record. It may not include an end time.

Close Event