Qt OPC UA データ型ジェネレーター

Qt 6.7 以降、Qt OPC UA には、qopcuaxmldatatypes2cpp というデータ型ジェネレータが付属しています。このジェネレータは、.bsd ファイルの列挙型と構造化型から、Qt OPC UA 互換の C++ 列挙型とデータクラスを生成します。

このジェネレータはコマンドラインツールで、次の引数で制御できます:

Longショート目的
-入力-ienum型とstruct型がすべて生成される.bsdファイル。複数のモデルのコードを生成するために複数回使用することができます。
-依存性入力-d-input経由で渡された入力ファイルから構造体が必要とする型のみが生成される依存関係入力.bsdファイル。他の複数のモデルに依存するモデルに対応するために、複数回使用することができます。
-出力-o生成されたファイルが置かれる出力ディレクトリ。
-接頭辞-p生成されるファイル、列挙型、およびクラス名の接頭辞。デフォルト値はGeneratedOpcUa です。

実行ごとに以下のファイルが生成されます:

  • すべての列挙型を含む名前空間を含む.h ファイル 1 つ。
  • 構造化型ごとに.h ファイルと.cpp ファイルが 1 つずつ生成されます。
  • エンコード・メソッドとデコード・メソッドを含む.h ファイルと.cpp ファイル。

© 2025 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.