|
int | a4l_sizeof_chan (a4l_chinfo_t *chan) |
| Get the size in memory of an acquired element. More...
|
|
int | a4l_sizeof_subd (a4l_sbinfo_t *subd) |
| Get the size in memory of a digital acquired element. More...
|
|
int | a4l_find_range (a4l_desc_t *dsc, unsigned int idx_subd, unsigned int idx_chan, unsigned long unit, double min, double max, a4l_rnginfo_t **rng) |
| Find the must suitable range. More...
|
|
int | a4l_rawtoul (a4l_chinfo_t *chan, unsigned long *dst, void *src, int cnt) |
| Unpack raw data (from the driver) into unsigned long values. More...
|
|
int | a4l_rawtof (a4l_chinfo_t *chan, a4l_rnginfo_t *rng, float *dst, void *src, int cnt) |
| Convert raw data (from the driver) to float-typed samples. More...
|
|
int | a4l_rawtod (a4l_chinfo_t *chan, a4l_rnginfo_t *rng, double *dst, void *src, int cnt) |
| Convert raw data (from the driver) to double-typed samples. More...
|
|
int | a4l_ultoraw (a4l_chinfo_t *chan, void *dst, unsigned long *src, int cnt) |
| Pack unsigned long values into raw data (for the driver) More...
|
|
int | a4l_ftoraw (a4l_chinfo_t *chan, a4l_rnginfo_t *rng, void *dst, float *src, int cnt) |
| Convert float-typed samples to raw data (for the driver) More...
|
|
int | a4l_dtoraw (a4l_chinfo_t *chan, a4l_rnginfo_t *rng, void *dst, double *src, int cnt) |
| Convert double-typed samples to raw data (for the driver) More...
|
|
int a4l_sizeof_chan |
( |
a4l_chinfo_t * |
chan | ) |
|
Get the size in memory of an acquired element.
According to the board, the channels have various acquisition widths. With values like 8, 16 or 32, there is no problem finding out the size in memory (1, 2, 4); however with widths like 12 or 24, this function might be helpful to guess the size needed in RAM for a single acquired element.
- Parameters
-
[in] | chan | Channel descriptor |
- Returns
- the size in memory of an acquired element, otherwise a negative error code:
- -EINVAL is returned if the argument chan is NULL
int a4l_sizeof_subd |
( |
a4l_sbinfo_t * |
subd | ) |
|
Get the size in memory of a digital acquired element.
This function is only useful for DIO subdevices. Digital subdevices are a specific kind of subdevice on which channels are regarded as bits composing the subdevice's bitfield. During a DIO acquisition, all bits are sampled. Therefore, a4l_sizeof_chan() is useless in this case and we have to use a4l_sizeof_subd(). With bitfields which sizes are 8, 16 or 32, there is no problem finding out the size in memory (1, 2, 4); however with widths like 12 or 24, this function might be helpful to guess the size needed in RAM for a single acquired element.
- Parameters
-
[in] | subd | Subdevice descriptor |
- Returns
- the size in memory of an acquired element, otherwise a negative error code:
- -EINVAL is returned if the argument chan is NULL or if the subdevice is not a digital subdevice
References A4L_SUBD_DI, A4L_SUBD_DIO, A4L_SUBD_DO, and A4L_SUBD_TYPES.
Referenced by a4l_sync_dio().