Struct aws_sdk_iotfleetwise::types::CanSignal
source · #[non_exhaustive]pub struct CanSignal {
pub message_id: i32,
pub is_big_endian: bool,
pub is_signed: bool,
pub start_bit: i32,
pub offset: f64,
pub factor: f64,
pub length: i32,
pub name: Option<String>,
}
Expand description
Information about a single controller area network (CAN) signal and the messages it receives and transmits.
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.message_id: i32
The ID of the message.
is_big_endian: bool
Whether the byte ordering of a CAN message is big-endian.
is_signed: bool
Whether the message data is specified as a signed value.
start_bit: i32
Indicates the beginning of the CAN signal. This should always be the least significant bit (LSB).
This value might be different from the value in a DBC file. For little endian signals, startBit
is the same value as in the DBC file. For big endian signals in a DBC file, the start bit is the most significant bit (MSB). You will have to calculate the LSB instead and pass it as the startBit
.
offset: f64
The offset used to calculate the signal value. Combined with factor, the calculation is value = raw_value * factor + offset
.
factor: f64
A multiplier used to decode the CAN message.
length: i32
How many bytes of data are in the message.
name: Option<String>
The name of the signal.
Implementations§
source§impl CanSignal
impl CanSignal
sourcepub fn message_id(&self) -> i32
pub fn message_id(&self) -> i32
The ID of the message.
sourcepub fn is_big_endian(&self) -> bool
pub fn is_big_endian(&self) -> bool
Whether the byte ordering of a CAN message is big-endian.
sourcepub fn start_bit(&self) -> i32
pub fn start_bit(&self) -> i32
Indicates the beginning of the CAN signal. This should always be the least significant bit (LSB).
This value might be different from the value in a DBC file. For little endian signals, startBit
is the same value as in the DBC file. For big endian signals in a DBC file, the start bit is the most significant bit (MSB). You will have to calculate the LSB instead and pass it as the startBit
.
Trait Implementations§
source§impl PartialEq for CanSignal
impl PartialEq for CanSignal
impl StructuralPartialEq for CanSignal
Auto Trait Implementations§
impl Freeze for CanSignal
impl RefUnwindSafe for CanSignal
impl Send for CanSignal
impl Sync for CanSignal
impl Unpin for CanSignal
impl UnwindSafe for CanSignal
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> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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