How to use the node-opcua-basic-types.decodeInt32 function in node-opcua-basic-types

To help you get started, we’ve selected a few node-opcua-basic-types 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-data-model / source / diagnostic_info.ts View on Github external
function decode_DiagnosticInfo(diagnosticInfo: DiagnosticInfo, stream: BinaryStream): void {

    const encodingMask = decodeByte(stream);

    // read symbolic id
    if (encodingMask & DiagnosticInfo_EncodingByte.SymbolicId) {
        diagnosticInfo.symbolicId = decodeInt32(stream);
    }
    // read namespace uri
    if (encodingMask & DiagnosticInfo_EncodingByte.NamespaceURI) {
        diagnosticInfo.namespaceURI = decodeInt32(stream);
    }
    // read locale
    if (encodingMask & DiagnosticInfo_EncodingByte.Locale) {
        diagnosticInfo.locale = decodeInt32(stream);
    }
    // read localized text
    if (encodingMask & DiagnosticInfo_EncodingByte.LocalizedText) {
        diagnosticInfo.localizedText = decodeInt32(stream);
    }
    // read additional info
    if (encodingMask & DiagnosticInfo_EncodingByte.AdditionalInfo) {
        diagnosticInfo.additionalInfo = decodeString(stream);
    }
    // read inner status code
    if (encodingMask & DiagnosticInfo_EncodingByte.InnerStatusCode) {
        diagnosticInfo.innerStatusCode = decodeStatusCode(stream);
    }
    // read inner status code
    if (encodingMask & DiagnosticInfo_EncodingByte.InnerDiagnosticInfo) {
        diagnosticInfo.innerDiagnosticInfo = new DiagnosticInfo({});
github node-opcua / node-opcua / packages / node-opcua-data-model / source / diagnostic_info.ts View on Github external
// read symbolic id
    if (encodingMask & DiagnosticInfo_EncodingByte.SymbolicId) {
        diagnosticInfo.symbolicId = decodeInt32(stream);
        tracer.trace("member", "symbolicId", diagnosticInfo.symbolicId, cursorBefore, stream.length, "Int32");
        cursorBefore = stream.length;
    }
    // read namespace uri
    if (encodingMask & DiagnosticInfo_EncodingByte.NamespaceURI) {
        diagnosticInfo.namespaceURI = decodeInt32(stream);
        tracer.trace("member", "symbolicId", diagnosticInfo.namespaceURI, cursorBefore, stream.length, "Int32");
        cursorBefore = stream.length;
    }
    // read locale
    if (encodingMask & DiagnosticInfo_EncodingByte.Locale) {
        diagnosticInfo.locale = decodeInt32(stream);
        tracer.trace("member", "locale", diagnosticInfo.locale, cursorBefore, stream.length, "Int32");
        cursorBefore = stream.length;
    }
    // read localized text
    if (encodingMask & DiagnosticInfo_EncodingByte.LocalizedText) {
        diagnosticInfo.localizedText = decodeInt32(stream);
        tracer.trace("member", "localizedText", diagnosticInfo.localizedText, cursorBefore, stream.length, "Int32");
        cursorBefore = stream.length;
    }
    // read additional info
    if (encodingMask & DiagnosticInfo_EncodingByte.AdditionalInfo) {
        diagnosticInfo.additionalInfo = decodeString(stream);
        tracer.trace("member", "additionalInfo", diagnosticInfo.additionalInfo, cursorBefore, stream.length, "String");
        cursorBefore = stream.length;
    }
    // read inner status code
github node-opcua / node-opcua / packages / node-opcua-data-model / source / diagnostic_info.ts View on Github external
const encodingMask = decodeByte(stream);

    tracer.trace("member", "encodingByte", "0x" + encodingMask.toString(16), cursorBefore, stream.length, "Mask");
    tracer.encoding_byte(encodingMask, DiagnosticInfo_EncodingByte, cursorBefore, stream.length);

    cursorBefore = stream.length;

    // read symbolic id
    if (encodingMask & DiagnosticInfo_EncodingByte.SymbolicId) {
        diagnosticInfo.symbolicId = decodeInt32(stream);
        tracer.trace("member", "symbolicId", diagnosticInfo.symbolicId, cursorBefore, stream.length, "Int32");
        cursorBefore = stream.length;
    }
    // read namespace uri
    if (encodingMask & DiagnosticInfo_EncodingByte.NamespaceURI) {
        diagnosticInfo.namespaceURI = decodeInt32(stream);
        tracer.trace("member", "symbolicId", diagnosticInfo.namespaceURI, cursorBefore, stream.length, "Int32");
        cursorBefore = stream.length;
    }
    // read locale
    if (encodingMask & DiagnosticInfo_EncodingByte.Locale) {
        diagnosticInfo.locale = decodeInt32(stream);
        tracer.trace("member", "locale", diagnosticInfo.locale, cursorBefore, stream.length, "Int32");
        cursorBefore = stream.length;
    }
    // read localized text
    if (encodingMask & DiagnosticInfo_EncodingByte.LocalizedText) {
        diagnosticInfo.localizedText = decodeInt32(stream);
        tracer.trace("member", "localizedText", diagnosticInfo.localizedText, cursorBefore, stream.length, "Int32");
        cursorBefore = stream.length;
    }
    // read additional info
github node-opcua / node-opcua / packages / node-opcua-data-model / source / diagnostic_info.ts View on Github external
function decode_DiagnosticInfo(diagnosticInfo: DiagnosticInfo, stream: BinaryStream): void {

    const encodingMask = decodeByte(stream);

    // read symbolic id
    if (encodingMask & DiagnosticInfo_EncodingByte.SymbolicId) {
        diagnosticInfo.symbolicId = decodeInt32(stream);
    }
    // read namespace uri
    if (encodingMask & DiagnosticInfo_EncodingByte.NamespaceURI) {
        diagnosticInfo.namespaceURI = decodeInt32(stream);
    }
    // read locale
    if (encodingMask & DiagnosticInfo_EncodingByte.Locale) {
        diagnosticInfo.locale = decodeInt32(stream);
    }
    // read localized text
    if (encodingMask & DiagnosticInfo_EncodingByte.LocalizedText) {
        diagnosticInfo.localizedText = decodeInt32(stream);
    }
    // read additional info
    if (encodingMask & DiagnosticInfo_EncodingByte.AdditionalInfo) {
        diagnosticInfo.additionalInfo = decodeString(stream);
    }
    // read inner status code
    if (encodingMask & DiagnosticInfo_EncodingByte.InnerStatusCode) {
        diagnosticInfo.innerStatusCode = decodeStatusCode(stream);
github node-opcua / node-opcua / packages / node-opcua-data-model / source / diagnostic_info.ts View on Github external
const tracer = options.tracer;

    tracer.trace("start", options.name + "(" + "DiagnosticInfo" + ")", stream.length, stream.length);

    let cursorBefore = stream.length;
    const encodingMask = decodeByte(stream);

    tracer.trace("member", "encodingByte", "0x" + encodingMask.toString(16), cursorBefore, stream.length, "Mask");
    tracer.encoding_byte(encodingMask, DiagnosticInfo_EncodingByte, cursorBefore, stream.length);

    cursorBefore = stream.length;

    // read symbolic id
    if (encodingMask & DiagnosticInfo_EncodingByte.SymbolicId) {
        diagnosticInfo.symbolicId = decodeInt32(stream);
        tracer.trace("member", "symbolicId", diagnosticInfo.symbolicId, cursorBefore, stream.length, "Int32");
        cursorBefore = stream.length;
    }
    // read namespace uri
    if (encodingMask & DiagnosticInfo_EncodingByte.NamespaceURI) {
        diagnosticInfo.namespaceURI = decodeInt32(stream);
        tracer.trace("member", "symbolicId", diagnosticInfo.namespaceURI, cursorBefore, stream.length, "Int32");
        cursorBefore = stream.length;
    }
    // read locale
    if (encodingMask & DiagnosticInfo_EncodingByte.Locale) {
        diagnosticInfo.locale = decodeInt32(stream);
        tracer.trace("member", "locale", diagnosticInfo.locale, cursorBefore, stream.length, "Int32");
        cursorBefore = stream.length;
    }
    // read localized text
github node-opcua / node-opcua / packages / node-opcua-data-model / schemas / DiagnosticInfo_schema.js View on Github external
// read symbolic id
        if (check_flag(encoding_mask, DiagnosticInfo_EncodingByte.SymbolicId)) {
            diagnosticInfo.symbolicId = ec.decodeInt32(stream);
            tracer.trace("member", "symbolicId", diagnosticInfo.symbolicId, cursor_before, stream.length, "Int32");
            cursor_before = stream.length;
        }
        // read namespace uri
        if (check_flag(encoding_mask, DiagnosticInfo_EncodingByte.NamespaceUri)) {
            diagnosticInfo.namespaceUri = ec.decodeInt32(stream);
            tracer.trace("member", "symbolicId", diagnosticInfo.namespaceUri, cursor_before, stream.length, "Int32");
            cursor_before = stream.length;
        }
        // read locale
        if (check_flag(encoding_mask, DiagnosticInfo_EncodingByte.Locale)) {
            diagnosticInfo.locale = ec.decodeInt32(stream);
            tracer.trace("member", "locale", diagnosticInfo.locale, cursor_before, stream.length, "Int32");
            cursor_before = stream.length;
        }
        // read localized text
        if (check_flag(encoding_mask, DiagnosticInfo_EncodingByte.LocalizedText)) {
            diagnosticInfo.localizedText =  ec.decodeInt32(stream);
            tracer.trace("member", "localizedText", diagnosticInfo.localizedText, cursor_before, stream.length, "Int32");
            cursor_before = stream.length;
        }
        // read additional info
        if (check_flag(encoding_mask, DiagnosticInfo_EncodingByte.AdditionalInfo)) {
            diagnosticInfo.additionalInfo = ec.decodeString(stream);
            tracer.trace("member", "additionalInfo", diagnosticInfo.additionalInfo, cursor_before, stream.length, "String");
            cursor_before = stream.length;
        }
        // read inner status code
github node-opcua / node-opcua / packages / node-opcua-data-model / source / diagnostic_info.ts View on Github external
// read symbolic id
    if (encodingMask & DiagnosticInfo_EncodingByte.SymbolicId) {
        diagnosticInfo.symbolicId = decodeInt32(stream);
    }
    // read namespace uri
    if (encodingMask & DiagnosticInfo_EncodingByte.NamespaceURI) {
        diagnosticInfo.namespaceURI = decodeInt32(stream);
    }
    // read locale
    if (encodingMask & DiagnosticInfo_EncodingByte.Locale) {
        diagnosticInfo.locale = decodeInt32(stream);
    }
    // read localized text
    if (encodingMask & DiagnosticInfo_EncodingByte.LocalizedText) {
        diagnosticInfo.localizedText = decodeInt32(stream);
    }
    // read additional info
    if (encodingMask & DiagnosticInfo_EncodingByte.AdditionalInfo) {
        diagnosticInfo.additionalInfo = decodeString(stream);
    }
    // read inner status code
    if (encodingMask & DiagnosticInfo_EncodingByte.InnerStatusCode) {
        diagnosticInfo.innerStatusCode = decodeStatusCode(stream);
    }
    // read inner status code
    if (encodingMask & DiagnosticInfo_EncodingByte.InnerDiagnosticInfo) {
        diagnosticInfo.innerDiagnosticInfo = new DiagnosticInfo({});
        if (diagnosticInfo.innerDiagnosticInfo) {
            diagnosticInfo.innerDiagnosticInfo.decode(stream);
        }
    }
github node-opcua / node-opcua / packages / node-opcua-data-model / schemas / DiagnosticInfo_schema.js View on Github external
decode: function (diagnosticInfo, stream, options) {

        const encoding_mask = ec.decodeByte(stream);

        // read symbolic id
        if (check_flag(encoding_mask, DiagnosticInfo_EncodingByte.SymbolicId)) {
            diagnosticInfo.symbolicId = ec.decodeInt32(stream);
        }
        // read namespace uri
        if (check_flag(encoding_mask, DiagnosticInfo_EncodingByte.NamespaceUri)) {
            diagnosticInfo.namespaceUri = ec.decodeInt32(stream);
        }
        // read locale
        if (check_flag(encoding_mask, DiagnosticInfo_EncodingByte.Locale)) {
            diagnosticInfo.locale = ec.decodeInt32(stream);
        }
        // read localized text
        if (check_flag(encoding_mask, DiagnosticInfo_EncodingByte.LocalizedText)) {
            diagnosticInfo.localizedText = ec.decodeInt32(stream);
        }
        // read additional info
        if (check_flag(encoding_mask, DiagnosticInfo_EncodingByte.AdditionalInfo)) {
            diagnosticInfo.additionalInfo = ec.decodeString(stream);
        }
        // read inner status code
        if (check_flag(encoding_mask, DiagnosticInfo_EncodingByte.InnerStatusCode)) {
            diagnosticInfo.innerStatusCode = ec.decodeStatusCode(stream);
        }
        // read inner status code
        if (check_flag(encoding_mask, DiagnosticInfo_EncodingByte.InnerDiagnosticInfo)) {
github node-opcua / node-opcua / packages / node-opcua-data-model / schemas / DiagnosticInfo_schema.js View on Github external
const tracer = options.tracer;

        tracer.trace("start", options.name + "(" + "DiagnosticInfo" + ")", stream.length, stream.length);

        let cursor_before = stream.length;
        const encoding_mask = ec.decodeByte(stream);

        tracer.trace("member", "encodingByte", "0x" + encoding_mask.toString(16), cursor_before, stream.length, "Mask");
        tracer.encoding_byte(encoding_mask,DiagnosticInfo_EncodingByte,cursor_before,stream.length);


        cursor_before = stream.length;

        // read symbolic id
        if (check_flag(encoding_mask, DiagnosticInfo_EncodingByte.SymbolicId)) {
            diagnosticInfo.symbolicId = ec.decodeInt32(stream);
            tracer.trace("member", "symbolicId", diagnosticInfo.symbolicId, cursor_before, stream.length, "Int32");
            cursor_before = stream.length;
        }
        // read namespace uri
        if (check_flag(encoding_mask, DiagnosticInfo_EncodingByte.NamespaceUri)) {
            diagnosticInfo.namespaceUri = ec.decodeInt32(stream);
            tracer.trace("member", "symbolicId", diagnosticInfo.namespaceUri, cursor_before, stream.length, "Int32");
            cursor_before = stream.length;
        }
        // read locale
        if (check_flag(encoding_mask, DiagnosticInfo_EncodingByte.Locale)) {
            diagnosticInfo.locale = ec.decodeInt32(stream);
            tracer.trace("member", "locale", diagnosticInfo.locale, cursor_before, stream.length, "Int32");
            cursor_before = stream.length;
        }
        // read localized text