The OPC UA ExtensionObject. 更多...
| 頭: | #include <QOpcUaExtensionObject> |
| qmake: | QT += opcua |
| enum | 編碼 { NoBody, ByteString, Xml } |
| QOpcUaExtensionObject (const QOpcUaExtensionObject & rhs ) | |
| QOpcUaExtensionObject & | operator= (const QOpcUaExtensionObject & rhs ) |
| QByteArray | encodedBody () const |
| QByteArray & | encodedBodyRef () |
| QOpcUaExtensionObject::Encoding | encoding () const |
| QString | encodingTypeId () const |
| void | setBinaryEncodedBody (const QByteArray & encodedBody , const QString & typeId ) |
| void | setEncodedBody (const QByteArray & encodedBody ) |
| void | setEncoding (QOpcUaExtensionObject::Encoding encoding ) |
| void | setEncodingTypeId (const QString & encodingTypeId ) |
| void | setXmlEncodedBody (const QByteArray & encodedBody , const QString & typeId ) |
| QVariant | operator QVariant () const |
| bool | operator== (const QOpcUaExtensionObject & rhs ) const |
This is the Qt OPC UA representation for an extension object. Extension objects are used as a container in OPC UA whenever a non-builtin type is stored in a Variant. It contains information about the type and encoding of the data as well as the data itself encoded with one of the encodings specified in OPC-UA part 6. Decoders are supposed to decode extension objects if they can handle the type. If the type is not supported by the decoder, the extension object is not decoded and decoding is left to the user.
Enumerates the possible encodings of the body.
| 常量 | 值 |
|---|---|
QOpcUaExtensionObject::NoBody
|
0
|
QOpcUaExtensionObject::ByteString
|
1
|
QOpcUaExtensionObject::Xml
|
2
|
Constructs an extension object from rhs .
設置值從 rhs in this extension object.
Returns the body of this extension object. It contains the encoded data.
另請參閱 setEncodedBody ().
Returns a reference to the body of this extension object.
返迴 encoding of the body.
另請參閱 setEncoding ().
Returns the node id of the encoding for the type stored by this extension object, for example ns=0;i=886 for Range_Encoding_DefaultBinary. All encoding ids are listed in https://opcfoundation.org/UA/schemas/1.03/NodeIds.csv .
另請參閱 setEncodingTypeId ().
Sets the body of this extension object to encodedBody , sets the encoding of the body to Encoding::ByteString and sets the type id of the encoded data to typeId .
該函數在 Qt 5.13 引入。
另請參閱 setEncodedBody (), setEncoding (),和 setEncodingTypeId ().
Sets the body of this extension object to encodedBody .
另請參閱 encodedBody ().
Sets the encoding of the body to encoding .
另請參閱 encoding ().
Sets the node id of the encoding for the type stored by this extension object to encodingTypeId .
另請參閱 encodingTypeId ().
Sets the body of this extension object to encodedBody , sets the encoding of the body to Encoding::Xml and sets the type id of the encoded data to typeId .
該函數在 Qt 5.13 引入。
另請參閱 setEncodedBody (), setEncoding (),和 setEncodingTypeId ().
Converts this extension object to QVariant .
返迴
true
if this extension object has the same value as
rhs
.