APIs

Show:

Constructor

Enum

(
  • key
  • value
)

Parameters:

  • key String

    The Enum key.

  • value Number

    The Enum value.

Methods

addTestUAAnalogItem

(
  • parentNode
)

add a fake analog data item for testing

Parameters:

  • parentNode Object

build_client_server_session

(
  • done
)
G_session: null, g_server: ( | OPCUAServer), shutdown: shutdown

Parameters:

  • done Object

Returns:

G_session: null, g_server: ( | OPCUAServer), shutdown: shutdown:

}

Example:

before(function (done) { client_server = build_client_server_session(server_options,function (err) { if (!err) { g_session = client_server.g_session; } done(err); });

}); after(function (done) { client_server.shutdown(done); });

build_server_with_temperature_device create and start a fake OPCUA Server that exposes a temperature set point variable. the SetPoint temperature can be set on the server side by accessing the 'set_point_temperature' of the return server object. the SetPoint temperature can be accessed as a Read/Write variable by a opcua client as "Root/MyDevices/SetPointTemperature". The node id of this variable is stored into the 'temperatureVariableId' of the server object.

(
  • options
  • done
)
OPCUAServer

Parameters:

  • options Options
    • [add_simulation= false] Boolean optional

      add the simulation nodes in the server

  • done Callback

Returns:

createHVACSystem

(
  • addressSpace
)

Parameters:

  • addressSpace Object

Returns:

:

get

(
  • key
)
EnumItem

Returns the appropriate EnumItem.

Parameters:

  • key EnumItem | | String | | Number

    The object to get with.

Returns:

EnumItem:

The get result.

getRandomInt

(
  • min
  • max
)
private

return a random integer value in the range of min inclusive and max exclusive

Parameters:

  • min Object
  • max Object

Returns:

:

has

(
  • value
)
Boolean

Checks if the flagged EnumItem has the passing object.

Parameters:

  • value EnumItem | String | Number

    The object to check with.

Returns:

Boolean:

The check result.

is

(
  • item
)
Boolean

Checks if the EnumItem is the same as the passing object.

Parameters:

  • item EnumItem | String | Number

    The object to check with.

Returns:

Boolean:

The check result.

make_debugLog

(
  • scripFullpath:string
)

Parameters:

  • scripFullpath:string 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

perform_operation_on_client_session simple wrapper that operates on a freshly created opcua session. The wrapper: - connects to the server, - creates a session - calls your **callback** method (func) with the session object - closes the session - disconnects the client - finally call the final **callback** (done_func)

(
  • client
  • endpointUrl
  • func
  • done_func
)

Parameters:

  • client Object
  • endpointUrl String
  • func Function
    • session Session

      the done callback to call when operation is completed

    • done Function

      the done callback to call when operation is completed

      • [err] Error optional
        an optional error to pass if the function has failed
  • done_func Function
    • [err] Error optional

      an optional error to pass if the function has failed

perform_operation_on_subscription simple wrapper that operates on a freshly created subscription. - connects to the server,and create a session - create a new subscription with a publish interval of 100 ms - calls your **callback** method (do_func) with the subscription object - delete the subscription - close the session and disconnect from the server - finally call the final **callback** (done_func)

(
  • client
  • endpointUrl
  • do_func
  • done_func
)

Parameters:

  • client OPCUAClientBase
  • endpointUrl String
  • do_func Function
    • session Session

      the done callback to call when operation is completed

    • done Function

      the done callback to call when operation is completed

  • done_func Function
    • [err] Error optional

sameDataValue

(
  • v1
  • v2
  • [timestampsToReturn]
)
Boolean

Parameters:

Returns:

Boolean:

true if data values are identical

start_simple_server

(
  • options
  • callback
)

Parameters:

  • options Object
    • env
    • [server_sourcefile="./bin/simple_server"] String optional
    • [port= 2223] String optional
  • callback Function
    • error Error | Null
    • data
      • process
      • endpointurl
      • serverCertificate

toJSON

() String

Returns JSON object representation of this EnumItem.

Returns:

String:

JSON object representation of this EnumItem.

toString

() String

Returns String representation of this EnumItem.

Returns:

String:

String representation of this EnumItem.

valueOf

() String

Returns the value to compare with.

Returns:

String:

The value to compare with.