IDS peak comfortC v1.14.2
Loading...
Searching...
No Matches
Chunks

Chunks refer to blocks of metadata transmitted alongside image data. More...

Data Structures

struct  peak_chunks_frame_info
 Structure representing frame information. More...
struct  peak_chunks_exposure
 Structure representing exposure information. More...
struct  peak_chunks_gain
 Structure representing gain information. More...
struct  peak_chunks_sequencer
 Structure representing sequencer status. More...
struct  peak_chunks_timestamp
 Structure representing timestamp information. More...
struct  peak_chunks_exposure_trigger
 Structure representing exposure trigger timestamp information. More...
struct  peak_chunks_usable_roi
 Structure representing usable ROI (Region of Interest). More...
struct  peak_chunks_line_status
 Structure representing line status information. More...
struct  peak_chunks_autofeature_status
 Structure representing the status of an auto feature. More...
struct  peak_chunks_autofeature
 Structure representing the status of multiple auto features. More...
struct  peak_chunks_ptp_status
 Structure representing the PTP status. More...

Enumerations

enum  peak_chunks_type {
  PEAK_CHUNKS_TYPE_INVALID , PEAK_CHUNKS_TYPE_FRAME_INFO , PEAK_CHUNKS_TYPE_EXPOSURE , PEAK_CHUNKS_TYPE_GAIN ,
  PEAK_CHUNKS_TYPE_SEQUENCER , PEAK_CHUNKS_TYPE_TIMESTAMP , PEAK_CHUNKS_TYPE_EXPOSURE_TRIGGER , PEAK_CHUNKS_TYPE_USABLE_ROI ,
  PEAK_CHUNKS_TYPE_LINE_STATUS , PEAK_CHUNKS_TYPE_AUTO_FEATURE_STATUS , PEAK_CHUNKS_TYPE_PTP_STATUS
}
 Enumeration for chunk types. More...
enum  peak_auto_feature_status {
  PEAK_AUTO_FEATURE_STATUS_INVALID , PEAK_AUTO_FEATURE_STATUS_OFF , PEAK_AUTO_FEATURE_STATUS_DONE , PEAK_AUTO_FEATURE_STATUS_ACTIVE ,
  PEAK_AUTO_FEATURE_STATUS_STUCK
}
 Enumeration representing the status of an auto feature. More...
enum  peak_ptp_status {
  PEAK_PTP_STATUS_INVALID , PEAK_PTP_STATUS_INITIALIZING , PEAK_PTP_STATUS_FAULTY , PEAK_PTP_STATUS_DISABLED ,
  PEAK_PTP_STATUS_LISTENING , PEAK_PTP_STATUS_PRE_MASTER , PEAK_PTP_STATUS_MASTER , PEAK_PTP_STATUS_PASSIVE ,
  PEAK_PTP_STATUS_UNCALIBRATED , PEAK_PTP_STATUS_SLAVE
}
 Enumeration representing the status of PTP (Precision Time Protocol). More...

Functions

peak_access_status peak_Chunks_GetAccessStatus (peak_camera_handle hCam)
 Query the chunks access status.
peak_status peak_Chunks_Enable (peak_camera_handle hCam, peak_bool enabled)
 Control whether the chunk transmission is enabled or disabled.
peak_bool peak_Chunks_IsEnabled (peak_camera_handle hCam)
 Indicates whether chunks are enabled or disabled.
peak_status peak_Chunks_AutoUpdate_Enable (peak_camera_handle hCam, peak_bool enabled)
 Control whether the chunks auto update is enabled or disabled.
peak_bool peak_Chunks_AutoUpdate_IsEnabled (peak_camera_handle hCam)
 Indicates whether the chunks auto update is enabled or disabled.
peak_status peak_Chunks_Update (peak_camera_handle hCam, peak_frame_handle hFrame)
 Update the chunk data from the frame.
peak_access_status peak_Chunks_Type_GetAccessStatus (peak_camera_handle hCam, peak_chunks_type type)
 Query the chunk type's access status.
peak_status peak_Chunks_Type_Enable (peak_camera_handle hCam, peak_chunks_type type, peak_bool enabled)
 Control whether a specific chunk type is enabled or disabled.
