Aller au contenu principal

API Reference

HDDS provides native bindings for multiple programming languages. Each binding is designed to feel idiomatic in its target language while maintaining consistent DDS semantics.

Supported Languages​

LanguagePackageDocumentation
RusthddsRust API
Chdds-c (libhdds_c)C API
C++hdds_cxxC++ API
PythonhddsPython API
TypeScript@hdds/clientHello World TypeScript

Quick Reference​

Creating a Participant​

use hdds::{Participant, TransportMode};

let participant = Participant::builder("my_app")
.domain_id(0)
.with_transport(TransportMode::UdpMulticast)
.build()?;

Creating a Writer​

let writer = participant
.topic::<Temperature>("sensors/temp")?
.writer()
.qos(QoS::reliable())
.build()?;

Writing Data​

let sample = Temperature { sensor_id: 1, value: 23.5 };
writer.write(&sample)?;

Reading Data​

while let Some(sample) = reader.try_take()? {
println!("Received: {:?}", sample);
}

Core Entities​

All DDS implementations share the same core entities:

Feature Comparison​

FeatureRustCC++Python
Typed Data#[derive(DDS)]hdds_genhdds_genhdds_gen
Raw BytesYesYesYesYes
Fluent QoSYesNoYesYes
RAIIYesManualYesContext Mgr
WaitSetYesYesYesYes
TelemetryYesYesYesYes
Async/AwaitRPC calls onlyNoNoNo
ListenersYesYesYesYes