IEC 62541 · Core

Part 4: Services

Document numberOPC 10000-4
IEC designationIEC 62541-4
ColloquiallyPart 4
GroupCore

Part 4 defines every OPC UA service - the request and response structures, the parameters and the error behaviour - grouped into service sets from Discovery and SecureChannel through View, Attribute, Method, MonitoredItem and Subscription. It also owns the StatusCode catalogue. This is the part client and server developers actually live in.

What it defines

An abstract service definition for every operation OPC UA supports, independent of encoding and transport. Each service gets its request and response parameters, the diagnostics it can return, and the conditions under which it fails. Part 6 then says how those structures are serialised and carried. Part 4 also defines the StatusCode catalogue that the whole standard uses, the DataValue and DiagnosticInfo structures, the audit event types raised for security-relevant calls, and the redundancy model.

The service sets

Discovery covers FindServers, GetEndpoints and RegisterServer. SecureChannel and Session cover the four-stage connection establishment. View covers Browse, BrowseNext, TranslateBrowsePathsToNodeIds and the RegisterNodes optimisation. Attribute covers Read, Write, HistoryRead and HistoryUpdate. Method has one service, Call. MonitoredItem and Subscription cover the entire data-change and event delivery machinery. NodeManagement and Query exist and are rarely implemented.

Everything is batched

Almost every service takes an array of operations and returns an array of results. That means there are two levels of error: the ServiceResult for the whole call, and a per-operation StatusCode for each item in it. A Read of two hundred nodes can return ServiceResult Good with a hundred and ninety-nine values and one BadNodeIdUnknown. Servers cap batch sizes through the OperationLimits object, and exceeding a cap returns BadTooManyOperations for the whole request.

StatusCode structure

A StatusCode is a 32-bit word split into code bits and flag bits: the code is the value masked with 0xFFFF0000 and is what you look up in the catalogue, while the low sixteen bits carry flags including the overflow indicator and the semantics-changed indicator. The severity is the top two bits, which is why every name begins with Good, Uncertain or Bad. A value can therefore be Good and still carry a flag telling you something was lost.

What it defines

ConceptWhat it is
Discovery Service SetFindServers, FindServersOnNetwork, GetEndpoints, RegisterServer. GetEndpoints is the call whose response determines every security decision a client makes.
SecureChannel Service SetOpenSecureChannel, CloseSecureChannel, and token renewal. Channels are renewable and outlive individual requests; an expired token gives BadSecureChannelTokenUnknown.
Session Service SetCreateSession, ActivateSession, CloseSession, Cancel. ActivateSession is where user identity is checked and where a session can be re-bound to a new channel after a reconnect.
View Service SetBrowse, BrowseNext, TranslateBrowsePathsToNodeIds, RegisterNodes, UnregisterNodes. TranslateBrowsePathsToNodeIds is the correct way to resolve a modelled path to a NodeId at runtime.
Attribute Service SetRead, Write, HistoryRead, HistoryUpdate. Read takes a TimestampsToReturn and an optional IndexRange per item; Write takes a full DataValue, which is where unexpected timestamp rejections come from.
Method Service SetCall, with an object NodeId, a method NodeId and input arguments. Returns per-argument results as well as an overall StatusCode, so argument-level errors are recoverable.
MonitoredItem Service SetCreateMonitoredItems, ModifyMonitoredItems, SetMonitoringMode, SetTriggering, DeleteMonitoredItems. This is where sampling interval, filter, queue size and discard policy are set.
Subscription Service SetCreateSubscription, ModifySubscription, SetPublishingMode, Publish, Republish, TransferSubscriptions, DeleteSubscriptions. Publish is a long-poll the client keeps outstanding.
StatusCode catalogueThe normative list of Good, Uncertain and Bad codes, their numeric values and the conditions they report. Everything from BadNodeIdUnknown to GoodSubscriptionTransferred is defined here.
Audit event types and redundancyAuditEventType and its security subtypes for channel, session, activation and certificate auditing, plus the server and client redundancy modes - cold, warm, hot and transparent - whose failover semantics differ sharply.

Do you need to read it?

Client and server developers, and anyone debugging with a packet capture. If you are reading a StatusCode and want to know exactly what condition the server is reporting, this is the part that says. Integrators need it less often, but the batching model and the OperationLimits caps explain a large share of unexplained failures in production clients.

Traps that trace back to this part

  • Reading only the service-level result hides per-item failures. A batched Read or Write returns Good at the service level while individual items carry BadNodeIdUnknown, BadNotWritable or BadUserAccessDenied. Client code that checks the ServiceResult and then trusts the array will report success for values it never got.
  • A Good StatusCode can mean data was lost. The overflow flag lives in the low sixteen bits of the word, so a queue overflow on a MonitoredItem arrives as a code whose looked-up name is Good with the overflow bit set - decimal 1152, hex 0x480, being the DataValueInfo and overflow bits together. Mask with 0xFFFF0000 to get the code and inspect the flags separately, or you will never see the loss.
  • Continuation points are a finite per-session resource. Browse returns BadNoContinuationPoints when the server's pool is exhausted, and a client that abandons a partial browse without calling BrowseNext with releaseContinuationPoints set leaks them until the session dies. Always release what you abandon.
  • Publish is a long-poll, not a poll. The client keeps several Publish requests outstanding and the server answers them as notifications arrive. BadTooManyPublishRequests is the server telling you to lower that count; some servers tolerate a gradual client-side backoff and others do not, so cap the outstanding count explicitly.

Last verified 7 September 2026 against OPC UA 1.05.07. The specification parts themselves are published by the OPC Foundation. OPC UA Connect is an educational resource and is not affiliated with the OPC Foundation.

Free download
OPC UA Server Acceptance Test Pack
A 40-check acceptance test you run against a vendor's server before commissioning sign-off. Weighted scoring, three hard gates, and a one-page verdict for the supplier meeting.
Get the free test pack →
Free, no course, no login