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.
- Source: crates/opcua-server
- API docs: docs.rs/zerodds-opcua-server
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 theServiceRequest/ServiceResponseenums: 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,AttributeWriteMaskandAccessLevelTypebits,NumericRange,TimestampsToReturn,MonitoringMode.identity— the four UserIdentityToken types (anonymous, user name, X.509, issued),UserTokenPolicyand the server-sideUserStorethat accepts or rejects an ActivateSession token.status— the StatusCodes the services return.server,client—Server,Client, transports. HistoryRead answers raw time-range reads (ReadRawModifiedDetailswithoutis_read_modified) andReadAtTimeDetailsfrom 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(passescryptothrough).
Features
std(default) — enablesallocand thestdfeatures ofzerodds-opcua-uacp,zerodds-opcua-pubsubandzerodds-opcua-gateway; addsTcpTransport,serve_connectionandstd::error::Errorimplementations.alloc— enables theallocfeatures of the same three crates.crypto— enableszerodds-opcua-uacp/crypto; compilesServerSecurityandClientSecurityfor the secured SecurityPolicies.
Status
no_stdwithallocunlessstdis enabled; TCP endpoints only withstd.forbid(unsafe_code).- Library only, no binaries. Example
open62541_probe; the scriptproofs/open62541.shruns theClientoveropc.tcpagainst open62541'stutorial_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.
- Quelle: crates/opcua-server
- API-Docs: docs.rs/zerodds-opcua-server
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 EnumsServiceRequest/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 vonAttributeWriteMaskundAccessLevelType,NumericRange,TimestampsToReturn,MonitoringMode.identity— die vier Typen von UserIdentityToken (anonym, Benutzername, X.509, ausgestellt),UserTokenPolicyund der serverseitigeUserStore, 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 (ReadRawModifiedDetailsohneis_read_modified) undReadAtTimeDetailsaus 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(reichtcryptodurch).
Features
std(Standard) — aktiviertallocund die Featuresstdvonzerodds-opcua-uacp,zerodds-opcua-pubsubundzerodds-opcua-gateway; ergänztTcpTransport,serve_connectionund Implementierungen vonstd::error::Error.alloc— aktiviert die Featuresallocderselben drei Crates.crypto— aktiviertzerodds-opcua-uacp/crypto; kompiliertServerSecurityundClientSecurityfür die gesicherten SecurityPolicies.
Status
no_stdmitalloc, solangestdnicht aktiviert ist; TCP-Endpunkte nur mitstd.forbid(unsafe_code).- Nur Bibliothek, keine Binaries. Beispiel
open62541_probe; das Skriptproofs/open62541.shführt denClientüberopc.tcpgegentutorial_server_variablevon open62541 aus (GetEndpoints, CreateSession, ActivateSession, Read, Write, Browse) und endet mit 77, wenn kein Build von open62541 vorhanden ist. - 68 Testfunktionen im Quelltext (
src/).