- Rearranged directory structure for forking out ANSTO
- Refactored site specific stuff into a site module - PSI specific stuff is now in the PSI directory. - The old version has been tagged with pre-ansto
This commit is contained in:
49
tecs/tecs_data.h
Normal file
49
tecs/tecs_data.h
Normal file
@@ -0,0 +1,49 @@
|
||||
#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_ */
|
||||
Reference in New Issue
Block a user