packCommands function

Uint8List packCommands(
  1. Iterable<AtemCommand> commands
)

Packs multiple commands into a single packet payload.

Implementation

Uint8List packCommands(Iterable<AtemCommand> commands) {
  final buffer = BytesBuilder();
  for (final cmd in commands) {
    buffer.add(cmd.toBytes());
  }
  return buffer.toBytes();
}