QOpcUaExtensionObject#

The OPC UA ExtensionObject. More

Inheritance diagram of PySide6.QtOpcUa.QOpcUaExtensionObject

Synopsis#

Functions#

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

arg__1PySide6.QtOpcUa.QOpcUaExtensionObject

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

PySide6.QtCore.QByteArray

Returns the body of this extension object. It contains the encoded data.

See also

setEncodedBody()

PySide6.QtOpcUa.QOpcUaExtensionObject.encodedBodyRef()#
Return type

PySide6.QtCore.QByteArray

Returns a reference to the body of this extension object.

PySide6.QtOpcUa.QOpcUaExtensionObject.encoding()#
Return type

Encoding

Returns the encoding of the body.

See also

setEncoding()

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 .

PySide6.QtOpcUa.QOpcUaExtensionObject.__eq__(rhs)#
Parameters

rhsPySide6.QtOpcUa.QOpcUaExtensionObject

Return type

bool

Returns true if this extension object has the same value as rhs.

PySide6.QtOpcUa.QOpcUaExtensionObject.setBinaryEncodedBody(encodedBody, typeId)#
Parameters

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

encodedBodyPySide6.QtCore.QByteArray

Sets the body of this extension object to encodedBody.

See also

encodedBody()

PySide6.QtOpcUa.QOpcUaExtensionObject.setEncoding(encoding)#
Parameters

encodingEncoding

Sets the encoding of the body to encoding.

See also

encoding()

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

encodingTypeId()

PySide6.QtOpcUa.QOpcUaExtensionObject.setXmlEncodedBody(encodedBody, typeId)#
Parameters

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.