#[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: u8Type ID of the TX task, see BMTxTaskType for details.
unused: u8Reserved
flags: u8CAN message control Flags, see BMMessageFlags for details.
length: u8Length of payload in bytes (not DLC)
e2e: u8Index of E2E (in E2E table, currently unsupported
reserved: u8Reserved
cycle: u16ms delay between rounds
n_rounds: u16num of cycles
n_messages: u16messages per round
id: u32CAN message arbitration ID, see BMMessageId for details.
pattern: u32TX 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