How to use the node-opcua-factory.initialize_field function in node-opcua-factory

To help you get started, we’ve selected a few node-opcua-factory 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-transport / source / HelloMessage.ts View on Github external
constructor(options?: HelloMessageOptions) {
        options = options || {};
        super();
        const schema = schemaHelloMessage;
        /* istanbul ignore next */
        if (parameters.debugSchemaHelper) {
            check_options_correctness_against_schema(this, schema, options);
        }

        this.protocolVersion = initialize_field(schema.fields[0], options.protocolVersion);
        this.receiveBufferSize = initialize_field(schema.fields[1], options.receiveBufferSize);
        this.sendBufferSize = initialize_field(schema.fields[2], options.sendBufferSize);
        this.maxMessageSize = initialize_field(schema.fields[3], options.maxMessageSize);
        this.maxChunkCount = initialize_field(schema.fields[4], options.maxChunkCount);
        this.endpointUrl = initialize_field(schema.fields[5], options.endpointUrl);
    }
github node-opcua / node-opcua / packages / node-opcua-chunkmanager / source / SequenceHeader.ts View on Github external
constructor(options?: any) {
        options = options || {};
        super();
        const schema = schemaSequenceHeader;
        /* istanbul ignore next */
        if (parameters.debugSchemaHelper) {
            check_options_correctness_against_schema(this, schema, options);
        }
        this.sequenceNumber = initialize_field(schema.fields[0], options.sequenceNumber);
        this.requestId = initialize_field(schema.fields[1], options.requestId);
    }
github node-opcua / node-opcua / packages / node-opcua-transport / source / TCPErrorMessage.ts View on Github external
constructor(options?: { statusCode?: StatusCode, reason?: string}) {
        options = options || {};
        const schema = schemaTCPErrorMessage;

        super();
        /* istanbul ignore next */
        if (parameters.debugSchemaHelper) {
            check_options_correctness_against_schema(this, schema, options);
        }
        this.statusCode = initialize_field(schema.fields[0], options.statusCode);
        this.reason = initialize_field(schema.fields[1], options.reason);
    }
github node-opcua / node-opcua / packages / node-opcua-transport / source / AcknowledgeMessage.ts View on Github external
constructor(options?: AcknowledgeMessageOptions) {

        options = options || {};

        super();
        const schema = schemaAcknowledgeMessage;
        /* istanbul ignore next */
        if (parameters.debugSchemaHelper) {
            check_options_correctness_against_schema(this, schema, options);
        }

        this.protocolVersion = initialize_field(schema.fields[0], options.protocolVersion);
        this.receiveBufferSize = initialize_field(schema.fields[1], options.receiveBufferSize);
        this.sendBufferSize = initialize_field(schema.fields[2], options.sendBufferSize);
        this.maxMessageSize = initialize_field(schema.fields[3], options.maxMessageSize);
        this.maxChunkCount = initialize_field(schema.fields[4], options.maxChunkCount);
    }
github node-opcua / node-opcua / packages / node-opcua-chunkmanager / source / SequenceHeader.ts View on Github external
constructor(options?: any) {
        options = options || {};
        super();
        const schema = schemaSequenceHeader;
        /* istanbul ignore next */
        if (parameters.debugSchemaHelper) {
            check_options_correctness_against_schema(this, schema, options);
        }
        this.sequenceNumber = initialize_field(schema.fields[0], options.sequenceNumber);
        this.requestId = initialize_field(schema.fields[1], options.requestId);
    }
github node-opcua / node-opcua / packages / node-opcua-transport / source / HelloMessage.ts View on Github external
constructor(options?: HelloMessageOptions) {
        options = options || {};
        super();
        const schema = schemaHelloMessage;
        /* istanbul ignore next */
        if (parameters.debugSchemaHelper) {
            check_options_correctness_against_schema(this, schema, options);
        }

        this.protocolVersion = initialize_field(schema.fields[0], options.protocolVersion);
        this.receiveBufferSize = initialize_field(schema.fields[1], options.receiveBufferSize);
        this.sendBufferSize = initialize_field(schema.fields[2], options.sendBufferSize);
        this.maxMessageSize = initialize_field(schema.fields[3], options.maxMessageSize);
        this.maxChunkCount = initialize_field(schema.fields[4], options.maxChunkCount);
        this.endpointUrl = initialize_field(schema.fields[5], options.endpointUrl);
    }
