new Pairer(opts, adapter)
- Source:
Plugin to add and remove devices from bridge and model on pairing and unpairing.
Parameters:
| Name | Type | Description |
|---|---|---|
opts |
Object | General settings for Pairer plugin |
adapter |
Adapter | The adapter object associated with this Pairer plugin |
Members
adapter :Adapter
- Source:
The adapter instance
Type:
deviceFingerprintUtility :DeviceFingerprintUtility
- Source:
The instance of the DeviceFingerprintUtility that the Pairer can harness
Type:
Methods
clearNode(nodePath, propertiesopt) → {Promise}
- Source:
Nullifies properties on node for unpaired device
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
nodePath |
String | K4Model node to clear (node or path) |
|
properties |
Object |
<optional> |
Device properties to clear on K4Model |
Returns:
- Type
- Promise
constructDevice(devicePath) → {Device}
- Source:
Builds a bridge Device object from K4Model node
Parameters:
| Name | Type | Description |
|---|---|---|
devicePath |
String | The K4Model node for the device |
Returns:
The actual device object built by the bridge
- Type
- Device
constructTemporaryDevice(deviceClsName, deviceId) → {Device}
- Source:
Builds a bridge Device object from a K4Model Class Name (cls)
Parameters:
| Name | Type | Description |
|---|---|---|
deviceClsName |
String | The K4Model Class Name (cls) |
deviceId |
Number | The device id |
Returns:
The actual device object built by the bridge
- Type
- Device
setNode(nodePath, properties) → {Promise}
- Source:
Populates properties on node for paired device
Parameters:
| Name | Type | Description |
|---|---|---|
nodePath |
String | K4Model node to populate (node or path) |
properties |
Object | The device properties to set on K4Model |
Returns:
- Type
- Promise
shouldConfigureOnPair(nodePath)
- Source:
Checks if device should be configured on pairing
Parameters:
| Name | Type | Description |
|---|---|---|
nodePath |
String | K4Model node for desired device |