Skip to main content

NativeOpcuaTransport

@totemsdk/edge-opcua


@totemsdk/edge-opcua / NativeOpcuaTransport

Class: NativeOpcuaTransport

OPC-UA transport port — injected by the caller.

OPC-UA (IEC 62541) is a binary protocol for industrial automation. Supports secure channels, sessions, node browsing, subscriptions, and method calls. The caller provides the OPC-UA stack.

Implements​

Constructors​

Constructor​

new NativeOpcuaTransport(config?): NativeOpcuaTransport

Parameters​

config?​

NativeOpcuaConfig = {}

Returns​

NativeOpcuaTransport

Methods​

browse()​

browse(nodeId): Promise<OpcuaNode[]>

Browse the server's address space.

Parameters​

nodeId​

string

Returns​

Promise<OpcuaNode[]>

Implementation of​

OpcuaTransportPort.browse


call()​

call(objectId, methodId, args): Promise<OpcuaValue[]>

Call a method on an object node.

Parameters​

objectId​

string

methodId​

string

args​

OpcuaValue[]

Returns​

Promise<OpcuaValue[]>

Implementation of​

OpcuaTransportPort.call


connect()​

connect(endpointUrl): Promise<void>

Connect to an OPC-UA server endpoint.

Parameters​

endpointUrl​

string

Returns​

Promise<void>

Implementation of​

OpcuaTransportPort.connect


disconnect()​

disconnect(): Promise<void>

Disconnect and close the session.

Returns​

Promise<void>

Implementation of​

OpcuaTransportPort.disconnect


onError()​

onError(handler): () => void

Register handler for session errors.

Parameters​

handler​

(err) => void

Returns​

() => void

Implementation of​

OpcuaTransportPort.onError


read()​

read(nodeId): Promise<OpcuaValue>

Read the value of a node.

Parameters​

nodeId​

string

Returns​

Promise<OpcuaValue>

Implementation of​

OpcuaTransportPort.read


subscribe()​

subscribe(nodeIds, samplingInterval): Promise<OpcuaSubscription>

Create a monitored item subscription.

Parameters​

nodeIds​

string[]

samplingInterval​

number

Returns​

Promise<OpcuaSubscription>

Implementation of​

OpcuaTransportPort.subscribe


write()​

write(nodeId, value): Promise<void>

Write a value to a node.

Parameters​

nodeId​

string

value​

OpcuaValue

Returns​

Promise<void>

Implementation of​

OpcuaTransportPort.write