5 rtms format description, Rtms format description -20 – Campbell Scientific LoggerNet Datalogger Support Software User Manual
Page 448

Section 11. Utilities Installed with LoggerNet Admin and LoggerNet Remote
11.4.5 RTMS Format Description
The EBNF description of RTMS syntax is as follows:
Record = ( DataRecord | AckRecord ) CRLF.
DataRecord = StationName “,” TableName “ (“ FieldSpecs “) VALUES (“ FieldValues
“)”.
AckRecord = StationName “,” TableName “,” RecordNumber.
FieldSpecs = FieldName “ “ FieldType {“,” FieldName “ “ FieldType}.
FieldValues = FieldValue {“,” FieldValue}.
StationName = Label.
TableName = Label.
FieldName = Label.
Label = Letter { Letter | Digit }.
FieldType = ( “TIMESTAMP” | Decimal | “FLOAT” | “INTEGER” | VarChar ).
Decimal = “DECIMAL(“ Digit [ Digit ] “,” Digit [ Digit ] “)”.
VarChar = “VARCHAR(“ Digit { Digit } “)”.
FieldValue = ( TimeStamp | RecordNumber | Number | String ).
TimeStamp = “‘“ Year “–” Month “–” Day “ “ Hour “:” Minute “:” Second “‘“.
Year = 4( Digit ).
Month = 2( Digit ).
Day = 2( Digit ).
Hour = 2( Digit ).
Minute = 2( Digit ).
Second = 2( Digit ) [ “.” { Digit } ].
RecordNumber = 10{ Digit }.
Number = { Digit } [ “.” ] { Digit }.
String = “‘“ { Character } “‘“.
A typical data record might look something like this:
Lgr,Sec15 (TMSTAMP TIMESTAMP,RECNBR DECIMAL(10,0),Battery_V
FLOAT,Temp FLOAT) VALUES (‘1993-12-08
15:02:00’,123456,13.5,72.123)
Only without the tabs and carriage return in the middle. One with strings might
look like this.
PC1,StatMsg (TMSTAMP TIMESTAMP,RECNBR DECIMAL(10,0),SrcStn
VARCHAR(256),AbtStn VARCHAR(256),Hop DECIMAL(3,0),Message
VARCHAR(256)) VALUES (‘1993-12-08
15:02:02.25’,13355,’PC1’,’StatMsg’,0,’DBSelect End Pipe Queue Dump’)
The acknowledgment records to be sent back to the server for the two records
shown above would be:
Lgr,Sec15,123456
and
PC1,StatMsg,13355
11-20