PSI sics-cvs-psi_pre-ansto

This commit is contained in:
2003-06-13 00:00:00 +00:00
committed by Douglas Clowes
parent 2e3ddfb6c6
commit 3ffd0d8af4
1099 changed files with 318432 additions and 0 deletions

49
tecs/tecs_data.h Normal file
View 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_ */