![]() |
IDS peak comfortC v1.12.0
|
Bandwidth related functions and types. More...
Topics | |
| Link speed constants | |
| Common constants for the link speed. | |
Functions | |
| peak_access_status | peak_Bandwidth_LinkSpeed_GetAccessStatus (peak_camera_handle hCam) |
| Query the link speed access status. | |
| peak_status | peak_Bandwidth_LinkSpeed_Get (peak_camera_handle hCam, int64_t *linkSpeed_Bps) |
| Get the link speed. | |
| peak_access_status | peak_Bandwidth_ThroughputLimit_GetAccessStatus (peak_camera_handle hCam) |
| Query the throughput limit access status. | |
| peak_status | peak_Bandwidth_ThroughputLimit_GetRange (peak_camera_handle hCam, int64_t *minThroughputLimit_Bps, int64_t *maxThroughputLimit_Bps, int64_t *incThroughputLimit_Bps) |
| Get the current range of valid throughput limit values. | |
| peak_status | peak_Bandwidth_ThroughputLimit_Set (peak_camera_handle hCam, int64_t throughputLimit_Bps) |
| Set the throughput limit. | |
| peak_status | peak_Bandwidth_ThroughputLimit_Get (peak_camera_handle hCam, int64_t *throughputLimit_Bps) |
| Get the throughput limit. | |
| peak_access_status | peak_Bandwidth_ThroughputFrameRateLimit_GetAccessStatus (peak_camera_handle hCam) |
| Query the throughput frame rate limit access status. | |
| peak_status | peak_Bandwidth_ThroughputFrameRateLimit_Get (peak_camera_handle hCam, double *throughputFrameRateLimit_fps) |
| Get the throughput frame rate limit. | |
| peak_access_status | peak_Bandwidth_ThroughputCalculated_GetAccessStatus (peak_camera_handle hCam) |
| Query the throughput calculated access status. | |
| peak_status | peak_Bandwidth_ThroughputCalculated_Get (peak_camera_handle hCam, int64_t *throughputCalculated_Bps) |
| Get the throughput calculated. | |
Bandwidth related functions and types.
Bandwidth control involves regulating the rate at which data is transferred from the camera to the host, ensuring that the data does not exceed the network's capacity, and optimizing performance to prevent issues like data congestion, frame loss, and latency. This is essential for maintaining precise image capture and smooth operation in industrial applications.
The maximum data transfer rate negotiated between the camera and the network after connection. It helps determine if the camera is connected via SuperSpeed or Hi-Speed USB for USB cameras or the network speed for ethernet cameras.
The following example shows how to check the camera link speed and compare it with the nominal interface speed.
The throughput has the following parameters:
Specifies the maximum frame rate achievable with the bandwidth set by ThroughputLimit.
The calculated theoretical bandwidth for the data stream based on current settings, but actual bandwidth is limited by the ThroughputLimit.
Sets an upper limit to the bandwidth for data sent from the camera. For GigE Vision cameras, it calculates packet delays and the maximum achievable frame rate. For USB 3 cameras, it can make data transfer via USB2 possible but may reduce sensor readout speed and increase rolling shutter effects, especially with high image widths. In general, using the ThroughputLimit allows precise and intuitive bandwidth control, ensuring optimal data transfer rates while balancing performance and stability.
The following sample sets the throughput limit to half the possible value and sets the corresponding framerate if it is supported by the camera model:
| peak_status peak_Bandwidth_LinkSpeed_Get | ( | peak_camera_handle | hCam, |
| int64_t * | linkSpeed_Bps ) |
Get the link speed.
Read the maximum data transfer rate negotiated between the camera and the network after connection. For a list of possible values see Link speed constants.
This value is informative only and shouldn't be set with peak_Bandwidth_ThroughputLimit_Set
| [in] | hCam | The camera handle. |
| [out] | linkSpeed_Bps | The link speed in bytes per second. |
linkSpeed_Bps is an invalid pointer. hCam is an invalid camera handle. | peak_access_status peak_Bandwidth_LinkSpeed_GetAccessStatus | ( | peak_camera_handle | hCam | ) |
Query the link speed access status.
Provides the current access status for the link speed control.
This function implements the Access Status Query principle.
| [in] | hCam | The camera handle. |
If the function indicates an error by returning PEAK_ACCESS_INVALID, these are the possible errors:
hCam is an invalid camera handle. | peak_status peak_Bandwidth_ThroughputCalculated_Get | ( | peak_camera_handle | hCam, |
| int64_t * | throughputCalculated_Bps ) |
Get the throughput calculated.
The calculated theoretical bandwidth for the data stream based on current settings, but actual bandwidth is limited by the ThroughputLimit.
| [in] | hCam | The camera handle. |
| [out] | throughputCalculated_Bps | The throughput calculated in bytes per second. |
throughputCalculated_Bps is an invalid pointer. hCam is an invalid camera handle. | peak_access_status peak_Bandwidth_ThroughputCalculated_GetAccessStatus | ( | peak_camera_handle | hCam | ) |
Query the throughput calculated access status.
Provides the current access status for the throughput calculated control.
This function implements the Access Status Query principle.
| [in] | hCam | The camera handle. |
If the function indicates an error by returning PEAK_ACCESS_INVALID, these are the possible errors:
hCam is an invalid camera handle. | peak_status peak_Bandwidth_ThroughputFrameRateLimit_Get | ( | peak_camera_handle | hCam, |
| double * | throughputFrameRateLimit_fps ) |
Get the throughput frame rate limit.
Specifies the maximum frame rate achievable with the bandwidth set by ThroughputLimit.
| [in] | hCam | The camera handle. |
| [out] | throughputFrameRateLimit_fps | The throughput frame rate limit in frames per second. |
throughputFrameRateLimit_Bps is an invalid pointer. hCam is an invalid camera handle. | peak_access_status peak_Bandwidth_ThroughputFrameRateLimit_GetAccessStatus | ( | peak_camera_handle | hCam | ) |
Query the throughput frame rate limit access status.
Provides the current access status for the throughput frame rate limit control.
This function implements the Access Status Query principle.
| [in] | hCam | The camera handle. |
If the function indicates an error by returning PEAK_ACCESS_INVALID, these are the possible errors:
hCam is an invalid camera handle. | peak_status peak_Bandwidth_ThroughputLimit_Get | ( | peak_camera_handle | hCam, |
| int64_t * | throughputLimit_Bps ) |
Get the throughput limit.
Gets the current upper limit to the bandwidth for data sent from the camera.
| [in] | hCam | The camera handle. |
| [out] | throughputLimit_Bps | The throughput limit in bytes per second. |
throughputLimit_Bps is an invalid pointer. hCam is an invalid camera handle. | peak_access_status peak_Bandwidth_ThroughputLimit_GetAccessStatus | ( | peak_camera_handle | hCam | ) |
Query the throughput limit access status.
Provides the current access status for the throughput limit control.
This function implements the Access Status Query principle.
| [in] | hCam | The camera handle. |
If the function indicates an error by returning PEAK_ACCESS_INVALID, these are the possible errors:
hCam is an invalid camera handle. | peak_status peak_Bandwidth_ThroughputLimit_GetRange | ( | peak_camera_handle | hCam, |
| int64_t * | minThroughputLimit_Bps, | ||
| int64_t * | maxThroughputLimit_Bps, | ||
| int64_t * | incThroughputLimit_Bps ) |
Get the current range of valid throughput limit values.
Queries the range of valid values for the throughput limit control.
The range of valid throughput limit values may depend on the camera configuration and the camera status.
| [in] | hCam | The camera handle. |
| [out] | minThroughputLimit_Bps | The minimum throughput limit in bytes per second. |
| [out] | maxThroughputLimit_Bps | The maximum throughput limit in bytes per second. |
| [out] | incThroughputLimit_Bps | The throughput limit increment in bytes per second. |
minThroughputLimit_Bps, maxThroughputLimit_Bps, and incThroughputLimit_Bps is an invalid pointer. hCam is an invalid camera handle. | peak_status peak_Bandwidth_ThroughputLimit_Set | ( | peak_camera_handle | hCam, |
| int64_t | throughputLimit_Bps ) |
Set the throughput limit.
Sets the upper limit for the bandwidth used for data sent from the camera. The possible range can be retrieved by calling peak_Bandwidth_ThroughputLimit_GetRange.
| [in] | hCam | The camera handle. |
| [in] | throughputLimit_Bps | The throughput limit to set in bytes per second. |
throughputLimit_Bps is out of range. Check the range of valid values via peak_Bandwidth_ThroughputLimit_GetRange. hCam is an invalid camera handle.