import { NodeIdType } from '../generated/NodeIdType'; export declare class NodeId { static readonly NullNodeId: Readonly; identifierType: NodeIdType; value: number | string | Uint8Array; namespace: number; /** * Construct a node ID * * @class NodeId * @param {NodeIdType} identifierType - the nodeID type * @param {Number|String|GUID|Buffer} value - the node id value. The type of Value depends on identifierType. * @param {Number} namespace - the index of the related namespace (optional , default value = 0 ) * @example * * ``` javascript * var nodeId = new NodeId(NodeIdType.NUMERIC,123,1); * ``` * @constructor */ constructor(identifierType: NodeIdType, value: number | string | Uint8Array, namespace?: number); /** * get the string representation of the nodeID. * * @example * * by default, toString will return the "ns=" representation * * ``` javascript * var nodeid = new NodeId(NodeIdType.NUMERIC, 123,1); * console.log(nodeid.toString()); * ``` * * ``` * >"ns=1;i=123" * ``` * @example * * toString can also be used to make the nsu= version of the nodeid. * * ```javascript * const namespaceArray = ["http://opcfoundation.com/UA/","http://mynamespace2"]; * const nodeid = new NodeId(NodeIdType.STRING, "Hello",1); * console.log(nodeid.toString({namespaceArray})); * ``` * ``` * >"nsu=http://mynamespace;i=123" * ``` * */ toString(namespaceArray?: string[]): string; /** * convert nodeId to a JSON string. same as {@link NodeId#toString } * @method toJSON * @return {string} */ toJSON(): string; /** * @method isEmpty * @return {boolean} true if the NodeId is null or empty */ isEmpty(): boolean; /** * @class NodeId * @method displayText * @return {String} */ displayText(): String; static sameNodeId(n1: NodeId, n2: NodeId): boolean; } /** * construct a node Id from a value and a namespace. * @class opcua * @method makeNodeId * @static * @param {String|Buffer} value * @param [namespace]=0 {Number} the node id namespace * @return {NodeId} */ export declare function makeNodeId(value: Uint8Array | string | number, namespace?: number): NodeId; export declare function build_nodid_indexes_for_map(map: { [name: string]: number; }): void; export declare function build_nodid_indexes_for_class_map(clazz: new () => T): void; /** * resolveNodeId can be helpful to convert a wellknown Node Name to a nodeid * if a wellknown node name cannot be detected, the function falls back to * calling coerceNodeId {@link coerceNodeId}. * * @example * ```javascript * const nodeId = resolveNodeId("ObjectsFolder"); * console.log(nodeId.toString()); * ``` * ```text * >ns=0;i=85 * ``` * * ```javascript * const nodeId = resolveNodeId("HasComponent"); * console.log(nodeId.toString()); * ``` * ```text * >ns=0;i=47 * ``` * * ```javascript * const nodeId = resolveNodeId("ns=1;i=4444"); * console.log(nodeId.toString()); * ``` * ```text * >ns=1;i=4444 * ``` */ export declare function resolveNodeId(node_or_string: NodeId | string | undefined, options?: ResolveNodeIdOptions): NodeId; export declare function from_hex(str: string): Uint8Array; export interface ResolveNodeIdOptions { namespaceArray?: string[]; defaultNamespaceIndex?: number; } /** * Convert a value into a nodeId: * @class opcua * @method coerceNodeId * @static * * @description: * - if nodeId is a string of form : "i=1234" => nodeId({ namespace: 0 , value=1234 , identifierType: NodeIdType.NUMERIC}) * - if nodeId is a string of form : "s=foo" => nodeId({ namespace: 0 , value="foo" , identifierType: NodeIdType.STRING}) * - if nodeId is a {@link NodeId} : coerceNodeId returns value * * @param value * @param namespace {Integer} */ export declare function coerceNodeId(value: unknown, namespaceOptions?: number | ResolveNodeIdOptions): NodeId; //# sourceMappingURL=nodeid.d.ts.map