runOutput method

Future<void> runOutput(
  1. DeviceOutputCommand cmd
)

Implementation

Future<void> runOutput(DeviceOutputCommand cmd) async {
  var msgs = features.values
      .where((x) => x.feature.output != null && x.feature.output!.containsKey(cmd.outputType))
      .map((x) => x.generateOutputCmd(cmd))
      .toList();
  if (msgs.isEmpty) {
    throw ButtplugClientDeviceException("$name does not support ${cmd.outputType} commands");
  }
  await _communicator.sendMessagesExpectOk(msgs);
}