The full event catalogue — 52 classes grouped by lifecycle. Each event carries a $client reference plus a handful of typed fields.
The library dispatches 52 event classes. Every event extends a
common shape with a $client property; the per-event fields below are
the additions on top of that.
All event classes live in PhpOpcua\Client\Event\.
| Event |
Fires when |
Key fields |
ClientConnecting |
connect() starts |
endpoint |
ClientConnected |
Session is activated |
endpoint, sessionId |
ClientDisconnecting |
disconnect() starts |
— |
ClientDisconnected |
Disconnect completed (clean or broken) |
— (only $client) |
ClientReconnecting |
reconnect() starts |
endpoint |
ConnectionFailed |
connect() raised |
endpoint, exception |
| Event |
Fires when |
Key fields |
SecureChannelOpened |
OPN exchange completed |
channelId, securityPolicy (enum), securityMode |
SecureChannelClosed |
CLO sent or socket dropped |
channelId |
| Event |
Fires when |
Key fields |
SessionCreated |
After CreateSession |
sessionId, sessionName |
SessionActivated |
After ActivateSession |
sessionId |
SessionClosed |
After CloseSession |
sessionId |
| Event |
Fires when |
Key fields |
NodeValueRead |
read() succeeded |
nodeId, attributeId, dataValue |
NodeValueWritten |
write() returned Good |
nodeId, value, type |
NodeValueWriteFailed |
write() returned non-Good |
nodeId, value, type, statusCode |
| Event |
Fires when |
Key fields |
WriteTypeDetecting |
Auto-detection started for a node |
nodeId |
WriteTypeDetected |
Auto-detection produced a BuiltinType |
nodeId, detectedType, fromCache |
| Event |
Fires when |
Key fields |
NodeBrowsed |
browse() succeeded |
nodeId, direction, referenceCount |
| Event |
Fires when |
Key fields |
SubscriptionCreated |
createSubscription() succeeded |
subscriptionId, revisedPublishingInterval |
SubscriptionDeleted |
deleteSubscription() succeeded |
subscriptionId |
SubscriptionKeepAlive |
Server sent an empty publish response |
subscriptionId |
SubscriptionTransferred |
transferSubscriptions() returned Good |
subscriptionId |
| Event |
Fires when |
Key fields |
MonitoredItemCreated |
createMonitoredItems() returned Good |
subscriptionId, monitoredItemId, nodeId, statusCode |
MonitoredItemModified |
modifyMonitoredItems() returned Good |
subscriptionId, monitoredItemId |
MonitoredItemDeleted |
deleteMonitoredItems() returned Good |
subscriptionId, monitoredItemId |
| Event |
Fires when |
Key fields |
DataChangeReceived |
A data-change notification was delivered |
subscriptionId, sequenceNumber, clientHandle, dataValue |
EventNotificationReceived |
An event notification was delivered |
subscriptionId, sequenceNumber, clientHandle, eventFields |
PublishResponseReceived |
Any publish response (including keep-alives) |
subscriptionId, sequenceNumber, notificationCount, moreNotifications |
| Event |
Fires when |
Key fields |
TriggeringConfigured |
setTriggering() returned Good |
subscriptionId, triggeringItemId, addResults, removeResults |
These are auto-deduced from event notification payloads — when an
EventNotificationReceived event carries alarm-shaped fields, the
library dispatches one of the specific events below in addition.
| Event |
Fires when |
Key fields |
AlarmEventReceived |
Any alarm-shaped event |
sourceName, message, severity, eventType |
AlarmActivated |
ActiveState → Active |
subscriptionId, clientHandle, sourceName, severity, message |
AlarmDeactivated |
ActiveState → Inactive |
sourceName |
AlarmAcknowledged |
AckedState → acknowledged |
sourceName, acknowledger |
AlarmConfirmed |
ConfirmedState → confirmed |
sourceName |
AlarmShelved |
Shelved/Unshelved state transition |
sourceName, shelved |
AlarmSeverityChanged |
Severity changed |
sourceName, oldSeverity, newSeverity |
LimitAlarmExceeded |
LimitAlarmType variants tripped a limit |
subscriptionId, clientHandle, sourceName, limitState, severity |
OffNormalAlarmTriggered |
OffNormalAlarmType variants tripped |
subscriptionId, clientHandle, sourceName, severity |
| Event |
Fires when |
Key fields |
DataTypesDiscovered |
discoverDataTypes() completed |
namespaceIndex, count |
History updates (4)
Dispatched after each HistoryUpdate call returns. Added in v4.4.0.
| Event |
Fires when |
Key fields |
HistoryDataUpdated |
historyInsertData() / historyReplaceData() / historyUpdateData() returned |
nodeId, operation (PerformUpdateType), valueCount, operationResults (int[]) |
HistoryDataDeleted |
historyDeleteRawModified() (kind: 'rawModified') or historyDeleteAtTime() (kind: 'atTime') returned |
nodeId, kind (string), statusCode (int), operationResults (int[], populated only for atTime) |
HistoryEventUpdated |
historyInsertEvent() / historyReplaceEvent() / historyUpdateEvent() returned |
nodeId, operation (PerformUpdateType), eventCount, operationResults (int[]) |
HistoryEventDeleted |
historyDeleteEvent() returned |
nodeId, eventCount, operationResults (int[]) |
PerformUpdateType is an int-backed enum
(Insert=1, Replace=2, Update=3, Remove=4) — see
Operations · History writes.
Dispatched after the client-side aggregator finishes a windowed
computation. Added in v4.4.0.
| Event |
Fires when |
Key fields |
AggregateComputed |
aggregate() or historyAggregate() returned |
function (AggregateFunction), rawInputCount, intervalCount, nodeId (?NodeId, null for in-memory) |
See Operations · Client-side aggregates.
| Event |
Fires when |
Key fields |
CacheHit |
A cached value was returned |
key, operation, nodeId |
CacheMiss |
A miss triggered a server round-trip |
key, operation, nodeId |
| Event |
Fires when |
Key fields |
RetryAttempt |
A retry is about to run |
operation, attempt, exception |
RetryExhausted |
The retry budget is exhausted and the call fails |
operation, attempts, exception |
| Event |
Fires when |
Key fields |
ServerCertificateTrusted |
Cert was already in store, accepted |
fingerprint |
ServerCertificateAutoAccepted |
TOFU recorded a new cert |
fingerprint |
ServerCertificateRejected |
Cert was rejected (validation failed) |
fingerprint, reason |
ServerCertificateManuallyTrusted |
trustCertificate() was called |
fingerprint |
ServerCertificateRemoved |
untrustCertificate() was called |
fingerprint |
Putting them in context
| You want |
Listen for |
| "Tell me when the connection is up" |
ClientConnected |
| "Tell me when it breaks" |
ConnectionFailed (raised exception); ClientDisconnected covers both clean and broken |
| "Count reads" |
NodeValueRead |
| "Count failed writes" |
NodeValueWriteFailed |
| "Page on critical alarms" |
AlarmActivated filtered by severity |
| "Measure cache effectiveness" |
CacheHit and CacheMiss |
| "Track retry behaviour" |
RetryAttempt, RetryExhausted |
| "Audit certificate trust decisions" |
The five trust-store events |
For wiring patterns, see Events. For events you want to
trigger programmatically (in tests), see Testing ·
MockClient.