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.33for 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.40.

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

Response

responseHeader

ResponseHeader

Common response parameters (see 7.34for ResponseHeaderdefinition).

results []

DataValue

List of Attributevalues (see 7.11for 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.12for 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 182.

Table 54– Read Service Result Codes

Symbolic Id

Description

Bad_NothingToDo

See Table 182for the description of this result code.

Bad_TooManyOperations

See Table 182for the description of this result code.

Bad_MaxAgeInvalid

The max age parameter is invalid.

Bad_TimestampsToReturnInvalid

See Table 182for 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 183.

Table 55– Read Operation Level Result Codes

Symbolic Id

Description

Bad_NodeIdInvalid

See Table 183for the description of this result code.

Bad_NodeIdUnknown

See Table 183for the description of this result code.

Bad_AttributeIdInvalid

See Table 183for the description of this result code.

Bad_IndexRangeInvalid

See Table 183for the description of this result code.

Bad_IndexRangeNoData

See Table 183for the description of this result code.

Bad_DataEncodingInvalid

See Table 183for the description of this result code.

Bad_DataEncodingUnsupported

See Table 183for the description of this result code.

Bad_NotReadable

See Table 183for the description of this result code.

Bad_UserAccessDenied

See Table 182for the description of this result code.

Bad_SecurityModeInsufficient

See Table 183for the description of this result code.