How to use the node-opcua-basic-types.encodeInt32 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 / schemas / DiagnosticInfo_schema.js View on Github external
encode: function (diagnosticInfo, stream) {

        const encoding_mask = getDiagnosticInfoEncodingByte(diagnosticInfo);

        // write encoding byte
        ec.encodeByte(encoding_mask, stream);

        // write symbolic id
        if (check_flag(encoding_mask, DiagnosticInfo_EncodingByte.SymbolicId)) {
            ec.encodeInt32(diagnosticInfo.symbolicId, stream);
        }
        // write namespace uri
        if (check_flag(encoding_mask, DiagnosticInfo_EncodingByte.NamespaceUri)) {
            ec.encodeInt32(diagnosticInfo.namespaceUri, stream);
        }
        // write locale
        if (check_flag(encoding_mask, DiagnosticInfo_EncodingByte.Locale)) {
            ec.encodeInt32(diagnosticInfo.locale, stream);
        }
        // write localized text
        if (check_flag(encoding_mask, DiagnosticInfo_EncodingByte.LocalizedText)) {
            ec.encodeInt32(diagnosticInfo.localizedText, stream);
        }
        // write additional info
        if (check_flag(encoding_mask, DiagnosticInfo_EncodingByte.AdditionalInfo)) {
            ec.encodeString(diagnosticInfo.additionalInfo, stream);
        }
        // write inner status code
        if (check_flag(encoding_mask, DiagnosticInfo_EncodingByte.InnerStatusCode)) {
            ec.encodeStatusCode(diagnosticInfo.innerStatusCode, stream);
github node-opcua / node-opcua / packages / node-opcua-data-model / source / diagnostic_info.ts View on Github external
function encode_DiagnosticInfo(diagnosticInfo: DiagnosticInfo, stream: OutputBinaryStream): void {

    const encodingMask = getDiagnosticInfoEncodingByte(diagnosticInfo);

    // write encoding byte
    encodeByte(encodingMask, stream);

    // write symbolic id
    if (encodingMask & DiagnosticInfo_EncodingByte.SymbolicId) {
        encodeInt32(diagnosticInfo.symbolicId, stream);
    }
    // write namespace uri
    if (encodingMask & DiagnosticInfo_EncodingByte.NamespaceURI) {
        encodeInt32(diagnosticInfo.namespaceURI, stream);
    }
    // write locale
    if (encodingMask & DiagnosticInfo_EncodingByte.Locale) {
        encodeInt32(diagnosticInfo.locale, stream);
    }
    // write localized text
    if (encodingMask & DiagnosticInfo_EncodingByte.LocalizedText) {
        encodeInt32(diagnosticInfo.localizedText, stream);
    }
    // write additional info
    if (encodingMask & DiagnosticInfo_EncodingByte.AdditionalInfo) {
        encodeString(diagnosticInfo.additionalInfo, stream);
github node-opcua / node-opcua / packages / node-opcua-data-model / source / diagnostic_info.ts View on Github external
const encodingMask = getDiagnosticInfoEncodingByte(diagnosticInfo);

    // write encoding byte
    encodeByte(encodingMask, stream);

    // write symbolic id
    if (encodingMask & DiagnosticInfo_EncodingByte.SymbolicId) {
        encodeInt32(diagnosticInfo.symbolicId, stream);
    }
    // write namespace uri
    if (encodingMask & DiagnosticInfo_EncodingByte.NamespaceURI) {
        encodeInt32(diagnosticInfo.namespaceURI, stream);
    }
    // write locale
    if (encodingMask & DiagnosticInfo_EncodingByte.Locale) {
        encodeInt32(diagnosticInfo.locale, stream);
    }
    // write localized text
    if (encodingMask & DiagnosticInfo_EncodingByte.LocalizedText) {
        encodeInt32(diagnosticInfo.localizedText, stream);
    }
    // write additional info
    if (encodingMask & DiagnosticInfo_EncodingByte.AdditionalInfo) {
        encodeString(diagnosticInfo.additionalInfo, stream);
    }
    // write inner status code
    if (encodingMask & DiagnosticInfo_EncodingByte.InnerStatusCode) {
        encodeStatusCode(diagnosticInfo.innerStatusCode, stream);
    }
    // write  innerDiagnosticInfo
    if (encodingMask & DiagnosticInfo_EncodingByte.InnerDiagnosticInfo) {
        assert(diagnosticInfo.innerDiagnosticInfo !== null, "missing innerDiagnosticInfo");
github node-opcua / node-opcua / packages / node-opcua-data-model / source / diagnostic_info.ts View on Github external
// write symbolic id
    if (encodingMask & DiagnosticInfo_EncodingByte.SymbolicId) {
        encodeInt32(diagnosticInfo.symbolicId, stream);
    }
    // write namespace uri
    if (encodingMask & DiagnosticInfo_EncodingByte.NamespaceURI) {
        encodeInt32(diagnosticInfo.namespaceURI, stream);
    }
    // write locale
    if (encodingMask & DiagnosticInfo_EncodingByte.Locale) {
        encodeInt32(diagnosticInfo.locale, stream);
    }
    // write localized text
    if (encodingMask & DiagnosticInfo_EncodingByte.LocalizedText) {
        encodeInt32(diagnosticInfo.localizedText, stream);
    }
    // write additional info
    if (encodingMask & DiagnosticInfo_EncodingByte.AdditionalInfo) {
        encodeString(diagnosticInfo.additionalInfo, stream);
    }
    // write inner status code
    if (encodingMask & DiagnosticInfo_EncodingByte.InnerStatusCode) {
        encodeStatusCode(diagnosticInfo.innerStatusCode, stream);
    }
    // write  innerDiagnosticInfo
    if (encodingMask & DiagnosticInfo_EncodingByte.InnerDiagnosticInfo) {
        assert(diagnosticInfo.innerDiagnosticInfo !== null, "missing innerDiagnosticInfo");
        if (diagnosticInfo.innerDiagnosticInfo) {
            encode_DiagnosticInfo(diagnosticInfo.innerDiagnosticInfo, stream);
        }
    }
github node-opcua / node-opcua / packages / node-opcua-data-model / source / diagnostic_info.ts View on Github external
function encode_DiagnosticInfo(diagnosticInfo: DiagnosticInfo, stream: OutputBinaryStream): void {

    const encodingMask = getDiagnosticInfoEncodingByte(diagnosticInfo);

    // write encoding byte
    encodeByte(encodingMask, stream);

    // write symbolic id
    if (encodingMask & DiagnosticInfo_EncodingByte.SymbolicId) {
        encodeInt32(diagnosticInfo.symbolicId, stream);
    }
    // write namespace uri
    if (encodingMask & DiagnosticInfo_EncodingByte.NamespaceURI) {
        encodeInt32(diagnosticInfo.namespaceURI, stream);
    }
    // write locale
    if (encodingMask & DiagnosticInfo_EncodingByte.Locale) {
        encodeInt32(diagnosticInfo.locale, stream);
    }
    // write localized text
    if (encodingMask & DiagnosticInfo_EncodingByte.LocalizedText) {
        encodeInt32(diagnosticInfo.localizedText, stream);
    }
    // write additional info
    if (encodingMask & DiagnosticInfo_EncodingByte.AdditionalInfo) {
        encodeString(diagnosticInfo.additionalInfo, stream);
    }
    // write inner status code
    if (encodingMask & DiagnosticInfo_EncodingByte.InnerStatusCode) {
        encodeStatusCode(diagnosticInfo.innerStatusCode, stream);
github node-opcua / node-opcua / packages / node-opcua-data-model / schemas / DiagnosticInfo_schema.js View on Github external
// write symbolic id
        if (check_flag(encoding_mask, DiagnosticInfo_EncodingByte.SymbolicId)) {
            ec.encodeInt32(diagnosticInfo.symbolicId, stream);
        }
        // write namespace uri
        if (check_flag(encoding_mask, DiagnosticInfo_EncodingByte.NamespaceUri)) {
            ec.encodeInt32(diagnosticInfo.namespaceUri, stream);
        }
        // write locale
        if (check_flag(encoding_mask, DiagnosticInfo_EncodingByte.Locale)) {
            ec.encodeInt32(diagnosticInfo.locale, stream);
        }
        // write localized text
        if (check_flag(encoding_mask, DiagnosticInfo_EncodingByte.LocalizedText)) {
            ec.encodeInt32(diagnosticInfo.localizedText, stream);
        }
        // write additional info
        if (check_flag(encoding_mask, DiagnosticInfo_EncodingByte.AdditionalInfo)) {
            ec.encodeString(diagnosticInfo.additionalInfo, stream);
        }
        // write inner status code
        if (check_flag(encoding_mask, DiagnosticInfo_EncodingByte.InnerStatusCode)) {
            ec.encodeStatusCode(diagnosticInfo.innerStatusCode, stream);
        }
        // write  innerDiagnosticInfo
        if (check_flag(encoding_mask, DiagnosticInfo_EncodingByte.InnerDiagnosticInfo)) {
            assert(diagnosticInfo.innerDiagnosticInfo !== null && "missing innerDiagnosticInfo");
            diagnosticInfo.innerDiagnosticInfo.encode(stream);
        }
    },
github node-opcua / node-opcua / packages / node-opcua-data-model / schemas / DiagnosticInfo_schema.js View on Github external
encode: function (diagnosticInfo, stream) {

        const encoding_mask = getDiagnosticInfoEncodingByte(diagnosticInfo);

        // write encoding byte
        ec.encodeByte(encoding_mask, stream);

        // write symbolic id
        if (check_flag(encoding_mask, DiagnosticInfo_EncodingByte.SymbolicId)) {
            ec.encodeInt32(diagnosticInfo.symbolicId, stream);
        }
        // write namespace uri
        if (check_flag(encoding_mask, DiagnosticInfo_EncodingByte.NamespaceUri)) {
            ec.encodeInt32(diagnosticInfo.namespaceUri, stream);
        }
        // write locale
        if (check_flag(encoding_mask, DiagnosticInfo_EncodingByte.Locale)) {
            ec.encodeInt32(diagnosticInfo.locale, stream);
        }
        // write localized text
        if (check_flag(encoding_mask, DiagnosticInfo_EncodingByte.LocalizedText)) {
            ec.encodeInt32(diagnosticInfo.localizedText, stream);
        }
        // write additional info
        if (check_flag(encoding_mask, DiagnosticInfo_EncodingByte.AdditionalInfo)) {
            ec.encodeString(diagnosticInfo.additionalInfo, stream);