Struct MultiDriver

Source
pub struct MultiDriver { /* private fields */ }
Expand description

Controller for moving multiple axes in a coordinated fashion.

Implementations§

Source§

impl MultiDriver

Source

pub const MAX_DRIVERS: usize = 10usize

The maximum number of Drivers that a MultiDriver can manage when compiled without the std feature.

Source

pub fn new() -> MultiDriver

Source

pub fn push_driver(&mut self, driver: Driver)

Add a new Driver to the list of synchronised axes managed by the MultiDriver.

§Panics

When compiling without the std feature flag, the MultiDriver can only manage up to MultiDriver::MAX_DRIVERS drivers.

Source

pub fn drivers(&self) -> &[Driver]

Source

pub fn drivers_mut(&mut self) -> &mut [Driver]

Source

pub fn move_to(&mut self, positions: &[i64])

Set the target positions of all managed steppers.

§Panics

The number of managed steppers should be the same as the number of positions.

Source

pub fn poll<D, C>( &mut self, devices: &mut [D], clock: &C, ) -> Result<(), D::Error>
where D: Device, C: SystemClock,

Poll the underlying Drivers, emitting steps to the provided Devices when necessary.

§Panics

The number of managed steppers should be the same as the number of devices.

Source

pub fn is_running(&self) -> bool

Are any of the managed steppers still running?

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.