/** * @module node-opcua-address-space.Private * * The layout of an event: which fields an event of a given type carries, where each one sits in the * type hierarchy and under which name `raiseEvent`'s caller provides its value. Raising an event * used to rediscover this by browsing the event type and its supertypes; the layout is now built * once per event type and rebuilt only when one of the nodes it was read from changes. */ import type { BaseNode, IAddressSpace, UAObjectType } from "node-opcua-address-space-base"; import { type NodeId } from "node-opcua-nodeid"; export interface EventField { /** the key under which the caller of raiseEvent gives the value: `"enabledState.id"` */ lowerName: string; /** the browse path of the field from the event type: `"EnabledState.Id"` */ fullBrowsePath: string; node: BaseNode; /** `node.nodeId.toString()`, the key under which a select clause reads the value back */ nodeIdKey: string; mandatory: boolean; } interface Dependency { node: BaseNode; /** the node's cache object when the layout was built; a change to the node replaces it */ cache: object; } export interface EventLayout { fields: EventField[]; /** every `lowerName`, to tell a caller which of its keys name no field */ names: Set; /** browse path to field NodeId, shared by every event raised with this layout */ pathToNodeId: Map; dependencies: Dependency[]; } /** * the layout of events of the given type, built on first use and after a change to the type hierarchy */ export declare function getEventLayout(addressSpace: IAddressSpace, eventType: UAObjectType, baseObjectType: UAObjectType): EventLayout; /** for tests: the cached layout of an event type, if any, without rebuilding it */ export declare function peekEventLayout(eventType: UAObjectType): EventLayout | undefined; export {};