The ResultManagementType provides mechanism to access results generated by the underlying system. Results can be managed in a local result store of the Server. Methods and Objects with Variables as well as Events and external file stores can be used to provide the results to the Client. The ObjectType is formally defined in Table 45.
Table 45 - ResultManagementType Definiton
Attribute |
Value |
||||
BrowseName |
ResultManagementType |
||||
IsAbstract |
False |
||||
References |
Node Class |
BrowseName |
DataType |
TypeDefinition |
Other |
Subtype of the 0:BaseObjectType defined in OPC 10000-5 |
|||||
0:HasProperty |
Variable |
0:DefaultInstanceBrowseName |
0:QualifiedName |
PropertyType |
|
0:HasComponent |
Method |
GetResultById |
|
|
O |
0:HasComponent |
Method |
GetLatestResult |
|
|
O |
0:HasComponent |
Method |
GetResultListFiltered |
|
|
O |
0:HasComponent |
Method |
ReleaseResultHandle |
|
|
O |
0:HasComponent |
Object |
Results |
|
0:FolderType |
O |
0:GeneratesEvent |
ObjectType |
ResultReadyEventType |
|
|
|
The components of the ResultManagementType have additional subcomponents which are defined in Table 46.
Table 46 - ResultManagementType Additional Subcomponents
Source Path |
Reference |
NodeClass |
BrowseName |
DataType |
TypeDefinition |
Others |
Results |
0:HasComponent |
Variable |
<ResultVariable> |
ResultDataType |
ResultType |
OP |
The component Variables of the ResultManagementType have additional Attributes defined in Table 47.
Table 47 - ResultManagementType Attribute values for child nodes
BrowsePath |
Value Attribute |
Description Attribute |
0:DefaultInstanceBrowseName |
ResultManagement |
The default BrowseName for instances of the type. |
Note:
- Server can return the standard OPC UA error codes as part of the status of the method call execution. Example: Method call not implemented, No data available, etc.
This method is used to retrieve a result by identifier from a given system. Depending on the design of the system, the client may be informed by events of ResultReadyEventType that a new result is available. Then, the client might fetch this result using the information provided by events of ResultReadyEventType.
Since the ResultId is supposed to be system-wide unique, this method shall return only a single result. Since there may be additional result content to be retrieved, the server should keep result data available, resources permitting, until the client releases the handle using ReleaseResultHandle method. However, the client cannot rely on the data to remain available until then.
Signature
GetResultById (
[in]GuidResultId,
[in]Int32ResourceTimeout,
[out]UInt32ResultHandle,
[out]ResultDataTypeResult,
[out]Int32Error)
Table 48 - GetResultById Method Arguments
Argument |
Description |
ResultId |
System-wide unique identifier for the result. |
ResourceTimeout |
With this argument the client can give a hint to the server how long it will need access to the result data. A value > 0 indicates an estimated maximum time for processing the data in milliseconds. A value = 0 indicates that the client will not need anything besides the data returned by the method call. A value < 0 indicates that the client cannot give an estimate. The client cannot rely on the data being available during the indicated time period. The argument is merely a hint allowing the server to optimize its resource management. |
ResultHandle |
The server shall return to each client requesting result data a system-wide unique handle identifying the result set / client combination. This handle should be used by the client to indicate to the server that the result data is no longer needed, allowing the server to optimize its resource handling. |
Result |
The result including metadata. |
Error |
0 – OK Values > 0 are reserved for errors defined by this and future standards. Values < 0 shall be used for application-specific errors.
Note: If the error != 0, the server is allowed to return NULL values for Result and 0 for ResultHandle but server might still return some data which is application specific. |
Table 49 - GetResultById Method AddressSpace definition
Attribute |
Value |
||||
BrowseName |
GetResultById |
||||
References |
NodeClass |
BrowseName |
DataType |
TypeDefinition |
Others |
HasProperty |
Variable |
InputArguments |
Argument[] |
PropertyType |
M |
HasProperty |
Variable |
OutputArguments |
Argument[] |
PropertyType |
M |
This method is used to retrieve the latest result available in a given system.
Signature
GetLatestResult (
[in]Int32ResourceTimeout,
[out]UInt32ResultHandle,
[out]ResultDataTypeResult,
[out]Int32Error)
Table 50 - GetLatestResult Method Arguments
Argument |
Description |
ResourceTimeout |
With this argument the client can give a hint to the server how long it will need access to the result data. A value > 0 indicates an estimated maximum time for processing the data in milliseconds. A value = 0 indicates that the client will not need anything besides the data returned by the method call. A value < 0 indicates that the client cannot give an estimate. The client cannot rely on the data being available during the indicated time period. The argument is merely a hint allowing the server to optimize its resource management. |
ResultHandle |
The server shall return to each client requesting result data a system-wide unique handle identifying the result set / client combination. This handle should be used by the client to indicate to the server that the result data is no longer needed, allowing the server to optimize its resource handling. |
Result |
The result including metadata. |
Error |
0 – OK Values > 0 are reserved for errors defined by this and future standards. Values < 0 shall be used for application-specific errors.
Note: If the error != 0, the server is allowed to return NULL values for Result and 0 for ResultHandle but server might still return some data which is application specific. |
Table 51 - GetLatestResult Method AddressSpace definition
Attribute |
Value |
||||
BrowseName |
GetLatestResult |
||||
References |
NodeClass |
BrowseName |
DataType |
TypeDefinition |
Others |
HasProperty |
Variable |
InputArguments |
Argument[] |
PropertyType |
M |
HasProperty |
Variable |
OutputArguments |
Argument[] |
PropertyType |
M |
This method is used to get a list of results matching certain filter criteria.
Signature
GetResultListFiltered (
[in]UtcTimeFromTime,
[in]UtcTimeToTime,
[in]ResultEvaluationResultEvaluation,
[in]Int32[]SequenceNumbers,
[in]UInt32MaxResults,
[in]UInt32StartIndex,
[in]GuidReporterAssetId,
[in]GuidGeneratorAssetId,
[in]BooleanIncludeStepResults,
[in]BooleanIncludeErrors,
[in]BooleanIncludeTraces,
[in]Int32ResourceTimeout,
[out]BooleanIsComplete,
[out]UInt32ResultCount,
[out]UInt32TotalAvailableResults,
[out]UInt32ResultHandle,
[out]ResultDataType[]ResultList,
[out]Int32Error)
Table 52 - GetResultListFiltered Method Arguments
Argument |
Description |
FromTime |
If not null, results from the given FromTime are returned in the ResultList. Any set of results whose StartTime is greater or equal to FromTime will be returned in the ResultList. |
ToTime |
If not null, results till the given toTime are returned in the ResultList. Any set of results whose EndTime is less than or equal to ToTime will be returned in the ResultList. |
ResultEvaluation |
Input to return results based on OK or NOT_OK count. The results based on the evaluation are returned in the ResultList. |
SequenceNumbers |
If not an empty array, the list of sequence numbers requested from the client. |
MaxResults |
Maximum number of results to return in one call; by passing 0, the client indicates that it does not put a limit on the number of results. |
StartIndex |
Shall be 0 on the first call, multiples of MaxResults on subsequent calls to retrieve portions of the entire list, if necessary. |
ReporterAssetId |
If not null, System wide unique identifier of the asset which reports the results. |
GeneratorAssetId |
If not null, System wide unique identifier of the asset which generates the results. |
IncludeStepResults |
A Boolean flag to notify the application to include list of step results in the ResultList. By default, it is set to false. |
IncludeErrors |
A Boolean flag to notify the application to include list of errors in the ResultList. By default, it is set to false. |
IncludeTraces |
A Boolean flag to notify the application to include list of traces in the ResultList. By default, it is set to false. |
ResourceTimeout |
With this argument the client can give a hint to the server how long it will need access to the result data. A value > 0 indicates an estimated maximum time for processing the data in milliseconds. A value = 0 indicates that the client will not need anything besides the data returned by the method call. A value < 0 indicates that the client cannot give an estimate. The client cannot rely on the data being available during the indicated time period. The argument is merely a hint allowing the server to optimize its resource management. |
IsComplete |
Indicates whether there are more results in the entire list than retrieved according to StartIndex and ResultCount. |
ResultCount |
Provides the number of results returned in ResultList in the specific method call. |
TotalAvailableResults |
This is the total number of results available based on the filtering criteria. This value will be same till the IsComplete is set to true if it is based on filter criteria. If filter criteria is not provided, then it is the total number of results available in the server. |
ResultHandle |
The server shall return to each client requesting result data a system-wide unique handle identifying the result set / client combination. This handle should be used by the client to indicate to the server that the result data is no longer needed, allowing the server to optimize its resource handling. |
ResultList |
List of results matching the filter criteria. |
Error |
0 – OK Values > 0 are reserved for errors defined by this and future standards. Values < 0 shall be used for application-specific errors. Note: If the error != 0, the server is allowed to return NULL values for ResultList and 0 for ResultHandle but server might still return some data which is application specific. |
There are the following cases with the respect to the number of results:
- The number of results to be returned according to the filter is less or equal to MaxResults; the first call, with StartIndex =0, returns IsComplete =TRUE, so the client knows that no further calls are necessary. ResultCount gives the number of valid elements in the ResultList array.
- The number of results to be returned is larger than MaxResults; the first N calls (N > 0 with N ≤ (number of results) divisor MaxResults), with StartIndex =(N-1)*MaxResults, return IsComplete =FALSE, so the client knows that further calls are necessary. The following call returns IsComplete =TRUE, so the client knows, no further calls are necessary. ResultCount gives the number of valid elements in the ResultList array (on each call, so on the first N calls, this should be MaxResults).
Table 53 - GetResultListFiltered Method AddressSpace definition
Attribute |
Value |
||||
BrowseName |
GetResultListFiltered |
||||
References |
NodeClass |
BrowseName |
DataType |
TypeDefinition |
Others |
HasProperty |
Variable |
InputArguments |
Argument[] |
PropertyType |
M |
HasProperty |
Variable |
OutputArguments |
Argument[] |
PropertyType |
M |
This method is used to inform the server that the client has finished processing a given result set allowing the server to free resources managing this result set. The server should keep the data of the result set available for the client until the ReleaseResultHandle method is called or until a timeout given by the client has expired.
However, the server is free to release the data at any time, depending on its internal resource management, so the client cannot rely on the data being available. ReleaseResultHandle is merely a hint allowing the server to optimize its internal resource management. For timeout usage see the description.
Note: The ResultHandle is provided as an option to be used by application for flexibility. Applications can choose to use it based on the use case or ignore it.
Signature
ReleaseResultHandle (
[in]UInt32ResultHandle,
[out]Int32Error)
Table 54 - ReleaseResultHandle Method Arguments
Argument |
Description |
ResultHandle |
Handle returned by GetResultById or GetResultListFiltered or GetLatestResult, identifying the result set/client combination. |
Error |
0 – OK Values > 0 are reserved for errors defined by this and future standards. Values < 0 shall be used for application-specific errors. |
Table 55 - ReleaseResultHandle Method AddressSpace definition
Attribute |
Value |
||||
BrowseName |
ReleaseResultHandle |
||||
References |
NodeClass |
BrowseName |
DataType |
TypeDefinition |
Others |
HasProperty |
Variable |
InputArguments |
Argument[] |
PropertyType |
M |
HasProperty |
Variable |
OutputArguments |
Argument[] |
PropertyType |
M |