19 #ifndef __AXISCAMERA_H__
20 #define __AXISCAMERA_H__
25 #define CAMERA_PORT 80
27 #define CAMERA_IMAGE_STALE_TIME_SEC 2.0
29 #define MAX_BLOCKING_TIME_SEC 0.5
33 enum FrcvCameraMetric {CAM_STARTS, CAM_STOPS,
34 CAM_NUM_IMAGE, CAM_BUFFERS_WRITTEN, CAM_BLOCKING_COUNT,
36 CAM_SOCKET_OPEN, CAM_SOCKET_INIT_ATTEMPTS, CAM_BLOCKING_TIMEOUT,
37 CAM_GETIMAGE_SUCCESS, CAM_GETIMAGE_FAILURE,
39 CAM_STALE_IMAGE, CAM_GETIMAGE_BEFORE_INIT, CAM_GETIMAGE_BEFORE_AVAILABLE,
40 CAM_READ_JPEG_FAILURE, CAM_PID_SIGNAL_ERR,
42 CAM_BAD_IMAGE_SIZE, CAM_HEADER_ERROR};
44 #define CAM_NUM_METRICS 17
47 IMAQ_FUNC
int Priv_SetWriteFileAllowed(uint32_t enable);
52 enum ImageResolution { k640x480, k320x240, k160x120 };
57 enum ImageRotation { ROT_0 = 0, ROT_180 = 180 };
61 int StartCameraTask();
66 int GetImage(Image* cameraImage,
double *timestamp);
67 int GetImageBlocking(Image* cameraImage,
double *timestamp,
double lastImageTimestamp);
69 int GetImageData(
char** imageData,
int* numBytes,
double* currentImageTimestamp);
70 int GetImageDataBlocking(
char** imageData,
int* numBytes,
double* timestamp,
double lastImageTimestamp);
73 void StartImageAcquisition();
74 void StopImageAcquisition();
75 void StartImageSignal(
int taskId);
78 int frcCameraInitialized();
79 int GetCameraMetric(FrcvCameraMetric metric);
82 int ConfigureCamera(
char *configString);
83 int GetCameraSetting(
char *configString,
char *cameraResponse);
84 int GetImageSetting(
char *configString,
char *cameraResponse);
88 int StartCameraTask(
int frames,
int compression, ImageResolution resolution, ImageRotation rotation);