Files
sics/tecs/tecs_data.h
2002-06-10 12:45:24 +00:00

50 lines
1.1 KiB
C

#ifndef TECS_DATA_H_
#define TECS_DATA_H_
typedef struct {
char *name;
} DataSet;
typedef struct {
void *private;
} DataBase;
DataSet *DataCreateSet(DataBase *dBase, char *name, float *var, int step, int lifetime, int start);
/*
create a new dataset
if the dataset already exists, or memory allocation failed, NULL is returned
set <dBase> to NULL to use the common database
*/
DataSet *DataFindSet(DataBase *dBase, char *name);
/*
find a previously created dataset.
returns NULL if dataset not found
set <dBase> to NULL to use the common database
*/
int DataSetStep(DataSet *set, int step);
int DataSetLifetime(DataSet *set, int lifetime);
int DataPut(DataSet *set, int time, float value);
/*
put one value to dataset
*/
int DataPutAll(DataBase *dBase, int time);
/*
put all variables in a set to their dataset
*/
int DataGetMult(char *names, int startTime, int endTime, int step, int stdStep, float *data, int data_len);
/*
get multiple datasets
*/
/*
define DATA_UNDEF as a binary and decimal well defined, hopefully rarely used number
*/
#define DATA_UNDEF MYC_NAN
#define DATA_GAP (MYC_NAN*2)
#endif /* TECS_DATA_H_ */