peak_bool peak_Chunks_Type_IsEnabled (peak_camera_handle hCam, peak_chunks_type type)
 Indicates whether a specific chunk type is enabled or disabled.
peak_status peak_Chunks_Type_Supported_GetList (peak_camera_handle hCam, peak_chunks_type *chunksTypesSupported, size_t *chunksTypesSize)
 Get the list of supported chunk types.
peak_status peak_Chunks_FrameInfo_Get (peak_camera_handle hCam, peak_chunks_frame_info *data)
 Retrieves the frame information from chunk data, including pixel format and region of interest (ROI).
peak_status peak_Chunks_Exposure_Get (peak_camera_handle hCam, peak_chunks_exposure *data)
 Retrieves the exposure information from chunk data.
peak_status peak_Chunks_Gain_Get (peak_camera_handle hCam, peak_chunks_gain *data)
 Retrieves the gain information from chunk data, including analog master gain and digital gains for red, green, and blue channels.
peak_status peak_Chunks_Sequencer_Get (peak_camera_handle hCam, peak_chunks_sequencer *data)
 Retrieves the sequencer information from chunk data.
peak_status peak_Chunks_Timestamp_Get (peak_camera_handle hCam, peak_chunks_timestamp *data)
 Retrieves the timestamp information from chunk data.
peak_status peak_Chunks_ExposureTrigger_Get (peak_camera_handle hCam, peak_chunks_exposure_trigger *data)
 Retrieves the exposure trigger timestamp information from chunk data.
peak_status peak_Chunks_UsableROI_Get (peak_camera_handle hCam, peak_chunks_usable_roi *data)
 Retrieves the usable region of interest (ROI) information from chunk data.
peak_status peak_Chunks_LineStatus_Get (peak_camera_handle hCam, peak_chunks_line_status *data)
 Retrieves the status information of all lines from chunk data.
peak_status peak_Chunks_AutoFeature_Get (peak_camera_handle hCam, peak_chunks_autofeature *data)
 Retrieves the auto-feature information from chunk data.
peak_status peak_Chunks_PTPStatus_Get (peak_camera_handle hCam, peak_chunks_ptp_status *data)
 Retrieves the Precision Time Protocol (PTP) status information from chunk data.

Detailed Description

Chunks refer to blocks of metadata transmitted alongside image data.

These chunks contain information about the camera’s settings and operation, such as exposure time, gain, timestamps, and other control parameters.

They help provide context to the image data, allowing for more accurate processing and analysis. Chunks can be enabled or disabled as needed to optimize data transmission.

To use chunks the following steps are needed:

Check for support

Before using chunks, a check for support is advised as support depends on the camera type and version. Note that the PEAK_CAMERA_TYPE_UEYE_USB and PEAK_CAMERA_TYPE_UEYE_ETH cameras do not support chunks at all.

if (!PEAK_IS_SUPPORTED(accessStatus))
{
// error handling
}
// chunks are supported

Enable the chunks transmission

In the camera, the chunks transmission must be enabled before they are used:

{
// error handling
}
// chunks are enabled

Check for supported types

The support of each type depends on the camera support. To check for support, either use peak_Chunks_Type_GetAccessStatus or iterate through the list of supported types:

size_t size = 0;
{
// error handling
return;
}
peak_chunks_type* supportedList = (peak_chunks_type*)malloc(size * sizeof(peak_chunks_type));
if (supportedList == NULL)
{
// error handling
return;
}
if (PEAK_ERROR(peak_Chunks_Type_Supported_GetList(hCam, supportedList, &size)))
{
// error handling
free(supportedList);
return;
}
for (size_t i = 0; i < size; i++)
{
//do something e.g., filter, check for support
}
free(supportedList);

Enable a type

Enable a specific chunk type to receive it. This is done here for PEAK_CHUNKS_TYPE_TIMESTAMP as an example:

// Enable the timestamp chunk
{
// error handling
}

Update Mode

There are two ways in which the chunks can be updated. The mode can be changed by a call to peak_Chunks_AutoUpdate_Enable.

Note
The chunk data is cached. If chunks were enabled before this, older data may still be available.

Auto Update

This is the default mode.

With each call to peak_Acquisition_WaitForFrame the chunks are automatically updated if the frame contains chunk data.

