Skip to main content

Module client

Module client 

Source
Expand description

Discover endpoints and browse, read or monitor nodes over a pinned OPC UA session.

Reuse one Client across polling cycles. Node identifiers retain their namespace URI when a server reassigns numeric indexes. Check each result’s status and wire type before using a value. Raw reads preserve the source and server timestamps, including their optional 10 ps increments. Use the commissioning API to assess a signal’s declared metadata.

Re-exports§

pub use crate::discovery::EndpointInfo;
pub use crate::discovery::EndpointToken;
pub use crate::discovery::discover_endpoints;
pub use crate::EngineeringUnit;
pub use crate::ua;
pub use ua::DataValue;

Structs§

ArrayValue
Values in OPC UA row-major order. A missing dimensions field on the wire is represented by one dimension equal to the number of elements.
BrowseEntry
One forward hierarchical reference. Browsing does not read its target Value.
BrowseName
A browse name qualified by its namespace URI. Names use case-sensitive exact matching.
CallOutcome
One Call result in wire order. Check the operation status before interpreting outputs.
CertificateRollover
A separately provisioned successor leaf for the same server and host.
Client
A native OPC UA client connected to one pinned server.
ConditionComment
Optional localized operator comment applied to the state identified by an EventId. Pass None to preserve the existing comment, or a locale with empty text to clear it.
ConnectionConfig
Endpoint and application credentials shared by all pinned user sessions. Certificate and unencrypted private key inputs use DER encoding (up to 64 KiB each).
ConnectionOptions
Select a channel policy and session user. The default is pinned Basic256Sha256 with an anonymous user.
Control
Borrow a pinned client for explicit value writes and method calls.
DataChange
Source position and unmodified OPC UA DataValue for one notification.
DataChanges
Single-node convenience handle returned by Client::subscribe.
EngineeringUnitEvidence
Unit evidence from a single signal, with the original operation status.
EventField
One select clause. The type identifies the event declaring the field. An empty path selects the NodeId attribute of the event instance (for example ConditionId).
Events
An event stream on a dedicated pinned session. Each notification contains the selected Variants in caller order. Keep a pending Publish alive across cancelled or timed-out waits. The server buffers events between calls; poll regularly within its subscription lifetime.
HistoricalRead
Historical values returned in server order, with the raw per-page operation statuses.
MonitoredDataChanges
One OPC UA subscription monitoring multiple Value attributes on the original session. Drop requests deletion of all items and the subscription. A loss on any item ends the group. Use a dedicated sequenced stream when you need retransmission or per-message provenance.
MonitoredNode
Stable identity and revised monitoring parameters for one group member.
ReadOperand
A URI-qualified node and the attribute to read from it.
RecoveredSession
One session lease. A new generation has a newly validated namespace table and read limit.
RecoveringClient
Reuses a pinned client until a channel change or failed/cancelled read retires its session. Each call to Self::session starts at most one connection attempt with the original endpoint, credentials, identity, policy and timeout. Schedule further attempts and backoff in the host. A lost read remains visible to the caller. A fresh generation does not replay observations.
Sample
One typed Value attribute, with its per-node status and optional source and server timestamps.
SampleTimestamp
One clock reported by the server, including its optional sub-tick precision.
Sequenced
One observation with the sequence number of its enclosing OPC UA NotificationMessage.
SequencedDataChanges
One dedicated, pinned session for changes from 1–32 ordered variables. This owner explicitly manages Publish and Republish. Each arrival includes its original message sequence, source index, DataValue, clocks and retransmission provenance.
VariableDefinition
Two independent attribute results. Each sample preserves its status and clocks.

Enums§

BrowseError
A local navigation request could not be completed unambiguously.
ConditionError
A condition method could not be prepared or its Call response could not be obtained. An operation-level rejection from the server is returned in CallOutcome::status.
ConnectError
A local configuration rejection or an OPC UA connection failure.
ControlError
A local preflight failure or an operation whose effects need reconciliation.
HistoryError
A raw history request could not be completed.
MeterReadError
A reviewed meter could not be verified or its DataValue could not be recorded exactly.
PublishError
Dedicated Publish stream setup, delivery and retransmission failures.
ReadAttribute
Attribute numbers from OPC UA Part 3, Table 1.
ReadError
A service, identity, or scalar-decoding error. Each successful result carries its node status.
RecoveryError
A fresh session could not be authenticated and prepared. The caller chooses when to retry.
SecurityPolicy
Security policy for a SignAndEncrypt secure channel.
SessionState
Relationship between the returned polling session and previous acquisitions.
SnapshotReadError
Native snapshot acquisition failed before a complete validated document was available.
SubscriptionError
Setup or reception of an authenticated sampled Value notification failed.
TimestampError
The original timestamp cannot be represented exactly by the application clock.
UnitStage
Operation that supplied the decisive status and clocks for a unit lookup.
UserIdentity
User authentication within the pinned encrypted session.

Constants§

MAX_MONITORED_NODES
Maximum number of requested Value attributes in one subscription.
MAX_READ_NODES
Maximum number of attribute operands in one logical client read.

Traits§

FixedScalar
Fixed-width numeric and Boolean types supported by arrays and raw history reads.
Scalar
A Rust type with an exact built-in OPC UA scalar mapping.

Type Aliases§

EventError
Error returned by an event stream and its condition operations.