...
Int Clpe_Connection(string password, int isAttachedSlave)
Description |
|
Parameters |
Ex ) “password1234”
|
Returns |
0 = no error. -1 = can not probe driver. -2 = can not find network. -3 = can not set address. -4 = can not ping. -5 = can not create socket. -6 = can not connect socket. |
Example code
Code Block | ||
---|---|---|
| ||
ClpeClientApi clpe_api; string password = “password1234”; int ret = clpe_api.Clpe_Connection(password, 1); if(ret == 0) { printf("Connection successed\n"); } |
...
Int Clpe_Connection(int isAttachedSlave)
Description |
|
Parameters |
|
Returns |
0 = no error. -4 = can not ping. -5 = can not create socket. -6 = can not connect socket. |
Example code
Code Block | ||
---|---|---|
| ||
ClpeClientApi clpe_api; int ret = clpe_api.Clpe_Connection(1); if(ret == 0) { printf("Connection successed\n"); } |
...
int Clpe_GetMicomVersion(unsigned char* version_master, unsigned char* version_slave)
Description |
|
Parameters |
|
Returns |
0 = no error. -1 = invalid command id. -3 = failed communication. -4 = error data checksum. |
Example code
Code Block | ||
---|---|---|
| ||
ClpeClientApi clpe_api; unsigned char *master_micomVer = (unsigned char*) malloc(6); unsigned char *slave_micomVer = (unsigned char*) malloc(6); int ret = clpe_api.Clpe_GetMicomVersion(master_micomVer, slave_micomVer); if(ret == 0) { printf("Master Micom Version = %s\n", master_micomVer); printf("Slave Micom Version = %s\n", slave_micomVer); } |
...
int Clpe_GetXavierVersion(unsigned char* versison_master, unsigned char* versison_slave)
Description |
|
Parameters |
|
Returns |
0 = no error. -1 = invalid command id. -3 = failed communication. -4 = error data checksum. |
Example code
Code Block | ||
---|---|---|
| ||
ClpeClientApi clpe_api; unsigned char *master_xavierVer = (unsigned char*) malloc(6); unsigned char *slave_xavierVer = (unsigned char*) malloc(6); int ret = clpe_api.Clpe_GetXavierVersion(master_xavierVer, slave_xavierVer); if(ret == 0) { printf("Master Xavier Version = %s\n", master_xavierVer); printf("Slave Xavier Version = %s\n", slave_xavierVer); } |
...
int Clpe_GetSDKVersion (unsigned char* version)
Description |
|
Parameters |
|
Returns |
0 = no error. |
Example code
Code Block | ||
---|---|---|
| ||
ClpeClientApi clpe_api; unsigned char *sdkVer = (unsigned char*) malloc(6); int ret = clpe_api.Clpe_GetXavierVersion(sdkVer); if(ret == 0) { printf("SDK Version = %s\n", sdkVer); } |
...
int Clpe_GetCamStatus(int* status)
Description |
|
Parameters |
|
Returns |
0 = no error. -1 = invalid command id. -3 = failed communication. -4 = error data checksum. |
Example code
Code Block |
---|
ClpeClientApi clpe_api; int *camStat = (int*) malloc(8 * sizeof(int)); int ret = clpe_api.Clpe_GetCamStatus(camStat); if(ret == 0) { printf("Camera Status [1] = %d, [2] = %d, [3] = %d, [4] = %d, [5] = %d, [6] = %d, [7] = %d , [8] = %d \n", camStat[0], camStat[1], camStat[2], camStat[3], camStat[4] , camStat[5] , camStat[6] , camStat[7]); } |
...
int Clpe_SetXavierPowerOff()
Description |
|
Parameters |
|
Returns |
0 = no error. -1 = invalid command id. -3 = failed communication. -4 = error data checksum. |
Code Block | ||
---|---|---|
| ||
ClpeClientApi clpe_api; int ret = clpe_api.Clpe_SetXavierPowerOff(); if(ret == 0) { printf("Xavier power off success ! Check the LED is off\n"); } |
XavierNX의 전원이 정상적으로 꺼지면, 전원선 부근의 LED가 꺼지게 된다.
int Clpe_CheckPci()
Description |
|
Parameters |
|
Returns |
0 = no error. -1 = pci device is not connected. |
Example code
Code Block | ||
---|---|---|
| ||
ClpeClientApi clpe_api; int ret = clpe_api.Clpe_CheckPci(); if(ret == 0) { printf("pci device is connected\n"); } |
int Clpe_CheckNetwork()
Description |
|
Parameters |
|
Returns |
0 = no error. -1 = network device is not connected. |
Example code
Code Block | ||
---|---|---|
| ||
ClpeClientApi clpe_api; int ret = clpe_api.Clpe_CheckNetwork(); if(ret == 0) { printf("network device is connected\n"); } |
int Clpe_CheckPing()
Description |
|
Parameters |
|
Returns |
0 = no error. -1 = ping failed. |
Example code
Code Block | ||
---|---|---|
| ||
ClpeClientApi clpe_api; int ret = clpe_api.Clpe_CheckPing(); if(ret == 0) { printf("ping successed\n"); } |
...
int Clpe_CheckTimeSyncStatus()
Description |
|
Parameters |
|
Returns |
0 = no error. -1 = time sync failed. |
Example code
Code Block | ||
---|---|---|
| ||
ClpeClientApi clpe_api; int ret = clpe_api. Clpe_CheckTimeSyncStatus(); if(ret == 0) { printf("time sync successed\n"); } |
int Clpe_ReqResyncTime()
Description |
|
Parameters |
|
Returns |
0 = no error. -1 = time sync failed. |
Example code
Code Block | ||
---|---|---|
| ||
ClpeClientApi clpe_api; int ret = clpe_api. Clpe_ Clpe_ReqResyncTime(); if(ret == 0) { printf("Time resync successed\n"); } |
...
int Clpe_StartStream (T_CB_APP cb_app, int use_cam_0, int use_cam_1, int use_cam_2, int use_cam_3, int use_cam_4, int use_cam_5, int use_cam_6, int use_cam_7, int display_on)
Description |
|
Parameters |
|
Returns |
0 = no error. -1 = Fail to create task. |
Example code
Code Block | ||
---|---|---|
| ||
int Clpe_GetFrameExample(unsigned int inst, unsigned char* buffer, unsigned int size, struct timeval* camera_timeStamp) { return 0; } |
Code Block | ||
---|---|---|
| ||
ClpeClientApi clpe_api; ret = clpe_api.Clpe_StartStream(Clpe_GetFrameExample, 1, 1, 1, 1, 1, 1, 1, 1, 1); if(ret == 0) { printf("Start stream successed\n"); } |
int Clpe_StopStream ()
Description |
|
Parameters |
|
Returns |
0 = no error. -1 = Stop error. |
Example code
Code Block | ||
---|---|---|
| ||
ClpeClientApi clpe_api; int ret = clpe_api. Clpe_StopStream (); if(ret == 0) { printf("Stop stream successed\n"); } |
...
int Clpe_GetFrameAllCam (int *p_camera_id, unsigned char **p_buffer, unsigned int *p_size, struct timeval *pt_camera_timeStamp)
Description |
|
Parameters |
|
Returns |
0 = no error. -2 = There is no the updated frame. |
Example code
Code Block | ||
---|---|---|
| ||
ClpeClientApi clpe_api; int camera_id = 0; unsigned char *p_buffer; unsigned int size; struct timeval t_camera_timeStamp; int ret = clpe_api.Clpe_GetFrameAllCam(&camera_id, &(p_buffer), &size, &t_camera_timeStamp); if(ret == 0) { printf("Get frame successed\n"); } |
‘p_buffer’ 의 영상 포맷은 ‘UYVY’, ‘JPEG’ 이다.
해당 함수 호출 전에 반드시 Clpe_StartStream() 호출되어야 한다.
...
int Clpe_GetFrameOneCam (int camera_id, unsigned char **p_buffer, unsigned int *p_size, struct timeval *pt_camera_timeStamp)
Description |
|
Parameters |
|
Returns |
0 = no error. -2 = There is no the updated frame. -3 = Not available camera id |
Example code
Code Block | ||
---|---|---|
| ||
ClpeClientApi clpe_api; int camera_id = 0; unsigned char *p_buffer; unsigned int size; struct timeval t_camera_timeStamp; int ret = clpe_api.Clpe_GetFrameOneCam(0, &(p_buffer), &size, &t_camera_timeStamp); if(ret == 0) { printf("Get frame successed\n"); } |
‘p_buffer’ 의 영상 포맷은 ‘UYVY’, ‘JPEG’ 이다.
해당 함수 호출 전에 반드시 Clpe_StartStream() 호출되어야 한다.
int ClpeClientApi::Clpe_SelectFormat(int format)
Description |
|
Parameters |
|
Returns |
0 = no error. -1 = invalid command id. -3 = failed communication. -4 = error data checksum. |
Example code
Code Block |
---|
ClpeClientApi clpe_api;
int format = 0;
int ret = clpe_api.Clpe_SelectFormat(format);
if(ret == 0)
{
printf("Get frame successed\n");
} |