Skip to main content

Crate zerodds_rs

Crate zerodds_rs 

Source
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

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§

DataReader
Typed DataReader — removes samples that the RTPS reader has received for the topic.
DataReaderQos
QoS set for a DataReader — Spec §2.2.2.5.2.
DataWriter
Typed DataWriter — sends samples to all matched readers of the topic.
DataWriterQos
QoS set for a DataWriter — Spec §2.2.2.4.2 (all policies settable on the DataWriter).
DomainParticipant
The participant.
DomainParticipantFactory
Factory singleton.
DomainParticipantQos
QoS set for the DomainParticipant — Spec §2.2.2.2.2.
Duration
DDS Duration (signed seconds + unsigned 2^-32-fractions).
InstanceHandle
Opaque InstanceHandle_t (DDS-DCPS 1.4 §2.3.3).
Publisher
Publisher — entity group for DataWriters.
PublisherQos
QoS set for the Publisher — Spec §2.2.2.4.1.
RawBytes
An opaque raw byte payload with a configurable type name (via an impl of BytesPayload<T> or a newtype).
Subscriber
Subscriber — entity group for DataReaders.
SubscriberQos
QoS set for the Subscriber — Spec §2.2.2.5.1.
Topic
Typed topic handle.
TopicQos
QoS set for a Topic — Spec §2.2.2.3.2.

Enums§

DdsError
Errors from DCPS operations. Roughly analogous to the spec ReturnCode_t enum; we omit RETCODE_OK (using Result::Ok instead) and merge BAD_PARAMETER + PRECONDITION_NOT_MET where the distinction doesn’t help.

Traits§

DdsType
A type that can be published/subscribed via DDS.

Type Aliases§

Result
Shorthand for DCPS results.