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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
// SPDX-License-Identifier: Apache-2.0 OR MIT
// Copyright (c) 2025-2026 naskel.com
//! # HDDS Micro - Embedded DDS for Microcontrollers
//!
//! A `no_std` implementation of DDS (Data Distribution Service) for resource-constrained
//! embedded systems such as ESP32, RP2040, and STM32 microcontrollers.
//!
//! ## Design Constraints
//!
//! - **Flash**: < 100 KB (target: 60-80 KB)
//! - **RAM**: < 50 KB (target: 30-40 KB)
//! - **No heap allocations** in core (const generics for fixed buffers)
//! - **No floating point** (embedded-friendly)
//! - **`no_std` compatible**
//!
//! ## Architecture
//!
//! ```text
//! +-----------------------------------------+
//! | Application (User Code) |
//! +-----------------------------------------+
//! v ^
//! +-----------------------------------------+
//! | MicroParticipant / MicroWriter / Reader|
//! +-----------------------------------------+
//! v ^
//! +-----------------------------------------+
//! | RTPS Lite (Header, Submessages) |
//! +-----------------------------------------+
//! v ^
//! +-----------------------------------------+
//! | CDR Micro (Encoder/Decoder) |
//! +-----------------------------------------+
//! v ^
//! +-----------------------------------------+
//! | Transport (WiFi UDP / LoRa / Serial) |
//! +-----------------------------------------+
//! ```
//!
//! ## Feature Flags
//!
//! - `esp32` -- ESP32-specific optimizations
//! - `rp2040` -- RP2040-specific optimizations
//! - `stm32` -- STM32-specific optimizations
//! - `wifi` -- `WiFi` UDP transport
//! - `lora` -- `LoRa` transport (SX1276/78)
//! - `alloc` -- Enable heap allocator
//! - `std` -- Enable std (for host testing)
extern crate alloc;
/// RTPS Lite protocol implementation (types, header, submessages)
/// CDR Micro encoder/decoder (fixed buffer, no allocations)
/// Transport abstraction for WiFi, LoRa, Serial
/// Core DDS structs (MicroParticipant, MicroWriter, MicroReader)
/// Error types for HDDS Micro
/// LoRa <-> WiFi/UDP Gateway (requires `std` feature)
// Re-exports for convenience
pub use crate;
pub use crate;
pub use crate;
pub use crateTransport;
/// Maximum packet size (MTU) for embedded environments
pub const MAX_PACKET_SIZE: usize = 1024;
/// Maximum number of samples in history cache
pub const MAX_HISTORY_DEPTH: usize = 16;
/// Version of HDDS Micro
pub const VERSION: &str = env!;