pyuaf.client.results
¶
class AsyncCreateMonitoredDataResult¶
-
class
pyuaf.client.results.
AsyncCreateMonitoredDataResult
(*args)¶ An
AsyncCreateMonitoredDataResult
is the immediate result of anAsyncCreateMonitoredDataRequest
. It only gives you information about whether the client could successfully process (e.g. resolve any addresses, create the necessary sessions, ...) the asynchronous request.The actual useful asynchronous result of the request is given to you as a regular
CreateMonitoredDataResult
, via a callback mechanism.Methods:
Attributes
-
targets
¶ The targets, as an
AsyncResultTargetVector
.
-
overallStatus
¶ The combined status of the targets, as a
Status
instance.If this status is Good, then you know for sure that all the statuses of the targets are all Good. If this status is Bad, then you know that at least one of the targets has a Bad status.
-
requestHandle
¶ The unique handle that was originally assigned to the
AsyncCreateMonitoredDataRequest
that resulted in thisAsyncCreateMonitoredDataResult
. It’s a 64-bitlong
value, assigned by the UAF during the processing of the request.
-
class AsyncCreateMonitoredEventsResult¶
-
class
pyuaf.client.results.
AsyncCreateMonitoredEventsResult
(*args)¶ An
AsyncCreateMonitoredEventsResult
is the immediate result of anAsyncCreateMonitoredEventsRequest
. It only gives you information about whether the client could successfully process (e.g. resolve any addresses, create the necessary sessions, ...) the asynchronous request.The actual useful asynchronous result of the request is given to you as a regular
CreateMonitoredEventsResult
, via a callback mechanism.Methods:
Attributes
-
targets
¶ The targets, as an
AsyncResultTargetVector
.
-
overallStatus
¶ The combined status of the targets, as a
Status
instance.If this status is Good, then you know for sure that all the statuses of the targets are all Good. If this status is Bad, then you know that at least one of the targets has a Bad status.
-
requestHandle
¶ The unique handle that was originally assigned to the
AsyncCreateMonitoredEventsRequest
that resulted in thisAsyncCreateMonitoredEventsResult
. It’s a 64-bitlong
value, assigned by the UAF during the processing of the request.
-
class AsyncMethodCallResult¶
-
class
pyuaf.client.results.
AsyncMethodCallResult
(*args)¶ An
AsyncMethodCallResult
is the immediate result of anAsyncMethodCallRequest
. It only gives you information about whether the client could successfully process (e.g. resolve any addresses, create the necessary sessions, ...) the asynchronous request.The actual useful asynchronous result of the request is given to you as a regular
MethodCallResult
, via a callback mechanism.Methods:
Attributes
-
targets
¶ The targets, as an
AsyncResultTargetVector
.
-
overallStatus
¶ The combined status of the targets, as a
Status
instance.If this status is Good, then you know for sure that all the statuses of the targets are all Good. If this status is Bad, then you know that at least one of the targets has a Bad status.
-
requestHandle
¶ The unique handle that was originally assigned to the
AsyncMethodCallRequest
that resulted in thisAsyncMethodCallResult
. It’s a 64-bitlong
value, assigned by the UAF during the processing of the request.
-
class AsyncReadResult¶
-
class
pyuaf.client.results.
AsyncReadResult
(*args)¶ An
AsyncReadResult
is the immediate result of anAsyncReadRequest
. It only gives you information about whether the client could successfully process (e.g. resolve any addresses, create the necessary sessions, ...) the asynchronous request.The actual useful asynchronous result of the request is given to you as a regular
ReadResult
, via a callback mechanism.Methods:
Attributes
-
targets
¶ The targets, as an
AsyncResultTargetVector
.
-
overallStatus
¶ The combined status of the targets, as a
Status
instance.If this status is Good, then you know for sure that all the statuses of the targets are all Good. If this status is Bad, then you know that at least one of the targets has a Bad status.
-
requestHandle
¶ The unique handle that was originally assigned to the
AsyncReadRequest
that resulted in thisAsyncReadResult
. It’s a 64-bitlong
value, assigned by the UAF during the processing of the request.
-
class AsyncResultTarget¶
-
class
pyuaf.client.results.
AsyncResultTarget
¶ A
AsyncResultTarget
corresponds exactly to theReadRequestTarget
orWriteRequestTarget
or ... that was part of the invoked request.So the first target of the asynchronous request (the
AsyncxxxxxRequest
) corresponds to- the first target of the immediate result (the
AsyncxxxxxResult
) - and the first target of the callback result (the
xxxxxResult
)
This target is the “immediate” result of an asynchronous request target. Meaning: it will only give you information about whether the asynchronous target was successfully sent (it tells you for instance if the addresses of the target could be resolved). The actual useful result of the request will come asynchronously, via a callback function.
Methods:
Attributes
-
status
¶ Status of the result target (Good if the request target was used in the asynchronous request, Bad if not), as a
Status
instance.A Good status means only that this target was successfully resolved, and sent to the server.
-
clientConnectionId
¶ The id of the session that was used for this target.
-
- the first target of the immediate result (the
class AsyncResultTargetVector¶
-
class
pyuaf.client.results.
AsyncResultTargetVector
¶ An AsyncResultTargetVector is a container that holds elements of type
pyuaf.client.results.AsyncResultTarget
. It is an artifact automatically generated from the C++ UAF code, and has the same functionality as alist
ofAsyncResultTarget
.Usage example:
>>> import pyuaf >>> from pyuaf.client.results import AsyncResultTarget, AsyncResultTargetVector >>> # construct a realistic result, for instance one with 5 targets: >>> targets = AsyncResultTargetVector(5) >>> noOfElements = len(targets) # will be 5 (alternative: targets.size()) >>> target0_isGood = targets[0].status.isGood() >>> # other methods of the vector: >>> targets.resize(6) >>> targets.append(AsyncResultTarget()) >>> someTarget = targets.pop() >>> targets.clear() >>> # ...
class AsyncWriteResult¶
-
class
pyuaf.client.results.
AsyncWriteResult
(*args)¶ An
AsyncWriteResult
is the immediate result of anAsyncWriteRequest
. It only gives you information about whether the client could successfully process (e.g. resolve any addresses, create the necessary sessions, ...) the asynchronous request.The actual useful asynchronous result of the request is given to you as a regular
WriteResult
, via a callback mechanism.Methods:
Attributes
-
targets
¶ The targets, as an
AsyncResultTargetVector
.
-
overallStatus
¶ The combined status of the targets, as a
Status
instance.If this status is Good, then you know for sure that all the statuses of the targets are all Good. If this status is Bad, then you know that at least one of the targets has a Bad status.
-
requestHandle
¶ The unique handle that was originally assigned to the
AsyncWriteRequest
that resulted in thisAsyncWriteResult
. It’s a 64-bitlong
value, assigned by the UAF during the processing of the request.
-
class BrowseNextResult¶
-
class
pyuaf.client.results.
BrowseNextResult
(*args)¶ A
BrowseNextResult
is the result of a correspondingBrowseNextRequest
.A
BrowseNextResult
is exactly the same as aBrowseResult
. See the latter class documentation for a description of the attributes and methods.
class BrowseResult¶
-
class
pyuaf.client.results.
BrowseResult
(*args)¶ A
BrowseResult
is the result of a correspondingBrowseRequest
.It tells you whether or not the requested targets have been browsed, what were the resulting references that were found, etc.
Methods:
Attributes
-
targets
¶ The targets, as a
BrowseResultTargetVector
.
-
overallStatus
¶ The combined status of the targets, as a
Status
instance.If this status is Good, then you know for sure that all the statuses of the targets are all Good. If this status is Bad, then you know that at least one of the targets has a Bad status.
-
requestHandle
¶ The unique handle that was originally assigned to the
BrowseRequest
that resulted in thisBrowseResult
. It’s a 64-bitlong
value, assigned by the UAF during the processing of the request.
-
class BrowseResultTarget¶
-
class
pyuaf.client.results.
BrowseResultTarget
¶ A
BrowseResultTarget
corresponds exactly to theBrowseRequestTarget
that was part of the invokedBrowseRequest
. So the first target of the request corresponds to the first target of the result, and so on.Methods:
Attributes
-
opcUaStatusCode
¶ Status, as an OPC UA status code (an
int
). Compare to those defined inpyuaf.util.opcuastatuscodes
.
-
status
¶ Status of the result target (Good if the request target was browsed, Bad if not), as a
Status
instance.
-
clientConnectionId
¶ The id of the session that was used for this target, as an
int
.
-
autoBrowsedNext
¶ An
int
, clarifying how many times the UAF automatically invoked the “BrowseNext” OPC UA service in order to get the results?
-
continuationPoint
¶ The continuation point (a server-defined byte string) that should be provided to the next BrowseNext call, to get the remaining browse results. The type of this attribute is a built-in Python
bytearray
. Since the UAF can automatically call BrowseNext for you (via thepyuaf.client.settings.BrowseSettings.maxAutoBrowseNext
attribute), you normally don’t have to use the continuation point and the BrowseNext service yourself.
-
references
¶ The reference descriptions that were found during the browsing, as a
ReferenceDescriptionVector
.
-
class BrowseResultTargetVector¶
-
class
pyuaf.client.results.
BrowseResultTargetVector
¶ An BrowseResultTargetVector is a container that holds elements of type
pyuaf.client.results.BrowseResultTarget
. It is an artifact automatically generated from the C++ UAF code, and has the same functionality as alist
ofBrowseResultTarget
.Usage example:
>>> import pyuaf >>> from pyuaf.client.results import BrowseResultTarget, BrowseResultTargetVector >>> # construct a realistic result, for instance one with 5 targets: >>> targets = BrowseResultTargetVector(5) >>> noOfElements = len(targets) # will be 5 (alternative: targets.size()) >>> for i in xrange(len(targets)): ... if(targets[i].status.isGood()): ... for j in xrange(len(targets[i].references)): ... print("Target %d Reference %d --> Display name = %s" ... %(i, j, targets[i].references[j].displayName)) >>> # other methods of the vector: >>> targets.resize(6) >>> targets.append(BrowseResultTarget()) >>> someTarget = targets.pop() >>> targets.clear() >>> # ...
class CreateMonitoredDataResult¶
-
class
pyuaf.client.results.
CreateMonitoredDataResult
(*args)¶ A
CreateMonitoredDataResult
is the result of a correspondingCreateMonitoredDataRequest
.It tells you whether or not the requested monitored items have been created, and some details about them.
Methods:
Attributes
-
targets
¶ The targets, as a
CreateMonitoredDataResultTargetVector
.
-
overallStatus
¶ The combined status of the targets, as a
Status
instance.If this status is Good, then you know for sure that all the statuses of the targets are all Good. If this status is Bad, then you know that at least one of the targets has a Bad status.
-
requestHandle
¶ The unique handle that was originally assigned to the
CreateMonitoredDataRequest
that resulted in thisCreateMonitoredDataResult
. It’s a 64-bitlong
value, assigned by the UAF during the processing of the request.
-
class CreateMonitoredDataResultTarget¶
-
class
pyuaf.client.results.
CreateMonitoredDataResultTarget
¶ A
CreateMonitoredDataResultTarget
corresponds exactly to theCreateMonitoredDataRequestTarget
that was part of the invokedCreateMonitoredDataRequest
. So the first target of the request corresponds to the first target of the result, and so on.Methods:
Attributes
-
status
¶ Status of the result (Good if the monitored item was created, Bad if not), as a
Status
instance.
-
opcUaStatusCode
¶ Status, as an OPC UA status code (an
int
). Compare to those defined inpyuaf.util.opcuastatuscodes
.
-
clientConnectionId
¶ The id of the session that was used for this target, as an
int
-
clientSubscriptionHandle
¶ The handle of the subscription that owns this monitored item, as an
int
-
clientHandle
¶ The client handle that was assigned to the monitored item by the UAF, at the time when the monitored item was requested. E.g. you can get client handles like this:
>>> import pyuaf >>> from pyuaf.util.errors import UafError, CreateMonitoredItemsError >>> from pyuaf.util import Address, NodeId >>> from pyuaf.client import Client >>> >>> myClient = Client("myClient", ["opc.tcp://localhost:4841"]) >>> >>> nameSpaceUri = "http://mycompany.com/mymachine" >>> serverUri = "http://mycompany.com/servers/plc1" >>> address0 = Address( NodeId("myMachine.myVariable0", nameSpaceUri), serverUri) >>> address1 = Address( NodeId("myMachine.myVariable1", nameSpaceUri), serverUri) >>> >>> def myCallback0(notification): ... print("Variable 0 was received: %s" %notification) >>> >>> def myCallback1(notification): ... print("Variable 1 was received: %s" %notification) >>> >>> try: ... result = myClient.createMonitoredData([address0, address1], ... notificationCallbacks = [myCallback0, myCallback1]) ... clientHandle0 = result.targets[0].clientHandle ... clientHandle1 = result.targets[1].clientHandle ... except CreateMonitoredItemsError, e: ... # The monitored items could not be created, because there was some failure ... # (maybe the server is off-line?). ... # Nevertheless, the client handles were already assigned, and we can get them like this: ... clientHandles = e.assignedClientHandles ... except UafError, e: ... print("Oops, an unexpected error!")
-
monitoredItemId
¶ An id (an
int
) that was assigned to the monitored item by the server (!).
-
revisedSamplingIntervalSec
¶ The rate, in seconds (as a
float
), at which the monitored item are sampled in reality by the server.
-
revisedQueueSize
¶ The true size of the queue at the server side, as an
int
.
-
class CreateMonitoredDataResultTargetVector¶
-
class
pyuaf.client.results.
CreateMonitoredDataResultTargetVector
¶ An CreateMonitoredDataResultTargetVector is a container that holds elements of type
pyuaf.client.results.CreateMonitoredDataResultTarget
. It is an artifact automatically generated from the C++ UAF code, and has the same functionality as alist
ofCreateMonitoredDataResultTarget
.Usage example:
>>> import pyuaf >>> from pyuaf.client.results import CreateMonitoredDataResultTarget, CreateMonitoredDataResultTargetVector >>> # construct a realistic result, for instance one with 5 targets: >>> targets = CreateMonitoredDataResultTargetVector(5) >>> noOfElements = len(targets) # will be 5 (alternative: targets.size()) >>> target0_isGood = targets[0].status.isGood() >>> target0_clientHandle = targets[0].clientHandle >>> # other methods of the vector: >>> targets.resize(6) >>> targets.append(CreateMonitoredDataResultTarget()) >>> someTarget = targets.pop() >>> targets.clear() >>> # ...
class CreateMonitoredEventsResult¶
-
class
pyuaf.client.results.
CreateMonitoredEventsResult
(*args)¶ A
CreateMonitoredEventsResult
is the result of a correspondingCreateMonitoredEventsRequest
.It tells you whether or not the requested monitored items have been created, and some details about them.
Methods:
Attributes
-
targets
¶ The targets, as a
CreateMonitoredEventsResultTargetVector
.
-
overallStatus
¶ The combined status of the targets, as a
Status
instance.If this status is Good, then you know for sure that all the statuses of the targets are all Good. If this status is Bad, then you know that at least one of the targets has a Bad status.
-
requestHandle
¶ The unique handle that was originally assigned to the
CreateMonitoredEventsRequest
that resulted in thisCreateMonitoredEventsResult
. It’s a 64-bitlong
value, assigned by the UAF during the processing of the request.
-
class CreateMonitoredEventsResultTarget¶
-
class
pyuaf.client.results.
CreateMonitoredEventsResultTarget
¶ A
CreateMonitoredEventsResultTarget
corresponds exactly to theCreateMonitoredEventsRequestTarget
that was part of the invokedCreateMonitoredEventsRequest
. So the first target of the request corresponds to the first target of the result, and so on.Methods:
Attributes
-
status
¶ Status of the result (Good if the monitored item was created, Bad if not), as a
Status
instance.
-
opcUaStatusCode
¶ Status, as an OPC UA status code (an
int
). Compare to those defined inpyuaf.util.opcuastatuscodes
.
-
clientConnectionId
¶ The id of the session that was used for this target, as an
int
.
-
clientHandle
¶ The client handle that was assigned to the monitored item by the UAF, at the time when the monitored item was requested.
See a similar use case example at
pyuaf.client.results.CreateMonitoredDataResultTarget.clientHandle()
.
-
clientSubscriptionHandle
¶ The handle of the subscription that owns this monitored item, as an
int
-
monitoredItemId
¶ An id (an
int
) that was assigned to the monitored item by the server (!).
-
revisedSamplingIntervalSec
¶ The rate, in seconds (as a
float
), at which the monitored item are sampled in reality by the server.
-
revisedQueueSize
¶ The true size of the queue at the server side, as an
int
.
-
class CreateMonitoredEventsResultTargetVector¶
-
class
pyuaf.client.results.
CreateMonitoredEventsResultTargetVector
¶ An CreateMonitoredEventsResultTargetVector is a container that holds elements of type
pyuaf.client.results.CreateMonitoredEventsResultTarget
. It is an artifact automatically generated from the C++ UAF code, and has the same functionality as alist
ofCreateMonitoredEventsResultTarget
.Usage example:
>>> import pyuaf >>> from pyuaf.client.results import CreateMonitoredEventsResultTarget, CreateMonitoredEventsResultTargetVector >>> # construct a realistic result, for instance one with 5 targets: >>> targets = CreateMonitoredEventsResultTargetVector(5) >>> noOfElements = len(targets) # will be 5 (alternative: targets.size()) >>> target0_isGood = targets[0].status.isGood() >>> target0_clientHandle = targets[0].clientHandle >>> # other methods of the vector: >>> targets.resize(6) >>> targets.append(CreateMonitoredEventsResultTarget()) >>> someTarget = targets.pop() >>> targets.clear() >>> # ...
class HistoryReadRawModifiedResult¶
-
class
pyuaf.client.results.
HistoryReadRawModifiedResult
(*args)¶ A
HistoryReadRawModifiedResult
is the result of a correspondingHistoryReadRawModifiedRequest
.It tells you whether or not the requested targets have returned some historical data, it provides you the retrieved historical data, any continuation points left, etc.
Methods:
Attributes
-
targets
¶ The targets, as a
HistoryReadRawModifiedResultTargetVector
.
-
overallStatus
¶ The combined status of the targets, as a
Status
instance.If this status is Good, then you know for sure that all the statuses of the targets are all Good. If this status is Bad, then you know that at least one of the targets has a Bad status.
-
requestHandle
¶ The unique handle that was originally assigned to the
HistoryReadRawModifiedRequest
that resulted in thisHistoryReadRawModifiedResult
. It’s a 64-bitlong
value, assigned by the UAF during the processing of the request.
-
class HistoryReadRawModifiedResultTarget¶
-
class
pyuaf.client.results.
HistoryReadRawModifiedResultTarget
¶ A
HistoryReadRawModifiedResultTarget
corresponds exactly to theHistoryReadRawModifiedRequestTarget
that was part of the invokedHistoryReadRawModifiedRequest
. So the first target of the request corresponds to the first target of the result, and so on.Methods:
Attributes
-
opcUaStatusCode
¶ Status, as an OPC UA status code (an
int
). Compare to those defined inpyuaf.util.opcuastatuscodes
.
-
status
¶ Status of the result target (Good if the requested data was retrieved, Bad if not), as a
Status
instance. Apart from the UAF status code (which are defined in thepyuaf.util.statuscodes
module), you may also check the OPC UA statuscode (which are defined in thepyuaf.util.opcuastatuscodes
module) since this provides more information (e.g. OpcUa_GoodNoData and OpcUa_GoodMoreData).>>> import pyuaf >>> from pyuaf.client.results import HistoryReadRawModifiedResult >>> from pyuaf.util.opcuastatuscodes import OpcUa_GoodNoData >>> # create some simulated result, that we may have received from the client: >>> someReceivedResult = HistoryReadRawModifiedResult() >>> someReceivedResult.targets.resize(1) >>> # if the result didn't return any data values, you may want to check if there is >>> # simply no historical data that matches your request: >>> if len(someReceivedResult.targets[0].dataValues) == 0: ... noDataFound = someReceivedResult.targets[0].opcUaStatusCode == OpcUa_GoodNoData
-
clientConnectionId
¶ The id of the session that was used for this target, as an
int
.
-
autoReadMore
¶ An
int
, clarifying how many times did the UAF automatically invoke the historical read OPC UA service in addition to the original request, in order to get the remaining results? In case the UAF did not read more data automatically, this value will be 0. Seepyuaf.client.settings.HistoryReadRawModifiedSettings.maxAutoReadMore
for more info.
-
continuationPoint
¶ The continuation point, in case there are still results left at the server.The type of this attribute is a built-in Python
bytearray
. If the continuation point is not NULL (i.e. if it contains more than 0 bytes), then you should copy the continuation point to the continuation point of the next HistoryReadRawModifiedRequest, and perform another call.
-
dataValues
¶ The requested historical data, as a
DataValueVector
.
-
modificationInfos
¶ The requested modification information, in case the
pyuaf.client.settings.HistoryReadRawModifiedSettings.isReadModified
flag was set in the settings of the original request.
-
class HistoryReadRawModifiedResultTargetVector¶
-
class
pyuaf.client.results.
HistoryReadRawModifiedResultTargetVector
¶ An HistoryReadRawModifiedResultTargetVector is a container that holds elements of type
pyuaf.client.results.HistoryReadRawModifiedResultTarget
. It is an artifact automatically generated from the C++ UAF code, and has the same functionality as alist
ofHistoryReadRawModifiedResultTarget
.Usage example:
>>> import pyuaf >>> from pyuaf.client.results import HistoryReadRawModifiedResultTarget, HistoryReadRawModifiedResultTargetVector >>> # construct a realistic result, for instance one with 5 targets: >>> targets = HistoryReadRawModifiedResultTargetVector(5) >>> noOfElements = len(targets) # will be 5 (alternative: targets.size()) >>> target0_isGood = targets[0].status.isGood() >>> target0_retrievedData = targets[0].dataValues >>> # other methods of the vector: >>> targets.resize(6) >>> targets.append(HistoryReadRawModifiedResultTarget()) >>> someTarget = targets.pop() >>> targets.clear() >>> # ...
class MethodCallResult¶
-
class
pyuaf.client.results.
MethodCallResult
(*args)¶ A
MethodCallResult
is the result of a correspondingMethodCallRequest
.It tells you whether or not the requested targets have been called, what were the resulting output arguments, etc.
Methods:
Attributes
-
targets
¶ The targets, as a
MethodCallResultTargetVector
.
-
overallStatus
¶ The combined status of the targets, as a
Status
instance.If this status is Good, then you know for sure that all the statuses of the targets are all Good. If this status is Bad, then you know that at least one of the targets has a Bad status.
-
requestHandle
¶ The unique handle that was originally assigned to the
MethodCallRequest
that resulted in thisMethodCallResult
. It’s a 64-bitlong
value, assigned by the UAF during the processing of the request.
-
class MethodCallResultTarget¶
-
class
pyuaf.client.results.
MethodCallResultTarget
¶ A
MethodCallResultTarget
corresponds exactly to theMethodCallRequestTarget
that was part of the invokedMethodCallRequest
. So the first target of the request corresponds to the first target of the result, and so on.Methods:
Attributes
-
opcUaStatusCode
¶ Status, as an OPC UA status code (an
int
). Compare to those defined inpyuaf.util.opcuastatuscodes
.
-
status
¶ Status of the result target (Good if the request target was called successfully, Bad if not), as a
Status
instance.
-
clientConnectionId
¶ The id of the session that was used for this target, as an
int
.
-
outputArguments
¶ The output arguments of the remote method call, as a
pyuaf.util.VariantVector
.
-
inputArgumentStatuses
¶ The status for each input argument, as a
pyuaf.util.StatusVector
. These statuses are derived from theinputArgumentOpcUaStatusCodes
attribute, they do not add more information. This attribute is mostly kept for backwards-compatibility. If you’re interested in the status of the input arguments, it’s probably easier to just compare theinputArgumentOpcUaStatusCodes
to those found inpyuaf.util.opcuastatuscodes
.
-
inputArgumentOpcUaStatusCodes
¶ The OPC UA statuscode for each input argument, as reported by the server, as a
pyuaf.util.UInt32Vector
. You can compare these values to the OPC UA statuscodes defined inpyuaf.util.opcuastatuscodes
.
-
class MethodCallResultTargetVector¶
-
class
pyuaf.client.results.
MethodCallResultTargetVector
¶ An MethodCallResultTargetVector is a container that holds elements of type
pyuaf.client.results.MethodCallResultTarget
. It is an artifact automatically generated from the C++ UAF code, and has the same functionality as alist
ofMethodCallResultTarget
.Usage example:
>>> import pyuaf >>> from pyuaf.client.results import MethodCallResultTarget, MethodCallResultTargetVector >>> # construct a realistic result, for instance one with 5 targets: >>> targets = MethodCallResultTargetVector(5) >>> noOfElements = len(targets) # will be 5 (alternative: targets.size()) >>> target0_isGood = targets[0].status.isGood() >>> target0_outputArgs = targets[0].outputArguments >>> # other methods of the vector: >>> targets.resize(6) >>> targets.append(MethodCallResultTarget()) >>> someTarget = targets.pop() >>> targets.clear() >>> # ...
class ReadResult¶
-
class
pyuaf.client.results.
ReadResult
(*args)¶ A
ReadResult
is the result of a correspondingReadRequest
.It tells you whether or not the requested targets have been read, what was the resulting data, etc.
Methods:
Attributes
-
targets
¶ The targets, as a
ReadResultTargetVector
.
-
overallStatus
¶ The combined status of the targets, as a
Status
instance.If this status is Good, then you know for sure that all the statuses of the targets are all Good. If this status is Bad, then you know that at least one of the targets has a Bad status.
-
requestHandle
¶ The unique handle that was originally assigned to the
ReadRequest
that resulted in thisReadResult
. It’s a 64-bitlong
value, assigned by the UAF during the processing of the request.
-
class ReadResultTarget¶
-
class
pyuaf.client.results.
ReadResultTarget
¶ A
ReadResultTarget
corresponds exactly to theReadRequestTarget
that was part of the invokedReadRequest
. So the first target of the request corresponds to the first target of the result, and so on.Methods:
Attributes
-
clientConnectionId
¶ The id of the session that was used for this target, as an
int
.
-
Attributes inherited from
pyuaf.util.DataValue
-
opcUaStatusCode
¶ Status, as an OPC UA status code (an
int
). Compare to those defined inpyuaf.util.opcuastatuscodes
.
-
status
¶ The status of the data, as a
Status
instance. The status contains the OPC UA status code of the data.
-
data
¶ The data that was read, as one of the data types described in A note on dynamic data types.
-
sourcePicoseconds
¶ The number of 10 picosecond intervals that need to be added to the source timestamp (to get a higher time resolution), as an
int
.
-
serverPicoseconds
¶ The number of 10 picosecond intervals that need to be added to the server timestamp (to get a higher time resolution), as an
int
.
-
class ReadResultTargetVector¶
-
class
pyuaf.client.results.
ReadResultTargetVector
¶ An ReadResultTargetVector is a container that holds elements of type
pyuaf.client.results.ReadResultTarget
. It is an artifact automatically generated from the C++ UAF code, and has the same functionality as alist
ofReadResultTarget
.Usage example:
>>> import pyuaf >>> from pyuaf.client.results import ReadResultTarget, ReadResultTargetVector >>> # construct a realistic result, for instance one with 5 targets: >>> targets = ReadResultTargetVector(5) >>> noOfElements = len(targets) # will be 5 (alternative: targets.size()) >>> target0_isGood = targets[0].status.isGood() >>> target0_data = targets[0].data >>> # other methods of the vector: >>> targets.resize(6) >>> targets.append(ReadResultTarget()) >>> someTarget = targets.pop() >>> targets.clear() >>> # ...
class TranslateBrowsePathsToNodeIdsResult¶
-
class
pyuaf.client.results.
TranslateBrowsePathsToNodeIdsResult
(*args)¶ A
TranslateBrowsePathsToNodeIdsResult
is the result of a correspondingTranslateBrowsePathsToNodeIdsRequest
.It tells you whether or not the requested targets have been translated, what were the resulting ExpandedNodeIds, etc.
Methods:
Attributes
-
targets
¶ The targets, as a
TranslateBrowsePathsToNodeIdsResultTargetVector
.
-
overallStatus
¶ The combined status of the targets, as a
Status
instance.If this status is Good, then you know for sure that all the statuses of the targets are all Good. If this status is Bad, then you know that at least one of the targets has a Bad status.
-
requestHandle
¶ The unique handle that was originally assigned to the
TranslateBrowsePathsToNodeIdsRequest
that resulted in thisTranslateBrowsePathsToNodeIdsResult
. It’s a 64-bitlong
value, assigned by the UAF during the processing of the request.
-
class TranslateBrowsePathsToNodeIdsResultTarget¶
-
class
pyuaf.client.results.
TranslateBrowsePathsToNodeIdsResultTarget
¶ A
TranslateBrowsePathsToNodeIdsResultTarget
corresponds exactly to theTranslateBrowsePathsToNodeIdsRequestTarget
that was part of the invokedTranslateBrowsePathsToNodeIdsRequest
. So the first target of the request corresponds to the first target of the result, and so on.Methods:
Attributes
-
opcUaStatusCode
¶ Status, as an OPC UA status code (an
int
). Compare to those defined inpyuaf.util.opcuastatuscodes
.
-
status
¶ Status of the result target (Good if the request target was translated, Bad if not), as a
Status
instance.
-
clientConnectionId
¶ The id of the session that was used for this target, as an
int
.
-
expandedNodeIds
¶ The ExpandedNodeIds that were the result of the browse path, as an
ExpandedNodeIdVector
.
-
remainingPathIndexes
¶ Any remaining path indexes, as an
UInt32Vector
.
-
class TranslateBrowsePathsToNodeIdsResultTargetVector¶
-
class
pyuaf.client.results.
TranslateBrowsePathsToNodeIdsResultTargetVector
¶ An TranslateBrowsePathsToNodeIdsResultTargetVector is a container that holds elements of type
pyuaf.client.results.TranslateBrowsePathsToNodeIdsResultTarget
. It is an artifact automatically generated from the C++ UAF code, and has the same functionality as alist
ofTranslateBrowsePathsToNodeIdsResultTarget
.Usage example:
>>> import pyuaf >>> from pyuaf.client.results import TranslateBrowsePathsToNodeIdsResultTarget, TranslateBrowsePathsToNodeIdsResultTargetVector >>> # construct a realistic result, for instance one with 5 targets: >>> targets = TranslateBrowsePathsToNodeIdsResultTargetVector(5) >>> noOfElements = len(targets) # will be 5 (alternative: targets.size()) >>> target0_isGood = targets[0].status.isGood() >>> target0_expandedNodeIds = targets[0].expandedNodeIds >>> # other methods of the vector: >>> targets.resize(6) >>> targets.append(TranslateBrowsePathsToNodeIdsResultTarget()) >>> someTarget = targets.pop() >>> targets.clear() >>> # ...
class WriteResult¶
-
class
pyuaf.client.results.
WriteResult
(*args)¶ A
WriteResult
is the result of a correspondingWriteRequest
.It tells you whether or not the requested targets have been written successfully.
Methods:
Attributes
-
targets
¶ The targets, as a
WriteResultTargetVector
.
-
overallStatus
¶ The combined status of the targets, as a
Status
instance.If this status is Good, then you know for sure that all the statuses of the targets are all Good. If this status is Bad, then you know that at least one of the targets has a Bad status.
-
requestHandle
¶ The unique handle that was originally assigned to the
WriteRequest
that resulted in thisWriteResult
. It’s a 64-bitlong
value, assigned by the UAF during the processing of the request.
-
class WriteResultTarget¶
-
class
pyuaf.client.results.
WriteResultTarget
¶ A
WriteResultTarget
corresponds exactly to theWriteRequestTarget
that was part of the invokedWriteRequest
. So the first target of the request corresponds to the first target of the result, and so on.Methods:
Attributes
-
opcUaStatusCode
¶ Status, as an OPC UA status code (an
int
). Compare to those defined inpyuaf.util.opcuastatuscodes
.
-
status
¶ Status of the result target (Good if the request target was written, Bad if not), as a
Status
instance.
-
clientConnectionId
¶ The id of the session that was used for this target, as an
int
.
-
class WriteResultTargetVector¶
-
class
pyuaf.client.results.
WriteResultTargetVector
¶ An WriteResultTargetVector is a container that holds elements of type
pyuaf.client.results.WriteResultTarget
. It is an artifact automatically generated from the C++ UAF code, and has the same functionality as alist
ofWriteResultTarget
.Usage example:
>>> import pyuaf >>> from pyuaf.client.results import WriteResultTarget, WriteResultTargetVector >>> # construct a realistic result, for instance one with 5 targets: >>> targets = WriteResultTargetVector(5) >>> noOfElements = len(targets) # will be 5 (alternative: targets.size()) >>> target0_isGood = targets[0].status.isGood() >>> # other methods of the vector: >>> targets.resize(6) >>> targets.append(WriteResultTarget()) >>> someTarget = targets.pop() >>> targets.clear() >>> # ...