@Override
        public ModbusAsciiADU parse(ReadBuffer io) throws ParseException {
            // A Modbus ASCII message starts with an ASCII character ":" and is ended by two characters CRLF
            // (Carriage-Return + Line-Feed)
            // The actual payload is that each byte of the message is encoded by a string representation of it's
            // two hex-digits.
            final short startChar = io.readShort(8);
            // Check if the message starts with the ":" char.
            if(startChar != 0x3A) {
                throw new ParseException(String.format("Expected starting ':' character but got %c", startChar));
            }
            // Read in all the bytes in the message.
            final ReadBufferByteBased bufferByteBased = (ReadBufferByteBased) io;
            // Read in all bytes except the last two ones, which contain a carriage-return and line-break.
            final byte[] bytes = bufferByteBased.getBytes(bufferByteBased.getPos(), bufferByteBased.getTotalBytes() - 2);
            // Convert the bytes into a string (Which is the hex-encoded message)
            final String inputString = new String(bytes, StandardCharsets.UTF_8);
            // Decode the encoded string back into a byte-array.
            try {
                final byte[] decodedBytes = Hex.decodeHex(inputString);
                // Parse the now decoded bytes as normal Message.
                final ReadBufferByteBased readBuffer = new ReadBufferByteBased(decodedBytes);
                return (ModbusAsciiADU) ModbusAsciiADU.staticParse(readBuffer, DriverType.MODBUS_ASCII, true);
            } catch (DecoderException e) {
                throw new ParseException(String.format("Error parsing incoming message: %s", inputString), e);
            }
        }
Consumes all Bytes until the starting character ":" is found
plc4j/drivers/modbus/src/main/java/org/apache/plc4x/java/modbus/ascii/ModbusAsciiDriver.java