Struct rclrust::qos::QoSProfile
source · [−]pub struct QoSProfile {
pub history: HistoryPolicy,
pub depth: usize,
pub reliability: ReliabilityPolicy,
pub durability: DurabilityPolicy,
pub deadline: Duration,
pub lifespan: Duration,
pub liveliness: LivelinessPolicy,
pub liveliness_lease_duration: Duration,
pub avoid_ros_namespace_conventions: bool,
}
Expand description
QoS profile
Fields
history: HistoryPolicy
History QoS policy setting.
depth: usize
Size of the message queue.
reliability: ReliabilityPolicy
Reliabiilty QoS policy setting.
durability: DurabilityPolicy
Durability QoS policy setting.
deadline: Duration
The period at which messages are expected to be sent/received.
lifespan: Duration
The age at which messages are considered expired and no longer valid.
liveliness: LivelinessPolicy
Liveliness QoS policy setting.
liveliness_lease_duration: Duration
The time within which the RMW node or publisher must show that it is alive.
avoid_ros_namespace_conventions: bool
If true, any ROS specific namespacing conventions will be circumvented.
In the case of DDS and topics, for example, this means the typical ROS specific prefix of rt would not be applied as described here:
http://design.ros2.org/articles/topic_and_service_names.html#ros-specific-namespace-prefix
This might be useful when trying to directly connect a native DDS topic with a ROS 2 topic.
Implementations
sourceimpl QoSProfile
impl QoSProfile
sourcepub const fn sensor_data() -> Self
pub const fn sensor_data() -> Self
Sensor Data QoS class
- History: Keep last,
- Depth: 5,
- Reliability: Best effort,
- Durability: Volatile,
- Deadline: Default,
- Lifespan: Default,
- Liveliness: System default,
- Liveliness lease duration: Default,
- avoid ros namespace conventions: false
sourcepub const fn parameters() -> Self
pub const fn parameters() -> Self
Parameters QoS class
- History: Keep last,
- Depth: 1000,
- Reliability: Reliable,
- Durability: Volatile,
- Deadline: Default,
- Lifespan: Default,
- Liveliness: System default,
- Liveliness lease duration: Default,
- Avoid ros namespace conventions: false
sourcepub const fn default() -> Self
pub const fn default() -> Self
Default QoS class
- History: Keep last,
- Depth: 10,
- Reliability: Reliable,
- Durability: Volatile,
- Deadline: Default,
- Lifespan: Default,
- Liveliness: System default,
- Liveliness lease duration: Default,
- Avoid ros namespace conventions: false
sourcepub const fn services_default() -> Self
pub const fn services_default() -> Self
Services QoS class
- History: Keep last,
- Depth: 10,
- Reliability: Reliable,
- Durability: Volatile,
- Deadline: Default,
- Lifespan: Default,
- Liveliness: System default,
- Liveliness lease duration: Default,
- Avoid ros namespace conventions: false
sourcepub const fn parameter_events() -> Self
pub const fn parameter_events() -> Self
Parameter events QoS class
- History: Keep last,
- Depth: 1000,
- Reliability: Reliable,
- Durability: Volatile,
- Deadline: Default,
- Lifespan: Default,
- Liveliness: System default,
- Liveliness lease duration: Default,
- Avoid ros namespace conventions: false
sourcepub const fn system_default() -> Self
pub const fn system_default() -> Self
System defaults QoS class
- History: System default,
- Depth: System default,
- Reliability: System default,
- Durability: System default,
- Deadline: Default,
- Lifespan: Default,
- Liveliness: System default,
- Liveliness lease duration: Default,
- Avoid ros namespace conventions: false
sourcepub const fn unknown() -> Self
pub const fn unknown() -> Self
Unknow QoS class
- History: Unknown,
- Depth: System default,
- Reliability: Unknown,
- Durability: Unknown,
- Deadline: Default,
- Lifespan: Default,
- Liveliness: Unknown,
- Liveliness lease duration: Default,
- Avoid ros namespace conventions: false
sourcepub const fn history(self, history: HistoryPolicy) -> Self
pub const fn history(self, history: HistoryPolicy) -> Self
sourcepub const fn reliability(self, reliability: ReliabilityPolicy) -> Self
pub const fn reliability(self, reliability: ReliabilityPolicy) -> Self
Set the reliability setting.
Examples
let qos = QoSProfile::default().reliability(ReliabilityPolicy::Reliable);
sourcepub const fn best_effort(self) -> Self
pub const fn best_effort(self) -> Self
sourcepub const fn durability(self, durability: DurabilityPolicy) -> Self
pub const fn durability(self, durability: DurabilityPolicy) -> Self
Set the durability setting.
Examples
let qos = QoSProfile::default().durability(DurabilityPolicy::Volatile);
sourcepub const fn transient_local(self) -> Self
pub const fn transient_local(self) -> Self
Set the durability setting to transient local.
Examples
let qos = QoSProfile::default().transient_local();
sourcepub const fn deadline(self, deadline: Duration) -> Self
pub const fn deadline(self, deadline: Duration) -> Self
Set the deadline setting.
Examples
let qos = QoSProfile::default().deadline(Duration::from_secs(5));
sourcepub const fn lifespan(self, lifespan: Duration) -> Self
pub const fn lifespan(self, lifespan: Duration) -> Self
Set the lifespan setting.
Examples
let qos = QoSProfile::default().lifespan(Duration::from_secs(5));
sourcepub const fn liveliness(self, liveliness: LivelinessPolicy) -> Self
pub const fn liveliness(self, liveliness: LivelinessPolicy) -> Self
Set the liveliness setting.
Examples
let qos = QoSProfile::default().liveliness(LivelinessPolicy::Automatic);
sourcepub const fn liveliness_lease_duration(
self,
liveliness_lease_duration: Duration
) -> Self
pub const fn liveliness_lease_duration(
self,
liveliness_lease_duration: Duration
) -> Self
Set the liveliness_lease_duration setting.
Examples
let qos = QoSProfile::default().liveliness_lease_duration(Duration::from_secs(5));
sourcepub const fn avoid_ros_namespace_conventions(
self,
avoid_ros_namespace_conventions: bool
) -> Self
pub const fn avoid_ros_namespace_conventions(
self,
avoid_ros_namespace_conventions: bool
) -> Self
Set the avoid_ros_namespace_conventions setting.
Examples
let qos = QoSProfile::default().avoid_ros_namespace_conventions(true);
Trait Implementations
sourceimpl Clone for QoSProfile
impl Clone for QoSProfile
sourcefn clone(&self) -> QoSProfile
fn clone(&self) -> QoSProfile
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for QoSProfile
impl Debug for QoSProfile
sourceimpl From<&'_ QoSProfile> for rmw_qos_profile_t
impl From<&'_ QoSProfile> for rmw_qos_profile_t
sourcefn from(qos: &QoSProfile) -> Self
fn from(qos: &QoSProfile) -> Self
Converts to this type from the input type.
sourceimpl From<&'_ rmw_qos_profile_t> for QoSProfile
impl From<&'_ rmw_qos_profile_t> for QoSProfile
sourcefn from(qos: &rmw_qos_profile_t) -> Self
fn from(qos: &rmw_qos_profile_t) -> Self
Converts to this type from the input type.
sourceimpl PartialEq<QoSProfile> for QoSProfile
impl PartialEq<QoSProfile> for QoSProfile
sourcefn eq(&self, other: &QoSProfile) -> bool
fn eq(&self, other: &QoSProfile) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &QoSProfile) -> bool
fn ne(&self, other: &QoSProfile) -> bool
This method tests for !=
.
impl Eq for QoSProfile
impl StructuralEq for QoSProfile
impl StructuralPartialEq for QoSProfile
Auto Trait Implementations
impl RefUnwindSafe for QoSProfile
impl Send for QoSProfile
impl Sync for QoSProfile
impl Unpin for QoSProfile
impl UnwindSafe for QoSProfile
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more