pub struct ParameterQuerySetCommand {
pub query_type: Option<ParameterQueryType>,
pub set_type: Option<ParameterSetType>,
pub feedback_48x_setting: Feedback48XSetting,
pub load_param_enable: bool,
pub end_load: EndLoadSetting,
}Expand description
机械臂参数查询与设置指令 (0x477)
注意:查询和设置是互斥的,不能同时设置。
Fields§
§query_type: Option<ParameterQueryType>§set_type: Option<ParameterSetType>§feedback_48x_setting: Feedback48XSetting§load_param_enable: bool§end_load: EndLoadSettingImplementations§
Source§impl ParameterQuerySetCommand
impl ParameterQuerySetCommand
Sourcepub fn query(query_type: ParameterQueryType) -> Self
pub fn query(query_type: ParameterQueryType) -> Self
创建查询指令
Sourcepub fn set(set_type: ParameterSetType) -> Self
pub fn set(set_type: ParameterSetType) -> Self
创建设置指令
Sourcepub fn with_feedback_48x(self, setting: Feedback48XSetting) -> Self
pub fn with_feedback_48x(self, setting: Feedback48XSetting) -> Self
设置0x48X报文反馈
Sourcepub fn with_end_load(self, load: EndLoadSetting) -> Self
pub fn with_end_load(self, load: EndLoadSetting) -> Self
设置末端负载
Sourcepub fn validate(&self) -> Result<(), ProtocolError>
pub fn validate(&self) -> Result<(), ProtocolError>
验证互斥性(查询和设置不能同时进行)
Sourcepub fn to_frame(self) -> Result<PiperFrame, ProtocolError>
pub fn to_frame(self) -> Result<PiperFrame, ProtocolError>
转换为 CAN 帧
Trait Implementations§
Source§impl Clone for ParameterQuerySetCommand
impl Clone for ParameterQuerySetCommand
Source§fn clone(&self) -> ParameterQuerySetCommand
fn clone(&self) -> ParameterQuerySetCommand
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 ParameterQuerySetCommand
impl Debug for ParameterQuerySetCommand
impl Copy for ParameterQuerySetCommand
Auto Trait Implementations§
impl Freeze for ParameterQuerySetCommand
impl RefUnwindSafe for ParameterQuerySetCommand
impl Send for ParameterQuerySetCommand
impl Sync for ParameterQuerySetCommand
impl Unpin for ParameterQuerySetCommand
impl UnwindSafe for ParameterQuerySetCommand
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