Classes
Methods
(async) connect(options) → {Promise.<boolean>}
Connect to a GNSS device using the most appropriate method
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>
getAvailableMethods(options) → {Array}
Get available connection methods
Parameters:
Name | Type | Description |
---|---|---|
options | Object | Connection options that may affect availability |
Returns:
- List of available connection handlers
- Type:
- Array
getConnectionInfo() → {Object}
Get connection status information
Returns:
- Connection status
- Type:
- Object
isDeviceConnected() → {boolean}
Check if device is connected
Returns:
- Whether device is connected
- Type:
- boolean
registerConnectionMethod(handler)
Register a connection handler
Parameters:
Name | Type | Description |
---|---|---|
handler | ConnectionHandler | The connection handler to register |
(async) sendData(data) → {Promise.<boolean>}
Send data to the connected device
Parameters:
Name | Type | Description |
---|---|---|
data | string | | Data to send |
Returns:
- Whether data was sent successfully
- Type:
- Promise.<boolean>