FlexrayClusterSettings

Struct FlexrayClusterSettings 

Source
pub struct FlexrayClusterSettings {
Show 36 fields pub baudrate: u32, pub action_point_offset: u8, pub bit: f64, pub cas_rx_low_max: u8, pub cold_start_attempts: u8, pub cycle: f64, pub cycle_count_max: u8, pub detect_nit_error: bool, pub dynamic_slot_idle_phase: u8, pub ignore_after_tx: u16, pub listen_noise: u8, pub macro_per_cycle: u16, pub macrotick_duration: f64, pub max_without_clock_correction_fatal: u8, pub max_without_clock_correction_passive: u8, pub minislot_action_point_offset: u8, pub minislot_duration: u8, pub network_idle_time: u16, pub network_management_vector_length: u8, pub number_of_minislots: u16, pub number_of_static_slots: u16, pub offset_correction_start: u16, pub payload_length_static: u16, pub safety_margin: u16, pub sample_clock_period: Option<f64>, pub static_slot_duration: u16, pub symbol_window: u8, pub symbol_window_action_point_offset: Option<u8>, pub sync_frame_id_count_max: u8, pub transceiver_standby_delay: Option<f64>, pub transmission_start_sequence_duration: u8, pub wakeup_rx_idle: u16, pub wakeup_rx_low: u8, pub wakeup_rx_window: u16, pub wakeup_tx_active: u16, pub wakeup_tx_idle: u16,
}
Expand description

Configuration settings of the Flexray cluster.

Refer to AUTOSAR_TPS_SystemTemplate.pdf, chapter 3.3.4 and Flexray 2.1a / 3.0 standard, appendix A + B for the meanings and ranges of these parameters.

Fields§

§baudrate: u32

baud rate of the Flexray cluster: one of 10000000 (10Mbit/s), 5000000 (5Mbit/s), 2500000 (2.5Mbit/s)

§action_point_offset: u8

gdActionPointOffset: Number of macroticks the action point is offset from the beginning of a static slot or symbol window: in the range 1 - 63 MT

§bit: f64

gdBit: Nominal bit time; inverse of the baudrate: 0.1µs, 0.2µs, or 0.4µs

§cas_rx_low_max: u8

gdCASRxLowMax: Upper limit of the CAS acceptance window. Range 67 - 99 gdBit

§cold_start_attempts: u8

gColdStartAttempts: Maximum number of times a node in the cluster is permitted to attempt to start the cluster. Range: 2 - 31

§cycle: f64

gdCycle: Length of the cycle in seconds. Range: 10µs - 16000µs; typically 0.005s

§cycle_count_max: u8

cCycleCountMax. Must be 63 to conform with Flexray 2.1

§detect_nit_error: bool

Indicates whether network idle time (NIT) error status should be detected

§dynamic_slot_idle_phase: u8

gdDynamicSlotIdlePhase: Duration of the idle phase within a dynamic slot. Range 0 - 2

§ignore_after_tx: u16

Duration for which the bitstrobing is paused after transmission

§listen_noise: u8

gListenNoise: Upper limit for the startup listen timeout and wakeup listen timeout in the presence of noise. Range 2 - 16

§macro_per_cycle: u16

gMacroPerCycle: Number of macroticks in a communication cycle. Range: 10 - 16000 MT

§macrotick_duration: f64

macrotick_duration [s] = cycle [s] / macro_per_cycle

§max_without_clock_correction_fatal: u8

gMaxWithoutClockCorrectionFatal: Threshold used for testing the vClockCorrectionFailed counter. Range: <max_without_clock_correction_passive> - 15 even/odd cycle pairs

§max_without_clock_correction_passive: u8

gMaxWithoutClockCorrectionPassive: Threshold used for testing the vClockCorrectionFailed counter. Range: 1 - 15 even/odd cycle pairs

§minislot_action_point_offset: u8

gdMinislotActionPointOffset: Number of macroticks the minislot action point is offset from the beginning of a minislot. Range: 1 - 31 MT

§minislot_duration: u8

gdMinislot: Duration of a minislot. Range: 2 - 63 MT

§network_idle_time: u16

gdNIT: Duration of the Network Idle Time. 2 - 805 MT

§network_management_vector_length: u8

gNetworkManagementVectorLength: Length of the Network Management vector in a cluster. Range: 0 - 12 bytes

§number_of_minislots: u16

gNumberOfMinislots: Number of minislots in the dynamic segment. Range: 0 - 7986

§number_of_static_slots: u16

gNumberOfStaticSlots: Number of static slots in the static segment. Range: 2 - 1023

§offset_correction_start: u16

gOffsetCorrectionStart: Start of the offset correction phase within the NIT, as MT from the start of the cycle. Range: 9 - 15999 MT

§payload_length_static: u16

gPayloadLengthStatic: Payload length of a static frame, in two byte words. Range: 0 - 127 words

§safety_margin: u16

Additional timespan in macroticks which takes jitter into account

§sample_clock_period: Option<f64>

gdSampleClockPeriod: Sample clock period. One of [1.25e-8 s, 2.5e-8 s, 5e-8 s]

§static_slot_duration: u16

gdStaticSlot: Duration of a static slot. Range: 4 - 661 MT

§symbol_window: u8

gdSymbolWindow: Duration of the symbol window. Range: 0 - 142 MT

§symbol_window_action_point_offset: Option<u8>

Flexray 3.0 only: Number of Macroticks the action point is offset from the beginning of the symbol window. Range: 1 - 63 MT

§sync_frame_id_count_max: u8

gSyncNodeMax: Maximum number of nodes that may send frames with the sync frame indicator bit set to one. Range: 2 - 15

§transceiver_standby_delay: Option<f64>

The duration of timer t_TrcvStdbyDelay in seconds.

§transmission_start_sequence_duration: u8

gdTSSTransmitter: Number of bits in the Transmission Start Sequence. Range: 3 - 15 gdBit

§wakeup_rx_idle: u16

gdWakeupSymbolRxIdle: Number of bits used by the node to test the duration of the ‘idle’ portion of a received wakeup symbol. Range: 14 - 59 gdBit

§wakeup_rx_low: u8

gdWakeupSymbolRxLow: Number of bits used by the node to test the LOW portion of a received wakeup symbol. Range 11 - 59 gdBit

§wakeup_rx_window: u16

gdWakeupSymbolRxWindow: The size of the window used to detect wakeups. Range: 76 - 301 gdBit

§wakeup_tx_active: u16

gdWakeupSymbolTxLow: Number of bits used by the node to transmit the LOW part of a wakeup symbol. Range: 15 - 60 gdBit

§wakeup_tx_idle: u16

gdWakeupSymbolTxIdle: Number of bits used by the node to transmit the ‘idle’ part of a wakeup symbol. Range: 45 - 180 gdBit

Implementations§

Source§

impl FlexrayClusterSettings

Source

pub fn new() -> Self

Create a new FlexrayClusterSettings object with default values

Source

pub fn verify(&self) -> bool

Check the plausibility of the parameter values

Returns true if no problem was detected, of false if a problem was found. The checks performed by this function are not comprehensive. Some problems may remain undetected.

§Example
let mut settings = FlexrayClusterSettings::default();
settings.macro_per_cycle = 1111;
assert!(!settings.verify())

Trait Implementations§

Source§

impl Clone for FlexrayClusterSettings

Source§

fn clone(&self) -> FlexrayClusterSettings

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for FlexrayClusterSettings

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for FlexrayClusterSettings

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl PartialEq for FlexrayClusterSettings

Source§

fn eq(&self, other: &FlexrayClusterSettings) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for FlexrayClusterSettings

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.