#[non_exhaustive]pub struct Ros2PrimitiveMessageDefinition {
pub primitive_type: Ros2PrimitiveType,
pub offset: Option<f64>,
pub scaling: Option<f64>,
pub upper_bound: Option<i64>,
}
Expand description
Represents a ROS 2 compliant primitive type message of the complex data structure.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.primitive_type: Ros2PrimitiveType
The primitive type (integer, floating point, boolean, etc.) for the ROS 2 primitive message definition.
offset: Option<f64>
The offset used to calculate the signal value. Combined with scaling, the calculation is value = raw_value * scaling + offset
.
scaling: Option<f64>
A multiplier used to decode the message.
upper_bound: Option<i64>
An optional attribute specifying the upper bound for STRING
and WSTRING
.
Implementations§
source§impl Ros2PrimitiveMessageDefinition
impl Ros2PrimitiveMessageDefinition
sourcepub fn primitive_type(&self) -> &Ros2PrimitiveType
pub fn primitive_type(&self) -> &Ros2PrimitiveType
The primitive type (integer, floating point, boolean, etc.) for the ROS 2 primitive message definition.
sourcepub fn offset(&self) -> Option<f64>
pub fn offset(&self) -> Option<f64>
The offset used to calculate the signal value. Combined with scaling, the calculation is value = raw_value * scaling + offset
.
sourcepub fn upper_bound(&self) -> Option<i64>
pub fn upper_bound(&self) -> Option<i64>
An optional attribute specifying the upper bound for STRING
and WSTRING
.
source§impl Ros2PrimitiveMessageDefinition
impl Ros2PrimitiveMessageDefinition
sourcepub fn builder() -> Ros2PrimitiveMessageDefinitionBuilder
pub fn builder() -> Ros2PrimitiveMessageDefinitionBuilder
Creates a new builder-style object to manufacture Ros2PrimitiveMessageDefinition
.
Trait Implementations§
source§impl Clone for Ros2PrimitiveMessageDefinition
impl Clone for Ros2PrimitiveMessageDefinition
source§fn clone(&self) -> Ros2PrimitiveMessageDefinition
fn clone(&self) -> Ros2PrimitiveMessageDefinition
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl PartialEq for Ros2PrimitiveMessageDefinition
impl PartialEq for Ros2PrimitiveMessageDefinition
source§fn eq(&self, other: &Ros2PrimitiveMessageDefinition) -> bool
fn eq(&self, other: &Ros2PrimitiveMessageDefinition) -> bool
self
and other
values to be equal, and is used
by ==
.