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

Copy
BOOL RtgvInitCameraControl(
    [in]    HANDLE cameraHandle, 
    [in]    UINT32 controlIPAddress, 
    [in]    UINT32 controlPort, 
    [in]    UINT32 heartbeatTimeout, 
    [in]    UINT32 heartbeatsPerPeriod, 
    [in]    BOOL writePrivileges
);

Parameters

[in] cameraHandle

A handle to the camera to use to start a control channel.

[in] controlIPAddress

The local IPv4 address of a wRTOS NIC used to send and receive control messages to and from the camera.

[in] controlPort

The local port used to send and receive control messages to and from the camera

[in] heartbeatTimeout

The heartbeat timeout, in milliseconds, to set on the camera. This parameter and heartbeatsPerPeriod affect how often a timer thread will send heartbeats to the camera.

[in] 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.

[in] writePrivileges

Indicates whether privileges to write to the camera’s registers should be included. When set to FALSE, the 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

If the function succeeds, it returns TRUE. If the function fails, it returns FALSE. Call GetLastError to obtain an error code.

Remarks

This function cannot be called before calling RtgvInitialize.

This function must be called before any GigE Vision get functions (such as RtgvGetFrameWidth, RtgvGetPayloadSize), RtgvStartCameraStream, RtgvStartStream, or RtgvSendTrigger are called.

Requirements

Minimum supported version Header Library

wRTOS 1.0 SDK

RtgvApi.h

RtgvApi.lib

See Also: