add doxy generation and build

parent a5d91d88
LIBOBJS = libfsi.o
DOXYFILE = doc/fsi.doxy
all: libfsi.a
.PHONY: all lib doc clean
all: lib doc
lib: libfsi.a
libfsi.a: $(LIBOBJS)
$(AR) $(ARFLAGS) $@ $^
doc: doc/html
doc/html: $(DOXYFILE)
doxygen $(DOXYFILE)
clean:
rm -f libfsi.a *.o
rm -rf doc/html
FILE_PATTERNS = *.c *.h doc.txt
PROJECT_NAME = "FSI library"
OUTPUT_DIRECTORY = doc
EXTENSION_MAPPING = txt=C
QUIET = YES
WARNINGS = YES
EXTRACT_ALL = YES
TAB_SIZE = 8
OPTIMIZE_OUTPUT_FOR_C = YES
AUTOLINK_SUPPORT = YES
GENERATE_LATEX = NO
ALWAYS_DETAILED_SEC = YES
REPEAT_BRIEF = YES
......@@ -147,29 +147,39 @@ struct fsi_full_measurement {
double data[FSI_SAMPLE_SIZE]; /**< raw data */
};
/* methods */
/** opaque library handle/context structure */
typedef struct __FSI_state FSI;
/* core API methods */
/** initialize library */
struct FSI* fsi_lib_init(void);
FSI *fsi_lib_init(void);
/** close library */
void fsi_lib_exit(FSI *h);
/** configure a channel type, gain and expected peak params */
int fsi_channel_configure(struct fsi_channel_config *cfg);
int fsi_channel_configure(FSI *h, struct fsi_channel_config *cfg);
/** get a channel last configured params */
int fsi_get_channel_configuration(FSI *h, unsigned int channel_id, struct fsi_channel_config *cfg);
/** bulk configure a channel array type, gain and expected peak params */
int fsi_channel_array_configure(struct fsi_channel_config cfg[], int nchannels);
int fsi_channel_array_configure(FSI *h, struct fsi_channel_config cfg[], int nchannels);
/** receive the whole set of distance/bragg measurements from all channels */
int fsi_receive_measurements(struct fsi_channel_measurement meas[], int *nchannels);
int fsi_receive_measurements(FSI *h, struct fsi_channel_measurement meas[], int *nchannels);
/** receive the whole set of distance/bragg measurements from all channels with a timeout */
int fsi_receive_measurements_timemout(struct fsi_channel_measurement meas[], int *nchannels,
int fsi_receive_measurements_timemout(FSI *h, struct fsi_channel_measurement meas[], int *nchannels,
unsigned int timeout);
/** receive raw measurements of channel_id */
int fsi_get_full_samples(int channel_id, enum fsi_expert_mode mode, struct fsi_full_measurement *meas);
int fsi_get_full_samples(FSI *h, int channel_id, enum fsi_expert_mode mode, struct fsi_full_measurement *meas);
/** close library */
int fsi_lib_exit(void);
/* auxiliary helper methods */
int fsi_get_gas_cell_id(FSI *h);
int fsi_get_interferometer_id(FSI *h);
#ifdef __cplusplus
}
......
......@@ -13,10 +13,15 @@
*/
int fsi_channel_configure(FSI *h, struct fsi_channel_config *cfg)
{
return fsi_channel_array_configure(cfg, 1);
return fsi_channel_array_configure(h, cfg, 1);
}
int fsi_receive_measurements(struct fsi_channel_measurement meas[], int *nchannels)
/**
* @brief recover the result of measurement processing
* @param[out] meas - array of measurements
* @param[out] nchannels - number of valid entries returned in meas
*/
int fsi_receive_measurements(FSI *h, struct fsi_channel_measurement meas[], int *nchannels)
{
return fsi_receive_measurements_timemout(meas, nchannels, 0);
return fsi_receive_measurements_timemout(h, meas, nchannels, 0);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment