Skip to main content

Crate zerodds_opcua_bridge

Crate zerodds_opcua_bridge 

Source
Expand description

zerodds-opcua-bridge — the OMG DDS-OPCUA Gateway 1.0 as a daemon on zerodds-dcps.

Crate zerodds-opcua-bridge. Safety classification: STANDARD.

The four no_std + alloc OPC-UA crates (zerodds_opcua_gateway, zerodds_opcua_uacp, zerodds_opcua_server, zerodds_opcua_pubsub) implement the OMG DDS-OPCUA Gateway 1.0 type system and AddressSpace mapping, the Part 6 opc.tcp framing and SecureChannel, the Part 4 Client/Server service set, and the Part 14 (UADP) PubSub wire stack — as libraries, with no DDS runtime, no network listener loop and no configuration file. This crate is the part that was missing: a running process.

§What the daemon does

Types are resolved through the reflective layer ([zerodds-dcps::serialized_type::SerializedTypeSupport], fed by a CompleteTypeObject this daemon builds from an operator-supplied .idl file — idl) rather than a compiled Rust type, the same primitive crates/xrce-agent’s daemon and crates/routing-service use for a topic whose Rust type is not linked in.

§Module map

  • dynamic_type / dynamic_value — zerodds_types::dynamic ↔ the OPC-UA gateway’s own symbolic type/value model (zerodds_opcua_gateway::dds_to_ua::walker::DdsType / zerodds_opcua_gateway::data_value::Variant).
  • idl — compiles an operator-supplied .idl file and builds the [zerodds-dcps::serialized_type::SerializedTypeSupport] for a named type in it.
  • dds_bridge — the DDS-side port: participant/topic/reader/writer registration against a real [zerodds-dcps::runtime::DcpsRuntime], plus SEDP-discovered topic enumeration.
  • address_space_build — Gateway 1.0 §9.3 AddressSpace materialization (DomainNode/TopicNode/instance nodes) over a live DDS reader.
  • ua_client — the OPC-UA client side of Gateway 1.0 §8.
  • pubsub_glue — the Part 14 UADP Publisher/Subscriber wiring.
  • daemon — the process itself: CLI, YAML config, SIGHUP/SIGTERM, systemd Type=notify, observability.

Feature daemon (default-on) gates the whole crate: the reflective type layer, the DDS port, the AddressSpace/PubSub glue and the process itself. Without it the crate is empty — there is no other consumer of these modules; unlike the four library crates it wires together, this one is the product, not a component.

Modules§

address_space_build
Gateway 1.0 §9.3 AddressSpace materialization: DDS Domain → Object node, DDS Topic → Object node, DDS sample → the Variable hierarchy zerodds_opcua_gateway::address_space::build_sample_instance already computes symbolically, turned into real zerodds_opcua_server::address_space::NodeMetas + HasComponent references and kept live by crate::dynamic_value::flatten.
daemon
The zerodds-opcua-bridged process: CLI, YAML config, SIGHUP/SIGTERM, systemd Type=notify, observability.
dds_bridge
The DDS side of the daemon: one DcpsRuntime per configured domain, raw-byte reader/writer registration via DcpsRuntime::register_user_ reader_kind/register_user_writer_kind — the same primitive crates/xrce-agent’s daemon and crates/routing-service use for a topic with no compiled Rust type — and a SerializedTypeSupport per topic, built by crate::idl from the operator’s own .idl file.
dynamic_type
zerodds_types::dynamic::DynamicType → DdsType, the lightweight type tree zerodds_opcua_gateway::dds_to_ua::walker walks (Gateway 1.0 §9.2).
dynamic_value
zerodds_types::dynamic::DynamicData ↔ a flat, path-named list of Variants.
idl
Compiles an operator-supplied .idl file into a model this daemon can resolve DDS types from, and builds the [zerodds-dcps::serialized_type::SerializedTypeSupport] a topic named in the config needs to decode/encode its samples without a compiled Rust type.
pubsub_glue
Part 14 UADP wiring: a Publisher per configured DDS-topic-to-DataSet mapping (DDS → PubSub) and a Subscriber per DataSet-to-DDS-topic mapping (PubSub → DDS), both driven by the same crate::dynamic_value::flatten/crate::dynamic_value::unflatten pair the AddressSpace side uses.
ua_client
Gateway 1.0 §8 (OPC UA → DDS): browses and subscribes a configured foreign OPC-UA server as a client (zerodds_opcua_server::client::Client over zerodds_opcua_server::client::tcp::TcpTransport) and writes the monitored nodes’ values into DDS.