pyuaf.client.results

class AsyncCreateMonitoredDataResult

class pyuaf.client.results.AsyncCreateMonitoredDataResult(*args)

An AsyncCreateMonitoredDataResult is the immediate result of an AsyncCreateMonitoredDataRequest. 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:

    __init__(*args)

    Create a new AsyncCreateMonitoredDataResult object.

    You should never have to create result objects yourself, the UAF will produce them and you will consume them.

    __str__(*args)

    Get a formatted string representation of the result.

  • 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 this AsyncCreateMonitoredDataResult. It’s a 64-bit long 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 an AsyncCreateMonitoredEventsRequest. 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:

    __init__(*args)

    Create a new AsyncCreateMonitoredEventsResult object.

    You should never have to create result objects yourself, the UAF will produce them and you will consume them.

    __str__(*args)

    Get a formatted string representation of the result.

  • 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 this AsyncCreateMonitoredEventsResult. It’s a 64-bit long 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 an AsyncMethodCallRequest. 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:

    __init__(*args)

    Create a new AsyncMethodCallResult object.

    You should never have to create result objects yourself, the UAF will produce them and you will consume them.

    __str__(*args)

    Get a formatted string representation of the result.

  • 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 this AsyncMethodCallResult. It’s a 64-bit long 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 an AsyncReadRequest. 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:

    __init__(*args)

    Create a new AsyncReadResult object.

    You should never have to create result objects yourself, the UAF will produce them and you will consume them.

    __str__(*args)

    Get a formatted string representation of the result.

  • 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 this AsyncReadResult. It’s a 64-bit long value, assigned by the UAF during the processing of the request.

class AsyncResultTarget

class pyuaf.client.results.AsyncResultTarget

A AsyncResultTarget corresponds exactly to the ReadRequestTarget or WriteRequestTarget 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:

    __init__()

    Create a new AsyncResultTarget object.

    You should never have to create result targets (or results for that matter) yourself, the UAF will produce them and you will consume them.

    __str__(*args)

    Get a formatted string representation of the target.

  • 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.

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 a list of AsyncResultTarget.

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 an AsyncWriteRequest. 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:

    __init__(*args)

    Create a new AsyncWriteResult object.

    You should never have to create result objects yourself, the UAF will produce them and you will consume them.

    __str__(*args)

    Get a formatted string representation of the result.

  • 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 this AsyncWriteResult. It’s a 64-bit long 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 corresponding BrowseNextRequest.

A BrowseNextResult is exactly the same as a BrowseResult. 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 corresponding BrowseRequest.

It tells you whether or not the requested targets have been browsed, what were the resulting references that were found, etc.

  • Methods:

    __init__(*args)

    Create a new BrowseResult object.

    You should never have to create result objects yourself, the UAF will produce them and you will consume them.

    __str__(*args)

    Get a formatted string representation of the result.

  • 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 this BrowseResult. It’s a 64-bit long value, assigned by the UAF during the processing of the request.

class BrowseResultTarget

class pyuaf.client.results.BrowseResultTarget

A BrowseResultTarget corresponds exactly to the BrowseRequestTarget that was part of the invoked BrowseRequest. So the first target of the request corresponds to the first target of the result, and so on.

  • Methods:

    __init__()

    Create a new BrowseRequestTarget object.

    You should never have to create result targets (or results for that matter) yourself, the UAF will produce them and you will consume them.

    __str__(*args)

    Get a formatted string representation of the target.

  • Attributes

    opcUaStatusCode

    Status, as an OPC UA status code (an int). Compare to those defined in pyuaf.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 the pyuaf.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 a list of BrowseResultTarget.

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 corresponding CreateMonitoredDataRequest.

It tells you whether or not the requested monitored items have been created, and some details about them.

  • Methods:

    __init__(*args)

    Create a new CreateMonitoredDataResult object.

    You should never have to create result objects yourself, the UAF will produce them and you will consume them.

    __str__(*args)

    Get a formatted string representation of the result.

  • 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 this CreateMonitoredDataResult. It’s a 64-bit long value, assigned by the UAF during the processing of the request.

