pub struct GripperStatus { /* private fields */ }Expand description
夹爪状态位域(Byte 6: 8 位)
协议定义(Motorola MSB 高位在前):
- Bit 0: 电源电压是否过低(0:正常 1:过低)
- Bit 1: 电机是否过温(0:正常 1:过温)
- Bit 2: 驱动器是否过流(0:正常 1:过流)
- Bit 3: 驱动器是否过温(0:正常 1:过温)
- Bit 4: 传感器状态(0:正常 1:异常)
- Bit 5: 驱动器错误状态(0:正常 1:错误)
- Bit 6: 驱动器使能状态(1:使能 0:失能,注意:反向逻辑)
- Bit 7: 回零状态(0:没有回零 1:已经回零)
Implementations§
Source§impl GripperStatus
impl GripperStatus
pub fn new( arg_voltage_low: bool, arg_motor_over_temp: bool, arg_driver_over_current: bool, arg_driver_over_temp: bool, arg_sensor_error: bool, arg_driver_error: bool, arg_enabled: bool, arg_homed: bool, ) -> GripperStatus
pub fn voltage_low(&self) -> bool
pub fn set_voltage_low(&mut self, value: bool)
pub fn motor_over_temp(&self) -> bool
pub fn set_motor_over_temp(&mut self, value: bool)
pub fn driver_over_current(&self) -> bool
pub fn set_driver_over_current(&mut self, value: bool)
pub fn driver_over_temp(&self) -> bool
pub fn set_driver_over_temp(&mut self, value: bool)
pub fn sensor_error(&self) -> bool
pub fn set_sensor_error(&mut self, value: bool)
pub fn driver_error(&self) -> bool
pub fn set_driver_error(&mut self, value: bool)
pub fn enabled(&self) -> bool
pub fn set_enabled(&mut self, value: bool)
pub fn homed(&self) -> bool
pub fn set_homed(&mut self, value: bool)
Trait Implementations§
Source§impl Bitsized for GripperStatus
impl Bitsized for GripperStatus
const BITS: usize = <Self::ArbitraryInt as Bitsized>::BITS
const MAX: <GripperStatus as Bitsized>::ArbitraryInt = <Self::ArbitraryInt as Bitsized>::MAX
type ArbitraryInt = u8
Source§impl Clone for GripperStatus
impl Clone for GripperStatus
Source§fn clone(&self) -> GripperStatus
fn clone(&self) -> GripperStatus
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GripperStatus
impl Debug for GripperStatus
Source§impl Default for GripperStatus
impl Default for GripperStatus
Source§fn default() -> GripperStatus
fn default() -> GripperStatus
Returns the “default value” for a type. Read more
Source§impl From<u8> for GripperStatus
impl From<u8> for GripperStatus
Source§fn from(value: u8) -> GripperStatus
fn from(value: u8) -> GripperStatus
Converts to this type from the input type.
impl Copy for GripperStatus
Auto Trait Implementations§
impl Freeze for GripperStatus
impl RefUnwindSafe for GripperStatus
impl Send for GripperStatus
impl Sync for GripperStatus
impl Unpin for GripperStatus
impl UnwindSafe for GripperStatus
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more