- class QOpcUaExtensionObject#
The OPC UA ExtensionObject. More…
Synopsis#
Methods#
def
__init__()
def
encodedBody()
def
encodedBodyRef()
def
encoding()
def
encodingTypeId()
def
__eq__()
def
setEncodedBody()
def
setEncoding()
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 Encoding#
Enumerates the possible encodings of the body.
Constant
Description
QOpcUaExtensionObject.NoBody
QOpcUaExtensionObject.ByteString
QOpcUaExtensionObject.Xml
- __init__()#
Default constructs an extension object with no parameters set.
- __init__(arg__1)
- Parameters:
arg__1 –
QOpcUaExtensionObject
Constructs an extension object from
rhs
.- encodedBody()#
- Return type:
Returns the body of this extension object. It contains the encoded data.
See also
- encodedBodyRef()#
- Return type:
Returns a reference to the body of this extension object.
Returns the
encoding
of the body.See also
- 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.05/NodeIds.csv .
See also
- __eq__(rhs)#
- Parameters:
rhs –
QOpcUaExtensionObject
- Return type:
bool
Returns
true
if this extension object has the same value asrhs
.- setBinaryEncodedBody(encodedBody, typeId)#
- Parameters:
encodedBody –
QByteArray
typeId – str
Sets the body of this extension object to
encodedBody
, sets the encoding of the body toByteString
and sets the type id of the encoded data totypeId
.- setEncodedBody(encodedBody)#
- Parameters:
encodedBody –
QByteArray
Sets the body of this extension object to
encodedBody
.See also
Sets the encoding of the body to
encoding
.See also
- setEncodingTypeId(encodingTypeId)#
- Parameters:
encodingTypeId – str
Sets the node id of the encoding for the type stored by this extension object to
encodingTypeId
.See also
- setXmlEncodedBody(encodedBody, typeId)#
- Parameters:
encodedBody –
QByteArray
typeId – str
Sets the body of this extension object to
encodedBody
, sets the encoding of the body toXml
and sets the type id of the encoded data totypeId
.