Classes
Methods
(async) connect(options) → {Promise.<boolean>}
Connect to a device
Parameters:
Name | Type | Description |
---|---|---|
options | Object | Connection options |
Returns:
- Whether connection was successful
- Type:
- Promise.<boolean>
(async) disconnect() → {Promise.<void>}
Disconnect from the device
Returns:
- Type:
- Promise.<void>
getDeviceInfo() → {Object}
Get information about the connected device
Returns:
- Device information
- Type:
- Object
getPriority(options) → {number}
Get priority level for this connection method
Parameters:
Name | Type | Description |
---|---|---|
options | Object | Connection options that may affect priority |
Returns:
- Priority level (higher = try first)
- Type:
- number
isAvailable() → {boolean}
Check if this connection method is available
Returns:
- Whether this method is available
- Type:
- boolean
(async) sendData(data) → {Promise.<boolean>}
Send data to the device
Parameters:
Name | Type | Description |
---|---|---|
data | string | | Data to send |
Returns:
- Whether data was sent successfully
- Type:
- Promise.<boolean>