zerodds-opcua-server

OPC-UA stack. OPC Foundation Part 4 services over the SecureChannel of zerodds-opcua-uacp: server, client and an in-memory AddressSpace.

zerodds-opcua-server is the request/response counterpart to the UADP PubSub stack in zerodds-opcua-pubsub. The Server is a request-driven state machine: it runs Hello → OpenSecureChannel → CreateSession/ActivateSession and dispatches the services against an AddressSpace. The Client drives the same handshake; open_channel opens a channel for the session-less Discovery services, connect establishes a full session. Clients reach a server in the same process through LoopbackTransport or a real opc.tcp peer through TcpTransport (feature std); serve_connection serves one accepted TcpStream with a Server. SecurityMode None works without further features; with feature crypto, ServerSecurity and ClientSecurity run the secured handshake, and the peer trust (certificates, public keys) and the CSPRNG are supplied by the caller.

  • services — the service messages and the ServiceRequest/ServiceResponse enums: CreateSession, ActivateSession, CloseSession, Read, Write, HistoryRead, Browse, BrowseNext, GetEndpoints, FindServers, Call, CreateSubscription, ModifySubscription, SetPublishingMode, Publish, Republish, TransferSubscriptions, DeleteSubscriptions, CreateMonitoredItems, ModifyMonitoredItems, SetMonitoringMode, SetTriggering, DeleteMonitoredItems.
  • address_space — node attributes (Part 3 §5) for Read and Write, a browsable node and reference graph, method handlers for Call, historizing nodes (set_historizing).
  • attributes — attribute ids, AttributeWriteMask and AccessLevelType bits, NumericRange, TimestampsToReturn, MonitoringMode.
  • identity — the four UserIdentityToken types (anonymous, user name, X.509, issued), UserTokenPolicy and the server-side UserStore that accepts or rejects an ActivateSession token.
  • status — the StatusCodes the services return.
  • server, client — Server, Client, transports. HistoryRead answers raw time-range reads (ReadRawModifiedDetails without is_read_modified) and ReadAtTimeDetails from the retained samples of a historizing node; requests for modified values or events are refused per request. Subscriptions sample on publish.

Spec anchors

  • OPC UA Part 4 service sets as the source cites them: Discovery §5.5 (§5.5.2 FindServers, §5.5.4 GetEndpoints), Session §5.7, View §5.9, Attribute §5.11, Method §5.12 (§5.12.2 Call), MonitoredItem §5.13, Subscription §5.14, HistoryRead §5.11.3; §7.38 (StatusCodes), §7.40 (UserIdentityToken), §7.41 (UserTokenPolicy), §7.27 (NumericRange).
  • OPC UA Part 3 §5 (node attributes), §8.57 (AccessLevelType), §8.60 (AttributeWriteMask).
  • OPC UA Part 6 §5.2 (binary encoding), Annex A.1 (attribute ids); Part 11 (historical access, read details).
  • Coverage: opcua-client-server-1.05.

Consumers

  • zerodds-opcua-bridge (passes crypto through).

Features

  • std (default) — enables alloc and the std features of zerodds-opcua-uacp, zerodds-opcua-pubsub and zerodds-opcua-gateway; adds TcpTransport, serve_connection and std::error::Error implementations.
  • alloc — enables the alloc features of the same three crates.
  • crypto — enables zerodds-opcua-uacp/crypto; compiles ServerSecurity and ClientSecurity for the secured SecurityPolicies.

Status

  • no_std with alloc unless std is enabled; TCP endpoints only with std.
  • forbid(unsafe_code).
  • Library only, no binaries. Example open62541_probe; the script proofs/open62541.sh runs the Client over opc.tcp against open62541's tutorial_server_variable (GetEndpoints, CreateSession, ActivateSession, Read, Write, Browse) and exits with 77 when no open62541 build is present.
  • 68 test functions in the source (src/).

zerodds-opcua-server

OPC-UA-Stack. Dienste nach OPC Foundation Part 4 über den SecureChannel aus zerodds-opcua-uacp: Server, Client und ein AddressSpace im Speicher.

