[][src]Struct odrive_cansimple::Connection

pub struct Connection { /* fields omitted */ }

Master CAN connection to one or more ODrive boards.

Implementations

impl Connection[src]

pub fn new(ifname: &str) -> Result<Connection, CANSocketOpenError>[src]

Returns an open CAN bus connection.

Example:

match odrive_cansimple::Connection::new("can0") {
    Ok(conn) => (),
    Err(error) => (),
}

pub fn set_nonblocking(&self, nonblocking: bool) -> Result<()>[src]

Set the connection to blocking or non-blocking mode.

pub fn read(&self) -> Result<Signal>[src]

Blocks until a a CAN frame is read from the bus.

pub fn write(&self, frame: &CANFrame) -> Result<()>[src]

pub fn emergency_stop(&self, id: AxisId) -> Result<()>[src]

pub fn reboot(&self, id: AxisId) -> Result<()>[src]

pub fn clear_errors(&self, id: AxisId) -> Result<()>[src]

pub fn start_anticogging(&self, id: AxisId) -> Result<()>[src]

pub fn set_axis_node_id(&self, id: AxisId, new_id: AxisId) -> Result<()>[src]

pub fn set_axis_requested_state(
    &self,
    id: AxisId,
    state: AxisState
) -> Result<()>
[src]

pub fn set_input_current(&self, id: AxisId, value: f32) -> Result<()>[src]

Set the current setpoint to the given value in amps with 0.01 A granularity.

pub fn set_velocity_limit(&self, id: AxisId, value: f32) -> Result<()>[src]

pub fn set_controller_modes(
    &self,
    id: AxisId,
    control_mode: ControlMode
) -> Result<()>
[src]

pub fn get_motor_error(&self, id: AxisId) -> Result<()>[src]

pub fn get_encoder_error(&self, id: AxisId) -> Result<()>[src]

pub fn get_sensorless_error(&self, id: AxisId) -> Result<()>[src]

pub fn get_encoder_estimates(&self, id: AxisId) -> Result<()>[src]

pub fn get_encoder_count(&self, id: AxisId) -> Result<()>[src]

pub fn get_iq(&self, id: AxisId) -> Result<()>[src]

pub fn get_sensorless_estimate(&self, id: AxisId) -> Result<()>[src]

pub fn get_vbus_voltage(&self, id: AxisId) -> Result<()>[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

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

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