ObservabilityManager

Class responsible for managing connection with the remote IoT device which supports Monitoring & Diagnostic Service.

The manager connects to the device and uploads all downloaded chunks to the cloud.

Data can be emitted any time so the connection should be maintained as long as needed.

See also

Types

Link copied to clipboard
object Companion
Link copied to clipboard
data class State(val state: ChunksEmitter.State = Disconnected, val uploadingState: ChunksUploader.State = Idle, val chunks: List<Chunk> = emptyList())

The state of the nRF Cloud Observability feature.

Properties

Link copied to clipboard
abstract val state: StateFlow<ObservabilityManager.State>

The state of the manager.

Functions

Link copied to clipboard
abstract fun connect(source: ChunksEmitter)

Function used to start collecting data from an ChunksEmitter and uploading them to nRF Cloud, powered by Memfault.

open fun connect(peripheral: Peripheral, required: Boolean = false)

Function used to start collecting observability data from the given Peripheral.

open fun connect(peripheral: Peripheral, centralManager: CentralManager)

Function used to connect to the given Peripheral using the given CentralManager, and start collecting observability data from it.

open fun connect(environment: NativeAndroidEnvironment, device: BluetoothDevice)

Function used to connect to the selected Bluetooth LE peripheral.

Link copied to clipboard
abstract fun disconnect()

Disconnects.