Trait tmcl::Instruction
[−]
[src]
pub trait Instruction { const INSTRUCTION_NUMBER: u8; fn type_number(&self) -> u8; fn motor_bank_number(&self) -> u8; fn operand(&self) -> [u8; 4]; }
A TMCL
Instruction
Associated Constants
const INSTRUCTION_NUMBER: u8
The command number (sometimes referred to as the instruction number).
Required Methods
fn type_number(&self) -> u8
fn motor_bank_number(&self) -> u8
The motor/bank number
fn operand(&self) -> [u8; 4]
Return the operand serialized.
Even though the whole frame (in serialized form) is represented as:
[..., operand[3], operand[2], operand[1], operand[0], ...]
.
This function instead return the operand:
[operand[0], operand[1], operand[2], operand[3]]
.
Implementors
impl Instruction for ROR
impl Instruction for ROL
impl Instruction for MST
impl Instruction for MVP
impl<T: WriteableAxisParameter> Instruction for tmcl::modules::tmcm::instructions::SAP<T>
impl<T: ReadableAxisParameter> Instruction for tmcl::modules::tmcm::instructions::GAP<T>
impl<T: WriteableAxisParameter> Instruction for tmcl::modules::tmcm::instructions::STAP<T>
impl<T: WriteableAxisParameter> Instruction for tmcl::modules::tmcm::instructions::RSAP<T>
impl Instruction for RFS
impl Instruction for SIO
impl Instruction for GIO
impl Instruction for CALC
impl Instruction for tmcl::modules::generic::instructions::SAP
impl Instruction for tmcl::modules::generic::instructions::GAP
impl Instruction for tmcl::modules::generic::instructions::STAP
impl Instruction for tmcl::modules::generic::instructions::RSAP