Ilmsens HAL API
1.1.1
A cross-platform C-library for interfacing m:explore UWB-sensors
|
Functions to read measured data out of internal ring-buffer. More...
Typedefs | |
typedef int32_t | ilmsens_hal_SampleType |
Represents the data type of raw measured data. |
Functions | |
int | ilmsens_hal_measRdy (unsigned int *pDevNums, unsigned int pNum) |
Reads the fill-level of the internal ring-buffer for all specified devices. | |
int | ilmsens_hal_measRead (unsigned int *pDevNums, unsigned int pNum, ilmsens_hal_SampleType *pBuffer, size_t pBufSizeBytes) |
Reads the measurement data for all specified devices in non-blocking way. | |
int | ilmsens_hal_measGet (unsigned int *pDevNums, unsigned int pNum, ilmsens_hal_SampleType *pBuffer, size_t pBufSizeBytes, unsigned int pTimeoutMillis) |
Blocks and reads the measurement data for all specified devices when it becomes available. |
Functions to read measured data out of internal ring-buffer.
int ilmsens_hal_measRdy | ( | unsigned int * | pDevNums, |
unsigned int | pNum | ||
) |
Reads the fill-level of the internal ring-buffer for all specified devices.
This functions is not blocking and returns immediately. However, in raw mode, it will transfer data from a device to the libraries' ring-buffer on the host, if it discovers that a complete dataset is available.
pDevNums | pointer to a first element or an array of device-indexes |
pNum | number of array-elements |
int ilmsens_hal_measRead | ( | unsigned int * | pDevNums, |
unsigned int | pNum, | ||
ilmsens_hal_SampleType * | pBuffer, | ||
size_t | pBufSizeBytes | ||
) |
Reads the measurement data for all specified devices in non-blocking way.
This functions is not blocking and returns immediately with the next measurement data or an error-code if no data are available.
pDevNums | pointer to a first element or an array of device-indexes |
pNum | number of array-elements |
pBuffer | pointer to output buffer for measured data |
pBufSizeBytes | Size of buffer pointed to by pBuffer in bytes |
int ilmsens_hal_measGet | ( | unsigned int * | pDevNums, |
unsigned int | pNum, | ||
ilmsens_hal_SampleType * | pBuffer, | ||
size_t | pBufSizeBytes, | ||
unsigned int | pTimeoutMillis | ||
) |
Blocks and reads the measurement data for all specified devices when it becomes available.
This functions blocks the caller until at least one complete measurement is available for every device or a specified timeout expired. The buffer pBuffer
must be large enough to hold one complete dataset for each device, i.e. it must be able to hold at least pNum
complete datasets.
Note: if pTimeoutMillis
is 0, this function will block forever...
pDevNums | pointer to a first element or an array of device-indexes |
pNum | number of array-elements |
pBuffer | pointer to output buffer for measured data |
pBufSizeBytes | Size of buffer pointed to by pBuffer in bytes |
pTimeoutMillis | timeout [ms] (0 = forever) |