mapper.device()
mapper.device(param_table)
This function opens a device and generate a Device object.
Parameters
Parameter | Type | Description |
---|---|---|
param_table | table | This parameter is in associative array table format, meaning it's specified by keys rather than parameter positions. See the Parameters Table section. |
Parameters Table
Key | Type | Description |
---|---|---|
name | string | User-assigned name for the Device object. This parameter is required. |
type | string | Device type*. This parameter is required. |
identifier | table | Specifies the information for device identification*. This parameter is required. |
options | table | Specifies the option parameters* for device opening. This parameter is optional. |
modifiers | table | Event 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
Key | Type | Description |
---|---|---|
name | string | Specifies 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. |
class | string | Specifies 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. |
modtype | string | Modifier type. It specifies eather of raw , button , or incdec . |
modparam | table | Options 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.