pub trait DamiaoCodecExt {
// Required methods
fn encode_read_param(&self, motor: MotorRef<'_>, rid: DamiaoRid) -> CanFrame;
fn encode_write_param(
&self,
motor: MotorRef<'_>,
rid: DamiaoRid,
val: ParamValue,
) -> CanFrame;
fn encode_save_to_flash(&self, motor: MotorRef<'_>) -> CanFrame;
fn encode_refresh(&self, motor: MotorRef<'_>) -> CanFrame;
}Expand description
Damiao-only extension: read/write per-motor parameters on CAN ID 0x7FF.
DamiaoCodec is the only implementor. The trait stands alone so callers
can reach it via &dyn downcast without bringing in MotorCodec.
Required Methods§
Sourcefn encode_read_param(&self, motor: MotorRef<'_>, rid: DamiaoRid) -> CanFrame
fn encode_read_param(&self, motor: MotorRef<'_>, rid: DamiaoRid) -> CanFrame
Encode a “read parameter” frame (command byte 0x33).
Sourcefn encode_write_param(
&self,
motor: MotorRef<'_>,
rid: DamiaoRid,
val: ParamValue,
) -> CanFrame
fn encode_write_param( &self, motor: MotorRef<'_>, rid: DamiaoRid, val: ParamValue, ) -> CanFrame
Encode a “write parameter” frame (command byte 0x55).
Sourcefn encode_save_to_flash(&self, motor: MotorRef<'_>) -> CanFrame
fn encode_save_to_flash(&self, motor: MotorRef<'_>) -> CanFrame
Encode a “save settings to flash” frame (command byte 0xAA).
Sourcefn encode_refresh(&self, motor: MotorRef<'_>) -> CanFrame
fn encode_refresh(&self, motor: MotorRef<'_>) -> CanFrame
Encode a “request state feedback” frame (Damiao refresh_motor_status,
command byte 0xCC on 0x7FF). The motor replies with a feedback frame;
this commands no motion. (Byte-for-byte the openarm
create_refresh_command.)