add comments and some aux function

parent 14c43bd1
......@@ -24,6 +24,8 @@ extern "C" {
* e.g. 1525-1630nm - tbd
* - channels will be distance or Bragg, and so configured till next
* call to the configuration (INPUT) function
* - it is assumed that a channel does not mix distance/Bragg
* measurements - am I wrong?
* - the peak set requested in a channel is assumed to have different
* fit params per peak. If a channel has all its peaks of the same
* type, this can be size-optimized - tbd
......@@ -80,6 +82,10 @@ struct fsi_peak_result {
};
/* 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
*/
struct fsi_channel_config {
unsigned int channel_id; /**< channel to be configured */
enum fsi_channel_type type; /**< type of channel (distance/Bragg) */
......@@ -91,14 +97,26 @@ 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
* 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)
*/
struct fsi_channel_measurement {
unsigned int channel_id; /**< channel id of this measurement */
enum fsi_channel_type type; /**< type of channel (distance/Bragg) */
int npeaks; /**< number of valid entries in peaks array */
struct fsi_peak_result
peaks[FSI_MAX_PEAKS]; /**< peam measured values */
peaks[FSI_MAX_PEAKS]; /**< peak measured values */
};
/* methods */
int fsi_lib_init(void);
int fsi_channel_configure(struct fsi_channel_config *cfg);
int fsi_channel_array_configure(struct fsi_channel_config cfg[], int nchannels);
#ifdef __cplusplus
}
#endif
......
/*
* Copyright CERN 2021
* Author: Juan David Gonzalez Cobas <dcobas _at_ cern.ch>
* SPDX-License-Identifier: LGPL-3.0-or-later
*/
#include "fsi.h"
void nothing(void)
int fsi_channel_configure(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