How to use the node-opcua-variant.VariantArrayType function in node-opcua-variant

To help you get started, we’ve selected a few node-opcua-variant 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-server / src / opcua_server.js View on Github external
session.status = "active";

            response = new ActivateSessionResponse({serverNonce: session.nonce});
            channel.send_response("MSG", response, message);

            const userIdentityTokenPasswordRemoved = function (userIdentityToken) {
                const a = userIdentityToken;
                // to do remove password
                return a;
            };

            // send OPCUA Event Notification
            // see part 5 : 6.4.3 AuditEventType
            //              6.4.7 AuditSessionEventType
            //              6.4.10 AuditActivateSessionEventType
            const VariantArrayType = require("node-opcua-variant").VariantArrayType;
            assert(session.nodeId); // sessionId
            //xx assert(session.channel.clientCertificate instanceof Buffer);
            assert(session.sessionTimeout > 0);

            if (server.isAuditing) {
                server.raiseEvent("AuditActivateSessionEventType", {

                    /* part 5 -  6.4.3 AuditEventType */
                    actionTimeStamp: {dataType: "DateTime", value: new Date()},
                    status: {dataType: "Boolean", value: true},

                    serverId: {dataType: "String", value: ""},

                    // ClientAuditEntryId contains the human-readable AuditEntryId defined in Part 3.
                    clientAuditEntryId: {dataType: "String", value: ""},
github node-opcua / node-opcua / packages / node-opcua-address-space / src / extension_object_array_node.js View on Github external
"use strict";
/* global describe,it,before*/

const assert = require("node-opcua-assert").assert;
const _ = require("underscore");

const Variant = require("node-opcua-variant").Variant;
const VariantArrayType = require("node-opcua-variant").VariantArrayType;
const DataType = require("node-opcua-variant").DataType;

const StatusCodes = require("node-opcua-status-code").StatusCodes;


const BaseNode = require("./base_node").BaseNode;
const UADataType = require("./ua_data_type").UADataType;
const UAObject = require("./ua_object").UAObject;
const UAVariable = require("./ua_variable").UAVariable;

const AddressSpace = require("./address_space").AddressSpace;

const hasConstructor = require("node-opcua-factory").hasConstructor;
const getConstructor = require("node-opcua-factory").getConstructor;
const BrowseDirection = require("node-opcua-data-model").BrowseDirection;
github node-opcua / node-opcua / packages / node-opcua-address-space / src / ua_variable_type.js View on Github external
const _ = require("underscore");

const NodeClass = require("node-opcua-data-model").NodeClass;

const NodeId = require("node-opcua-nodeid").NodeId;
const coerceNodeId = require("node-opcua-nodeid").coerceNodeId;
const makeNodeId = require("node-opcua-nodeid").makeNodeId;
const resolveNodeId = require("node-opcua-nodeid").resolveNodeId;
const sameNodeId = require("node-opcua-nodeid").sameNodeId;


const DataValue =  require("node-opcua-data-value").DataValue;

const Variant  = require("node-opcua-variant").Variant;
const DataType = require("node-opcua-variant").DataType;
const VariantArrayType = require("node-opcua-variant").VariantArrayType;

const StatusCodes = require("node-opcua-status-code").StatusCodes;

const AttributeIds = require("node-opcua-data-model").AttributeIds;


const isNullOrUndefined = require("node-opcua-utils").isNullOrUndefined;


const BrowseDirection = require("node-opcua-data-model").BrowseDirection;

const SessionContext = require("./session_context").SessionContext;
const Reference = require("./reference").Reference;


const debug =  require("node-opcua-debug");
github node-opcua / node-opcua / packages / node-opcua-server / src / server_engine.js View on Github external
const read_service = require("node-opcua-service-read");
const AttributeIds = require("node-opcua-data-model").AttributeIds;
const TimestampsToReturn = read_service.TimestampsToReturn;

const UAVariable = require("node-opcua-address-space").UAVariable;
const ServerSidePublishEngine = require("./server_publish_engine").ServerSidePublishEngine;

const historizing_service = require("node-opcua-service-history");
const HistoryReadRequest = historizing_service.HistoryReadRequest;
const HistoryReadDetails = historizing_service.HistoryReadDetails;
const HistoryReadResult = historizing_service.HistoryReadResult;

const DataValue = require("node-opcua-data-value").DataValue;
const Variant = require("node-opcua-variant").Variant;
const DataType = require("node-opcua-variant").DataType;
const VariantArrayType = require("node-opcua-variant").VariantArrayType;
const isValidVariant = require("node-opcua-variant").isValidVariant;


const StatusCodes = require("node-opcua-status-code").StatusCodes;
const StatusCode = require("node-opcua-status-code").StatusCode;


require("node-opcua-common");

const address_space = require("node-opcua-address-space");
const AddressSpace = address_space.AddressSpace;

const generate_address_space = require("node-opcua-address-space").generate_address_space;

const ServerSession = require("./server_session").ServerSession;
github node-opcua / node-opcua / packages / node-opcua-address-space / src / data_access / address_space_add_MultiStateDiscrete.js View on Github external
const assert = require("node-opcua-assert").assert;
const util = require("util");
const address_space = require("../address_space");
const DataType = require("node-opcua-variant").DataType;
const Variant = require("node-opcua-variant").Variant;
const VariantArrayType = require("node-opcua-variant").VariantArrayType;

const add_dataItem_stuff = require("./UADataItem").add_dataItem_stuff;
const coerceLocalizedText = require("node-opcua-data-model").coerceLocalizedText;

const _ = require("underscore");

const Namespace = require("../namespace").Namespace;

const UAVariable = require("../ua_variable").UAVariable;
/**
 * @class UAMultiStateDiscreteType
 * @constructor
 */
function UAMultiStateDiscreteType() {

}
github node-opcua / node-opcua / packages / node-opcua-address-space / src / address_space_add_method.js View on Github external
"use strict";
/**
 * @module opcua.address_space
 * @class AddressSpace
 */

const assert = require("node-opcua-assert").assert;
const _ = require("underscore");
const NodeClass = require("node-opcua-data-model").NodeClass;
const Argument = require("node-opcua-service-call").Argument;


const DataValue =  require("node-opcua-data-value").DataValue;
const Variant = require("node-opcua-variant").Variant;
const DataType = require("node-opcua-variant").DataType;
const VariantArrayType = require("node-opcua-variant").VariantArrayType;
const coerceQualifiedName = require("node-opcua-data-model").coerceQualifiedName;

const Namespace = require("./namespace").Namespace;
const BaseNode = require("./base_node").BaseNode;

exports.install = function (AddressSpace) {

    const isNonEmptyQualifiedName = Namespace.isNonEmptyQualifiedName;
    const _handle_hierarchy_parent = Namespace._handle_hierarchy_parent;


    Namespace.prototype._addMethod = function(options) {

        const self = this;

        const addressSpace = self.addressSpace;
github node-opcua / node-opcua / packages / node-opcua-data-value / src / datavalue.js View on Github external
"use strict";

const assert = require("node-opcua-assert").assert;
const _ = require("underscore");


const DataValue = exports.DataValue = require("../_generated_/_auto_generated_DataValue").DataValue;

const DataType = require("node-opcua-variant").DataType;
const VariantArrayType = require("node-opcua-variant").VariantArrayType;


const TimestampsToReturn = require("../schemas/TimestampsToReturn_enum").TimestampsToReturn;


const registerSpecialVariantEncoder = require("node-opcua-factory").registerSpecialVariantEncoder;
registerSpecialVariantEncoder(exports.DataValue);

const getCurrentClock = require("node-opcua-date-time").getCurrentClock;

const Variant = require("node-opcua-variant").Variant;
const sameVariant = require("node-opcua-variant/src/variant_tools").sameVariant;

function w(n){
    return ("0000"+n).substr(-3);
}
github node-opcua / node-opcua / packages / node-opcua-address-space / src / loader / load_nodeset2.js View on Github external
"use strict";
const assert = require("node-opcua-assert").assert;
const _ = require("underscore");
const async = require("async");
const fs = require("fs");


const Xml2Json = require("node-opcua-xml2json").Xml2Json;
const ReaderState = require("node-opcua-xml2json").ReaderState;
const NodeClass = require("node-opcua-data-model").NodeClass;
const resolveNodeId = require("node-opcua-nodeid").resolveNodeId;

const NodeId = require("node-opcua-nodeid").NodeId;

const DataType = require("node-opcua-variant").DataType;
const VariantArrayType = require("node-opcua-variant").VariantArrayType;
const Argument = require("node-opcua-service-call").Argument;

const coerceLocalizedText = require("node-opcua-data-model").coerceLocalizedText;
const EnumValueType = require("node-opcua-data-model").EnumValueType;

const ec = require("node-opcua-basic-types");

const AddressSpace = require("../address_space").AddressSpace;

const EUInformation = require("node-opcua-data-access").EUInformation;
const stringToQualifiedName = require("node-opcua-data-model").stringToQualifiedName;

const debugLog = require("node-opcua-debug").make_debugLog(__filename);

function __make_back_references(namespace) {
github node-opcua / node-opcua / packages / node-opcua-address-space / src / data_access / address_space_add_YArrayItem.js View on Github external
const DataType = require("node-opcua-variant").DataType;
const NodeId = require("node-opcua-nodeid").NodeId;
const StatusCodes = require("node-opcua-status-code").StatusCodes;
const AttributeIds = require("node-opcua-data-model").AttributeIds;
const BaseNode = require("../base_node").BaseNode;


const part8 = require("node-opcua-data-access");

const AxisInformation = part8.AxisInformation;
const AxisScaleEnumeration       = part8.AxisScaleEnumeration;
const Range           = part8.Range;

const utils = require("node-opcua-utils");
const assert = require("node-opcua-assert").assert;
const VariantArrayType = require("node-opcua-variant").VariantArrayType;
const coerceLocalizedText = require("node-opcua-data-model").coerceLocalizedText;
const Namespace = require("../namespace").Namespace;

module.exports.install = function(AddressSpace) {
    /**
     *
     * @method addYArrayItem
     * @param options
     * @param options.componentOf {NodeId}
     * @param options.browseName {String}
     * @param options.title {String}
     * @param [options.instrumentRange]
     * @param [options.instrumentRange.low] {Double}
     * @param [options.instrumentRange.high] {Double}
     * @param options.engineeringUnitsRange.low {Double}
     * @param options.engineeringUnitsRange.high {Double}
github node-opcua / node-opcua / packages / node-opcua / index.js View on Github external
module.exports.makeNodeId = require("node-opcua-nodeid").makeNodeId;
module.exports.coerceNodeId = require("node-opcua-nodeid").coerceNodeId;
module.exports.sameNodeId = require("node-opcua-nodeid").sameNodeId;
module.exports.NodeIdType = require("node-opcua-nodeid").NodeIdType;

module.exports.ExpandedNodeId = require("node-opcua-nodeid/src/expanded_nodeid").ExpandedNodeId;
module.exports.makeExpandedNodeId = require("node-opcua-nodeid/src/expanded_nodeid").makeExpandedNodeId;
module.exports.coerceExpandedNodeId = require("node-opcua-nodeid/src/expanded_nodeid").coerceExpandedNodeId;

module.exports.StatusCodes = require("node-opcua-status-code").StatusCodes;

module.exports.Enum = require("node-opcua-enum");

module.exports.DataType = require("node-opcua-variant").DataType;
module.exports.Variant = require("node-opcua-variant").Variant;
module.exports.VariantArrayType = require("node-opcua-variant").VariantArrayType;
module.exports.buildVariantArray = require("node-opcua-variant").buildVariantArray;

module.exports.DataValue = require("node-opcua-data-value").DataValue;
module.exports.sameDataValue = require("node-opcua-data-value").sameDataValue;

module.exports.NumericRange = require("node-opcua-numeric-range").NumericRange;

module.exports.AccessLevelFlag = require("node-opcua-data-model").AccessLevelFlag;
module.exports.makeAccessLevel = require("node-opcua-data-model").makeAccessLevel;
module.exports.LocalizedText = require("node-opcua-data-model").LocalizedText;
module.exports.coerceLocalizedText = require("node-opcua-data-model").coerceLocalizedText;
module.exports.QualifiedName = require("node-opcua-data-model").QualifiedName;
module.exports.coerceQualifyName = require("node-opcua-data-model").coerceQualifyName;
module.exports.NodeClass = require("node-opcua-data-model").NodeClass;
module.exports.NodeClassMask = require("node-opcua-data-model").NodeClassMask;
module.exports.AttributeIds = require("node-opcua-data-model").AttributeIds;