cpp70.sdl

Schema for the cpp70Example_main.cpp example. Compile this schema using rdm-compile as follows:

rdm-compile --c-structs --lc-struct-members --catalog cpp70.sdl

and include the generated header file(s) as follows:

#include "cpp70_structs.h"
#include "cpp70_cat.h"

and compile the following generated source file(s):

cpp70_cat.c

Here follows the actual schema:

/*
* EXAMPLE - CPP70 for CPP using the C core API and Time Series C++
*
* This is the DDL (Database Definition Language) for a single field,
* single record-type database. The one record type is called CORE03_RECORD,
* and it's one field, MESSAGE, can store an UTF-8 string.
*/
create circular table measurement_seconds of maxrows = 600
(
time_stamp_current uint64 primary key,
value_current double not null
);
create circular table stats_minutes of maxrows = 600
(
time_stamp_first uint64 not null,
time_stamp_last uint64 primary key,
n uint64 not null,
value_sum double not null,
value_sum2 double not null
);
create circular table stats_hours of maxrows = 600
(
time_stamp_first uint64 not null,
time_stamp_last uint64 primary key,
n uint64 not null,
value_sum double not null,
value_sum2 double not null
);
create circular table stats_days of maxrows = 70
(
time_stamp_first uint64 not null,
time_stamp_last uint64 primary key,
n uint64 not null,
value_sum double not null,
value_sum2 double not null
);