Note
Chunk data for older frames can still be retrieved if peak_Chunks_Update is called beforehand.

Manual Update

In manual mode, the update must be carried out by a call to peak_Chunks_Update.

Acquire frame(s)

Start the image acquisition with peak_Acquisition_Start and wait for a frame with peak_Acquisition_WaitForFrame.

Retrieve chunk data

Each of the chunk type has a corresponding function for data retrieval. These are:

Chunk type Function for data retrieval Data type
PEAK_CHUNKS_TYPE_FRAME_INFO peak_Chunks_FrameInfo_Get peak_chunks_frame_info
PEAK_CHUNKS_TYPE_EXPOSURE peak_Chunks_Exposure_Get peak_chunks_exposure
PEAK_CHUNKS_TYPE_GAIN peak_Chunks_Gain_Get peak_chunks_gain
PEAK_CHUNKS_TYPE_SEQUENCER peak_Chunks_Sequencer_Get peak_chunks_sequencer
PEAK_CHUNKS_TYPE_TIMESTAMP peak_Chunks_Timestamp_Get peak_chunks_timestamp
PEAK_CHUNKS_TYPE_EXPOSURE_TRIGGER peak_Chunks_ExposureTrigger_Get peak_chunks_exposure_trigger
PEAK_CHUNKS_TYPE_USABLE_ROI peak_Chunks_UsableROI_Get peak_chunks_usable_roi
PEAK_CHUNKS_TYPE_LINE_STATUS peak_Chunks_LineStatus_Get peak_chunks_line_status
PEAK_CHUNKS_TYPE_AUTO_FEATURE_STATUS peak_Chunks_AutoFeature_Get peak_chunks_autofeature
PEAK_CHUNKS_TYPE_PTP_STATUS peak_Chunks_PTPStatus_Get peak_chunks_ptp_status

This is done as an example for peak_Chunks_Timestamp_Get, as shown below. The other types and their functions are interchangeable:

// Start the acquisition normally
{
// error handling
return;
}
// Get 10 frames
for (int i = 0; i < 10; i++)
{
peak_chunks_timestamp timestampChunk = { 0 };
// Wait for the frame. Before returning, the chunks will be updated.
if (PEAK_ERROR(peak_Acquisition_WaitForFrame(hCam, 1000, &hFrame)))
{
printf("Could not get frame %d\n", i);
continue;
}
// Get the timestamp chunk and print it
if (PEAK_SUCCESS(peak_Chunks_Timestamp_Get(hCam, &timestampChunk)))
{
printf("Timestamp for frame %d: %"PRIi64"\n", i, timestampChunk.timestamp);
}
else
{
printf("Could not get timestamp chunk data for frame %d", i);
}
if (PEAK_ERROR(peak_Frame_Release(hCam, hFrame)))
{
// error handling
}
}
{
// error handling
}

Sample output:

Timestamp for frame 0: 5183205018150
Timestamp for frame 1: 5183255018750
Timestamp for frame 2: 5183305019350
Timestamp for frame 3: 5183355019900
Timestamp for frame 4: 5183405020500
Timestamp for frame 5: 5183455021100
Timestamp for frame 6: 5183505021700
Timestamp for frame 7: 5183555022300
Timestamp for frame 8: 5183605022900
Timestamp for frame 9: 5183655023500

Newer chunk types currently not supported

If newer chunk types that are not supported by the current API version are required, they can be enabled and retrieved using the GFA interface.

Enumeration Type Documentation

◆ peak_auto_feature_status

Enumeration representing the status of an auto feature.

Since
1.13
Enumerator
PEAK_AUTO_FEATURE_STATUS_INVALID 

The auto feature status is invalid.

PEAK_AUTO_FEATURE_STATUS_OFF 

The auto feature is off.

PEAK_AUTO_FEATURE_STATUS_DONE 

The auto feature is done.

PEAK_AUTO_FEATURE_STATUS_ACTIVE 

The auto feature is active.

PEAK_AUTO_FEATURE_STATUS_STUCK 

The auto feature is stuck.

◆ peak_chunks_type

Enumeration for chunk types.

Since
1.13
Enumerator
PEAK_CHUNKS_TYPE_INVALID 

Invalid chunk type.

Use this value to initialize variables of type peak_chunks_type.

