pyuaf.client.results¶
class AsyncCreateMonitoredDataResult¶
-
class
pyuaf.client.results.AsyncCreateMonitoredDataResult(*args)¶ An
AsyncCreateMonitoredDataResultis 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
Statusinstance.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
AsyncCreateMonitoredDataRequestthat resulted in thisAsyncCreateMonitoredDataResult. It’s a 64-bitlongvalue, assigned by the UAF during the processing of the request.
-
class AsyncCreateMonitoredEventsResult¶
-
class
pyuaf.client.results.AsyncCreateMonitoredEventsResult(*args)¶ An
AsyncCreateMonitoredEventsResultis 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
Statusinstance.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
AsyncCreateMonitoredEventsRequestthat resulted in thisAsyncCreateMonitoredEventsResult. It’s a 64-bitlongvalue, assigned by the UAF during the processing of the request.
-
class AsyncMethodCallResult¶
-
class
pyuaf.client.results.AsyncMethodCallResult(*args)¶ An
AsyncMethodCallResultis 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
Statusinstance.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
AsyncMethodCallRequestthat resulted in thisAsyncMethodCallResult. It’s a 64-bitlongvalue, assigned by the UAF during the processing of the request.
-
class AsyncReadResult¶
-
class
pyuaf.client.results.AsyncReadResult(*args)¶ An
AsyncReadResultis 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
Statusinstance.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
AsyncReadRequestthat resulted in thisAsyncReadResult. It’s a 64-bitlongvalue, assigned by the UAF during the processing of the request.
-
class AsyncResultTarget¶
-
class
pyuaf.client.results.AsyncResultTarget¶ A
AsyncResultTargetcorresponds exactly to theReadRequestTargetorWriteRequestTargetor ... 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
Statusinstance.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 alistofAsyncResultTarget.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
AsyncWriteResultis 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
Statusinstance.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
AsyncWriteRequestthat resulted in thisAsyncWriteResult. It’s a 64-bitlongvalue, assigned by the UAF during the processing of the request.
-
class BrowseNextResult¶
-
class
pyuaf.client.results.BrowseNextResult(*args)¶ A
BrowseNextResultis the result of a correspondingBrowseNextRequest.A
BrowseNextResultis 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
BrowseResultis 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
Statusinstance.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
BrowseRequestthat resulted in thisBrowseResult. It’s a 64-bitlongvalue, assigned by the UAF during the processing of the request.
-
class BrowseResultTarget¶
-
class
pyuaf.client.results.BrowseResultTarget¶ A
BrowseResultTargetcorresponds exactly to theBrowseRequestTargetthat 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
Statusinstance.
-
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.maxAutoBrowseNextattribute), 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 alistofBrowseResultTarget.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
CreateMonitoredDataResultis 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
Statusinstance.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
CreateMonitoredDataRequestthat resulted in thisCreateMonitoredDataResult. It’s a 64-bitlongvalue, assigned by the UAF during the processing of the request.
-
class CreateMonitoredDataResultTarget¶
-
class
pyuaf.client.results.CreateMonitoredDataResultTarget¶ A
CreateMonitoredDataResultTargetcorresponds exactly to theCreateMonitoredDataRequestTargetthat 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
Statusinstance.
-
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 alistofCreateMonitoredDataResultTarget.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
CreateMonitoredEventsResultis 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
Statusinstance.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
CreateMonitoredEventsRequestthat resulted in thisCreateMonitoredEventsResult. It’s a 64-bitlongvalue, assigned by the UAF during the processing of the request.
-
class CreateMonitoredEventsResultTarget¶
-
class
pyuaf.client.results.CreateMonitoredEventsResultTarget¶ A
CreateMonitoredEventsResultTargetcorresponds exactly to theCreateMonitoredEventsRequestTargetthat 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
Statusinstance.
-
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 alistofCreateMonitoredEventsResultTarget.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
HistoryReadRawModifiedResultis 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
Statusinstance.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
HistoryReadRawModifiedRequestthat resulted in thisHistoryReadRawModifiedResult. It’s a 64-bitlongvalue, assigned by the UAF during the processing of the request.
-
class HistoryReadRawModifiedResultTarget¶
-
class
pyuaf.client.results.HistoryReadRawModifiedResultTarget¶ A
HistoryReadRawModifiedResultTargetcorresponds exactly to theHistoryReadRawModifiedRequestTargetthat 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
Statusinstance. Apart from the UAF status code (which are defined in thepyuaf.util.statuscodesmodule), you may also check the OPC UA statuscode (which are defined in thepyuaf.util.opcuastatuscodesmodule) 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.maxAutoReadMorefor 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.isReadModifiedflag 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 alistofHistoryReadRawModifiedResultTarget.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
MethodCallResultis 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
Statusinstance.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
MethodCallRequestthat resulted in thisMethodCallResult. It’s a 64-bitlongvalue, assigned by the UAF during the processing of the request.
-
class MethodCallResultTarget¶
-
class
pyuaf.client.results.MethodCallResultTarget¶ A
MethodCallResultTargetcorresponds exactly to theMethodCallRequestTargetthat 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
Statusinstance.
-
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 theinputArgumentOpcUaStatusCodesattribute, 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 theinputArgumentOpcUaStatusCodesto 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 alistofMethodCallResultTarget.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
ReadResultis 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
Statusinstance.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
ReadRequestthat resulted in thisReadResult. It’s a 64-bitlongvalue, assigned by the UAF during the processing of the request.
-
class ReadResultTarget¶
-
class
pyuaf.client.results.ReadResultTarget¶ A
ReadResultTargetcorresponds exactly to theReadRequestTargetthat 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
Statusinstance. 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 alistofReadResultTarget.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
TranslateBrowsePathsToNodeIdsResultis 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
Statusinstance.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
TranslateBrowsePathsToNodeIdsRequestthat resulted in thisTranslateBrowsePathsToNodeIdsResult. It’s a 64-bitlongvalue, assigned by the UAF during the processing of the request.
-
class TranslateBrowsePathsToNodeIdsResultTarget¶
-
class
pyuaf.client.results.TranslateBrowsePathsToNodeIdsResultTarget¶ A
TranslateBrowsePathsToNodeIdsResultTargetcorresponds exactly to theTranslateBrowsePathsToNodeIdsRequestTargetthat 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
Statusinstance.
-
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 alistofTranslateBrowsePathsToNodeIdsResultTarget.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
WriteResultis 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
Statusinstance.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
WriteRequestthat resulted in thisWriteResult. It’s a 64-bitlongvalue, assigned by the UAF during the processing of the request.
-
class WriteResultTarget¶
-
class
pyuaf.client.results.WriteResultTarget¶ A
WriteResultTargetcorresponds exactly to theWriteRequestTargetthat 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
Statusinstance.
-
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 alistofWriteResultTarget.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() >>> # ...