zerodds-opcua-server ist das Gegenstück mit Anfrage und Antwort zum UADP-PubSub-Stack in zerodds-opcua-pubsub. Der Server ist ein von Anfragen getriebener Zustandsautomat: Er durchläuft Hello → OpenSecureChannel → CreateSession/ActivateSession und führt die Dienste gegen einen AddressSpace aus. Der Client führt denselben Verbindungsaufbau aus; open_channel öffnet einen Kanal für die Dienste der Discovery, die keine Session brauchen, connect baut eine vollständige Session auf. Clients erreichen einen Server im selben Prozess über LoopbackTransport oder einen echten opc.tcp-Partner über TcpTransport (Feature std); serve_connection bedient einen angenommenen TcpStream mit einem Server. SecurityMode None funktioniert ohne weitere Features; mit dem Feature crypto führen ServerSecurity und ClientSecurity den gesicherten Verbindungsaufbau aus, wobei das Vertrauen in die Gegenstelle (Zertifikate, öffentliche Schlüssel) und der CSPRNG vom Aufrufer kommen.

  • services — die Dienstnachrichten und die Enums ServiceRequest/ServiceResponse: CreateSession, ActivateSession, CloseSession, Read, Write, HistoryRead, Browse, BrowseNext, GetEndpoints, FindServers, Call, CreateSubscription, ModifySubscription, SetPublishingMode, Publish, Republish, TransferSubscriptions, DeleteSubscriptions, CreateMonitoredItems, ModifyMonitoredItems, SetMonitoringMode, SetTriggering, DeleteMonitoredItems.
  • address_space — Knotenattribute (Part 3 §5) für Read und Write, ein durchsuchbarer Graph aus Knoten und Referenzen, Handler für Methoden (Call), Knoten mit Historie (set_historizing).
  • attributes — Attribut-IDs, Bits von AttributeWriteMask und AccessLevelType, NumericRange, TimestampsToReturn, MonitoringMode.
  • identity — die vier Typen von UserIdentityToken (anonym, Benutzername, X.509, ausgestellt), UserTokenPolicy und der serverseitige UserStore, der ein Token aus ActivateSession annimmt oder ablehnt.
  • status — die StatusCodes, die die Dienste zurückgeben.
  • server, client — Server, Client, Transporte. HistoryRead beantwortet Lesezugriffe über einen Zeitbereich (ReadRawModifiedDetails ohne is_read_modified) und ReadAtTimeDetails aus den vorgehaltenen Samples eines Knotens mit Historie; Anfragen nach geänderten Werten oder Events werden je Anfrage abgelehnt. Subscriptions erfassen ihre Werte beim Publish (sample on publish).

Spec-Anker

  • OPC UA Part 4, Dienstgruppen so, wie der Quelltext sie zitiert: Discovery §5.5 (§5.5.2 FindServers, §5.5.4 GetEndpoints), Session §5.7, View §5.9, Attribute §5.11, Method §5.12 (§5.12.2 Call), MonitoredItem §5.13, Subscription §5.14, HistoryRead §5.11.3; §7.38 (StatusCodes), §7.40 (UserIdentityToken), §7.41 (UserTokenPolicy), §7.27 (NumericRange).
  • OPC UA Part 3 §5 (Knotenattribute), §8.57 (AccessLevelType), §8.60 (AttributeWriteMask).
  • OPC UA Part 6 §5.2 (binäre Kodierung), Annex A.1 (Attribut-IDs); Part 11 (Historical Access, Lesedetails).
  • Abdeckung: opcua-client-server-1.05.

Konsumenten

  • zerodds-opcua-bridge (reicht crypto durch).

Features

  • std (Standard) — aktiviert alloc und die Features std von zerodds-opcua-uacp, zerodds-opcua-pubsub und zerodds-opcua-gateway; ergänzt TcpTransport, serve_connection und Implementierungen von std::error::Error.
  • alloc — aktiviert die Features alloc derselben drei Crates.
  • crypto — aktiviert zerodds-opcua-uacp/crypto; kompiliert ServerSecurity und ClientSecurity für die gesicherten SecurityPolicies.

Status

  • no_std mit alloc, solange std nicht aktiviert ist; TCP-Endpunkte nur mit std.
  • forbid(unsafe_code).
  • Nur Bibliothek, keine Binaries. Beispiel open62541_probe; das Skript proofs/open62541.sh führt den Client über opc.tcp gegen tutorial_server_variable von open62541 aus (GetEndpoints, CreateSession, ActivateSession, Read, Write, Browse) und endet mit 77, wenn kein Build von open62541 vorhanden ist.
  • 68 Testfunktionen im Quelltext (src/).