PEAK_CHUNKS_TYPE_FRAME_INFO 

Chunk type frame info, with the data type peak_chunks_frame_info

PEAK_CHUNKS_TYPE_EXPOSURE 

Chunk type exposure, with the data type peak_chunks_exposure

PEAK_CHUNKS_TYPE_GAIN 

Chunk type gain, with the data type peak_chunks_gain

PEAK_CHUNKS_TYPE_SEQUENCER 

Chunk type sequencer, with the data type peak_chunks_sequencer

PEAK_CHUNKS_TYPE_TIMESTAMP 

Chunk type sequencer, with the data type peak_chunks_sequencer

PEAK_CHUNKS_TYPE_EXPOSURE_TRIGGER 

Chunk type exposure trigger, with the data type peak_chunks_exposure_trigger

PEAK_CHUNKS_TYPE_USABLE_ROI 

Chunk type usable roi, with the data type peak_chunks_usable_roi

PEAK_CHUNKS_TYPE_LINE_STATUS 

Chunk type line status, with the data type peak_chunks_line_status

PEAK_CHUNKS_TYPE_AUTO_FEATURE_STATUS 

Chunk type auto feature status, with the data type peak_chunks_autofeature

PEAK_CHUNKS_TYPE_PTP_STATUS 

Chunk type ptp status, with the data type peak_chunks_ptp_status

◆ peak_ptp_status

Enumeration representing the status of PTP (Precision Time Protocol).

Since
1.13
Enumerator
PEAK_PTP_STATUS_INVALID 

The PTP status is invalid.

PEAK_PTP_STATUS_INITIALIZING 

PTP is initializing.

PEAK_PTP_STATUS_FAULTY 

An error occurred during synchronization to master. PTP is disabled.

PEAK_PTP_STATUS_DISABLED 

PTP is disabled.

PEAK_PTP_STATUS_LISTENING 

The camera is listening to messages from other PTP master devices.

PEAK_PTP_STATUS_PRE_MASTER 

The camera is PTP pre-master device.

PEAK_PTP_STATUS_MASTER 

The camera is the PTP master.

PEAK_PTP_STATUS_PASSIVE 

The camera is in PTP passive state.

PEAK_PTP_STATUS_UNCALIBRATED 

The camera is an uncalibrated PTP slave device.

PEAK_PTP_STATUS_SLAVE 

The camera is PTP slave device.

Function Documentation

◆ peak_Chunks_AutoFeature_Get()

peak_status peak_Chunks_AutoFeature_Get ( peak_camera_handle hCam,
peak_chunks_autofeature * data )

Retrieves the auto-feature information from chunk data.

This includes the status of the auto brightness and the auto white balance features. If the camera does not support all auto features, the corresponding status will be PEAK_AUTO_FEATURE_STATUS_INVALID.

Parameters
[in]hCamThe camera handle.
[out]dataPointer of type peak_chunks_autofeature where the auto feature information will be stored.
Returns
PEAK_STATUS_SUCCESS Operation was successful; auto-feature information retrieved.
PEAK_STATUS_INVALID_HANDLE The camera handle hCam is invalid.
PEAK_STATUS_NOT_INITIALIZED The library has not been initialized.
PEAK_STATUS_NOT_IMPLEMENTED The chunk type is not available. Check support with peak_Chunks_Type_GetAccessStatus.
PEAK_STATUS_ACCESS_DENIED The data for the chunk type is not readable. Check that the chunk mode is enabled, the chunk type is enabled and that the frame data is processed by either enabling auto update or a call to peak_Chunks_Update.
PEAK_STATUS_ERROR An unexpected internal error occurred.
Since
1.13

◆ peak_Chunks_AutoUpdate_Enable()

peak_status peak_Chunks_AutoUpdate_Enable ( peak_camera_handle hCam,
peak_bool enabled )

Control whether the chunks auto update is enabled or disabled.

This changes the behavior when the chunks are updated:

Parameters
[in]hCamThe camera handle.
[in]enabledThe desired auto update status. PEAK_TRUE for enabled, PEAK_FALSE for disabled.
Returns
PEAK_STATUS_SUCCESS Operation was successful; no error occurred.
PEAK_STATUS_ACCESS_DENIED Chunks are not available. Check the access status via peak_Chunks_GetAccessStatus.
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.
Since
1.13

