How to use the node-opcua-constants.ObjectIds.ObjectsFolder function in node-opcua-constants

To help you get started, we’ve selected a few node-opcua-constants 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-address-space / test_helpers / create_minimalist_address_space_nodeset.ts View on Github external
nodeClass: NodeClass.Object,
        nodeId: resolveNodeId(ObjectIds.ModellingRule_Mandatory),
    }) as any as UAObject;

    // add the root folder
    {
        const rootFolder = namespace0._createNode({
            browseName: "RootFolder",
            nodeClass: NodeClass.Object,
            nodeId: resolveNodeId(ObjectIds.RootFolder)
        }) as any as UAObject;

        {
            const objectsFolder = namespace0.addObject({
                browseName: "Objects",
                nodeId: resolveNodeId(ObjectIds.ObjectsFolder),
                organizedBy: rootFolder
            });

            assert(rootFolder.getFolderElementByName("Objects")!
              .browseName.toString() === "Objects");

        }
        {
            const dataTypeFolder = namespace0.addObject({
                browseName: "DataType",
                nodeId: resolveNodeId(ObjectIds.DataTypesFolder),
                organizedBy: rootFolder
            });
            {
                const doubleDataType = namespace0._createNode({
                    browseName: "Double",
github node-opcua / node-opcua / packages / node-opcua-address-space / test_helpers / create_minimalist_address_space_nodeset.js View on Github external
isAbstract: true
    });

    // add the root folder
    {
        const rootFolder = namespace0._createNode({
            browseName: "RootFolder",
            nodeId: resolveNodeId(ObjectIds.RootFolder),
            nodeClass: NodeClass.Object
        });


        {
            const objectsFolder = namespace0.addObject({
                browseName: "Objects",
                nodeId: resolveNodeId(ObjectIds.ObjectsFolder),
                organizedBy: rootFolder
            });

            rootFolder.getFolderElementByName("Objects").browseName.toString().should.eql("Objects");

        }
        {
            const dataTypeFolder = namespace0.addObject({
                browseName: "DataType",
                nodeId: resolveNodeId(ObjectIds.DataTypesFolder),
                organizedBy: rootFolder
            });
            {
                const doubleDataType = namespace0._createNode({
                    browseName: "Double",
                    nodeId: resolveNodeId(DataTypeIds.Double),
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-client / source / tools / read_history_server_capabilities.ts View on Github external
export function readHistoryServerCapabilities(
  session: ClientSession,
  callback?: (err: Error | null, capabilities?: HistoryServerCapabilities) => void
): any {

    if (!callback) { throw new Error("Internal error"); }
    // display HistoryCapabilities of server
    const browsePath: BrowsePath = makeBrowsePath(
        ObjectIds.ObjectsFolder,
        "/Server/ServerCapabilities.HistoryServerCapabilities");

    session.translateBrowsePath(browsePath, (err: Error | null, result?: BrowsePathResult) => {
        if (err) {
            return callback(err);
        }
        if (!result) {
            return callback(new Error("Internal Error"));
        }
        if (result.statusCode !== StatusCodes.Good) {
            return callback(new Error("StatusCode = " + result.statusCode.toString()));
        }

        result.targets = result.targets || [];

        const historyServerCapabilitiesNodeId = result.targets[0].targetId;

node-opcua-constants

pure nodejs OPCUA SDK - module constants

MIT
Latest version published 5 months ago

Package Health Score

80 / 100
Full package analysis