Expand description
Crate zerodds-rs. Safety classification: SAFE.
zerodds-rs — idiomatic Rust SDK facade.
Re-exports the user-facing APIs from the underlying
implementation crates (zerodds-dcps, zerodds-dcps-async,
zerodds-qos, zerodds-types, zerodds-monitor, zerodds-recorder).
Applications should use this crate — direct access to
zerodds-dcps etc. is allowed, but the public API must stabilize
against zerodds-rs.
§Example
use zerodds_rs::{
DomainParticipantFactory, DomainParticipantQos, RawBytes, TopicQos,
PublisherQos, SubscriberQos, DataWriterQos, DataReaderQos,
};
let f = DomainParticipantFactory::instance();
let dp = f.create_participant_offline(0, DomainParticipantQos::default());
let topic = dp.create_topic::<RawBytes>("Chatter", TopicQos::default()).unwrap();
let publisher = dp.create_publisher(PublisherQos::default());
let writer = publisher
.create_datawriter::<RawBytes>(&topic, DataWriterQos::default())
.unwrap();
let _ = writer; // offline mode has no UDP — API smoke only.§Re-Exports
crate::dcps— synchronous DCPS surface (zerodds_dcps::*).crate::aio— async DCPS (zerodds_dcps_async::*).crate::qos— all 22 QoS policies (zerodds_qos::*).crate::types— IDL/XTypes type system (zerodds_types::*).crate::monitor— statistics + built-in DCPS monitor.crate::recorder— sample recording + replay.
Plus top-level convenience re-exports of the most common symbols.
Re-exports§
pub use zerodds_dcps as dcps;pub use zerodds_dcps_async as aio;pub use zerodds_qos as qos;pub use zerodds_types as types;pub use zerodds_monitor as monitor;pub use zerodds_recorder as recorder;pub use zerodds_foundation as foundation;
Structs§
- Data
Reader - Typed DataReader — removes samples that the RTPS reader has received for the topic.
- Data
Reader Qos - QoS set for a
DataReader— Spec §2.2.2.5.2. - Data
Writer - Typed DataWriter — sends samples to all matched readers of the topic.
- Data
Writer Qos - QoS set for a
DataWriter— Spec §2.2.2.4.2 (all policies settable on the DataWriter). - Domain
Participant - The participant.
- Domain
Participant Factory - Factory singleton.
- Domain
Participant Qos - QoS set for the
DomainParticipant— Spec §2.2.2.2.2. - Duration
- DDS Duration (signed seconds + unsigned 2^-32-fractions).
- Instance
Handle - Opaque
InstanceHandle_t(DDS-DCPS 1.4 §2.3.3). - Publisher
- Publisher — entity group for DataWriters.
- Publisher
Qos - QoS set for the
Publisher— Spec §2.2.2.4.1. - RawBytes
- An opaque raw byte payload with a configurable type name (via an
implofBytesPayload<T>or a newtype). - Subscriber
- Subscriber — entity group for DataReaders.
- Subscriber
Qos - QoS set for the
Subscriber— Spec §2.2.2.5.1. - Topic
- Typed topic handle.
- Topic
Qos - QoS set for a
Topic— Spec §2.2.2.3.2.
Enums§
- DdsError
- Errors from DCPS operations. Roughly analogous to the spec
ReturnCode_tenum; we omitRETCODE_OK(usingResult::Okinstead) and mergeBAD_PARAMETER+PRECONDITION_NOT_METwhere the distinction doesn’t help.
Traits§
- DdsType
- A type that can be published/subscribed via DDS.
Type Aliases§
- Result
- Shorthand for DCPS results.