◆ peak_Chunks_AutoUpdate_IsEnabled()

peak_bool peak_Chunks_AutoUpdate_IsEnabled ( peak_camera_handle hCam)

Indicates whether the chunks auto update is enabled or disabled.

When auto update is enabled, the chunks are updated with each call to peak_Acquisition_WaitForFrame. When auto update is disabled, the chunks must be updated by calling peak_Chunks_Update.

Parameters
[in]hCamThe camera handle.
Returns
PEAK_TRUE The chunks auto update feature is currently enabled.
PEAK_FALSE The chunks auto update feature is currently disabled or the query failed.
Since
1.13

◆ peak_Chunks_Enable()

peak_status peak_Chunks_Enable ( peak_camera_handle hCam,
peak_bool enabled )

Control whether the chunk transmission is enabled or disabled.

This controls whether the frame includes chunks or not. It must be enabled to use any chunk type. Each type that is to be transmitted must be enabled individually by calling peak_Chunks_Type_Enable.

Parameters
[in]hCamThe camera handle.
[in]enabledThe desired enabled status. PEAK_TRUE for enabled, PEAK_FALSE for disabled.
Returns
PEAK_STATUS_SUCCESS Operation was successful; no error occurred.
PEAK_STATUS_ACCESS_DENIED Chunks are not available. Check the access status via peak_Chunks_GetAccessStatus.
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.
Since
1.13

◆ peak_Chunks_Exposure_Get()

peak_status peak_Chunks_Exposure_Get ( peak_camera_handle hCam,
peak_chunks_exposure * data )

Retrieves the exposure information from chunk data.

Parameters
[in]hCamThe camera handle.
[out]dataPointer of type peak_chunks_exposure where the exposure information will be stored.
Returns
PEAK_STATUS_SUCCESS Operation was successful; exposure information retrieved.
PEAK_STATUS_INVALID_HANDLE The camera handle hCam is invalid.
PEAK_STATUS_NOT_INITIALIZED The library has not been initialized.
PEAK_STATUS_NOT_IMPLEMENTED The chunk type is not available. Check support with peak_Chunks_Type_GetAccessStatus.
PEAK_STATUS_ACCESS_DENIED The data for the chunk type is not readable. Check that the chunk mode is enabled, the chunk type is enabled and that the frame data is processed by either enabling auto update or a call to peak_Chunks_Update.
PEAK_STATUS_ERROR An unexpected internal error occurred.
Since
1.13

◆ peak_Chunks_ExposureTrigger_Get()

peak_status peak_Chunks_ExposureTrigger_Get ( peak_camera_handle hCam,
peak_chunks_exposure_trigger * data )

Retrieves the exposure trigger timestamp information from chunk data.

Parameters
[in]hCamThe camera handle.
[out]dataPointer of type peak_chunks_exposure_trigger where the exposure trigger timestamp information will be stored.
Returns
PEAK_STATUS_SUCCESS Operation was successful; exposure trigger timestamp information retrieved.
PEAK_STATUS_INVALID_HANDLE The camera handle hCam is invalid.
PEAK_STATUS_NOT_INITIALIZED The library has not been initialized.
PEAK_STATUS_NOT_IMPLEMENTED The chunk type is not available. Check support with peak_Chunks_Type_GetAccessStatus.
PEAK_STATUS_ACCESS_DENIED The data for the chunk type is not readable. Check that the chunk mode is enabled, the chunk type is enabled and that the frame data is processed by either enabling auto update or a call to peak_Chunks_Update.
PEAK_STATUS_ERROR An unexpected internal error occurred.
Since
1.13

◆ peak_Chunks_FrameInfo_Get()

peak_status peak_Chunks_FrameInfo_Get ( peak_camera_handle hCam,
peak_chunks_frame_info * data )

Retrieves the frame information from chunk data, including pixel format and region of interest (ROI).

