當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript node-opcua-debug.make_errorLog函數代碼示例

本文整理匯總了TypeScript中node-opcua-debug.make_errorLog函數的典型用法代碼示例。如果您正苦於以下問題:TypeScript make_errorLog函數的具體用法?TypeScript make_errorLog怎麽用?TypeScript make_errorLog使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了make_errorLog函數的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: require

import {
    CreateSecureChannelCallbackFunc, FindEndpointCallback,
    FindEndpointOptions,
    FindEndpointResult, FindServersOnNetworkRequestLike, FindServersRequestLike,
    GetEndpointsOptions,
    OPCUAClientBase,
    OPCUAClientBaseOptions
} from "../client_base";
import { ClientSessionImpl } from "./client_session_impl";

// tslint:disable-next-line:no-var-requires
const once = require("once");

const debugLog = make_debugLog(__filename);
const errorLog = make_errorLog(__filename);
const doDebug = checkDebugFlag(__filename);

const defaultConnectionStrategy: ConnectionStrategyOptions = {
    initialDelay: 1000,
    maxDelay: 20 * 1000, // 20 seconds
    maxRetry: -1, // infinite
    randomisationFactor: 0.1
};

const warningLog = debugLog;

function __findEndpoint(
  masterClient: OPCUAClientBase,
  endpointUrl: string,
  params: FindEndpointOptions,
開發者ID:node-opcua,項目名稱:node-opcua,代碼行數:30,代碼來源:client_base_impl.ts

示例2: make_errorLog

/**
 * @module node-opcua-transport
 */
import { EventEmitter } from "events";
import { assert } from "node-opcua-assert";

import { BinaryStream } from "node-opcua-binary-stream";
import { createFastUninitializedBuffer } from "node-opcua-buffer-utils";
import { readMessageHeader, SequenceHeader } from "node-opcua-chunkmanager";
import { make_errorLog } from "node-opcua-debug";
import { PacketAssembler, PacketInfo } from "node-opcua-packet-assembler";
import { get_clock_tick } from "node-opcua-utils";

const doPerfMonitoring = false;

const errorLog = make_errorLog("MessageBuilder");

export function readRawMessageHeader(data: Buffer): PacketInfo {
    const messageHeader = readMessageHeader(new BinaryStream(data));
    return {
        extra: "",
        length: messageHeader.length,
        messageHeader
    };
}

/**
 * @class MessageBuilderBase
 * @extends EventEmitter
 * @uses PacketAssembler
 * @constructor
開發者ID:node-opcua,項目名稱:node-opcua,代碼行數:31,代碼來源:message_builder_base.ts

示例3: make_debugLog

import {
    checkDebugFlag,
    make_debugLog,
    make_errorLog
} from "node-opcua-debug";
import {
    NodeId
} from "node-opcua-nodeid";
import {
    AddObjectOptions,
    AddressSpace,
    UACertificateExpirationAlarm
} from "node-opcua-address-space";
const debugLog = make_debugLog("ServerConfiguration");
const errorLog = make_errorLog("ServerConfiguration");
const doDebug = checkDebugFlag("ServerConfiguration");

export function installCertificateExpirationAlarm(addressSpace: AddressSpace) {

    debugLog("installCertificateExpirationAlarm");

    const server = addressSpace.rootFolder.objects.server;

    const namespace = addressSpace.getOwnNamespace();

    const certificateExpirationAlarmType = addressSpace.findEventType("CertificateExpirationAlarmType");

    const options = {
        browseName: "ServerCertificateAlarm",
        conditionSource: null,
開發者ID:node-opcua,項目名稱:node-opcua,代碼行數:30,代碼來源:install_CertificateAlarm.ts


注:本文中的node-opcua-debug.make_errorLog函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。