How to use the node-opcua-common.ServerState function in node-opcua-common

To help you get started, we’ve selected a few node-opcua-common 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 / index.js View on Github external
module.exports.UserIdentityTokenType = require("node-opcua-service-endpoints").UserIdentityTokenType;

module.exports.subscription_service = require("node-opcua-service-subscription");
module.exports.historizing_service = require("node-opcua-service-history");
module.exports.discovery_service = require("node-opcua-service-discovery");
module.exports.secure_channel_service = require("node-opcua-service-secure-channel");

module.exports.translate_browse_paths_to_node_ids_service = require("node-opcua-service-translate-browse-path");
module.exports.BrowsePath = require("node-opcua-service-translate-browse-path").BrowsePath;
module.exports.makeRelativePath = require("node-opcua-service-translate-browse-path").makeRelativePath;
module.exports.makeBrowsePath = require("node-opcua-service-translate-browse-path").makeBrowsePath;

module.exports.query_service = require("node-opcua-service-query");
module.exports.node_managment_service = require("node-opcua-service-node-management");

module.exports.ServerState = require("node-opcua-common").ServerState;
module.exports.ServiceCounter = require("node-opcua-common").ServiceCounter;

module.exports.SecurityPolicy = require("node-opcua-secure-channel").SecurityPolicy;
module.exports.MessageSecurityMode = require("node-opcua-service-secure-channel").MessageSecurityMode;

module.exports.utils = require("node-opcua-utils");
module.exports.crypto_utils = require("node-opcua-crypto");
module.exports.hexDump = require("node-opcua-debug").hexDump;

//----------------------------------------------------------------------------------------------------------------------
// client services
//----------------------------------------------------------------------------------------------------------------------
module.exports.OPCUAClient = require("node-opcua-client").OPCUAClient;
module.exports.OPCUAClientBase = require("node-opcua-client").OPCUAClientBase;

module.exports.NodeCrawler = require("node-opcua-client-crawler").NodeCrawler;
github node-opcua / node-opcua / packages / node-opcua-server / src / server_engine.js View on Github external
require("node-opcua-common");

const address_space = require("node-opcua-address-space");
const AddressSpace = address_space.AddressSpace;

const generate_address_space = require("node-opcua-address-space").generate_address_space;

const ServerSession = require("./server_session").ServerSession;

const VariableIds = require("node-opcua-constants").VariableIds;
const MethodIds = require("node-opcua-constants").MethodIds;

const ReferenceType = require("node-opcua-address-space").ReferenceType;


const ServerState = require("node-opcua-common").ServerState;
const ServerStatus = require("node-opcua-common").ServerStatus;
const ServerDiagnosticsSummary = require("node-opcua-common").ServerDiagnosticsSummary;

const endpoints_service = require("node-opcua-service-endpoints");
const ApplicationDescription = endpoints_service.ApplicationDescription;

const nodesets = require("node-opcua-nodesets");
exports.standard_nodeset_file = nodesets.standard_nodeset_file;
exports.di_nodeset_filename = nodesets.di_nodeset_filename;
exports.adi_nodeset_filename = nodesets.adi_nodeset_filename;
const mini_nodeset_filename = require("node-opcua-address-space/test_helpers/get_mini_address_space").mini_nodeset_filename;
exports.mini_nodeset_filename = mini_nodeset_filename;


const debugLog = require("node-opcua-debug").make_debugLog(__filename);
const doDebug = require("node-opcua-debug").checkDebugFlag(__filename);
github node-opcua / node-opcua / packages / node-opcua-server / src / opcua_server.js View on Github external
const ServerEngine = require("./server_engine").ServerEngine;


const browse_service = require("node-opcua-service-browse");
const read_service = require("node-opcua-service-read");
const write_service = require("node-opcua-service-write");
const historizing_service = require("node-opcua-service-history");
const subscription_service = require("node-opcua-service-subscription");
const translate_service = require("node-opcua-service-translate-browse-path");
const session_service = require("node-opcua-service-session");
const register_node_service = require("node-opcua-service-register-node");
const call_service = require("node-opcua-service-call");
const endpoints_service = require("node-opcua-service-endpoints");
const query_service = require("node-opcua-service-query");

const ServerState = require("node-opcua-common").ServerState;
const EndpointDescription = endpoints_service.EndpointDescription;

const TimestampsToReturn = read_service.TimestampsToReturn;

const ActivateSessionRequest = session_service.ActivateSessionRequest;
const ActivateSessionResponse = session_service.ActivateSessionResponse;

const CreateSessionRequest = session_service.CreateSessionRequest;
const CreateSessionResponse = session_service.CreateSessionResponse;


const CloseSessionRequest = session_service.CloseSessionRequest;
const CloseSessionResponse = session_service.CloseSessionResponse;

const DeleteMonitoredItemsRequest = subscription_service.DeleteMonitoredItemsRequest;
const DeleteMonitoredItemsResponse = subscription_service.DeleteMonitoredItemsResponse;
github node-opcua / node-opcua / packages / node-opcua-client / src / client_session_keepalive_manager.js View on Github external
const assert = require("node-opcua-assert").assert;
const EventEmitter = require("events").EventEmitter;
const util = require("util");

const coerceNodeId = require("node-opcua-nodeid").coerceNodeId;
const VariableIds = require("node-opcua-constants").VariableIds;

const serverStatus_State_Id = coerceNodeId(VariableIds.Server_ServerStatus_State);
const ServerState = require("node-opcua-common").ServerState;
const StatusCodes = require("node-opcua-status-code").StatusCodes;

const debugLog = require("node-opcua-debug").make_debugLog(__filename);
const doDebug = require("node-opcua-debug").checkDebugFlag(__filename);


function ClientSessionKeepAliveManager(session) {
    const self = this;
    self.session = session;
    self.timerId = 0;
}
util.inherits(ClientSessionKeepAliveManager, EventEmitter);
/**
 * @method ping_server
 *
 * when a session is opened on a server, the client shall send request on a regular basis otherwise the server