run method Null safety
override
Runs this command.
The return value is wrapped in a Future
if necessary and returned by
CommandRunner.runCommand.
Implementation
@override
void run() async {
Loggy.initLoggy(
logPrinter: const PrettyPrinter(
showColors: false,
),
logOptions: OnvifUtil.convertToLogOptions(globalResults!['log-level']));
final timeout = int.parse(argResults!['timeout']);
if (timeout < 1) {
throw UsageException(
'API usage error:', 'timeout must be greater than zero');
}
final multicastProbe = MulticastProbe();
await multicastProbe.probe();
print(multicastProbe.onvifDevices);
}