Parameters
[in]hCamThe camera handle.
[out]dataPointer of type peak_chunks_frame_info where the frame information will be stored.
Returns
PEAK_STATUS_SUCCESS Operation was successful; frame information retrieved.
PEAK_STATUS_INVALID_HANDLE The camera handle hCam is invalid.
PEAK_STATUS_NOT_INITIALIZED The library has not been initialized.
PEAK_STATUS_NOT_IMPLEMENTED The chunk type is not available. Check support with peak_Chunks_Type_GetAccessStatus.
PEAK_STATUS_ACCESS_DENIED The data for the chunk type is not readable. Check that the chunk mode is enabled, the chunk type is enabled and that the frame data is processed by either enabling auto update or a call to peak_Chunks_Update.
PEAK_STATUS_ERROR An unexpected internal error occurred.
Since
1.13

◆ peak_Chunks_Gain_Get()

peak_status peak_Chunks_Gain_Get ( peak_camera_handle hCam,
peak_chunks_gain * data )

Retrieves the gain information from chunk data, including analog master gain and digital gains for red, green, and blue channels.

Note
If a channel is not available, it is indicated by a NaN value.
Parameters
[in]hCamThe camera handle.
[out]dataPointer of type peak_chunks_gain where the gain information will be stored.
Returns
PEAK_STATUS_SUCCESS Operation was successful; gain information retrieved.
PEAK_STATUS_INVALID_HANDLE The camera handle hCam is invalid.
PEAK_STATUS_NOT_INITIALIZED The library has not been initialized.
PEAK_STATUS_NOT_IMPLEMENTED The chunk type is not available. Check support with peak_Chunks_Type_GetAccessStatus.
PEAK_STATUS_ACCESS_DENIED The data for the chunk type is not readable. Check that the chunk mode is enabled, the chunk type is enabled and that the frame data is processed by either enabling auto update or a call to peak_Chunks_Update.
PEAK_STATUS_ERROR An unexpected internal error occurred.
Since
1.13

◆ peak_Chunks_GetAccessStatus()

peak_access_status peak_Chunks_GetAccessStatus ( peak_camera_handle hCam)

Query the chunks access status.

This function implements the Access Status Query principle.

Parameters
[in]hCamThe camera handle.
Returns
PEAK_ACCESS_READWRITE The feature is available for read access and for write access.
PEAK_ACCESS_READONLY The feature is supported but not available for change.
PEAK_ACCESS_NOT_SUPPORTED The feature is not supported.
PEAK_ACCESS_NONE The feature is not available.
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:

Since
1.13

◆ peak_Chunks_IsEnabled()

peak_bool peak_Chunks_IsEnabled ( peak_camera_handle hCam)

Indicates whether chunks are enabled or disabled.

Parameters
[in]hCamThe camera handle.
Returns
PEAK_TRUE Chunks are currently enabled.
PEAK_FALSE Chunks are currently disabled or the query failed.
Since
1.13

◆ peak_Chunks_LineStatus_Get()

peak_status peak_Chunks_LineStatus_Get ( peak_camera_handle hCam,
peak_chunks_line_status * data )

Retrieves the status information of all lines from chunk data.

Parameters
[in]hCamThe camera handle.
[out]dataPointer of type peak_chunks_line_status where the line status information will be stored.
Returns
PEAK_STATUS_SUCCESS Operation was successful; line status information retrieved.
PEAK_STATUS_INVALID_HANDLE The camera handle hCam is invalid.
PEAK_STATUS_NOT_INITIALIZED The library has not been initialized.
PEAK_STATUS_NOT_IMPLEMENTED The chunk type is not available. Check support with peak_Chunks_Type_GetAccessStatus.
PEAK_STATUS_ACCESS_DENIED The data for the chunk type is not readable. Check that the chunk mode is enabled, the chunk type is enabled and that the frame data is processed by either enabling auto update or a call to peak_Chunks_Update.
PEAK_STATUS_ERROR An unexpected internal error occurred.
Since
1.13

◆ peak_Chunks_PTPStatus_Get()

peak_status peak_Chunks_PTPStatus_Get ( peak_camera_handle hCam,
peak_chunks_ptp_status * data )

Retrieves the Precision Time Protocol (PTP) status information from chunk data.

