Struct r2r::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§
source§impl 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
Set the reliability setting to best effort.
§Examples
let qos = QosProfile::default().best_effort();
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§
source§impl Clone for QosProfile
impl Clone for QosProfile
source§fn clone(&self) -> QosProfile
fn clone(&self) -> QosProfile
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for QosProfile
impl Debug for QosProfile
source§impl From<QosProfile> for rmw_qos_profile_t
impl From<QosProfile> for rmw_qos_profile_t
source§fn from(qos: QosProfile) -> Self
fn from(qos: QosProfile) -> Self
source§impl From<rmw_qos_profile_s> for QosProfile
impl From<rmw_qos_profile_s> for QosProfile
source§fn from(rmw_qos: rmw_qos_profile_t) -> Self
fn from(rmw_qos: rmw_qos_profile_t) -> Self
source§impl PartialEq for QosProfile
impl PartialEq for QosProfile
impl Eq for QosProfile
impl StructuralPartialEq for QosProfile
Auto Trait Implementations§
impl Freeze for QosProfile
impl RefUnwindSafe for QosProfile
impl Send for QosProfile
impl Sync for QosProfile
impl Unpin for QosProfile
impl UnwindSafe for QosProfile
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more