Requirement to know data types before compilation is too restrictive in my opinion. Our C++ SDK discovers custom data types at runtime: https://onewayautomation.com/opcua-sdk