runOutput method

Future<void> runOutput(
  1. DeviceOutputCommand cmd
)

Implementation

Future<void> runOutput(DeviceOutputCommand cmd) async {
  _ensureConnected();
  final matching = features.values.where((x) => x.hasOutput(cmd.outputType)).toList();
  if (matching.isEmpty) {
    throw ButtplugClientDeviceFeatureCapabilityException(
      '$name does not support ${cmd.outputType} commands',
    );
  }
  await _communicator.sendMessagesExpectOk(
    matching.map((feature) => feature.generateOutputCmd(cmd)).toList(),
  );
}