Parameters
[in]hCamThe camera handle.
[out]dataPointer of type peak_chunks_ptp_status where the PTP status information will be stored.
Returns
PEAK_STATUS_SUCCESS Operation was successful; PTP status information retrieved.
PEAK_STATUS_INVALID_HANDLE The camera handle hCam is invalid.
PEAK_STATUS_NOT_INITIALIZED The library has not been initialized.
PEAK_STATUS_NOT_IMPLEMENTED The chunk type is not available. Check support with peak_Chunks_Type_GetAccessStatus.
PEAK_STATUS_ACCESS_DENIED The data for the chunk type is not readable. Check that the chunk mode is enabled, the chunk type is enabled and that the frame data is processed by either enabling auto update or a call to peak_Chunks_Update.
PEAK_STATUS_ERROR An unexpected internal error occurred.
Since
1.13

◆ peak_Chunks_Sequencer_Get()

peak_status peak_Chunks_Sequencer_Get ( peak_camera_handle hCam,
peak_chunks_sequencer * data )

Retrieves the sequencer information from chunk data.

This includes the active sequencer set for the frame.

Parameters
[in]hCamThe camera handle.
[out]dataPointer of type peak_chunks_sequencer where the sequencer information will be stored.
Returns
PEAK_STATUS_SUCCESS Operation was successful; sequencer information retrieved.
PEAK_STATUS_INVALID_HANDLE The camera handle hCam is invalid.
PEAK_STATUS_NOT_INITIALIZED The library has not been initialized.
PEAK_STATUS_NOT_IMPLEMENTED The chunk type is not available. Check support with peak_Chunks_Type_GetAccessStatus.
PEAK_STATUS_ACCESS_DENIED The data for the chunk type is not readable. Check that the chunk mode is enabled, the chunk type is enabled and that the frame data is processed by either enabling auto update or a call to peak_Chunks_Update.
PEAK_STATUS_ERROR An unexpected internal error occurred.
Since
1.13

◆ peak_Chunks_Timestamp_Get()

peak_status peak_Chunks_Timestamp_Get ( peak_camera_handle hCam,
peak_chunks_timestamp * data )

Retrieves the timestamp information from chunk data.

Parameters
[in]hCamThe camera handle.
[out]dataPointer of type peak_chunks_timestamp where the timestamp information will be stored.
Returns
PEAK_STATUS_SUCCESS Operation was successful; timestamp information retrieved.
PEAK_STATUS_INVALID_HANDLE The camera handle hCam is invalid.
PEAK_STATUS_NOT_INITIALIZED The library has not been initialized.
PEAK_STATUS_NOT_IMPLEMENTED The chunk type is not available. Check support with peak_Chunks_Type_GetAccessStatus.
PEAK_STATUS_ACCESS_DENIED The data for the chunk type is not readable. Check that the chunk mode is enabled, the chunk type is enabled and that the frame data is processed by either enabling auto update or a call to peak_Chunks_Update.
PEAK_STATUS_ERROR An unexpected internal error occurred.
Since
1.13

◆ peak_Chunks_Type_Enable()

peak_status peak_Chunks_Type_Enable ( peak_camera_handle hCam,
peak_chunks_type type,
peak_bool enabled )

Control whether a specific chunk type is enabled or disabled.

When a chunk type is enabled, it will be transmitted if chunks are generally enabled through peak_Chunks_Enable.

Parameters
[in]hCamThe camera handle.
[in]typeThe chunk type to enable or disable.
[in]enabledThe desired chunk enabled status. PEAK_TRUE for enabled, PEAK_FALSE for disabled.
Returns
PEAK_STATUS_SUCCESS Operation was successful; no error occurred.
PEAK_STATUS_ACCESS_DENIED Chunks are not available. Check the access status via peak_Chunks_GetAccessStatus.
PEAK_STATUS_INVALID_PARAMETER type is not a valid type.
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.
Since
1.13

◆ peak_Chunks_Type_GetAccessStatus()

peak_access_status peak_Chunks_Type_GetAccessStatus ( peak_camera_handle hCam,
peak_chunks_type type )

Query the chunk type's access status.

Use this function to check if a specific chunk type is supported. For a list of supported types, see peak_Chunks_Type_Supported_GetList.

This function implements the Access Status Query principle.

Parameters
[in]hCamThe camera handle.
[in]typeThe chunk type to check.
Returns
PEAK_ACCESS_READWRITE The feature is available for read access and for write access.
PEAK_ACCESS_READONLY The feature is supported but not available for change.
PEAK_ACCESS_NOT_SUPPORTED The feature is not supported.
PEAK_ACCESS_NONE The feature is not available.
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:

