BMTxTask

Struct BMTxTask 

Source
#[repr(C)]
pub struct BMTxTask { pub kind: u8, pub unused: u8, pub flags: u8, pub length: u8, pub e2e: u8, pub reserved: u8, pub cycle: u16, pub n_rounds: u16, pub n_messages: u16, pub id: u32, pub pattern: u32, pub payload: [u8; 64], }
Expand description

CAN channel TX task item structure, used by [super::api::BM_SetTxTasks] Once the CAN device is armed with TX tasks, it will try to parse the TX task and send CAN messages automatically. The difference with a software triggered CAN message in BusMaster is that hardware triggered CAN messages are more precise in time and could reach a higher throughput.

Fields§

§kind: u8

Type ID of the TX task, see BMTxTaskType for details.

§unused: u8

Reserved

§flags: u8

CAN message control Flags, see BMMessageFlags for details.

§length: u8

Length of payload in bytes (not DLC)

§e2e: u8

Index of E2E (in E2E table, currently unsupported

§reserved: u8

Reserved

§cycle: u16

ms delay between rounds

§n_rounds: u16

num of cycles

§n_messages: u16

messages per round

§id: u32

CAN message arbitration ID, see BMMessageId for details.

§pattern: u32

TX task pattern data

§payload: [u8; 64]

Default payload data, note this is also the template payload of the unchanged part in a volatile TX task

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> 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, 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.