IDS peak comfortC  v1.6.0
Camera memory

Enumerations

enum  peak_camera_memory_area { PEAK_CAMERA_MEMORY_AREA_INVALID, PEAK_CAMERA_MEMORY_AREA_USER_DATA_1, PEAK_CAMERA_MEMORY_AREA_USER_DATA_2 }
 peak Camera Memory Area More...
 

Functions

peak_access_status peak_CameraMemory_Area_GetAccessStatus (peak_camera_handle hCam, peak_camera_memory_area cameraMemoryArea)
 Query the camera memory area access status. More...
 
peak_status peak_CameraMemory_Area_GetList (peak_camera_handle hCam, peak_camera_memory_area *cameraMemoryAreaList, size_t *cameraMemoryAreaCount)
 Get the list of currently usable camera memory areas. More...
 
peak_status peak_CameraMemory_Area_Size_Get (peak_camera_handle hCam, peak_camera_memory_area cameraMemoryArea, size_t *cameraMemoryAreaSize)
 Get the size of a camera memory area. More...
 
peak_status peak_CameraMemory_Area_Data_Clear (peak_camera_handle hCam, peak_camera_memory_area cameraMemoryArea)
 Clear a camera memory area. More...
 
peak_status peak_CameraMemory_Area_Data_Write (peak_camera_handle hCam, peak_camera_memory_area cameraMemoryArea, const uint8_t *data, size_t dataSize)
 Write to a camera memory area. More...
 
peak_status peak_CameraMemory_Area_Data_Read (peak_camera_handle hCam, peak_camera_memory_area cameraMemoryArea, uint8_t *data, size_t dataSize)
 Read from the specified camera memory area. More...
 

Detailed Description

Camera memory related functions and types.

Enumeration Type Documentation

◆ peak_camera_memory_area

peak Camera Memory Area

A camera memory area can be used to store binary data in the cameras persistent memory.

Enumerator
PEAK_CAMERA_MEMORY_AREA_INVALID 

Invalid memory area.

Use this value for the initialization of variables of type peak_camera_memory_area.

PEAK_CAMERA_MEMORY_AREA_USER_DATA_1 

Cameras User Data 1 memory.

This memory area can be used to store binary data in the cameras persistent memory.

PEAK_CAMERA_MEMORY_AREA_USER_DATA_2 

Cameras User Data 2 memory.

This memory area can be used to store binary data in the cameras persistent memory.

Function Documentation

◆ peak_CameraMemory_Area_Data_Clear()

peak_status peak_CameraMemory_Area_Data_Clear ( peak_camera_handle  hCam,
peak_camera_memory_area  cameraMemoryArea 
)

Clear a camera memory area.

Deletes the data from the specified camera memory area.

Parameters
[in]hCamThe camera handle.
[in]cameraMemoryAreaThe camera memory area.
Returns
PEAK_STATUS_SUCCESS Operation was successful; no error occurred.
PEAK_STATUS_ACCESS_DENIED The camera memory area is not writeable. Check the access status via peak_CameraMemory_Area_GetAccessStatus. Check the list of currently usable camera memory areas via peak_CameraMemory_Area_GetList.
PEAK_STATUS_INVALID_PARAMETER cameraMemoryArea is an invalid camera memory area. Check peak_camera_memory_area.
PEAK_STATUS_INVALID_HANDLE hCam is an invalid camera handle.
PEAK_STATUS_NOT_INITIALIZED The library is not initialized.
PEAK_STATUS_ERROR An unexpected internal error occurred.

◆ peak_CameraMemory_Area_Data_Read()

peak_status peak_CameraMemory_Area_Data_Read ( peak_camera_handle  hCam,
peak_camera_memory_area  cameraMemoryArea,
uint8_t *  data,
size_t  dataSize 
)

Read from the specified camera memory area.

Reads the specified data from the specified camera memory area.

The data is read from the start of the camera memory area.

Parameters
[in]hCamThe camera handle.
[in]cameraMemoryAreaThe camera memory area.
[in]dataThe buffer to receive the data to.
[in]dataSizeThe size of *data in bytes.
Returns
PEAK_STATUS_SUCCESS Operation was successful; no error occurred.
PEAK_STATUS_ACCESS_DENIED The camera memory area is not readable. Check the access status via peak_CameraMemory_Area_GetAccessStatus. Check the list of currently usable camera memory areas via peak_CameraMemory_Area_GetList.
PEAK_STATUS_OUT_OF_RANGE dataSize exceeds the size of the specified camera memory area. Check the size of the camera memory area via peak_CameraMemory_Area_Size_Get.
PEAK_STATUS_INVALID_PARAMETER cameraMemoryArea is an invalid camera memory area or dataSize is 0 or data is an invalid pointer. Check peak_camera_memory_area.
PEAK_STATUS_INVALID_HANDLE hCam is an invalid camera handle.
PEAK_STATUS_NOT_INITIALIZED The library is not initialized.
PEAK_STATUS_ERROR An unexpected internal error occurred.

◆ peak_CameraMemory_Area_Data_Write()

peak_status peak_CameraMemory_Area_Data_Write ( peak_camera_handle  hCam,
peak_camera_memory_area  cameraMemoryArea,
const uint8_t *  data,
size_t  dataSize 
)

Write to a camera memory area.

Writes the specified data to the specified camera memory area.

The data is written to the start of the camera memory area. If dataSize is smaller than the capacity of the camera memory area, the remaining contents of the camera memory area are cleared.

