- class QOpcUaVariant#
The OPC UA Variant. More…
New in version 6.7.
Synopsis#
Methods#
def
__init__()
def
isArray()
def
__ne__()
def
setValue()
def
swap()
def
type()
def
value()
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#
The OPC UA variant is an union of all built-in OPC UA types and also contains information about the array dimensions associated with the value. This class is currently only supported by
QOpcUaBinaryDataEncoding
andQOpcUaGenericStructHandler
.- class ValueType#
This enum contains the possible value types of an OPC UA variant.
Constant
Description
QOpcUaVariant.ValueType.Unknown
QOpcUaVariant.ValueType.Boolean
QOpcUaVariant.ValueType.SByte
QOpcUaVariant.ValueType.Byte
QOpcUaVariant.ValueType.Int16
QOpcUaVariant.ValueType.UInt16
QOpcUaVariant.ValueType.Int32
QOpcUaVariant.ValueType.UInt32
,
QOpcUaVariant.ValueType.Int64
QOpcUaVariant.ValueType.UInt64
QOpcUaVariant.ValueType.Float
QOpcUaVariant.ValueType.Double
QOpcUaVariant.ValueType.String
QOpcUaVariant.ValueType.DateTime
QOpcUaVariant.ValueType.Guid
QOpcUaVariant.ValueType.ByteString
QOpcUaVariant.ValueType.XmlElement
QOpcUaVariant.ValueType.NodeId
QOpcUaVariant.ValueType.ExpandedNodeId
QOpcUaVariant.ValueType.StatusCode
QOpcUaVariant.ValueType.QualifiedName
QOpcUaVariant.ValueType.LocalizedText
QOpcUaVariant.ValueType.ExtensionObject
QOpcUaVariant.ValueType.DataValue
QOpcUaVariant.ValueType.Variant
QOpcUaVariant.ValueType.DiagnosticInfo
- __init__()#
Default constructs a new OPC UA variant.
- __init__(other)
- Parameters:
other –
QOpcUaVariant
Constructs a new OPC UA variant from
other
.- __init__(value, type[, isArray=false[, arrayDimensions={}]])
- Parameters:
value – object
type –
ValueType
isArray – bool
arrayDimensions – .list of qint32
Constructs a new OPC UA variant and sets
value
,type
,isArray
andarrayDimensions
- arrayDimensions()#
- Return type:
.list of qint32
Returns the array dimensions of this OPC UA variant.
- isArray()#
- Return type:
bool
Returns
true
if this OPC UA variant contains an array value.- __ne__(rhs)#
- Parameters:
rhs –
QOpcUaVariant
- Return type:
bool
Returns
true
iflhs
is not equal torhs
.- setValue(value, type[, isArray=false[, arrayDimensions={}]])#
- Parameters:
value – object
type –
ValueType
isArray – bool
arrayDimensions – .list of qint32
Sets the value of this OPC UA variant to
value
, the type totype
,isArray
toisArray
and the array dimensions toarrayDimensions
.Array values must be passed as a QList of
type
.See also
- swap(other)#
- Parameters:
other –
QOpcUaVariant
Swaps enum definition object
other
with this OPC UA variant object. This operation is very fast and never fails.Returns the value type of this OPC UA variant.
- value()#
- Return type:
object
Returns the value of this OPC UA variant.
See also