DR2tmc

A compiler for HPF datarecvext programs

DR2tmc is yet another compiler which takes a file of type ".DR" and translates it into a ".tmc" file. Its purpose is to simplify the generation of datarecvext programs, making it easier to implement changes in the data stream.

DR2tmc is now fully supported by appgen. To create a datarecvext program, list your .DR file as one of the source files in your .spec file. You must also supply a version of status.h defining the functions (or macros):

Syntax

Each line of the input file may include on of the following elements:

# Comment
Any line beginning with the "#" character is considered a comment and will be ignored. "#" characters appearing later in the line may be part of the syntax, so should not be used for comments.
[!%] header line
Any line in which the first non-space character is an exclamation point or a percent sign will be passed through as is in the header of each run. Note that leading spaces are significant to dataRecv, so the syntax should be checked carefully.
Status <TMVarName>
Specifies the name of the TM variable which holds the RUNFLAG and ABORTFLAG bits. The default name is "RunStat".
RunNum <TMVarName>
Specifies the name of the TM variable which holds the current run number. The default name is "RunNum".
FormatSuffix <string>
Redefines the string that should be appended to each format string specified in a Var statement. The default string is "FormatData".
Var <TMVarName> <PSkey>* <Format>?
Defines a variable to be extracted. The arguments allow you to control how the variable is output and what information about it is passed on to PSPlot.
<TMVarName>
A telemetry variable name defined elsewhere in the TMC definitions for this experiment.
<PSkey>
PSkeys define either an alias or a format string for the specified TM Variable. There can be 0 or more PSkeys with each variable definition. Each PSkey consists of one of the control characters '-', '+' or '#' followed immediately by a string without any intervening spaces. The keys mean:
<Format>

Format is an optional definition that gives you direct control over how the variable is converted from raw data to text. A Format specification consists of a printf-style format code followed by a conversion function which is to be called with the TM variable as an argument. The default format code is "%s" and the default conversion function is "text" (but note that these are specified without the quotes!).

The conversion function is applied to the TM variable in a very naive fashion, similar to how it is handled in .edf files. Namely, the string you specify is followed immediately in the output by the TM variable name in parentheses. As such, this "function" need not be a function at all:

Var MFCtr %u 1*

This will use the %u format on the raw value of the MFCtr variable. Many simple conversions can be handled this way.


Return to Manuals Guide


last updated: Fri May 7 15:14:06 2004 webmaster@huarp.harvard.edu
Copyright 2004 by the President and Fellows of Harvard College