QOpcUaExtensionObject#
The OPC UA ExtensionObject. More…
Synopsis#
Functions#
def
encodedBody
()def
encodedBodyRef
()def
encoding
()def
encodingTypeId
()def
__eq__
(rhs)def
setBinaryEncodedBody
(encodedBody, typeId)def
setEncodedBody
(encodedBody)def
setEncoding
(encoding)def
setEncodingTypeId
(encodingTypeId)def
setXmlEncodedBody
(encodedBody, typeId)
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
Detailed Description#
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.
- class PySide6.QtOpcUa.QOpcUaExtensionObject#
PySide6.QtOpcUa.QOpcUaExtensionObject(arg__1)
- Parameters:
Default constructs an extension object with no parameters set.
Constructs an extension object from rhs
.
- PySide6.QtOpcUa.QOpcUaExtensionObject.Encoding#
Enumerates the possible encodings of the body.
Constant
Description
QOpcUaExtensionObject.NoBody
QOpcUaExtensionObject.ByteString
QOpcUaExtensionObject.Xml
- PySide6.QtOpcUa.QOpcUaExtensionObject.encodedBody()#
- Return type:
Returns the body of this extension object. It contains the encoded data.
See also
- PySide6.QtOpcUa.QOpcUaExtensionObject.encodedBodyRef()#
- Return type:
Returns a reference to the body of this extension object.
Returns the encoding
of the body.
See also
- PySide6.QtOpcUa.QOpcUaExtensionObject.encodingTypeId()#
- Return type:
str
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 .
See also
- PySide6.QtOpcUa.QOpcUaExtensionObject.__eq__(rhs)#
- Parameters:
- Return type:
bool
Returns true
if this extension object has the same value as rhs
.
- PySide6.QtOpcUa.QOpcUaExtensionObject.setBinaryEncodedBody(encodedBody, typeId)#
- Parameters:
encodedBody –
PySide6.QtCore.QByteArray
typeId – str
Sets the body of this extension object to encodedBody
, sets the encoding of the body to ByteString
and sets the type id of the encoded data to typeId
.
- PySide6.QtOpcUa.QOpcUaExtensionObject.setEncodedBody(encodedBody)#
- Parameters:
encodedBody –
PySide6.QtCore.QByteArray
Sets the body of this extension object to encodedBody
.
See also
Sets the encoding of the body to encoding
.
See also
- PySide6.QtOpcUa.QOpcUaExtensionObject.setEncodingTypeId(encodingTypeId)#
- Parameters:
encodingTypeId – str
Sets the node id of the encoding for the type stored by this extension object to encodingTypeId
.
See also
- PySide6.QtOpcUa.QOpcUaExtensionObject.setXmlEncodedBody(encodedBody, typeId)#
- Parameters:
encodedBody –
PySide6.QtCore.QByteArray
typeId – str
Sets the body of this extension object to encodedBody
, sets the encoding of the body to Xml
and sets the type id of the encoded data to typeId
.