1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
// SPDX-License-Identifier: Apache-2.0
// Copyright 2026 ZeroDDS Contributors
//! Crate `zerodds-py`. Safety classification: **STANDARD** (Binding-FFI).
//!
//! PyO3-Bindings fuer ZeroDDS DCPS-API. Liefert ein importierbares
//! Python-Modul `zerodds_py` ueber `maturin build` oder direkt via
//! `cargo build --features extension-module`.
//!
//! Spec: OMG DDS 1.4 (formal/2015-04-10) §2.2.2 mit Python-Idiomen.
//!
//! ## Schichten-Position
//!
//! Layer 6 — PSMs / Bindings.
//!
//! ## Build
//!
//! - **Default-Cargo-Build** (ohne Python-Headers): pyo3 ist optional,
//! das Crate compilet als lib-Platzhalter. Keine Python-API
//! verfuegbar — so laeuft der Workspace-CI ohne Python-Dependency.
//! - **Mit `--features extension-module`** (oder via `maturin build`):
//! wird als `cdylib` kompiliert und erzeugt ein importierbares
//! Python-Modul `zerodds_py`.
//!
//! ## API
//!
//! ```python
//! import zerodds_py as zerodds
//!
//! factory = zerodds.DomainParticipantFactory.instance()
//! participant = factory.create_participant_offline(0)
//!
//! topic = participant.create_bytes_topic("Chatter")
//! publisher = participant.create_publisher()
//! writer = publisher.create_bytes_writer(topic)
//!
//! subscriber = participant.create_subscriber()
//! reader = subscriber.create_bytes_reader(topic)
//!
//! writer.write(b"hello")
//! samples = reader.take() # List[bytes]
//! ```
//!
//! Typisierte `DdsType`-Bindings (Dataclass-Mapping via IDL-Generator)
//! folgen aus `crates/idl-rust` ueber Python-Bindings-Generator.