initialize method
Initialize the device manager by specifying its configuration
.
Implementation
@nonVirtual
void initialize(TDeviceConfiguration configuration) {
info(
'$runtimeType - Initializing, type: $typeName, configuration: $configuration');
super.configuration = configuration;
onInitialize(configuration);
// Listen to status events and when this device is (re)connected, restart sampling.
if (restartOnReconnect) {
statusEvents
.where((status) => status == DeviceStatus.connected)
.listen((_) => restart());
}
status = DeviceStatus.initialized;
}