OPC UA 是用於工業應用程序數據建模和數據交換的協議。
OPC UA 服務器提供對由參考連接節點網格,組織數據的訪問。使用不同引用類型和包含元數據的節點,使客戶端能夠在無需提前知道其結構的情況下導航和解釋數據。
Each node has a unique identifier and attributes that can be read and written. Among others, there are 變量 nodes that store values and callable Method nodes with attached nodes describing parameters and return values. Notifications in case of events and monitoring of Variable nodes for value changes are offered too.
Complex objects can be created by combining nodes using references. Inheritance is also possible. OPC UA offers support for pre-made models that can be extended to fit special needs.
OPC UA is the platform-independent successor of OPC Classic intended for usage on all levels, from embedded sensors up to manufacturing execution and enterprise resource planning systems. It has a service-oriented architecture based on standardized messages for service requests and responses. There are different ways for these messages to be encoded and transported over the network. The most common way is binary encoding over TCP.
The following table summarizes the features of OPC UA that are supported by Qt OPC UA.
| 特徵 | Open62541 插件 | UACpp plugin |
|---|---|---|
| 讀取 | X | X |
| 批量讀取 | X | X |
| 寫入 | X | X |
| 批量寫入 | X | X |
| 多維數組 | X | X |
| 瀏覽 | X | X |
| 數據改變訂閱 | X | X |
| 事件訂閱 | X | X |
| 修改訂閱/監視項 | X | X |
| 方法調用 | X | X |
| 瀏覽路徑分辨率 | X | X |
| GetEndpoints | X | X |
| FindServers | X | X |
| NodeManagement | X | X |
A subset of the OPC UA data types is currently supported in Qt OPC UA. Most of them are available with all backends.
| 數據類型 | Open62541 插件 | UACpp plugin | Qt OPC UA data type |
|---|---|---|---|
| Int16, Int32, Int64 | X | X | 直接使用 |
| UInt16, UInt32, UInt64 | X | X | 直接使用 |
| Byte | X | X | quint8 |
| SByte | X | X | qint8 |
| 布爾 | X | X | 直接使用 |
| Double | X | X | 直接使用 |
| Float | X | X | 直接使用 |
| 字符串 | X | X | QString |
| LocalizedText | X | X | QOpcUaLocalizedText |
| DateTime | X | X | QDateTime |
| ByteString | X | X | QByteArray |
| XmlElement | X | X | QString |
| NodeId | X | X | QString |
| GUID | X | X | QUuid |
| QualifiedName | X | X | QOpcUaQualifiedName |
| StatusCode | X | X | QOpcUa::UaStatusCode |
| Range | X | X | QOpcUaRange |
| EUInformation | X | X | QOpcUaEUInformation |
| ComplexNumber | X | X | QOpcUaComplexNumber |
| DoubleComplexNumber | X | X | QOpcUaDoubleComplexNumber |
| AxisInformation | X | X | QOpcUaAxisInformation |
| XV | X | X | QOpcUaXValue |
| 自變量 | X | X | QOpcUaArgument |
| ExpandedNodeId | X | X | QOpcUaExpandedNodeId |
| ExtensionObject | X | X | QOpcUaExtensionObject |
Two important classes are exposed to the user: QOpcUaClient and QOpcUaNode .
Objects of both classes are owned by the user and must be deleted when they are no longer needed.
The following table summarizes the logging categories that are used by Qt OPC UA.
| 日誌類彆 | 描述 |
|---|---|
| qt.opcua | Plugin independent messages generated by QOpcUaProvider and QOpcUaClient |
| qt.opcua.plugins.open62541 | Messages generated by the open62541 plugin |
| qt.opcua.plugins.uacpp | Messages generated by the UACpp plugin |
The Qt OPC UA module is available under commercial licenses from Qt 公司 。此外,它在自由軟件許可下也是可用的。這些自由軟件許可是 GNU LGPL (次一般公共許可) 第 3 版 ,或 GNU GPL (一般公共許可) 第 2 版 。見 Qt 許可 進一步瞭解細節。
Qt OPC UA in Qt 5.15.17 may contain third party modules under following permissive licenses:
| Creative Commons CCZero 1.0 Universal License | |
| Mozilla 公共許可 2.0 |
Linking to external libraries involves licenses from the backend providers.
The Open62541 plugin is available under the same licenses as Qt OPC UA. The Open62541 library itself is licensed under Mozilla 公共許可第 2.0 版 .
The UA CPP plugin is available under commercial licenses from Qt 公司 。此外,它是可用的根據 GNU GPL (一般公共許可) 第 3 版 。UA CPP 庫本身可用於商業許可來自 Unified Automation .