1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
use auto_impl::auto_impl;

use crate::error::Error;

#[auto_impl(Box, Arc)]
pub trait MotorDrivePosition: Send + Sync {
    fn set_motor_position(&self, position: f64) -> Result<(), Error>;
    fn get_motor_position(&self) -> Result<f64, Error>;
}

#[auto_impl(Box, Arc)]
pub trait MotorDriveVelocity: Send + Sync {
    fn set_motor_velocity(&self, velocity: f64) -> Result<(), Error>;
    fn get_motor_velocity(&self) -> Result<f64, Error>;
}

#[auto_impl(Box, Arc)]
pub trait MotorDriveEffort: Send + Sync {
    fn set_motor_effort(&self, effort: f64) -> Result<(), Error>;
    fn get_motor_effort(&self) -> Result<f64, Error>;
}