How to use the node-opcua-nodeid/src/expanded_nodeid.makeExpandedNodeId function in node-opcua-nodeid

To help you get started, we’ve selected a few node-opcua-nodeid 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-end2end-test / _test_generated / _auto_generated_ServerSideUnimplementedRequest.js View on Github external
assert(this instanceof BaseUAObject); //  ' keyword "new" is required for constructor call')
    resolve_schema_field_types(schema);

    BaseUAObject.call(this,options);

    /**
      * 
      * @property requestHeader
      * @type {RequestHeader}
      */
    self.requestHeader =  new RequestHeader( options.requestHeader);

   // Object.preventExtensions(self);
}
util.inherits(ServerSideUnimplementedRequest,BaseUAObject);
ServerSideUnimplementedRequest.prototype.encodingDefaultBinary = makeExpandedNodeId(892,0);
ServerSideUnimplementedRequest.prototype._schema = schema;

/**
 * encode the object into a binary stream
 * @method encode
 *
 * @param stream {BinaryStream} 
 */
ServerSideUnimplementedRequest.prototype.encode = function(stream,options) {
    // call base class implementation first
    BaseUAObject.prototype.encode.call(this,stream,options);
   this.requestHeader.encode(stream,options);
};
/**
 * decode the object from a binary stream
 * @method decode
github node-opcua / node-opcua / packages / node-opcua-generator / src / factory_code_generator.js View on Github external
}
    if (!encoding_BinaryId) {
        throw new Error(
            "" + name + " has no _Encoding_DefaultBinary id\nplease add a Id field in the structure definition"
        );
    }
    if (typeof encoding_XmlId === "string") {
        encoding_XmlId = coerceNodeId(encoding_XmlId);
    }
    if (typeof encoding_BinaryId === "string") {
        encoding_BinaryId = coerceNodeId(encoding_BinaryId);
    }

    const encodingBinaryNodeId =
        encoding_BinaryId === RUNTIME_GENERATED_ID ? encoding_BinaryId : makeExpandedNodeId(encoding_BinaryId);
    const encodingXmlNodeId = encoding_XmlId ? makeExpandedNodeId(encoding_XmlId) : null;

    schema.baseType = schema.baseType || "BaseUAObject";

    const baseclass = schema.baseType;

    const classname = schema.name;

    const f = new LineFile();

    function write() {
        f.write.apply(f, arguments);
    }

    resolve_schema_field_types(schema);
    const complexTypes = schema.fields.filter(function(field) {
        return field.category === "complex" && field.fieldType !== schema.name;
github node-opcua / node-opcua / packages / node-opcua-generator / src / factory_code_generator.js View on Github external
//xx  assert(id === RUNTIME_GENERATED_ID);
    }
    if (!encoding_BinaryId) {
        throw new Error(
            "" + name + " has no _Encoding_DefaultBinary id\nplease add a Id field in the structure definition"
        );
    }
    if (typeof encoding_XmlId === "string") {
        encoding_XmlId = coerceNodeId(encoding_XmlId);
    }
    if (typeof encoding_BinaryId === "string") {
        encoding_BinaryId = coerceNodeId(encoding_BinaryId);
    }

    const encodingBinaryNodeId =
        encoding_BinaryId === RUNTIME_GENERATED_ID ? encoding_BinaryId : makeExpandedNodeId(encoding_BinaryId);
    const encodingXmlNodeId = encoding_XmlId ? makeExpandedNodeId(encoding_XmlId) : null;

    schema.baseType = schema.baseType || "BaseUAObject";

    const baseclass = schema.baseType;

    const classname = schema.name;

    const f = new LineFile();

    function write() {
        f.write.apply(f, arguments);
    }

    resolve_schema_field_types(schema);
    const complexTypes = schema.fields.filter(function(field) {