zerodds_opcua_gateway/lib.rs
1// SPDX-License-Identifier: Apache-2.0
2// Copyright 2026 ZeroDDS Contributors
3
4//! OMG DDS-OPCUA Gateway 1.0 — Type-System + AddressSpace Mapping.
5//!
6//! Crate `zerodds-opcua-gateway`. Safety classification: **STANDARD**.
7//! Spec `formal/2020-01-01` (`docs/standards/cache/omg/dds-opcua-1.0.pdf`).
8//!
9//! # Scope
10//!
11//! Wir implementieren die **Type-System-Mapping**-Layer aus Spec §8.2
12//! (OPC-UA → DDS) + §9.2 (DDS → OPC-UA) als pure-Rust no_std+alloc
13//! Library:
14//!
15//! * `BuiltinTypeKind` Enum mit allen 25 OPC-UA-Built-in-Type-IDs
16//! (Spec §8.2 Tab 8.1).
17//! * Primitive-Type-Mapping (Boolean, SByte/Byte, Int16/UInt16,
18//! Int32/UInt32, Int64/UInt64, Float, Double, String) — Spec Tab 8.1.
19//! * `NodeId` mit allen 4 Identifier-Kinds (Numeric, String, Guid,
20//! Opaque) — Spec §8.2.2 Tab 8.2.
21//! * `ExpandedNodeId` mit Namespace-URI + Server-Index — Spec §8.2.2.
22//! * `NodeClass` Enum (8 Werte) — Spec §8.3.1 Tab 8.3.
23//! * `StatusCode` + `Guid` + `ByteString` + `LocalizedText` +
24//! `QualifiedName` Modelle — Spec Tab 8.2.
25//! * `BodyEncoding` + `ExtensionObject` + `Variant` + `DataValue` —
26//! Spec Tab 8.2.
27//! * AddressSpace-Mapping: DDS Domain → OPC-UA ObjectNode + DDS Topic
28//! → OPC-UA ObjectNode + DDS Sample → OPC-UA Variable — Spec §9.3.
29//!
30//! # Was nicht abgedeckt ist
31//!
32//! * **OPC-UA Binary Wire-Encoding** (Spec OPCUA-06 Mappings) —
33//! Caller-Layer (typisch externer OPC-UA-Stack wie `opcua` oder
34//! `open62541`).
35//! * **Subscription Service Set Behavior** (Spec §8.4.3) — Runtime-
36//! Logic; das Mapping-Modell ist exposed, das eigentliche Polling/
37//! Notification ist Caller.
38//! * **Historical Access** (Spec §8.3.4 + §9.3.4) — verlangt
39//! Historical-Server-Backend.
40
41#![forbid(unsafe_code)]
42#![warn(missing_docs)]
43
44extern crate alloc;
45
46pub mod address_space;
47pub mod data_value;
48pub mod dds_to_ua;
49pub mod historical;
50pub mod node_id;
51pub mod service_sets;
52pub mod subscription_mapping;
53pub mod types;
54
55#[cfg(feature = "std")]
56pub mod xml;
57
58pub use address_space::{DomainNode, SampleVariable, TopicNode, mangle_topic_node_browse_name};
59pub use data_value::{DataValue, ExtensionObject, Variant, VariantValue};
60pub use node_id::{ExpandedNodeId, NodeId, NodeIdentifier};
61pub use types::{
62 BuiltinTypeKind, ByteString, Guid, LocalizedText, NodeClass, QualifiedName, StatusCode,
63 map_primitive_to_dds,
64};
65
66#[cfg(feature = "std")]
67pub use xml::{
68 BridgeDef, ConnectionDirection, GatewayConfig, OpcuaXmlError, OpcuaXmlError as XmlError,
69 UaConnection, parse_gateway_config,
70};