|
Sentis-ToF-M100 API
1.0.0
API_for_using_the_Bluetechnix_Sentis_ToF_M100_camera
|
#include <apitypes.h>

Go to the source code of this file.
Functions | |
| DLLExport T_SENTIS_HANDLE | STSopen (T_SENTIS_CONFIG *pa_tConf, T_ERROR_CODE *pa_tErr) |
| Open the UDP and TCP sockets for data and control interfaces. Instance a thread which receives the UDP data and writes them to a queue. More... | |
| DLLExport T_ERROR_CODE | STSclose (T_SENTIS_HANDLE pa_tHndl) |
| Deletes the device handle and frees all allocated memory and close any TCP and UDP connections. More... | |
| DLLExport T_ERROR_CODE | STSgetData (T_SENTIS_HANDLE pa_tHndl, T_SENTIS_DATA_HEADER *pa_tHeader, char *pa_pcBuffer, int *pa_nLength, double pa_nFlags, int pa_nTimeout) |
| The function is used to read the image data of one frame. More... | |
| DLLExport T_ERROR_CODE | STSreadRegister (T_SENTIS_HANDLE pa_tHndl, unsigned short pa_usAddress, unsigned short *pa_usData, int pa_nFlags, int pa_nTimeout) |
| Read the content of one register from the camera. More... | |
| DLLExport T_ERROR_CODE | STSwriteRegister (T_SENTIS_HANDLE pa_tHndl, unsigned short pa_usAddress, unsigned short pa_usData) |
| Write a value to one register of the camera. More... | |
| DLLExport T_ERROR_CODE STSclose | ( | T_SENTIS_HANDLE | pa_tHndl | ) |
Deletes the device handle and frees all allocated memory and close any TCP and UDP connections.
| [in] | pa_tHndl,: | Device handle. |
| DLLExport T_ERROR_CODE STSgetData | ( | T_SENTIS_HANDLE | pa_tHndl, |
| T_SENTIS_DATA_HEADER * | pa_tHeader, | ||
| char * | pa_pcBuffer, | ||
| int * | pa_nLength, | ||
| double | pa_nFlags, | ||
| int | pa_nTimeout | ||
| ) |
The function is used to read the image data of one frame.
The meta-information of the image is contained in pa_tHeader. On each call one frame should be provided. The buffer contains the image data only depending on the selected image format. The buffer length must be indicated in the pa_nLength parameter and it should be big enough for the set image format in the camera register. If the length of the buffer is too small, the function will return an error and pa_nLength will contain the size needed for the image format set in the camera register.
| [in] | pa_tHndl | Device handle. |
| [out] | pa_pcBuffer | Buffer to the image data. |
| [in,out] | pa_nLength | It should provide the size of pa_pcBuffer. On return “pa_nLength” should contain the real size of the image data. If not enough buffer space has been provided an error code should be reported. |
| [out] | pa_tHeader | Pointer to a image header structure. |
| [in] | pa_nFlags | Flags to control the behavior of the function. |
| [in] | pa_nTimeout | No frame timeout [us] in case of blocking behavior. 0 means default timeout (1000ms). |
| DLLExport T_SENTIS_HANDLE STSopen | ( | T_SENTIS_CONFIG * | pa_tConf, |
| T_ERROR_CODE * | pa_tErr | ||
| ) |
Open the UDP and TCP sockets for data and control interfaces. Instance a thread which receives the UDP data and writes them to a queue.
This function starts the communication with the camera, checks the data connection and keeps it opened if the HOLD_CONTROL_ALIVE flag is set. It creates the udp data connection and initializes a queue where the image frames are saved.
To configure these connections and theirs behavior, the function receives the T_SENTIS_CONFIG struct where the user should define the connection values.
The user receives an handle T_SENTIS_HANDLE which allows to interact with the camera.
The user should check if the connection is established by checking the T_ERROR_CODE. Also it is the responsability of the user to correctly close and delete the connection and the data structures related by using the function STSclose.
| [in] | pa_tConf | Configuration structure. |
| [out] | pa_tErr | 0 on success, a negative one byte error code otherwise |
| DLLExport T_ERROR_CODE STSreadRegister | ( | T_SENTIS_HANDLE | pa_tHndl, |
| unsigned short | pa_usAddress, | ||
| unsigned short * | pa_usData, | ||
| int | pa_nFlags, | ||
| int | pa_nTimeout | ||
| ) |
Read the content of one register from the camera.
| [in] | pa_tHndl | Device handle. |
| [in] | pa_usAddress | 16 bits register address. |
| [out] | pa_usData | 16 bits register content buffer. |
| [in] | pa_nFlags | Read behavior. Blocking. |
| [in] | pa_nTimeout | Read timeout [us]. 0 means default timeout (1000ms). |
| DLLExport T_ERROR_CODE STSwriteRegister | ( | T_SENTIS_HANDLE | pa_tHndl, |
| unsigned short | pa_usAddress, | ||
| unsigned short | pa_usData | ||
| ) |
Write a value to one register of the camera.
| [in] | pa_tHndl | Device handle. |
| [in] | pa_usAddress | 16 bits register address. |
| [out] | pa_usData | 16 bits register value to be written. |
1.8.3.1