How to use the node-opcua-service-translate-browse-path.makeBrowsePath function in node-opcua-service-translate-browse-path

To help you get started, we’ve selected a few node-opcua-service-translate-browse-path examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github node-opcua / node-opcua / packages / node-opcua-client / src / tools / read_history_server_capabilities.js View on Github external
function readHistoryServerCapabilities(the_session,callback) {
    // display HistoryCapabilities of server
    const browsePath = makeBrowsePath(ObjectIds.ObjectsFolder,"/Server/ServerCapabilities.HistoryServerCapabilities");

    the_session.translateBrowsePath(browsePath,function(err,result) {
        if (err) { return callback(err); }
        if (result.statusCode !==  StatusCodes.Good) {
            return callback();
        }
        const historyServerCapabilitiesNodeId = result.targets[0].targetId;
        // (should be ns=0;i=11192)
        assert(historyServerCapabilitiesNodeId.toString() === "ns=0;i=11192");

        // -------------------------
        const properties = [
            "AccessHistoryDataCapability",
            "AccessHistoryEventsCapability",
            "DeleteAtTimeCapability",
            "DeleteRawCapability",
github node-opcua / node-opcua / packages / node-opcua-file-transfer / source / client / client_file.ts View on Github external
private async extractMethodsIds(): Promise {
        const browsePaths: BrowsePath[] = [
            makeBrowsePath(this.fileNodeId, "/Open"),
            makeBrowsePath(this.fileNodeId, "/Close"),
            makeBrowsePath(this.fileNodeId, "/SetPosition"),
            makeBrowsePath(this.fileNodeId, "/GetPosition"),
            makeBrowsePath(this.fileNodeId, "/Write"),
            makeBrowsePath(this.fileNodeId, "/Read"),
            makeBrowsePath(this.fileNodeId, "/OpenCount"),
            makeBrowsePath(this.fileNodeId, "/Size")
        ];

        const results = await this.session.translateBrowsePath(browsePaths);

        if (results[0].statusCode !== StatusCodes.Good) {
            throw new Error("fileType object does not expose mandatory Open Method");
        }
        if (results[1].statusCode !== StatusCodes.Good) {
            throw new Error("fileType object does not expose mandatory Close Method");
        }
        if (results[2].statusCode !== StatusCodes.Good) {
github node-opcua / node-opcua / packages / node-opcua-file-transfer / source / client / client_file.ts View on Github external
private async extractMethodsIds(): Promise {
        const browsePaths: BrowsePath[] = [
            makeBrowsePath(this.fileNodeId, "/Open"),
            makeBrowsePath(this.fileNodeId, "/Close"),
            makeBrowsePath(this.fileNodeId, "/SetPosition"),
            makeBrowsePath(this.fileNodeId, "/GetPosition"),
            makeBrowsePath(this.fileNodeId, "/Write"),
            makeBrowsePath(this.fileNodeId, "/Read"),
            makeBrowsePath(this.fileNodeId, "/OpenCount"),
            makeBrowsePath(this.fileNodeId, "/Size")
        ];

        const results = await this.session.translateBrowsePath(browsePaths);

        if (results[0].statusCode !== StatusCodes.Good) {
            throw new Error("fileType object does not expose mandatory Open Method");
        }
        if (results[1].statusCode !== StatusCodes.Good) {
            throw new Error("fileType object does not expose mandatory Close Method");
        }
github node-opcua / node-opcua / packages / node-opcua-file-transfer / source / client / client_file.ts View on Github external
private async extractMethodsIds(): Promise {
        const browsePaths: BrowsePath[] = [
            makeBrowsePath(this.fileNodeId, "/Open"),
            makeBrowsePath(this.fileNodeId, "/Close"),
            makeBrowsePath(this.fileNodeId, "/SetPosition"),
            makeBrowsePath(this.fileNodeId, "/GetPosition"),
            makeBrowsePath(this.fileNodeId, "/Write"),
            makeBrowsePath(this.fileNodeId, "/Read"),
            makeBrowsePath(this.fileNodeId, "/OpenCount"),
            makeBrowsePath(this.fileNodeId, "/Size")
        ];

        const results = await this.session.translateBrowsePath(browsePaths);

        if (results[0].statusCode !== StatusCodes.Good) {
            throw new Error("fileType object does not expose mandatory Open Method");
        }
        if (results[1].statusCode !== StatusCodes.Good) {
            throw new Error("fileType object does not expose mandatory Close Method");
        }
        if (results[2].statusCode !== StatusCodes.Good) {
            throw new Error("fileType object does not expose mandatory SetPosition Method");
github node-opcua / node-opcua / packages / node-opcua-file-transfer / source / client / client_file.ts View on Github external
private async extractMethodsIds(): Promise {
        const browsePaths: BrowsePath[] = [
            makeBrowsePath(this.fileNodeId, "/Open"),
            makeBrowsePath(this.fileNodeId, "/Close"),
            makeBrowsePath(this.fileNodeId, "/SetPosition"),
            makeBrowsePath(this.fileNodeId, "/GetPosition"),
            makeBrowsePath(this.fileNodeId, "/Write"),
            makeBrowsePath(this.fileNodeId, "/Read"),
            makeBrowsePath(this.fileNodeId, "/OpenCount"),
            makeBrowsePath(this.fileNodeId, "/Size")
        ];

        const results = await this.session.translateBrowsePath(browsePaths);

        if (results[0].statusCode !== StatusCodes.Good) {
            throw new Error("fileType object does not expose mandatory Open Method");
        }
        if (results[1].statusCode !== StatusCodes.Good) {
            throw new Error("fileType object does not expose mandatory Close Method");
        }
        if (results[2].statusCode !== StatusCodes.Good) {
            throw new Error("fileType object does not expose mandatory SetPosition Method");
        }
        if (results[3].statusCode !== StatusCodes.Good) {
            throw new Error("fileType object does not expose mandatory GetPosition Method");
github node-opcua / node-opcua / packages / node-opcua-file-transfer / source / client / client_file.ts View on Github external
private async extractMethodsIds(): Promise {
        const browsePaths: BrowsePath[] = [
            makeBrowsePath(this.fileNodeId, "/Open"),
            makeBrowsePath(this.fileNodeId, "/Close"),
            makeBrowsePath(this.fileNodeId, "/SetPosition"),
            makeBrowsePath(this.fileNodeId, "/GetPosition"),
            makeBrowsePath(this.fileNodeId, "/Write"),
            makeBrowsePath(this.fileNodeId, "/Read"),
            makeBrowsePath(this.fileNodeId, "/OpenCount"),
            makeBrowsePath(this.fileNodeId, "/Size")
        ];

        const results = await this.session.translateBrowsePath(browsePaths);

        if (results[0].statusCode !== StatusCodes.Good) {
            throw new Error("fileType object does not expose mandatory Open Method");
        }
        if (results[1].statusCode !== StatusCodes.Good) {
            throw new Error("fileType object does not expose mandatory Close Method");
        }
        if (results[2].statusCode !== StatusCodes.Good) {
            throw new Error("fileType object does not expose mandatory SetPosition Method");
        }
github node-opcua / node-opcua / packages / node-opcua-file-transfer / source / client / client_file.ts View on Github external
private async extractMethodsIds(): Promise {
        const browsePaths: BrowsePath[] = [
            makeBrowsePath(this.fileNodeId, "/Open"),
            makeBrowsePath(this.fileNodeId, "/Close"),
            makeBrowsePath(this.fileNodeId, "/SetPosition"),
            makeBrowsePath(this.fileNodeId, "/GetPosition"),
            makeBrowsePath(this.fileNodeId, "/Write"),
            makeBrowsePath(this.fileNodeId, "/Read"),
            makeBrowsePath(this.fileNodeId, "/OpenCount"),
            makeBrowsePath(this.fileNodeId, "/Size")
        ];

        const results = await this.session.translateBrowsePath(browsePaths);

        if (results[0].statusCode !== StatusCodes.Good) {
            throw new Error("fileType object does not expose mandatory Open Method");
        }
        if (results[1].statusCode !== StatusCodes.Good) {
            throw new Error("fileType object does not expose mandatory Close Method");
github node-opcua / node-opcua / packages / node-opcua-file-transfer / source / client / client_file.ts View on Github external
private async extractMethodsIds(): Promise {
        const browsePaths: BrowsePath[] = [
            makeBrowsePath(this.fileNodeId, "/Open"),
            makeBrowsePath(this.fileNodeId, "/Close"),
            makeBrowsePath(this.fileNodeId, "/SetPosition"),
            makeBrowsePath(this.fileNodeId, "/GetPosition"),
            makeBrowsePath(this.fileNodeId, "/Write"),
            makeBrowsePath(this.fileNodeId, "/Read"),
            makeBrowsePath(this.fileNodeId, "/OpenCount"),
            makeBrowsePath(this.fileNodeId, "/Size")
        ];

        const results = await this.session.translateBrowsePath(browsePaths);

        if (results[0].statusCode !== StatusCodes.Good) {
            throw new Error("fileType object does not expose mandatory Open Method");
        }
        if (results[1].statusCode !== StatusCodes.Good) {
            throw new Error("fileType object does not expose mandatory Close Method");
        }
        if (results[2].statusCode !== StatusCodes.Good) {
            throw new Error("fileType object does not expose mandatory SetPosition Method");
        }
        if (results[3].statusCode !== StatusCodes.Good) {