Skip to main content

nros_node/
limits.rs

1//! Shared string-length and resource caps used by the Rust, C, and C++ APIs.
2//!
3//! These values are structural — changing any of them alters the layout of
4//! `#[repr(C)]` handle types in the C/C++ bindings and requires recompiling
5//! both Rust and C/C++ code.
6
7/// Maximum length of a zenoh locator string (e.g., `tcp/127.0.0.1:7447`).
8pub const MAX_LOCATOR_LEN: usize = 128;
9
10/// Maximum length of a node name.
11pub const MAX_NAME_LEN: usize = 64;
12
13/// Maximum length of a node namespace.
14pub const MAX_NAMESPACE_LEN: usize = 128;
15
16/// Maximum length of a topic name.
17pub const MAX_TOPIC_LEN: usize = 256;
18
19/// Maximum length of a service name.
20pub const MAX_SERVICE_NAME_LEN: usize = 256;
21
22/// Maximum length of an action name.
23pub const MAX_ACTION_NAME_LEN: usize = 256;
24
25/// Maximum length of a type name (e.g., `std_msgs::msg::dds_::Int32_`).
26pub const MAX_TYPE_NAME_LEN: usize = 256;
27
28/// Maximum length of a type hash (RIHS format).
29pub const MAX_TYPE_HASH_LEN: usize = 128;
30
31/// Maximum number of concurrent goals per action server.
32pub const MAX_CONCURRENT_GOALS: usize = 4;