Since
1.13

◆ peak_Chunks_Type_IsEnabled()

peak_bool peak_Chunks_Type_IsEnabled ( peak_camera_handle hCam,
peak_chunks_type type )

Indicates whether a specific chunk type is enabled or disabled.

Parameters
[in]hCamThe camera handle.
[in]typeThe chunk type to check.
Returns
PEAK_TRUE The chunk type specified in type is enabled.
PEAK_FALSE The chunk type specified in type is disabled or the query failed.
Since
1.13

◆ peak_Chunks_Type_Supported_GetList()

peak_status peak_Chunks_Type_Supported_GetList ( peak_camera_handle hCam,
peak_chunks_type * chunksTypesSupported,
size_t * chunksTypesSize )

Get the list of supported chunk types.

The list of supported chunk types depends on the camera and interface technology.

This function implements the Two Staged Data Query principle.

Parameters
[in]hCamThe camera handle.
[out]chunksTypesSupportedPointer to a user allocated array buffer to receive the list of supported chunk types. If this parameter is NULL, chunksTypesSize will contain the current number of chunk types supported.
The required size of chunksTypesSupported in bytes is chunksTypesSize x sizeof(peak_chunks_type).
[in,out]chunksTypesSize
  • chunksTypesSupported equal NULL:
    out: minimal number of chunk types chunksTypesSupported must be large enough to hold
  • chunksTypesSupported unequal NULL:
    in: number of chunk types chunksTypesSupported can hold
    out: number of chunk types filled by the function
Returns
PEAK_STATUS_SUCCESS Operation was successful; no error occurred.
PEAK_STATUS_BUFFER_TOO_SMALL chunksTypesSupported is not NULL and the value of *chunksTypesSize is too small to receive the expected amount of data.
PEAK_STATUS_ACCESS_DENIED The chunks feature is not supported or the GFA write mode is enabled.
PEAK_STATUS_INVALID_PARAMETER chunksTypesSize 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.
Since
1.13

◆ peak_Chunks_Update()

peak_status peak_Chunks_Update ( peak_camera_handle hCam,
peak_frame_handle hFrame )

Update the chunk data from the frame.

Use this function when auto update is disabled and the chunk data needs to be updated. When the frame includes no chunk data, this function call will fail.

Note
If you use peak_Chunks_Update while auto update is enabled, the chunk data for this frame is only available until the next frame is received with peak_Acquisition_WaitForFrame.
Parameters
[in]hCamThe camera handle.
[in]hFrameThe frame with the chunk data to update.
Returns
PEAK_STATUS_SUCCESS Operation was successful; no error occurred.
PEAK_STATUS_INVALID_HANDLE hCam is an invalid camera handle.
PEAK_STATUS_INVALID_PARAMETER hFrame is not a valid frame.
PEAK_STATUS_NO_DATA hFrame has no chunk data.
PEAK_STATUS_NOT_INITIALIZED The library is not initialized.
PEAK_STATUS_ERROR An unexpected internal error occurred.
Since
1.13

◆ peak_Chunks_UsableROI_Get()

peak_status peak_Chunks_UsableROI_Get ( peak_camera_handle hCam,
peak_chunks_usable_roi * data )

Retrieves the usable region of interest (ROI) information from chunk data.

This is used for some cameras where invalid pixel values are transmitted and need to be cut out.

Parameters
[in]hCamThe camera handle.
[out]dataPointer of type peak_chunks_usable_roi where the usable ROI information will be stored.
Returns
PEAK_STATUS_SUCCESS Operation was successful; usable ROI information retrieved.
PEAK_STATUS_INVALID_HANDLE The camera handle hCam is invalid.
PEAK_STATUS_NOT_INITIALIZED The library has not been initialized.
PEAK_STATUS_NOT_IMPLEMENTED The chunk type is not available. Check support with peak_Chunks_Type_GetAccessStatus.
PEAK_STATUS_ACCESS_DENIED The data for the chunk type is not readable. Check that the chunk mode is enabled, the chunk type is enabled and that the frame data is processed by either enabling auto update or a call to peak_Chunks_Update.
PEAK_STATUS_ERROR An unexpected internal error occurred.
Since
1.13