API Docs for: 0.0.57
Show:

OPCUABaseServer Class

Constructor

OPCUABaseServer

(
  • options
)

Parameters:

  • options Object
    • certificateFile
    • privateKeyFile
    • [serverInfo= null] optional

      the information used in the end point description

      • [applicationUri= "urn:NodeOPCUA-SimpleDemoServer"] String optional
      • [productUri= "SimpleDemoServer"] String optional
      • [applicationName] Text: "applicationName" optional
        {LocalizedText}
      • [gatewayServerUri= null] String optional
      • [discoveryProfileUri= null] String optional
      • [discoveryUrls= []] Array optional

Methods

_on_FindServersRequest

(
  • message
  • channel
)
private

Parameters:

  • message Object
  • channel Object

_on_GetEndpointsRequest

(
  • message
  • channel
)
private

Parameters:

  • message Object
  • channel Object

addSubscriber add a subscriber to the WatchDog. This method modifies the subscriber be adding a new method to it called 'keepAlive' The subscriber must also provide a "watchdogReset". watchdogReset will be called if the subscriber failed to call keepAlive withing the timeout period.

(
  • subscriber
  • timeout
)
Number

Provided by the opcua.miscellaneous module.

Defined in lib\misc\watchdog.js:68

add a subscriber to the WatchDog.

Parameters:

  • subscriber Object
  • timeout Object

Returns:

Number:

check_flag

(
  • value
  • mask
)
Boolean

Provided by the opcua.miscellaneous module.

Defined in lib\misc\utils.js:28

check if a set of bits are set in the values

Parameters:

  • value Object
  • mask Object

Returns:

Boolean:

getChannels

() Array

returns a array of currently active channels

Returns:

Array:

getObjectClassName

(
  • obj
)
String

Provided by the opcua.miscellaneous module.

Defined in lib\misc\utils.js:42

Parameters:

  • obj Object

Returns:

String:

make_debugLog

(
  • script_fullpath
)

Provided by the opcua.miscellaneous module.

Defined in lib\misc\utils.js:122

Parameters:

  • script_fullpath Object

Returns:

returns a debugLog function that will write message to the console if the DEBUG environment variable indicates that the provided source file shall display debug trace

makeBuffer turn a string make of hexadecimal bytes into a buffer

(
  • listOfBytes
)
Buffer

Provided by the opcua.miscellaneous module.

Defined in lib\misc\utils.js:247

Parameters:

  • listOfBytes Object

Returns:

Buffer:

Example:

var buffer = makeBuffer("BE EF");

makeServiceFault

(
  • statusCode
  • messages
)

construct a service Fault response

Parameters:

  • statusCode Object
  • messages Object

normalize_require_file

(
  • baseFolder
  • full_path_to_file
)

Provided by the opcua.miscellaneous module.

Defined in lib\misc\utils.js:353

Parameters:

  • baseFolder Object
  • full_path_to_file Object

Example:

: normalize_require_file("/home/bob/folder1/","/home/bob/folder1/folder2/toto.js").should.eql("./folder2/toto");

redirectToFile

(
  • tmpfile
  • action_func
  • callback
)

Provided by the opcua.miscellaneous module.

Defined in lib\misc\utils.js:163

Parameters:

  • tmpfile String

    log file name to redirect console output.

  • action_func Function
    • the inner function to execute
  • callback Object

resumeEndPoints

(
  • callback
)

set all the end point into a state where they do accept connections

Parameters:

  • callback Function

set_flag

(
  • value
  • mask
)
Number

Provided by the opcua.miscellaneous module.

Defined in lib\misc\utils.js:16

set a flag

Parameters:

  • value Object
  • mask Object

Returns:

Number:

shutdown

(
  • done
)
async

shutdown all server endPoints

Parameters:

  • done Callback
    • err Error | Null

start

(
  • done
)
async

start all registered endPoint, in parallel, and call done when all endPoints are listening.

Parameters:

  • done Callback

suspendEndPoints

(
  • callback
)

set all the end point into a state where they do not accept further connections

Parameters:

  • callback Function

Properties

serverType

ApplicationType

The type of server : SERVER, CLIENTANDSERVER, DISCOVERYSERVER

subscriberCount

Number

Provided by the opcua.miscellaneous module.

Defined in lib\misc\watchdog.js:15

returns the number of subscribers using the WatchDog object.