@Override
    protected int doReadBytes(ByteBuf buf) throws Exception {
        if (!active) {
            return 0;
        }
        logger.debug("Trying to read bytes from wire...");
        int bytesRead = comPort.read(buf);
        logger.debug("Read {} bytes from the wire", bytesRead);
        return bytesRead;
    }
Create a new instance

@param parent the parent {@link Channel} by which this instance was created. May be {@code null}
@param ch     the underlying {@link SelectableChannel} on which it operates
plc4j/transports/serial/src/main/java/org/apache/plc4x/java/transport/serial/SerialChannel.java