libut61 - template variable substitution

variable description
$(FUNC) A 2 digit hexadecimal number that represents the currently active function. Note: only the low nibble is used for encoding the function and other bits such as $(judg) and $(vbar) and $(vahz) are needed to determine the actual operation mode.
$(RANG) A 2 digit hexadecimal number that represents the currently active range, in both auto and manual mode. Note: only the low nibble is used for encoding the range and other bits such as $(judg) and $(vbar) and $(vahz) are needed to interpret its value.
$(Tday) Month day of current local time; tm_mday of localtime(3).
$(Tdst) Is daylight saving is in effect in current local time? See tm_isdst of localtime(3).
$(Thr) Hour of current local time; tm_hour of localtime(3).
$(Tmin) Minute of current local time; tm_min of localtime(3).
$(Tmon) Month of current local time; tm_mon of localtime(3).
$(Tsec) Second of current local time; tm_sec of localtime(3).
$(Twdy) Day-of-week of current local time; tm_wday of localtime(3).
$(Tydy) Day-of-year of current local time; tm_yday of localtime(3).
$(Tyr) Year of current local time, in 4 digits; tm_year of localtime(3).
$(VLD) 1 if the low level data packet is valid, 0 if invalid.
$(ac) 1 if measurement is in AC mode, 0 otherwise.
$(auto) 1 if auto range is active, 0 otherwise.
$(batt) 1 if battery is low, 0 otherwise.
$(dc) 1 if measurement is in DC mode, 0 otherwise.
$(dig0) First (leftmost) digit in ASCII ('0'..'9'). Contains '0' instead of space padding on the left. The decimal point is not a digit.
$(dig1) Second digit from the left, in ASCII ('0'..'9'). Contains '0' instead of space padding on the left. The decimal point is not a digit.
$(dig2) Third digit from the left, in ASCII ('0'..'9'). Contains '0' instead of space padding on the left. The decimal point is not a digit.
$(dig3) Fourth digit from the left, in ASCII ('0'..'9'). Contains '0' instead of space padding on the left. The decimal point is not a digit.
$(dig4) Last, rightmost digit, in ASCII ('0'..'9'). The decimal point is not a digit.
$(func) Human readable name of the currently selected DMM function.
$(hold) 1 if HOLD is active on the LCD (does not affect data readout on the serial line).
$(info) One word, human readable info about the vailidty of the measurement. Prints 'ok' on a valid measurement, else prints a single word error message, e.g. ul/ol on underflow or overflow.
$(judg) The judge bit; refines which function and range is selected.
$(lpf) 1 if Low Pass Filter is active on the input, 0 otherwise.
$(max) 1 if MAX function is active, 0 otherwise.
$(mbas) The maximum number that could be measured in the current range, expressed in a base SI unit (e.g. V when the measurement was done in mV), printed as a decimal number with no unit.
$(min) 1 if MIN function is active, 0 otherwise.
$(ol) 1 on overflow (the LCD shoudl display ol), 0 otherwise.
$(pmax) 1 if the peak max is active and the LCD is displaying peak maximum, 0 otherwise.
$(pmin) 1 if the peak min is active and the LCD is displaying peak minimum, 0 otherwise.
$(rel) 1 if REL function is active, 0 otherwise.
$(rmr) 1 if RMR function is active, 0 otherwise.
$(sign) The sign bit; if 1, the raw value is negative. The value of this bit is already considered when $(val), $(vbas) and $(vlcd) are calculated.
$(sync) 1 if the communication is in sync, 0 if invalid. In sync means the lib is prepared to receive the next packet. Out of sync means the next (potentially partial) packed needs to be dropped.
$(ubas) The base unit for the currently selected function, printed in ASCII, e.g. V when mV is selected. This is the unit corresponding to $(vbas).
$(ul) 1 on underflow (the LCD shoudl display ul), 0 otherwise.
$(unit) The unit for the currently selected function, printed in ASCII, e.g. mV. This is the unit corresponding to $(val) and $(vlcd).
$(vahz) 1 if measuring duty cycle in frequency mode, 0 otherwise.
$(val) The last measured value represented in the same unit as on the LCD (e.g. mV), printed as a decimal number with no unit. The value may be invalid on underflow, overflow or otter error (see $(info)), in which case it is reported 0. The 'hold' state has no effect on this value.
$(vbar) The vbar bit; refines which function and range is selected.
$(vbas) The last measured value represented in a base SI unit (e.g. V when the measurement was done in mV), printed as a decimal number with no unit. The value may be invalid on underflow, overflow or otter error (see $(info)), in which case it is reported 0. The 'hold' state has no effect on this value.
$(vlcd) The last measured value represented in the same unit as on the LCD (e.g. mV), printed in the same format as on the LCD (left padded with space, negative sign on the far left). The value may be invalid on underflow, overflow or otter error (see $(info)), in which case it is reported 0. The 'hold' state has no effect on this value.
$(vld) 1 if the measurement and conversion are valid, 0 if invalid.