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
.