DiscoveryScanEngine

class DiscoveryScanEngine(radioController: RadioController, serviceRepository: ServiceRepository, nodeRepository: NodeRepository, radioConfigRepository: RadioConfigRepository, collectorRegistry: DiscoveryPacketCollectorRegistry, discoveryDao: DiscoveryDao, aiProvider: DiscoverySummaryAiProvider, applicationScope: ApplicationCoroutineScope, dispatchers: CoroutineDispatchers) : DiscoveryPacketCollector(source)

Core scan engine for Local Mesh Discovery.

Cycles through a queue of LoRa presets, dwells on each for a configured duration while collecting packets, then persists aggregated results via DiscoveryDao.

Constructors

Link copied to clipboard
constructor(radioController: RadioController, serviceRepository: ServiceRepository, nodeRepository: NodeRepository, radioConfigRepository: RadioConfigRepository, collectorRegistry: DiscoveryPacketCollectorRegistry, discoveryDao: DiscoveryDao, aiProvider: DiscoverySummaryAiProvider, applicationScope: ApplicationCoroutineScope, dispatchers: CoroutineDispatchers)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard
open override val isActive: Boolean
Link copied to clipboard

Functions

Link copied to clipboard
open suspend override fun onPacketReceived(meshPacket: MeshPacket, dataPacket: DataPacket)
Link copied to clipboard
fun reset()

Resets engine state after the UI has acknowledged completion.

Link copied to clipboard
suspend fun startScan(presets: List<ChannelOption>, dwellDurationSeconds: Long)

Convenience overload: scan a list of public presets (each becomes a preset ScanTarget labelled by name).

Link copied to clipboard
suspend fun startScanTargets(targets: List<ScanTarget>, dwellDurationSeconds: Long)

Starts a discovery scan across the given targets — public presets and/or beacon-advertised custom channels. (Distinct name from the ChannelOption overload: both would erase to the same JVM signature otherwise.)

Link copied to clipboard
suspend fun stopScan()

Stops the active scan and restores the home preset.