Parameters
[in]hCamThe camera handle.
[in]cameraMemoryAreaThe camera memory area.
[in]dataThe data to write.
[in]dataSizeThe size of *data in bytes.
Returns
PEAK_STATUS_SUCCESS Operation was successful; no error occurred.
PEAK_STATUS_ACCESS_DENIED The camera memory area is not writeable. Check the access status via peak_CameraMemory_Area_GetAccessStatus. Check the list of currently usable camera memory areas via peak_CameraMemory_Area_GetList.
PEAK_STATUS_OUT_OF_RANGE dataSize exceeds the size of the specified camera memory area. Check the size of the camera memory area via peak_CameraMemory_Area_Size_Get.
PEAK_STATUS_INVALID_PARAMETER cameraMemoryArea is an invalid camera memory area or dataSize is 0 or data is an invalid pointer. Check peak_camera_memory_area.
PEAK_STATUS_INVALID_HANDLE hCam is an invalid camera handle.
PEAK_STATUS_NOT_INITIALIZED The library is not initialized.
PEAK_STATUS_ERROR An unexpected internal error occurred.

◆ peak_CameraMemory_Area_GetAccessStatus()

peak_access_status peak_CameraMemory_Area_GetAccessStatus ( peak_camera_handle  hCam,
peak_camera_memory_area  cameraMemoryArea 
)

Query the camera memory area access status.

Provides the current access status for the specified camera memory area.

This function implements the Access Status Query principle.

Parameters
[in]hCamThe camera handle.
[in]cameraMemoryAreaThe camera memory area.
Returns
PEAK_ACCESS_READWRITE The camera memory area can be read from and written to.
PEAK_ACCESS_READONLY The camera memory area can be read from only.
PEAK_ACCESS_WRITEONLY The camera memory area can be written to only.
PEAK_ACCESS_GFA_LOCK The camera memory area is not accessible because the GFA write access is enabled.
PEAK_ACCESS_NONE The camera memory area is not accessible.
PEAK_ACCESS_NOT_SUPPORTED The camera memory area is not supported.
PEAK_ACCESS_INVALID The function failed. Call peak_Library_GetLastError to get the error code and description.

If the function indicates an error by returning PEAK_ACCESS_INVALID, these are the possible errors:

◆ peak_CameraMemory_Area_GetList()

peak_status peak_CameraMemory_Area_GetList ( peak_camera_handle  hCam,
peak_camera_memory_area *  cameraMemoryAreaList,
size_t *  cameraMemoryAreaCount 
)

Get the list of currently usable camera memory areas.

Queries the list of currently selectable camera memory areas.

The list of usable camera memory areas may depend on the camera configuration and the camera status.

This function implements the Two Staged Data Query principle.

Parameters
[in]hCamThe camera handle.
[out]cameraMemoryAreaListPointer to a user allocated array buffer to receive the camera memory area list. If this parameter is NULL, cameraMemoryAreaCount will contain the current number of camera memory areas.
The required size of cameraMemoryAreaList in bytes is cameraMemoryAreaCount x sizeof(peak_camera_memory_area).
[in,out]cameraMemoryAreaCount
  • cameraMemoryAreaList equal NULL:
    out: minimal number of parameter sets cameraMemoryAreaList must be large enough to hold
  • parameterSetList unequal NULL:
    in: number of camera memory areas cameraMemoryAreaList can hold
    out: number of camera memory areas filled by the function
Returns
PEAK_STATUS_SUCCESS Operation was successful; no error occurred.
PEAK_STATUS_BUFFER_TOO_SMALL cameraMemoryAreaList is not NULL and the value of *cameraMemoryAreaCount is too small to receive the expected amount of data.
PEAK_STATUS_ACCESS_DENIED The camera memory feature is not supported or the GFA write mode is enabled.
PEAK_STATUS_INVALID_PARAMETER cameraMemoryAreaCount is an invalid pointer.
PEAK_STATUS_INVALID_HANDLE hCam is an invalid camera handle.
PEAK_STATUS_NOT_INITIALIZED The library is not initialized.
PEAK_STATUS_ERROR An unexpected internal error occurred.
Note
Please consider that the camera memory area list might change between the size query call and the list query call.
This may be the case if the camera configuration or the camera status have changed in the time between the two function calls.

◆ peak_CameraMemory_Area_Size_Get()

peak_status peak_CameraMemory_Area_Size_Get ( peak_camera_handle  hCam,
peak_camera_memory_area  cameraMemoryArea,
size_t *  cameraMemoryAreaSize 
)

Get the size of a camera memory area.

Queries the size of the specified camera memory area.

Parameters
[in]hCamThe camera handle.
[in]cameraMemoryAreaThe camera memory area.
[out]cameraMemoryAreaSizeThe size of the camera memory area in bytes.
Returns
PEAK_STATUS_SUCCESS Operation was successful; no error occurred.
PEAK_STATUS_ACCESS_DENIED The camera memory area is not accessible. Check the access status via peak_CameraMemory_Area_GetAccessStatus. Check the list of currently usable camera memory areas via peak_CameraMemory_Area_GetList.
PEAK_STATUS_INVALID_PARAMETER cameraMemoryArea is an invalid camera memory area or size is an invalid pointer. Check peak_camera_memory_area.
PEAK_STATUS_INVALID_HANDLE hCam is an invalid camera handle.
PEAK_STATUS_NOT_INITIALIZED The library is not initialized.
PEAK_STATUS_ERROR An unexpected internal error occurred.