pub struct ActuatorCommand {
pub actuator_id: String,
pub kind: ActuatorKind,
pub value: f64,
pub params: Vec<f64>,
pub timestamp: f64,
}Expand description
A command to an actuator.
Fields§
§actuator_id: StringActuator identifier (e.g., “left_motor”, “valve_3”).
kind: ActuatorKindType of actuator.
value: f64Primary command value (e.g., speed, position, duty cycle).
params: Vec<f64>Optional secondary parameters (e.g., acceleration limit, duration).
timestamp: f64Command timestamp.
Implementations§
Source§impl ActuatorCommand
impl ActuatorCommand
Sourcepub fn new(
actuator_id: impl Into<String>,
kind: ActuatorKind,
value: f64,
) -> Self
pub fn new( actuator_id: impl Into<String>, kind: ActuatorKind, value: f64, ) -> Self
Create a new actuator command.
Sourcepub fn with_params(self, params: Vec<f64>) -> Self
pub fn with_params(self, params: Vec<f64>) -> Self
Add parameters.
Trait Implementations§
Source§impl Clone for ActuatorCommand
impl Clone for ActuatorCommand
Source§impl Debug for ActuatorCommand
impl Debug for ActuatorCommand
Source§impl<'de> Deserialize<'de> for ActuatorCommand
impl<'de> Deserialize<'de> for ActuatorCommand
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ActuatorCommand
impl RefUnwindSafe for ActuatorCommand
impl Send for ActuatorCommand
impl Sync for ActuatorCommand
impl Unpin for ActuatorCommand
impl UnsafeUnpin for ActuatorCommand
impl UnwindSafe for ActuatorCommand
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