NodeOPCUA API Documentation
    Preparing search index...

    Implements

    Index
    continuationPoints: Buffer<ArrayBufferLike>[] = []
    currentTime?: PreciseClock

    Server timestamp at the time the request was received.

    object: UAObjectType | UAObject<UAObjectEvents> | undefined

    The object on which the current operation is being performed.

    requestHeader?: RequestHeader

    The RequestHeader of the request currently being served through this context, when one is available. A context built for one Call service invocation (see ServerSession's per-request context, opcua_server.ts _on_CallRequest) carries the RequestHeader of that CallRequest, so a bound Method handler can read context.requestHeader?.auditEntryId - OPC 10000-4 v1.05.07 §7.32 RequestHeader - and copy it into ClientAuditEntryId when it raises an AuditEventType - OPC 10000-5 v1.05.06 §6.4.3. undefined for a context with no request behind it, e.g. a Session's own long-lived sessionContext, or most PseudoSession calls.

    server?: IServerBase
    session?: ISessionBase

    The underlying OPC UA session, if available.

    defaultContext: SessionContext = ...
    • A SessionContext identical to this one, plus requestHeader (and the getAuditEntryId() it feeds). Deliberately a new instance rather than a mutation of this: build one per Call service invocation (see opcua_server.ts _on_CallRequest), never by writing onto the Session's own long-lived sessionContext. That object is shared and read concurrently by every request in flight on the Session (ServerSession#sessionContext is one instance for the Session's whole lifetime - see also UAMethodImpl#execute, which already mutates context.object on whatever context it is handed), so a shared mutable RequestHeader field would let two Calls running at once on the same Session overwrite or read back the wrong id. A fresh instance per Call has none of that: nothing but the caller holds a reference to it.

      Parameters

      Returns SessionContext