class CreateMonitoredDataResultTarget

class pyuaf.client.results.CreateMonitoredDataResultTarget

A CreateMonitoredDataResultTarget corresponds exactly to the CreateMonitoredDataRequestTarget that was part of the invoked CreateMonitoredDataRequest. So the first target of the request corresponds to the first target of the result, and so on.

  • Methods:

    __init__()

    Create a new CreateMonitoredDataRequestTarget object.

    You should never have to create result targets (or results for that matter) yourself, the UAF will produce them and you will consume them.

    __str__(*args)

    Get a formatted string representation of the target.

  • 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 in pyuaf.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 a list of CreateMonitoredDataResultTarget.

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 corresponding CreateMonitoredEventsRequest.

It tells you whether or not the requested monitored items have been created, and some details about them.

  • Methods:

    __init__(*args)

    Create a new CreateMonitoredEventsResult object.

    You should never have to create result objects yourself, the UAF will produce them and you will consume them.

    __str__(*args)

    Get a formatted string representation of the result.

  • 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 this CreateMonitoredEventsResult. It’s a 64-bit long value, assigned by the UAF during the processing of the request.

class CreateMonitoredEventsResultTarget

class pyuaf.client.results.CreateMonitoredEventsResultTarget

A CreateMonitoredEventsResultTarget corresponds exactly to the CreateMonitoredEventsRequestTarget that was part of the invoked CreateMonitoredEventsRequest. So the first target of the request corresponds to the first target of the result, and so on.

  • Methods:

    __init__()

    Create a new CreateMonitoredEventsRequestTarget object.

    You should never have to create result targets (or results for that matter) yourself, the UAF will produce them and you will consume them.

    __str__(*args)

    Get a formatted string representation of the target.

  • 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 in pyuaf.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 a list of CreateMonitoredEventsResultTarget.

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 corresponding HistoryReadRawModifiedRequest.

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:

    __init__(*args)

    Create a new HistoryReadRawModifiedResult object.

    You should never have to create result objects yourself, the UAF will produce them and you will consume them.

    __str__(*args)

    Get a formatted string representation of the result.

  • 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 this HistoryReadRawModifiedResult. It’s a 64-bit long value, assigned by the UAF during the processing of the request.

class HistoryReadRawModifiedResultTarget

class pyuaf.client.results.HistoryReadRawModifiedResultTarget

