InputManager

Overview

Related Modules:

Input

Description:

Provides interfaces for managing input devices.

The interfaces can be used to perform basic operations on the input devices, such as opening and closing the device files and querying information about the input device.

Summary

Data Fields

Variable Name

Description

OpenInputDevice )(uint32_t devIndex)

int32_t( 

Opens a specified input device file.

CloseInputDevice )(uint32_t devIndex)

int32_t( 

Closes a specified input device file.

GetInputDevice )(uint32_t devIndex, DeviceInfo devInfo)

int32_t( 

Gets information about a specified input device.

GetInputDeviceList )(uint32_t devNum, DeviceInfo devList, uint32_t size)

int32_t(* 

Gets information about all input devices in the device list.

Details

Field Documentation

CloseInputDevice

  1. int32_t(* InputManager::CloseInputDevice) (uint32_t devIndex)

Description:

Closes a specified input device file.

Parameters:

Name

Description

devIndex Indicates the index of an input device. A maximum of 32 input devices are supported. The value ranges from 0 to 31, and value 0 represents the first input device.

Returns:

Returns 0 if the operation is successful; returns an error code defined in RetStatus otherwise.

GetInputDevice

  1. int32_t(* InputManager::GetInputDevice) (uint32_t devIndex, [DeviceInfo]($api-api-SmartVision-Devices-DeviceInfo.md) **devInfo)

Description:

Gets information about a specified input device.

Parameters:

Name

Description

devIndex Indicates the index of an input device. A maximum of 32 input devices are supported. The value ranges from 0 to 31, and value 0 represents the first input device.
devInfo Indicates the double pointer to information about the specified device. For details, see DeviceInfo.

Returns:

Returns 0 if the operation is successful; returns an error code defined in RetStatus otherwise.

GetInputDeviceList

  1. int32_t(* InputManager::GetInputDeviceList) (uint32_t *devNum, [DeviceInfo]($api-api-SmartVision-Devices-DeviceInfo.md) **devList, uint32_t size)

Description:

Gets information about all input devices in the device list.

Parameters:

Name

Description

devNum Indicates the pointer to the total number of input devices which have been registered.
devList Indicates the double pointer to information about all devices in the device list. For details, see DeviceInfo.
size Indicates the number of elements in the devList array.

Returns:

Returns 0 if the operation is successful; returns an error code defined in RetStatus otherwise.

OpenInputDevice

  1. int32_t(* InputManager::OpenInputDevice) (uint32_t devIndex)

Description:

Opens a specified input device file.

Parameters:

Name

Description

devIndex Indicates the index of an input device. A maximum of 32 input devices are supported. The value ranges from 0 to 31, and value 0 represents the first input device.

Returns:

Returns 0 if the operation is successful; returns an error code defined in RetStatus otherwise.