SupportedCapabilities

SupportedCapabilities

SupportedCapabilities class contains the supported capabilities of the scanner.

Constructor

# new SupportedCapabilities(capabilities)

Creates an instance of SupportedCapabilities.

Parameters:
Name Type Description
capabilities Object

The supported capabilities of the scanner.

Methods

# getCapability(capName)

Get the capability. Capability has the following properties: values, type, isReadOnly, isEnum, isMultiVal.

Parameters:
Name Type Description
capName string

capability name

Returns:

capability if available, otherwise returns undefined.

# hasCapability(capName)

Check the capability value. If the supportedCapabilities is not set, it will display warning and return false.

Parameters:
Name Type Description
capName string

capability name

Returns:

true if the capability is supported, false otherwise.

# isReadOnly(capName)

Checks if the capability is read only. If the supportedCapabilities is not set, it will display warning and return false.

Parameters:
Name Type Description
capName string

capability name

Returns:

true if the capability is read only, false otherwise.

# isSet()

Checks if the supportedCapabilities is set.

Returns:

true if the supportedCapabilities is set, false otherwise.

# isSupportedValue(capName, value)

Checks if the value is supported for the capability. If the supportedCapabilities is not set, it will display warning and return false.

Parameters:
Name Type Description
capName string

capability name

value *
Returns:

true if the value is supported, false otherwise.