packToBytes method
Recalculates the bitmap and packs into a fresh buffer, the same sequence the Java encoder performs before writing to the channel.
Implementation
Uint8List packToBytes(IsoMsg message, {int maxMessageSize = 9999}) {
message.recalcBitMap();
final IsoBuffer buffer = IsoBuffer.allocate(maxMessageSize);
pack(message, buffer);
return buffer.toBytes();
}