A HistoryReadRawModifiedResultTarget corresponds exactly to the HistoryReadRawModifiedRequestTarget that was part of the invoked HistoryReadRawModifiedRequest. So the first target of the request corresponds to the first target of the result, and so on.

  • Methods:

    __init__()

    Create a new HistoryReadRawModifiedRequestTarget object.

    You should never have to create result targets (or results for that matter) yourself, the UAF will produce them and you will consume them.

    __str__(*args)

    Get a formatted string representation of the target.

  • Attributes

    opcUaStatusCode

    Status, as an OPC UA status code (an int). Compare to those defined in pyuaf.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 the pyuaf.util.statuscodes module), you may also check the OPC UA statuscode (which are defined in the pyuaf.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. See pyuaf.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 a list of HistoryReadRawModifiedResultTarget.

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 corresponding MethodCallRequest.

It tells you whether or not the requested targets have been called, what were the resulting output arguments, etc.

  • Methods:

    __init__(*args)

    Create a new MethodCallResult object.

    You should never have to create result objects yourself, the UAF will produce them and you will consume them.

    __str__(*args)

    Get a formatted string representation of the result.

  • 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 this MethodCallResult. It’s a 64-bit long value, assigned by the UAF during the processing of the request.

class MethodCallResultTarget

class pyuaf.client.results.MethodCallResultTarget

A MethodCallResultTarget corresponds exactly to the MethodCallRequestTarget that was part of the invoked MethodCallRequest. So the first target of the request corresponds to the first target of the result, and so on.

  • Methods:

    __init__()

    Create a new MethodCallRequestTarget object.

    You should never have to create result targets (or results for that matter) yourself, the UAF will produce them and you will consume them.

    __str__(*args)

    Get a formatted string representation of the target.

  • Attributes

    opcUaStatusCode

    Status, as an OPC UA status code (an int). Compare to those defined in pyuaf.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 the inputArgumentOpcUaStatusCodes 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 the inputArgumentOpcUaStatusCodes to those found in pyuaf.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 in pyuaf.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 a list of MethodCallResultTarget.

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 corresponding ReadRequest.

It tells you whether or not the requested targets have been read, what was the resulting data, etc.

  • Methods:

    __init__(*args)

    Create a new ReadResult object.

    You should never have to create result objects yourself, the UAF will produce them and you will consume them.

    __str__(*args)

    Get a formatted string representation of the result.

  • 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 this ReadResult. It’s a 64-bit long value, assigned by the UAF during the processing of the request.

class ReadResultTarget

class pyuaf.client.results.ReadResultTarget

A ReadResultTarget corresponds exactly to the ReadRequestTarget that was part of the invoked ReadRequest. So the first target of the request corresponds to the first target of the result, and so on.

  • Methods:

    __init__()

    Create a new ReadRequestTarget object.

    You should never have to create result targets (or results for that matter) yourself, the UAF will produce them and you will consume them.

    __str__(*args)

    Get a formatted string representation of the target.

  • 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 in pyuaf.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.

    sourceTimestamp

    The source time stamp of the data, as a DateTime instance.

    serverTimestamp

    The server time stamp of the data, as a DateTime instance.

    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 a list of ReadResultTarget.

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 corresponding TranslateBrowsePathsToNodeIdsRequest.

It tells you whether or not the requested targets have been translated, what were the resulting ExpandedNodeIds, etc.

  • Methods:

    __init__(*args)

    Create a new TranslateBrowsePathsToNodeIdsResult object.

    You should never have to create result objects yourself, the UAF will produce them and you will consume them.

    __str__(*args)

    Get a formatted string representation of the result.

  • 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 this TranslateBrowsePathsToNodeIdsResult. It’s a 64-bit long value, assigned by the UAF during the processing of the request.

class TranslateBrowsePathsToNodeIdsResultTarget

class pyuaf.client.results.TranslateBrowsePathsToNodeIdsResultTarget

A TranslateBrowsePathsToNodeIdsResultTarget corresponds exactly to the TranslateBrowsePathsToNodeIdsRequestTarget that was part of the invoked TranslateBrowsePathsToNodeIdsRequest. So the first target of the request corresponds to the first target of the result, and so on.

  • Methods:

    __init__()

    Create a new TranslateBrowsePathsToNodeIdsRequestTarget object.

    You should never have to create result targets (or results for that matter) yourself, the UAF will produce them and you will consume them.

    __str__(*args)

    Get a formatted string representation of the target.

  • Attributes

    opcUaStatusCode

    Status, as an OPC UA status code (an int). Compare to those defined in pyuaf.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 a list of TranslateBrowsePathsToNodeIdsResultTarget.

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 corresponding WriteRequest.

It tells you whether or not the requested targets have been written successfully.

  • Methods:

    __init__(*args)

    Create a new WriteResult object.

    You should never have to create result objects yourself, the UAF will produce them and you will consume them.

    __str__(*args)

    Get a formatted string representation of the result.

  • 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 this WriteResult. It’s a 64-bit long value, assigned by the UAF during the processing of the request.

class WriteResultTarget

class pyuaf.client.results.WriteResultTarget

A WriteResultTarget corresponds exactly to the WriteRequestTarget that was part of the invoked WriteRequest. So the first target of the request corresponds to the first target of the result, and so on.

  • Methods:

    __init__()

    Create a new WriteRequestTarget object.

    You should never have to create result targets (or results for that matter) yourself, the UAF will produce them and you will consume them.

    __str__(*args)

    Get a formatted string representation of the target.

  • Attributes

    opcUaStatusCode

    Status, as an OPC UA status code (an int). Compare to those defined in pyuaf.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 a list of WriteResultTarget.

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()
>>> # ...