Saved message format
The saved message file consists of index and message files.
Index file
The index file is a Tcl keyed list. The keyed list consists of a set of key-value pairs, where:
- Each keyword is followed by a value.
- The entire key-value pair is enclosed in { } (braces).
- Each line in the index file describes exactly one message in the message file.
The exact interpretation of a message depends on the record format, which the user must know. SMAT has no way of obtaining that information.
With the exception of DATAFMT
, which is not used by the
engine but can be set by the user, these fields have maximum lengths. They are made
fixed-length by padding with white space. Fixed-length fields are used by the GUI to
search the index by offsets instead of having to load the entire index into memory.
Message file
SMAT does not interpret the body of the message, though it does let the user format the message body as an aid in manual searches.
In addition to messages, the message file also contains variable-length metadata, which is a raw string to be parsed using offsets from the index file.
This table shows the offsets that are used to parse the .msg file:
Field | Description |
---|---|
OFFSET
|
Pointer to the message beginning |
LENGTH
|
Message length in bytes |
DATAFMT
|
Data format metadata length |
SEPCHARS
|
User-defined separators metadata length |
DRIVERCTL
|
Driver control metadata length |
USERDATA
|
User data metadata length |