github node-opcua / node-opcua / packages / node-opcua-data-value / source / datavalue.ts View on Github external
*/
    this.sourcePicoseconds = initialize_field(schema.fields[3], options.sourcePicoseconds);

    /**
     * @property serverTimestamp
     * @type {DateTime}
     * @default  null
     */
    this.serverTimestamp = initialize_field(schema.fields[4], options.serverTimestamp);

    /**
     * @property serverPicoseconds
     * @type {UInt16}
     * @default  0
     */
    this.serverPicoseconds = initialize_field(schema.fields[5], options.serverPicoseconds);
  }
github node-opcua / node-opcua / packages / node-opcua-data-value / source / datavalue.ts View on Github external
*/
    this.statusCode = initialize_field(schema.fields[1], options.statusCode);

    /**
     * @property sourceTimestamp
     * @type {DateTime}
     * @default  null
     */
    this.sourceTimestamp = initialize_field(schema.fields[2], options.sourceTimestamp);

    /**
     * @property sourcePicoseconds
     * @type {UInt16}
     * @default  0
     */
    this.sourcePicoseconds = initialize_field(schema.fields[3], options.sourcePicoseconds);

    /**
     * @property serverTimestamp
     * @type {DateTime}
     * @default  null
     */
    this.serverTimestamp = initialize_field(schema.fields[4], options.serverTimestamp);

    /**
     * @property serverPicoseconds
     * @type {UInt16}
     * @default  0
     */
    this.serverPicoseconds = initialize_field(schema.fields[5], options.serverPicoseconds);
  }
github node-opcua / node-opcua / packages / node-opcua-data-value / source / datavalue.ts View on Github external
* @property value
     * @type {Variant}
     * @default  null
     */
    if (options.value === undefined || options.value === null) {
      this.value = new Variant({ dataType: DataType.Null });
    } else {
      this.value = (options.value) ? new Variant(options.value) : new Variant({ dataType: DataType.Null });
    }

    /**
     * @property statusCode
     * @type {StatusCode}
     * @default  Good (0x00000)
     */
    this.statusCode = initialize_field(schema.fields[1], options.statusCode);

    /**
     * @property sourceTimestamp
     * @type {DateTime}
     * @default  null
     */
    this.sourceTimestamp = initialize_field(schema.fields[2], options.sourceTimestamp);

    /**
     * @property sourcePicoseconds
     * @type {UInt16}
     * @default  0
     */
    this.sourcePicoseconds = initialize_field(schema.fields[3], options.sourcePicoseconds);

    /**
github node-opcua / node-opcua / packages / node-opcua-data-value / source / datavalue.ts View on Github external
this.value = (options.value) ? new Variant(options.value) : new Variant({ dataType: DataType.Null });
    }

    /**
     * @property statusCode
     * @type {StatusCode}
     * @default  Good (0x00000)
     */
    this.statusCode = initialize_field(schema.fields[1], options.statusCode);

    /**
     * @property sourceTimestamp
     * @type {DateTime}
     * @default  null
     */
    this.sourceTimestamp = initialize_field(schema.fields[2], options.sourceTimestamp);

    /**
     * @property sourcePicoseconds
     * @type {UInt16}
     * @default  0
     */
    this.sourcePicoseconds = initialize_field(schema.fields[3], options.sourcePicoseconds);

    /**
     * @property serverTimestamp
     * @type {DateTime}
     * @default  null
     */
    this.serverTimestamp = initialize_field(schema.fields[4], options.serverTimestamp);

    /**