add doxy-like comments

parent 4c7b000a
......@@ -41,7 +41,7 @@ enum fsi_channel_type {
FSI_CH_INTERF, /**< reference interferometer channel */
};
/* types of functional forms to fit the peaks found */
/** types of functional forms to fit the peaks found */
enum fsi_peak_type {
FSI_PEAK_NONE = 0,
FSI_PEAK_LORENTZ = 1, /**< Cauchy-Lorentz 1/(1+xˆ2) distribution */
......@@ -51,7 +51,7 @@ enum fsi_peak_type {
FSI_PEAK_BRAGG, /**< Bragg-type peak */
/* FIXME:should Bragg type be set apart? tbd */
};
/** types of raw buffer requested by expert diagnostic functions */
enum fsi_expert_mode {
FSI_EXPERT_NONE = 0,
FSI_EXPERT_LIN_FFT, /**< buffer of linearized FFT data */
......@@ -64,13 +64,13 @@ enum fsi_expert_mode {
FSI_EXPERT_OSC_BRAGG, /**< tbd - no different from FSI_EXPERT_OSCILLOSCOPE? */
};
/* biggest number of model parameters among different peak types */
/** biggest number of model parameters among different peak types */
#define FSI_MAX_MODEL_PARAMS 4
/* max number of peaks to find in a channel sample */
/** max number of peaks to find in a channel sample */
#define FSI_MAX_PEAKS 5
/* length of return peak data */
/** length of return peak data */
#define FSI_PEAK_LENGTH 200
/* size of sample vectors - this should not be hardcoded - tbd */
/** size of sample vectors - this should not be hardcoded - tbd */
#define FSI_SAMPLE_SIZE 1024
/* library error codes */
......@@ -78,9 +78,10 @@ enum fsi_expert_mode {
struct FSI;
/* peak finding/fitting configuration for a channel
/** peak finder/fitting configuration for an individual peak
*
* A channel will be configured so that
* A channel will be configured with up to FSI_MAX_PEAKS of these to
* find in its spectrum
*/
struct fsi_peak_config {
double frequency; /**< estimated frequency where peak fits */
......@@ -89,6 +90,11 @@ struct fsi_peak_config {
enum fsi_peak_type type; /**< shape of peak to fit */
};
/** peak finder/fitting result for an individual peak
*
* A channel measurement result will be constituted by up to
* FSI_MAX_PEAKS of these
*/
struct fsi_peak_result {
double frequency; /**< center of peak fitted to data */
double amplitude; /**< peak width derived from parameters */
......@@ -101,7 +107,8 @@ struct fsi_peak_result {
};
/* channel configuration - this will set up a channel's data processing
/**
* channel configuration - this will set up a channel's data processing
* pipeline for the next acq cycle. Up to FSI_MAX_PEAKS will be
* requested
*/
......@@ -116,7 +123,8 @@ struct fsi_channel_config {
If so, this needs not be an array and npeaks is sufficient */
};
/* channel measurement results - the result of acq data processing for
/**
* channel measurement results - the result of acq data processing for
* an individual channel is returned here, with npeaks (up to
* FSI_MAX_PEAKS) peaks given in the case by their fit results (type of
* function and its params, and an array of FSI_PEAK_LENGTH samples)
......@@ -128,6 +136,10 @@ struct fsi_channel_measurement {
struct fsi_peak_result peaks[FSI_MAX_PEAKS]; /**< peak measured values */
};
/**
* this collects full/raw data for an individual channel, as per the
* expert/diagnostic functions
*/
struct fsi_full_measurement {
unsigned int channel_id; /**< channel id of this measurement */
enum fsi_channel_type type; /**< type of channel (distance/Bragg) */
......
......@@ -6,7 +6,12 @@
#include "fsi.h"
int fsi_channel_configure(struct fsi_channel_config *cfg)
/** @file libfsi.c - implementation of ancillary functions in libfsi */
/**
* @brief set up a single channel configuration
* @param[in] cfg - a fsi_channel_config instance
*/
int fsi_channel_configure(FSI *h, struct fsi_channel_config *cfg)
{
return fsi_channel_array_configure(cfg, 1);
}
......
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