MonitoringAndDiagnosticsConnection
A helper class that connects to a remote Bluetooth LE device using a CentralManager, and attaches MonitoringAndDiagnosticsProfile to it once connected.
This class owns the whole connection lifecycle: connecting, auto-reconnecting, and monitoring the bond state. Use it either:
with an existing CentralManager and Peripheral, e.g. a mock manager for testing, or one that isn't otherwise connected by the application, or
with a NativeAndroidEnvironment and a BluetoothDevice, for applications don't yet use Kotlin BLE Library.
Applications that already connect and manage their own Peripheral elsewhere should instead attach MonitoringAndDiagnosticsProfile directly to it, and don't need this class.
See also
Constructors
Creates a new instance of MonitoringAndDiagnosticsConnection with the given CentralManager and Peripheral.
Creates a new instance of MonitoringAndDiagnosticsConnection with the given NativeAndroidEnvironment and BluetoothDevice.
Types
Properties
The MAC address of the associated Peripheral.
The log sink for events produced by this connection and the attached MonitoringAndDiagnosticsProfile.
The Monitoring & Diagnostics Service profile, exposing no.nordicsemi.android.observability.data.ChunksEmitter.state and no.nordicsemi.android.observability.data.ChunksEmitter.chunks, decoupled from this connection.
The current state of the device, including the Bluetooth LE connection.