public String getReadBufferReadMethodCall(String logicalName, SimpleTypeReference simpleTypeReference, String valueString, TypedField field) {
        switch (simpleTypeReference.getBaseType()) {
            case BIT:
                String bitType = "bit";
                return "read_buffer.read_" + bitType + "(\"" + logicalName + "\"";
            case BYTE:
                String byteType = "byte";
                return "read_buffer.read_" + byteType + "(\"" + logicalName + "\"";
            case UINT:
                String unsignedIntegerType;
                IntegerTypeReference unsignedIntegerTypeReference = (IntegerTypeReference) simpleTypeReference;
                if (unsignedIntegerTypeReference.getSizeInBits() <= 4) {
                    unsignedIntegerType = "unsigned_byte";
                } else if (unsignedIntegerTypeReference.getSizeInBits() <= 8) {
                    unsignedIntegerType = "unsigned_short";
                } else if (unsignedIntegerTypeReference.getSizeInBits() <= 16) {
                    unsignedIntegerType = "unsigned_int";
                } else if (unsignedIntegerTypeReference.getSizeInBits() <= 32) {
                    unsignedIntegerType = "unsigned_long";
                } else {
                    unsignedIntegerType = "unsigned_long";
                }
                return "read_buffer.read_" + unsignedIntegerType + "(" + simpleTypeReference.getSizeInBits() + ", logical_name=\"" + logicalName + "\"";
            case INT:
                String integerType;
                if (simpleTypeReference.getSizeInBits() <= 8) {
                    integerType = "signed_byte";
                } else if (simpleTypeReference.getSizeInBits() <= 16) {
                    integerType = "short";
                } else if (simpleTypeReference.getSizeInBits() <= 32) {
                    integerType = "int";
                } else if (simpleTypeReference.getSizeInBits() <= 64) {
                    integerType = "long";
                } else {
                    integerType = "long";
                }
                return "read_buffer.read_" + integerType + "(" + simpleTypeReference.getSizeInBits() + ", logical_name=\"" + logicalName + "\"";
            case FLOAT:
                String floatType = (simpleTypeReference.getSizeInBits() <= 32) ? "float" : "double";
                return "read_buffer.read_" + floatType + "(" + simpleTypeReference.getSizeInBits() + ", logical_name=\"" + logicalName + "\"";
            case STRING:
            case VSTRING:
                String stringType = "str";
                final Term encodingTerm = field.getEncoding().orElse(new DefaultStringLiteral("UTF-8"));
                if (!(encodingTerm instanceof StringLiteral)) {
                    throw new FreemarkerException("Encoding must be a quoted string value");
                }
                String encoding = ((StringLiteral) encodingTerm).getValue();
                String length = Integer.toString(simpleTypeReference.getSizeInBits());
                if (simpleTypeReference.getBaseType() == SimpleTypeReference.SimpleBaseType.VSTRING) {
                    VstringTypeReference vstringTypeReference = (VstringTypeReference) simpleTypeReference;
                    length = toParseExpression(field, INT_TYPE_REFERENCE, vstringTypeReference.getLengthExpression(), null);
                }
                return "read_buffer.read_" + stringType + "(" + simpleTypeReference.getSizeInBits() + ", logical_name=\"" + logicalName + "\"";

            default:
                return "";
        }
    }
Gets a read buffer read method call for a simple type reference and a typed field.
The method will handle cases where the value string is present and in other cases it will default to the read buffer read method call without any arguments.

@param logicalName the logical name of the field
@param simpleTypeReference the simple type reference of the field
@param valueString the value string to be passed to the read buffer read method call
@param field the typed field
@return the read buffer read method call
code-generation/language-python/src/main/java/org/apache/plc4x/language/python/PythonLanguageTemplateHelper.java