CPD2 Configuration File The configuration file is located in $CPD/etc/cpd.conf. This file is normally a symbolic link to the actual station specific configuration. The file is structured on a key and value pair model with one key-value pair per line. The division between key and value occurs at the first comma in the line. Keys are considered to be case insensitive and whitespace independent. That is, the key is considered the same regardless of case or whitespace usage. Additionally any '!' characters in the key are ignored (see below). If keys are duplicated the last one's value takes precedence. The interpretation of the value depends on the exact key context it is used in. In all lines any text after and including a '#' character is completely ignored; it serves as a premature line end (a comment). Blank lines are ignored entirely. Keys are structured on a hierarchical tree layout with each tree node being separated by semicolons. Thus a key of 'Instruments;S11;Config;SMZ' refers to the lookup hierarchy of Instruments->S11->Config->SMZ. That is, the value for "SMZ" in the "Config" section of the instrument S11 (in normal structure). If one or more !' character are present in the key they are reduced to a single one at the location of the first occurrence and the entire line inserted into log files relevant to that section. That is, lines marked with that in the global section are inserted into all log files but lines with them in an instrument section are only inserted into that instrument's log files. Thus the line 'Disk;!StationID,NIL' inserted the header line '!StationID,NIL' into all log files. Common value parsing methods: Numeric - Generally any valid real number is recognized; exponential notation is supported in the form of N.NNNNE+03. See atof(3). Numeric segmented (amount) - A series Numeric values segmented by a delimiter (often ':') such that the when reading the series from right to left each segment is multiplied by a cumulative multiplier growing by the given amount each segment. Time - A Numeric segmented value growing by 60. That is a structure like HH:MM:SS is recognized with the parts being optional by omitting the leftmost ones. Relative path - A filename path that if it does not start with a '/' is assumed to be relative to the environment variable CPD2. So a path of 'etc/cpd.conf' refers to the main CPD2 configuration. Serial Port - A serial port path and parameters description string. Consists of the path and parameters separated by a colon. The parameters consists of the integer baud rate, one of 'N', 'E', or 'O' (for no parity, even parity or odd parity), the integer number of data bits [6-8], and the integer number of stop bits [1-2]. Thus a string such as "/dev/ttyUSB0:9600N81" describes the first USB serial port, at 9600 baud, no parity, eight data bits and one stop bit. If the string beings with '=' then it is treated as a TCP pass through to a network-to-serial converter. That is the string "=192.168.1.100:1045" will open a TCP connection to 192.168.1.100 port 1045 and send/receive data to that. In this mode all port parameters are ignored (they must be set by the converter). Boolean - A value indicating true or false. May be zero or non-zero for false or true. Also accepts values such as 'T' or 'F' and 'TRUE' or 'FALSE' (ignoring case). Digital Filter - A set of two sub keys, "A" and "B" indicating the coefficients in left to right history order of a digital filter. The "A" coefficients are the values of the N-prior inputs while the "B" ones are the values of the N-prior output values. Both lists are delimited by semicolons. The default is for a no-op smoother (output the same value as the input). Calibration Polynomial - A set of Numeric coefficients delimited by semicolons. The coefficients increase in order left to right. So, a polynomial of "0.1;1.2;-1.3" specifies "0.1 + 1.2*x - 1.3*x^2" The maximum order is unlimited. Analog Channel - A string name for an analog channel. In the input context the values "MVC", "ZERO" and "ONE" are also supported as constant values. For inputs the sub-key "cal" is supported to set the Calibration Polynomial (default identity) of this channel. Digital Channel - A string name for a digital channel. In the input context the values "TRUE" and "FALSE" are also supported as constants. Global settings. - Global Global;!!fil;Project - No effect on CPD2 operation but a commonly used meta-data string for log files. Global;SpinupTime - A Time value specifying the system spin up time. Values are not averaged during the spin up time. Defaults to zero. May be overridden on a per-client basis. Disk Disk;!StationID - Station ID code. Usually inserted as meta-data as well. Defaults to "NIL". Disk;LogDir - Directory to place log files in. Defaults to "/aer/${STATIONID}/log" Disk;BufferSize - Maximum size in bytes of data to buffer before forcing writes. Defaults to zero (immediate writing of all data). Disk;MaxFileSize - Maximum file size in kbytes before new files are forced. Zero (the default) allows for unlimited file size. RemoteHost - Remote host name for all instruments to connect to. Overridden by the instrument specific one. Defaults to the local system socket (no networking). Instruments. Generally of the form "Instrument;Name" where name is of the form "A11". The exact name is determined by the flow diagram naming system. An instrument must contain a "Startup" key (see below) or it will be ignored in standard CPD2 start up (but may be started manually). Any key tree with a "Startup" key will be started with CPD2. So, a key structure like "Schedule;X1;Startup,cpd2.verticalprofile" would start "cpd2.verticalprofile Schedule;X1". - Instruments;Name;Startup - The name of the binary to try to start, searched in ${CPD2}/bin. The binary also determines the instrument type. Normally of the form "cpd.*" where the second half is the actual type, such as "cpd2.neph". Instruments;Name;Port - Serial Port to use to connect to the instrument. Required for instruments that use the serial port to communicate. Instruments;Name;OutPort - Serial Port to output a copy of all log records to. Instruments;Name;RemoteHost - Remote host name to connect to as the CPD2 server. Instruments;Name;Tags - List separated by semicolons of tag names for this instrument. Maximum of eight tags listed. Instruments;Name;DisplayName - Human readable name for the instrument. Displayed in the client menus. Instruments;Name;IdentifierChar - Single character identifier for the instrument. Used as a shortcut on the client. General Instrument logging. RecType represents a full record type (such as "S11a"). VarName represents a complete variable name (such as "U_S11"). - Instruments;Name;!fil;name - Base name for the instrument. This is used construct the log file name, the variables, and the record names. Usually complies to a CPD2 flow chart tied name. For example a neph might be "S11". Instruments;Name;EnableLogging - Boolean controlling this instrument's logging. Defaults to being enabled. Instruments;Name;AvgerageOnBypass - Boolean controlling averaging when the system is bypassed, defaults to true for any instrument not ending in 1. That is, enabled for N71 but disabled for S11. Instruments;Name;AvgerageOnContam - Boolean controlling averaging when the system is contaminated, defaults to true. Instruments;Name;IgnoreFlush - Boolean controlling if the instrument obeys the system flush, defaults to the value of the AverageOnBypass. Instruments;Name;record;RecType - The semicolon separated list of partial (no instrument suffix) or complete variables to be put into this record. Instruments;Name;var;VarName;enable - Boolean. If disabled a variable will not appear in any records even if it is specified in the record definition. Default is enabled. Instruments;Name;var;VarName;format - CPD2 extended printf (see libcpd2/sfmt.h) format for the variable. Defaults to the hard coded default format if available. Instruments;Name;var;VarName;mvc - MVC string for the variable. Defaults first the hard coded default MVC then if not available and possible to automatic generation from the format. Common variables: F1 - System flags. Instrument: cpd2.aethalometer Variables: Q - Flow (slpm) PCT - Fraction X[1-7]c - Concentration (ng/m3) Zir[1-7] - ATN Isz[1-7] - Sample zero Is[1-7] - Sample intensity Irz[1-7] - Reference zero Ir[1-7] - Reference intensity Records: a - Q;PCT;X[1-7];Zir[1-7];Isz[1-7];Is[1-7];Ir[1-7] Keys: Instruments;A11;Timebase - Time base in minutes. Communication is dropped if no record is received in this value plus one minute. Instruments;A11;Channels - Integer number of channels. The number must be 1<=N<=7. Instruments;A11;Wavelength;N - Where N is [1,7]. The wavelength of the Nth channel in nm. No effect on CPD2 operation, but used to display Defaults to (in order) 370,470,521,565,700,430,950. Instrument: cpd2.ain_simple Has an arbitrary number of configuration defined variables. These variables should have MVCs, formats, and field descriptions defined for them. It is also recommended to put the channel assignment into the log meta-data. The MVC and format are defined with the standard variable alteration procedure above. All channels are zero based. Records: a - F; m - Keys: In all strings accepted the escapes "\n" for newline, "\r" for carriage return, "\t" for tab, "\;" for comma, "\s" for space (single), and "\xFF" for ASCII character FF (in hex) are supported. Instruments;X1;CountAIChannels - Integer number of analog input channels. Default 1. Instruments;X1;Parser;LineDelimiter - List of characters that delimit "lines". Defaults to newline and/or carriage return. Instruments;X1;Parser;Delimiter - List of delimiter characters to split the input lines on. Defaults to all space characters and comma. Instruments;X1;Parser;Delimiter;Consecutive - Boolean. If true then consecutive delimiters are treated as a single one for the purposes of the index in the split. Defaults to true. Instruments;X1;Parser;Delimiter;SkipLeading - Boolean. If true skips any leading delimiters. Defaults to true. Instruments;X1;Parser;AcceptEmpty - Boolean. If true then empty input lines are not considered invalid, they are just ignored. Defaults to false. Instruments;X1;Parser;SkipCharacters - Integer number of characters to skip at the start of lines. Default 0. Instruments;X1;Parser;StartField - Field number to start parsing at, effectively and offset from the actual output fields to the parsed ones. Default 0. Instruments;X1;Parser;MaximumLength - Maximum possible length of the incoming records. Defaults to 8192. Instruments;X1;Parser;Timeout - Number number of seconds to wait before timing out waiting for incoming data. Instruments;X1;Parser;Poll - String to poll before every read with. Defaults to nothing (do not poll). Instruments;X1;Parser;Poll;Delay - Number of seconds to wait before polling or between reads. Defaults to zero. Instruments;X1;Parser;Start;Send; - String to send on start up. The should cause to the string to be alpha-sorted into the correct order. Instruments;X1;Parser;Start;SendDelay - Delay between start up strings in seconds. Defaults to zero. Instruments;X1;Parser;Start;FlushDelay - Delay before flushing all data after sending start up strings. Defaults to one second. Instruments;X1;!var;chan - Analog Input channel definition. The channel is an integer value, starting at zero. Calibration should also be set, see above. Instrument: cpd2.bestups Variables: V1 - Voltage in V2 - Voltage out V3 - Battery voltage A1 - Output current A2 - Battery current C - Frequency (Hz) VA1 - Power (watts) VA2 - VA Out PCT - Load precentage S - Runtime (seconds) T - Ambient temperature (C) F2 - UPS Flags (0x0001 = notready, 0x0002 = inverter on, 0x0004 = charger on) Records: a - F1;F2;V1;V2;V3;A1;A2;C;VA1;VA2;V;PCT;S;T Instrument: cpd2.caps Variables: Be[BGR] - Aerosol light extinction coefficient (Mm-1) ZBel[BGR] - Loss (Mm-1) Bez[BGR] - Baseline light extinction coefficient (Mm-1) T - Temperature (C) P - Pressure (hPa) Q - Flow (lpm) V - Light signal (mV) F2 - CAPS flags Records: a - F1;F2;BeB;BeG;BeR;T;P m - Q;ZBelB;ZBelG;ZBelR;V c - BezB;BezG;BezR Instrument: cpd2.ccn Variables: F2 - Temp stable flag F3 - Alarm bits (and sign = 0x100) F4 - TDMA control flag U - Super staturation setting reported (precent) Uc - Super staturation calculated (precent) T1 - TEC 1 Temp (C) T2 - TEC 2 Temp (C) T3 - TEC 3 Temp (C) T4 - Sample temp (C) Tu - Inlet temp (C) T5 - OPC Temp (C) T6 - Nafion temp (C) Q1 - Sample flow (lpm) Q2 - Sheath flow (lpm) P - Sample pressure (hPa) A - Laser current (mA) V1 - First stage monitor voltage DTg - Stddev of TEC3-TEC1 (C) DT - Temperature gradient TEC3-TEC1 (C) V2 - Proportional valve voltage N - CN count Nn - Starting bin number for total CN count Nb[1,21] - Count for individual bins Records: a - F1;F2;V1;U;Uc;T1;T2;T3;T4;Tu;T5;T6;Q1;Q2;P;A;DTg;DT;V2;N;Nn;Nb[1,21] m - Keys: Instruments;N11;StdDevStable - Maximum standard deviation of TEC3-TEC1 to consider stable. Instruments;N11;RunDMTModel - Boolean. Run the high precision model of the CCN to calculate a better super staturation. Defaults to true. Instruments;N11;SPInit - Numeric value of the initial super saturation setpoint. This value is held until the next setpoint comes in time. Instruments;N11;SPExit - Numeric value of the super saturation setpoint to execute when the program exits. Instruments;N11;Scanning - Boolean indicating to run setpoint scanning or not. Default is off. Instruments;N11;Setpoint;