The Qt OPC UA data type generator
Starting with Qt 6.7, Qt OPC UA comes with a data type generator named qopcuaxmldatatypes2cpp which generates Qt OPC UA compatible C++ enumerations and data classes from enums and structured types in .bsd files.
The generator is a command line tool which can be controlled by the following argument:
Long | Short | Purpose |
---|---|---|
–input | -i | A .bsd file for which all contained enum and struct types will be generated. Can be used more than once to generate code for multiple models. |
–dependencyinput | -d | A dependency input .bsd file where only types required by a struct from an input file passed via —input will be generated. Can be used more than once to accommodate models with dependencies to multiple other models. |
–output | -o | The output directory where the generated files will be placed. |
–prefix | -p | The prefix for the generated file, enum and class names. The default value is GeneratedOpcUa. |
The following files are generated for each run:
- One .h file containing a namespace with all enumerated types
- One .h and one .cpp file for each structured type
- One .h and one .cpp file containing encoding and decoding methods
© 2024 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.