private String toStaticCallSerializationExpression(TypeDefinition baseType, Field field, List<Argument> serializerArguments, VariableLiteral vl, Tracer tracer) {
        tracer = tracer.dive("toStaticCallSerializationExpression");
        List<Term> args = vl.getArgs().orElseThrow(() -> new FreemarkerException("'STATIC_CALL' needs at least one attribute"));
        String functionName = args.get(0).asLiteral()
            .orElseThrow(() -> new FreemarkerException("Expecting the first argument of a 'STATIC_CALL' to be a Literal"))
            .asStringLiteral()
            .orElseThrow(() -> new FreemarkerException("Expecting the first argument of a 'STATIC_CALL' to be a StringLiteral"))
            .getValue();
        // But to make the function name unique, well add the driver prefix to it.
        StringBuilder sb = new StringBuilder(getCTypeName(functionName));
        sb.append("(");
        for (int i = 1; i < args.size(); i++) {
            Term arg = args.get(i);
            if (i > 1) {
                sb.append(", ");
            }
            if (arg instanceof VariableLiteral) {
                VariableLiteral va = (VariableLiteral) arg;
                // "io" and "_value" are always available in every parser.
                boolean isSerializerArg = "writeBuffer".equals(va.getName()) || "_value".equals(va.getName()) || "element".equals(va.getName());
                boolean isTypeArg = "_type".equals(va.getName());
                if (!isSerializerArg && !isTypeArg && serializerArguments != null) {
                    for (Argument serializerArgument : serializerArguments) {
                        if (serializerArgument.getName().equals(va.getName())) {
                            isSerializerArg = true;
                            break;
                        }
                    }
                }
                if (isSerializerArg) {
                    if ("_value".equals(va.getName())) {
                        sb.append("_message");
                    } else {
                        sb.append(va.getName());
                    }
                    if (va.getChild().isPresent()) {
                        sb.append("->");
                        appendVariableExpressionRest(sb, baseType, va.getChild().get());
                    }
                } else if (isTypeArg) {
                    String part = va.getChild().get().getName();
                    switch (part) {
                        case "name":
                            sb.append("\"").append(field.getTypeName()).append("\"");
                            break;
                        case "length":
                            sb.append("\"").append(((SimpleTypeReference) field).getSizeInBits()).append("\"");
                            break;
                        case "encoding":
                            if (!(field instanceof TypedField)) {
                                throw new FreemarkerException("'encoding' only supported for typed fields.");
                            }
                            TypedField typedField = (TypedField) field;
                            if (!(typedField.getType() instanceof StringTypeReference)) {
                                throw new FreemarkerException("Can only access 'encoding' for string types.");
                            }
                            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();
                            sb.append("\"").append(encoding).append("\"");
                            break;
                    }
                } else {
                    sb.append(toVariableSerializationExpression(baseType, field, va, null));
                }
            } else if (arg instanceof StringLiteral) {
                sb.append(((StringLiteral) arg).getValue());
            }
        }
        sb.append(")");
        return tracer + sb.toString();
    }
Ge the type-size suffix in case of simple types.

@param field the field we want to get the type-size for
@return a type-size string for the given field or an empty string if this does not apply
code-generation/language-c/src/main/java/org/apache/plc4x/language/c/CLanguageTemplateHelper.java