RtGVInitCameraControl
RtGVInitCameraControl starts a control channel with a camera, which allows you to query and control the camera for such uses as retrieving the width of the image on the camera (using RtGVGetFrameWidth), or starting an image stream on the camera (using RtGVStartStream or RtGVStartCameraStream).
Syntax
BOOL RtGVInitCameraControl( HANDLE cameraHandle, UINT32 controlIPAddress, UINT32 controlPort, UINT32 heartbeatTimeout, UINT32 heartbeatsPerPeriod, BOOL writePrivileges );
Parameters
cameraHandle
A handle to the camera to use to start a control channel.
controlIPAddress
The local IPv4 address of an RTX64 NIC used to send and receive control messages to and from the camera.
controlPort
The local port used to send and receive control messages to and from the camera
heartbeatTimeout
The heartbeat timeout (in milliseconds) to set on the camera. This parameter, along with heartbeatsPerPeriod, affects how often a timer thread will send heartbeats to the camera.
heartbeatsPerPeriod
The number of heartbeats to send per period. This parameter, along with heartbeatTimeout, affects how often a timer thread will send heartbeats to the camera.
NOTE: This cannot be set to 0, and should be set higher than 1 (number of heartbeats per heartbeatTimeout period) if there is a concern that packets may be dropped. If this is set to 0, the call fails with ERROR_INVALID_PARAMETER.
writePrivileges
Indicates whether or not to include privileges to write to the camera’s registers. When set to FALSE, parameters heartbeatTimeout and heartbeatsPerPeriod are ignored.
NOTE: When set to FALSE, functions RtGVStartCameraStream, RtGVStartStream, and RtGVSendTrigger should not be called, as these require write privileges.
Return Values
Returns TRUE if the function succeeds, FALSE if the function fails. Call GetLastError for extended error information.
Remarks
This function cannot be called before calling RtGVInitialize.
This function must be called before any RtGigEVision get functions (such as RtGVGetFrameWidth, RtGVGetPayloadSize), RtGVStartCameraStream, RtGVStartStream, or RtGVSendTrigger are called.
Requirements
Minimum Supported Version | RTX64 3.7 Vision SDK |
Header |
RtGVApi.h |
Library |
RtGigEVision.lib |