Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
FSI Data Acquisition Path Gateware and Software
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Projects
FSI Data Acquisition Path Gateware and Software
Commits
199ce18f
Commit
199ce18f
authored
Jul 23, 2021
by
Juan David Gonzalez Cobas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add comments and some aux function
parent
14c43bd1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
3 deletions
+27
-3
fsi.h
libfsi/fsi.h
+19
-1
libfsi.c
libfsi/libfsi.c
+8
-2
No files found.
libfsi/fsi.h
View file @
199ce18f
...
...
@@ -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
...
...
libfsi/libfsi.c
View file @
199ce18f
/*
* 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
);
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment