This Service Setprovides Servicesto access Attributesthat are part of Nodes.

This Serviceis used to read one or more Attributesof one or more Nodes. For constructed Attributevalues whose elements are indexed, such as an array, this Serviceallows Clientsto read the entire set of indexed values as a composite, to read individual elements or to read ranges of elements of the composite.

The maxAge parameter is used to direct the Serverto access the value from the underlying data source, such as a device, if its copy of the data is older than that which the maxAge specifies. If the Servercannot meet the requested maximum age, it returns its “best effort” value rather than rejecting the request.

Table 53defines the parameters for the Service.

Table 53– Read Service Parameters

Name

Type

Description

Request

requestHeader

RequestHeader

Common request parameters (see 7.28for RequestHeaderdefinition).

maxAge

Duration

Maximum age of the value to be read in milliseconds. The age of the value is based on the difference between the ServerTimestampand the time when the Serverstarts processing the request. For example if the Clientspecifies a maxAgeof 500 milliseconds and it takes 100 milliseconds until the Serverstarts processing the request, the age of the returned value could be 600 milliseconds prior to the time it was requested.

If the Serverhas one or more values of an Attributethat are within the maximum age, it can return any one of the values or it can read a new value from the data source. The number of values of an Attributethat a Serverhas depends on the number of MonitoredItemsthat are defined for the Attribute. In any case, the Clientcan make no assumption about which copy of the data will be returned.

If the Serverdoes not have a value that is within the maximum age, it shall attempt to read a new value from the data source.

If the Servercannot meet the requested maxAge, it returns its “best effort” value rather than rejecting the request. This may occur when the time it takes the Serverto process and return the new data value after it has been accessed is greater than the specified maximum age.

If maxAgeis set to 0, the Servershall attempt to read a new value from the data source.

If maxAgeis set to the max Int32 value or greater, the Servershall attempt to get a cached value.

Negative values are invalid for maxAge.

timestampsTo

Return

Enum

TimestampsTo Return

An enumeration that specifies the Timestampsto be returned for each requested Variable Value Attribute. The TimestampsToReturnenumeration is defined in 7.35.

nodesToRead []

ReadValueId

List of Nodesand their Attributesto read. For each entry in this list, a StatusCodeis returned, and if it indicates success, the Attribute Valueis also returned. The ReadValueId parameter type is defined in 7.24.

Response

responseHeader

ResponseHeader

Common response parameters (see 7.29for ResponseHeaderdefinition).

results []

DataValue

List of Attributevalues (see 7.7for DataValuedefinition). The size and order of this list matches the size and order of the nodesToReadrequest parameter. There is one entry in this list for each Nodecontained in the nodesToReadparameter.

diagnosticInfos []

DiagnosticInfo

List of diagnostic information (see 7.8for DiagnosticInfo definition). The size and order of this list matches the size and order of the nodesToReadrequest parameter. There is one entry in this list for each Nodecontained in the nodesToReadparameter. This list is empty if diagnostics information was not requested in the request header or if no diagnostic information was encountered in processing of the request.

Table 54defines the Serviceresults specific to this Service. Common StatusCodesare defined in Table 177.

Table 54– Read Service Result Codes

Symbolic Id

Description

Bad_NothingToDo

See Table 177for the description of this result code.

Bad_TooManyOperations

See Table 177for the description of this result code.

Bad_MaxAgeInvalid

The max age parameter is invalid.

Bad_TimestampsToReturnInvalid

See Table 177for the description of this result code.

Table 55defines values for the operation level statusCodecontained in the DataValuestructure of each resultselement. Common StatusCodesare defined in Table 178.

Table 55– Read Operation Level Result Codes

Symbolic Id

Description

Bad_NodeIdInvalid

See Table 178for the description of this result code.

Bad_NodeIdUnknown

See Table 178for the description of this result code.

Bad_AttributeIdInvalid

See Table 178for the description of this result code.

Bad_IndexRangeInvalid

See Table 178for the description of this result code.

Bad_IndexRangeNoData

See Table 178for the description of this result code.

Bad_DataEncodingInvalid

See Table 178for the description of this result code.

Bad_DataEncodingUnsupported

See Table 178for the description of this result code.

Bad_NotReadable

See Table 178for the description of this result code.

Bad_UserAccessDenied

See Table 177for the description of this result code.

Bad_SecurityModeInsufficient

See Table 178for the description of this result code.

This Serviceis used to read historical values or Eventsof one or more Nodes. For constructed Attributevalues whose elements are indexed, such as an array, this Serviceallows Clientsto read the entire set of indexed values as a composite, to read individual elements or to read ranges of elements of the composite. Serversmay make historical values available to Clientsusing this Service, although the historical values themselves are not visible in the AddressSpace.

The AccessLevel Attributedefined in OPC 10000-3indicates a Node’s support for historical values. Several request parameters indicate how the Serveris to access values from the underlying history data source. The EventNotifier Attributedefined in OPC 10000-3indicates a Node’s support for historical Events.

The continuationPointparameter in the HistoryReadis used to mark a point from which to continue the read if not all values could be returned in one response. The value is opaque for the Clientand is only used to maintain the state information for the Serverto continue from. A Servermay use the timestamp of the last returned data item if the timestamp is unique. This can reduce the need in the Serverto store state information for the continuation point.

In some cases it may take longer than the Clienttimeout hint to read the data for all nodes to read. Then the Servermay return zero results with a continuation point for the affected nodes before the timeout expires. That allows the Serverto resume the data acquisition on the next Clientread call.

For additional details on reading historical data and historical Eventssee OPC 10000-11.

Table 56defines the parameters for the Service.

Table 56– HistoryRead Service Parameters

Name

Type

Description

Request

requestHeader

RequestHeader

Common request parameters (see 7.28for RequestHeaderdefinition).

historyReadDetails

Extensible Parameter

HistoryReadDetails

The details define the types of history reads that can be performed. The HistoryReadDetailsparameter type is an extensible parameter type formally defined in OPC 10000-11. The ExtensibleParametertype is defined in 7.12.

timestampsToReturn

Enum

TimestampsTo Return

An enumeration that specifies the timestamps to be returned for each requested Variable Value Attribute. The TimestampsToReturnenumeration is defined in 7.35.

Specifying a TimestampsToReturnof NEITHER is not valid. A Servershall return a Bad_InvalidTimestampArgument StatusCodein this case.

OPC 10000-11defines exceptions where this parameter shall be ignored.

releaseContinuation

Points

Boolean

A Booleanparameter with the following values:

TRUEpassed continuationPointsshall be reset to free resources in the Server.

FALSEpassed continuationPointsshall be used to get the next set of historical information.

A Clientshall always use the continuation point returned by a HistoryReadresponse to free the resources for the continuation point in the Server. If the Clientdoes not want to get the next set of historical information, HistoryReadshall be called with this parameter set to TRUE.

nodesToRead []

HistoryReadValueId

This parameter contains the list of items upon which the historical retrieval is to be performed. This structure is defined in-line with the following indented items.

nodeId

NodeId

If the HistoryReadDetailsisRAW, PROCESSED, MODIFIED or ATTIME:

The nodeIdof the Nodeswhose historical values are to be read. The value returned shall always include a timestamp.

If the HistoryReadDetailsisEVENTS:

The NodeIdof the Nodewhose Eventhistory is to be read.

If the Nodedoes not support the requested access for historical values or historical Eventsthe appropriate error response for the given Nodeshall be generated.

indexRange

NumericRange

This parameter is used to identify a single element of an array, or a single range of indexes for arrays. If a range of elements is specified, the values are returned as a composite. The first element is identified by index 0 (zero). The NumericRangetype is defined in 7.22.

This parameter is null if the value is not an array. However, if the value is an array, and this parameter is null, then all elements are to be included in the range.

dataEncoding

QualifiedName

A QualifiedNamethat specifies the data encoding to be returned for the Valueto be read (see 7.24for definition how to specify the data encoding).

This parameter only applies if the DataTypeof the Variableis a subtype of Structure. It is an error to specific this parameter if the DataTypeof the Variableis not a subtype of Structure.

The parameter is ignored when reading history of Events.

continuationPoint

ContinuationPoint

For each NodesToReaditem this parameter specifies a continuation point returned from a previous HistoryReadcall, allowing the Clientto continue that read from the last value received.

The HistoryReadis used to select an ordered sequence of historical values or events. A continuation point marks a point in that ordered sequence, such that the Serverreturns the subset of the sequence that follows that point.

A null value indicates that this parameter is not used.

See 7.6for a general description of continuation points.

This continuation point is described in more detail in OPC 10000-11.

Response

responseHeader

ResponseHeader

Common response parameters (see 7.29for ResponseHeadertype).

results []

HistoryReadResult

List of read results. The size and order of the list matches the size and order of the nodesToReadrequest parameter. This structure is defined in-line with the following indented items.

statusCode

StatusCode

StatusCodefor the NodesToReaditem (see 7.34for StatusCodedefinition).

continuationPoint

ContinuationPoint

This parameter is used only if the number of values to be returned is too large to be returned in a single response or if the timeout provided as hint by the Clientis close to expiring and not all nodes have been processed.

When this parameter is not used, its value is null.

Serversshall support at least one continuation point per Session. Serversspecify a max history continuation points per Sessionin the Servercapabilities Objectdefined in OPC 10000-5. A continuation point shall remain active until the Clientpasses the continuation point to HistoryReador the Sessionis closed. If the max continuation points have been reached the oldest continuation point shall be reset.

historyData

Extensible Parameter

HistoryData

The history data returned for the Node.

The HistoryDataparameter type is an extensible parameter type formally defined in OPC 10000-11. It specifies the types of history data that can be returned. The ExtensibleParameterbase type is defined in 7.12.

diagnosticInfos []

Diagnostic Info

List of diagnostic information. The size and order of the list matches the size and order of the nodesToReadrequest parameter. There is one entry in this list for each Nodecontained in the nodesToReadparameter. This list is empty if diagnostics information was not requested in the request header or if no diagnostic information was encountered in processing of the request.

Table 57defines the Serviceresults specific to this Service. Common StatusCodesare defined in Table 177.

Table 57– HistoryRead Service Result Codes

Symbolic Id

Description

Bad_NothingToDo

See Table 177for the description of this result code.

Bad_TooManyOperations

See Table 177for the description of this result code.

Bad_TimestampsToReturnInvalid

See Table 177for the description of this result code.

Bad_HistoryOperationInvalid

See Table 178for the description of this result code.

Bad_HistoryOperationUnsupported

See Table 178for the description of this result code.

The requested history operation is not supported by the server.

Table 58defines values for the operation level statusCodeparameter that are specific to this Service. Common StatusCodesare defined in Table 178. History access specific StatusCodesare defined in OPC 10000-11.

Table 58– HistoryRead Operation Level Result Codes

Symbolic Id

Description

Bad_NodeIdInvalid

See Table 178for the description of this result code.

Bad_NodeIdUnknown

See Table 178for the description of this result code.

Bad_DataEncodingInvalid

See Table 178for the description of this result code.

Bad_DataEncodingUnsupported

See Table 178for the description of this result code.

Bad_UserAccessDenied

See Table 177for the description of this result code.

Bad_ContinuationPointInvalid

See Table 177for the description of this result code.

Bad_InvalidTimestampArgument

The defined timestamp to return was invalid.

Bad_HistoryOperationUnsupported

See Table 178for the description of this result code.

The requested history operation is not supported for the requested node.

Bad_NoContinuationPoints

See Table 178for the description of this result code.

See 7.6for the rules to apply this status code.

This Serviceis used to write values to one or more Attributesof one or more Nodes. For constructed Attributevalues whose elements are indexed, such as an array, this Serviceallows Clientsto write the entire set of indexed values as a composite, to write individual elements or to write ranges of elements of the composite.

The values are written to the data source, such as a device, and the Servicedoes not return until it writes the values or determines that the value cannot be written. In certain cases, the Serverwill successfully write to an intermediate system or Server, and will not know if the data source was updated properly. In these cases, the Servershould report a success code that indicates that the write was not verified. In the cases where the Serveris able to verify that it has successfully written to the data source, it reports an unconditional success.

The order the operations are processed in the Serveris not defined and depends on the different data sources and the internal Serverlogic. If an Attributeand Nodecombination is contained in more than one operation, the order of the processing is undefined. If a Clientrequires sequential processing the Clientneeds separate Servicecalls.

It is possible that the Servermay successfully write some Attributes, but not others. Rollback is the responsibility of the Client.

If a Serverallows writing of Attributeswith the DataType LocalizedText, the Client can add or overwrite the text for a locale by writing the text with the associated LocaleId. Writing a null Stringfor the text for a locale shall delete the Stringfor that locale. Writing a null Stringfor the localeand a non-null Stringfor the textis setting the textfor an invariant locale. Writing a null Stringfor the textand a null Stringfor the localeshall delete the entries for all locales. If a Clientattempts to write a localethat is either syntactically invalid or not supported, the Serverreturns Bad_LocaleNotSupported. The Writebehaviour for Value Attributeswith a LocalizedText DataTypeis Serverspecific but it is recommended to follow the same rules.

Table 59defines the parameters for the Service.

Table 59– Write Service Parameters

Name

Type

Description

Request

requestHeader

RequestHeader

Common request parameters (see 7.28for RequestHeaderdefinition).

nodesToWrite []

WriteValue

List of Nodesand their Attributesto write. This structure is defined in-line with the following indented items.

nodeId

NodeId

NodeIdof the Nodethat contains the Attributes.

attributeId

IntegerId

Id of the Attribute. This shall be a valid Attributeid. The IntegerId is defined in 7.14. The IntegerIds for the Attributes are defined in OPC 10000-6.

indexRange

NumericRange

This parameter is used to identify a single element of an array, or a single range of indexes for arrays. The first element is identified by index 0 (zero). The NumericRangetype is defined in 7.22.

This parameter is not used if the specified Attributeis not an array. However, if the specified Attributeis an array and this parameter is not used, then all elements are to be included in the range. The parameter is null if not used.

A Servershall return a Bad_WriteNotSupported error if an indexRangeis provided and writing of indexRangeis not possible for the Node.

value

DataValue

The Node’s Attributevalue (see 7.7for DataValuedefinition).

If the indexRange parameter is specified then the Valueshall be an array even if only one element is being written.

If the SourceTimestampor the ServerTimestampis specified, the Servershall use these values. The Serverreturns a Bad_WriteNotSupported error if it does not support writing of timestamps.

A Servershall return a Bad_TypeMismatch error if the data type of the written value is not the same type or subtype of the Attribute’s DataType. Based on the DataTypehierarchy, subtypes of the Attribute DataTypeshall be accepted by the Server. Serversmay reject subtypes defined in newer specification versions than supported by the Serverwith Bad_TypeMismatch. For the Value Attributethe DataTypeis defined through the DataType Attribute. A ByteStringis structurally the same as a one dimensional array of Byte. A Servershall accept a ByteStringif an array of Byteis expected.

The Serverreturns a Bad_DataEncodingUnsupported error if it does not support the provided data encoding.

Simple DataTypes(see OPC 10000-3) use the same representation on the wire as their super types and therefore writing a value of a simple DataTypecannot be distinguished from writing a value of its super type. The Servershall assume that by receiving the correct wire representation for a simpleDataTypethe correct type was chosen. Serversare allowed to impose additional data validations on the value independent of the encoding (e.g. having an image in GIF format in a ByteString). In this case the Servershall return a Bad_TypeMismatch error if the validation fails.

Response

responseHeader

ResponseHeader

Common response parameters (see 7.29for ResponseHeaderdefinition).

results []

StatusCode

List of results for the Nodesto write (see 7.34for StatusCodedefinition). The size and order of the list matches the size and order of the nodesToWriterequest parameter. There is one entry in this list for each Nodecontained in the nodesToWriteparameter.

diagnosticInfos []

DiagnosticInfo

List of diagnostic information for the Nodesto write (see 7.8for DiagnosticInfo definition). The size and order of the list matches the size and order of the nodesToWriterequest parameter. This list is empty if diagnostics information was not requested in the request header or if no diagnostic information was encountered in processing of the request.

Table 60defines the Serviceresults specific to this Service. Common StatusCodesare defined in Table 177.

Table 60– Write Service Result Codes

Symbolic Id

Description

Bad_NothingToDo

See Table 177for the description of this result code.

Bad_TooManyOperations

See Table 177for the description of this result code.

Table 61defines values for the resultsparameter that are specific to this Service. Common StatusCodesare defined in Table 178.

Table 61– Write Operation Level Result Codes

Symbolic Id

Description

Good_CompletesAsynchronously

See Table 177for the description of this result code.

The value was successfully written to an intermediate system but the Serverdoes not know if the data source was updated properly.

Bad_NodeIdInvalid

See Table 178for the description of this result code.

Bad_NodeIdUnknown

See Table 178for the description of this result code.

Bad_AttributeIdInvalid

See Table 178for the description of this result code.

Bad_IndexRangeInvalid

See Table 178for the description of this result code.

Bad_IndexRangeNoData

See Table 178for the description of this result code.

Bad_WriteNotSupported

The requested write operation is not supported.

If a Clientattempts to write any value, status code, timestamp combination and the Serverdoes not support the requested combination (which could be a single quantity such as just timestamp); than the Servershall not perform any write on this Nodeand shall return this StatusCodefor this Node. It is also used if writing an IndexRange is not supported for a Node.

Bad_NotWritable

See Table 178for the description of this result code.

Bad_UserAccessDenied

See Table 177for the description of this result code.

The current user does not have permission to write the attribute.

Bad_OutOfRange

See Table 178for the description of this result code.

If a Clientattempts to write a value outside the valid range like a value not contained in the enumeration data type of the Node, the Server shall return this StatusCodefor this Node.

Bad_TypeMismatch

See Table 178for the description of this result code.

Bad_DataEncodingUnsupported

See Table 178for the description of this result code.

Bad_NoCommunication

See Table 178for the description of this result code.

Bad_LocaleNotSupported

The locale in the requested write operation is not supported.

This Serviceis used to update historical values or Eventsof one or more Nodes. Several request parameters indicate how the Serveris to update the historical value or Event. Valid actions are Insert, Replace or Delete.

Table 62defines the parameters for the Service.

Table 62– HistoryUpdate Service Parameters

Name

Type

Description

Request

requestHeader

RequestHeader

Common request parameters (see 7.28for RequestHeaderdefinition).

historyUpdateDetails []

Extensible Parameter

HistoryUpdate

Details

The details defined for this update. The HistoryUpdateDetailsparameter type is an extensible parameter type formally defined in OPC 10000-11. It specifies the types of history updates that can be performed. The ExtensibleParametertype is defined in 7.12.

Response

responseHeader

ResponseHeader

Common response parameters (see 7.29for ResponseHeaderdefinition).

results []

HistoryUpdate Result

List of update results for the history update details. The size and order of the list matches the size and order of the details element of the historyUpdateDetailsparameter specified in the request. This structure is defined in-line with the following indented items.

statusCode

StatusCode

StatusCodefor the update of the Node(see 7.34for StatusCodedefinition).

operationResults []

StatusCode

List of StatusCodesfor the operations to be performed on a Node. The size and order of the list matches the size and order of any list defined by the details element being reported by this result entry.

diagnosticInfos []

DiagnosticInfo

List of diagnostic information for the operations to be performed on a Node(see 7.8for DiagnosticInfo definition). The size and order of the list matches the size and order of any list defined by the details element being reported by this resultsentry. This list is empty if diagnostics information was not requested in the request header or if no diagnostic information was encountered in processing of the request.

diagnosticInfos []

DiagnosticInfo

List of diagnostic information for the history update details. The size and order of the list matches the size and order of the details element of the historyUpdateDetailsparameter specified in the request. This list is empty if diagnostics information was not requested in the request header or if no diagnostic information was encountered in processing of the request.

Table 63defines the Serviceresults specific to this Service. Common StatusCodesare defined in Table 177.

Table 63– HistoryUpdate Service Result Codes

Symbolic Id

Description

Bad_NothingToDo

See Table 177for the description of this result code.

Bad_TooManyOperations

See Table 177for the description of this result code.

Table 64defines values for the statusCode andoperationResultsparameters that are specific to this Service. Common StatusCodesare defined in Table 178. History access specific StatusCodesare defined in OPC 10000-11.

Table 64– HistoryUpdate Operation Level Result Codes

Symbolic Id

Description

Bad_NotWritable

See Table 178for the description of this result code.

Bad_HistoryOperationInvalid

See Table 178for the description of this result code.

Bad_HistoryOperationUnsupported

See Table 178for the description of this result code.

Bad_UserAccessDenied

See Table 177for the description of this result code.

The current user does not have permission to update the history.