Skip to main content

mapper.device()

mapper.device(param_table)

This function opens a device and generate a Device object.

Parameters

ParameterTypeDescription
param_tabletableThis parameter is in associative array table format, meaning it's specified by keys rather than parameter positions. See the Parameters Table section.

Parameters Table

KeyTypeDescription
namestringUser-assigned name for the Device object.
This parameter is required.
typestringDevice type*.
This parameter is required.
identifiertableSpecifies the information for device identification*.
This parameter is required.
optionstableSpecifies the option parameters* for device opening.
This parameter is optional.
modifierstableEvent Modifier array.
It specifies the array table of Event Modifier Definition table.
This parameter is optional
*note

The notation for the values specified in type, identifier, and options varies for each device type. Refer to the Built-in Devices section for details on built-in devices. For plugin devices, please refer to the plugin's documentation.

Event Modifier Definition

KeyTypeDescription
namestringSpecifies the name of the Device Unit** targeted by the modifier.
This parameter and class are mutually exclusive.
If an Event Modifier is simultaneously defined for the class associated with the Device Unit specified by this parameter, the Event Modifier specified by the name takes precedence.
classstringSpecifies when applying the same modifier to multiple Device Units with similar characteristics.
It specifies one of the following: binary for units with binary value ranges, absolute for units with absolute value ranges, or relative for units with relative value ranges.
This parameter and name are mutually exclusive.
modtypestringModifier type.
It specifies eather of raw, button, or incdec.
modparamtableOptions specific to the modifier.
For detailed information, refer to the Event Modifier Specification.
**note

The naming convention of the Device Unit varies for each device type. Refer to the Built-in Devices section for details on built-in devices. For plugin devices, please refer to the plugin's documentation.

Return Values

This function returns a Device object corresponding to the specified device.

See Also