Type Alias: OpcUaTransportConfig
type OpcUaTransportConfig = {
endpoint_url: string;
nodes: (string | OpcUaNodeSpec)[];
publishing_interval?: number;
sampling_interval?: number;
queue_size?: number;
security_mode?: "None" | "Sign" | "SignAndEncrypt";
security_policy?: string;
username?: string;
password?: string;
application_name?: string;
max_retry?: number;
};
Defined in: livelink.clients/livelink.agent/sources/data/transports/OpcUaTransport.ts:60
Configuration of an OpcUaTransport.
Properties
endpoint_url
endpoint_url: string;
Defined in: livelink.clients/livelink.agent/sources/data/transports/OpcUaTransport.ts:64
Endpoint of the OPC UA server, e.g. opc.tcp://plc.example.com:4840.
nodes
nodes: (string | OpcUaNodeSpec)[];
Defined in: livelink.clients/livelink.agent/sources/data/transports/OpcUaTransport.ts:70
Nodes to monitor. A bare string is a node id whose channel is that same node id; use the OpcUaNodeSpec form to alias it to a readable channel.
publishing_interval?
optional publishing_interval?: number;
Defined in: livelink.clients/livelink.agent/sources/data/transports/OpcUaTransport.ts:83
How often the server publishes the samples it has collected, in milliseconds. Defaults to
1000. This is the latency floor of the whole ingestion: sampling faster than this only
fills the queue.
This is a request: the server answers with the interval it will actually publish at, and that is the one that holds. Most servers refuse to go below 50 ms — node-opcua's own server clamps there, and caps at one minute — so asking for less buys nothing. A request the server revises upward is logged once rather than absorbed silently, since everything downstream of a halved sample rate looks like a bug elsewhere.
sampling_interval?
optional sampling_interval?: number;
Defined in: livelink.clients/livelink.agent/sources/data/transports/OpcUaTransport.ts:93
How often the server samples the monitored nodes, in milliseconds. Defaults to OpcUaTransportConfig.publishing_interval, i.e. one sample per publication.
Revised by the server the same way the publishing interval is, and logged the same way: a node whose underlying device cannot be read faster comes back with its own minimum, whatever this asks for.
queue_size?
optional queue_size?: number;
Defined in: livelink.clients/livelink.agent/sources/data/transports/OpcUaTransport.ts:100
How many samples the server buffers per node between two publications. Defaults to 1, which
keeps only the latest — the right choice for telemetry driving a scene. Raise it to receive
every sample of a node sampled faster than it is published.
security_mode?
optional security_mode?: "None" | "Sign" | "SignAndEncrypt";
Defined in: livelink.clients/livelink.agent/sources/data/transports/OpcUaTransport.ts:106
Message security to negotiate. Defaults to "None", or to "SignAndEncrypt" when a
OpcUaTransportConfig.security_policy other than "None" is named.
security_policy?
optional security_policy?: string;
Defined in: livelink.clients/livelink.agent/sources/data/transports/OpcUaTransport.ts:114
Security policy to negotiate, by short name ("Basic256Sha256",
"Aes128_Sha256_RsaOaep", ...) or by full policy URI. Defaults to "None", or to
"Basic256Sha256" when a OpcUaTransportConfig.security_mode other than "None" is
named. The two must agree: either both are "None", or neither is.
username?
optional username?: string;
Defined in: livelink.clients/livelink.agent/sources/data/transports/OpcUaTransport.ts:119
User name to authenticate with. Omitted = connect anonymously.
password?
optional password?: string;
Defined in: livelink.clients/livelink.agent/sources/data/transports/OpcUaTransport.ts:124
Password that goes with OpcUaTransportConfig.username.
application_name?
optional application_name?: string;
Defined in: livelink.clients/livelink.agent/sources/data/transports/OpcUaTransport.ts:130
Application name announced to the server, and carried by the client certificate generated for
a secured connection. Defaults to "livelink-agent".
max_retry?
optional max_retry?: number;
Defined in: livelink.clients/livelink.agent/sources/data/transports/OpcUaTransport.ts:141
How many times to retry the connection before giving up. Defaults to 3.
Deliberately bounded: sources are started sequentially and awaited, so a transport retrying
forever would hang the whole ingestion rather than report. A failed start surfaces on
on-error and is retried by the next session to bind, which is the loop that actually
survives a PLC being down at boot. The same budget governs the automatic reconnection after
an established connection drops.