restoreLocalConfiguration

abstract suspend fun restoreLocalConfiguration(expectedDeviceAddress: String?, config: Config, primaryChannel: Channel? = null): Boolean(source)

Restores local radio settings only while expectedDeviceAddress is still selected.

The selection check and the edit-settings transaction are serialized with setDeviceAddress, so a delayed recovery task cannot apply one device's saved settings to a replacement radio. A concurrent device selection waits for the serialized edit-settings transaction to finish. primaryChannel is written before config when present, and both writes are idempotent for the same captured device/configuration so a failed attempt can be retried. If the channel write is accepted and the config write then fails, firmware may temporarily retain that staged channel state until the transaction is retried or the connection is replaced; callers must re-check selection ownership before every retry. Returns false without writing when expectedDeviceAddress is null or selection ownership has changed.