~~ODT~~ ===== RECORDER SETUP AND CONFIGURATION ===== Chapter 9 of IRIG 106 defines the Telemetry Attributes Transfer Standard (TMATS). Historically, TMATS has been used as a shorthand way of documenting and describing recorded data to facilitate future data interpretation and reduction. In the context of Chapter 10, TMATS is still used to document recorded data, but is also used for recorder setup and configuration. The TMATS text is designed to be user friendly and it is also structured to be machine parsable. Each attribute appears in the TMATS file as a unique code name and data item pair. The code name appears first, delimited by a colon. The data item follows, delimited by a semicolon. Therefore, an attribute has the form: CODE:DATA; Note: Although not required, lines may be terminated with a carriage return and line feed to improve readability. TMATS attributes are logically arranged in a hierarchical tree structure. Figure 9-1 in the [[http://www.irig106.org/docs/106-13/chapter9.pdf|IRIG 106 Chapter 9]] standard shows this attribute tree structure. Unlike other markup languages, such as Extensible Markup Language (XML), the structure of the attribute tree is not inherent in the position, structure, or syntax of individual TMATS lines. Instead, the hierarchical connections are deduced by matching attribute names from different tree levels. For example, TMATS ''R'' attributes are linked to the corresponding TMATS ''G'' attribute by matching the ''R-m\ID'' attribute such as ''R-1\ID:MyDataSource;'' with the corresponding ''G\DSI-n'' attribute such as ''G\DSI-1:MyDataSource;''. An example of a portion of a TMATS attribute tree is shown below. Chapter 9 defines the specific linking fields for the various levels of the TMATS attribute tree. {{ :ch10_handbook:tmats_atrribute_tree.png |}}
char szLine[2048];
char * szCodeName;
char * szDataItem;
// Split the line into left hand and right hand sides
szCodeName = strtok(szLine, ":");
szDataItem = strtok(NULL, ";");
// Determine and decode different TMATS types
switch (szCodeName[0])
{
case 'G' : // Decode General Information
break;
case 'B' : // Decode Bus Data Attributes
break;
case 'R' : // Decode Tape/Storage Source Attributes
break;
case 'T' : // Decode Transmission Attributes
break;
case 'M' : // Decode Multiplexing/Modulation Attributes
break;
case 'P' : // Decode PCM Format Attributes
break;
case 'D' : // Decode PCM Measurement Description
break;
case 'S' : // Decode Packet Format Attributes
break;
case 'A' : // Decode PAM Attributes
break;
case 'C' : // Decode Data Conversion Attributes
break;
case 'H' : // Decode Airborne Hardware Attributes
break;
case 'V' : // Decode Vendor Specific Attributes
break;
default :
break;
} // end decoding switch
// Now link the various records together into a tree
vConnectRtoG(...);
vConnectMtoR(...);
vConnectBtoM(...);