pub enum CommandPriority {
RealtimeControl,
ReliableCommand,
}Expand description
命令优先级
用于区分不同类型的命令,优化发送策略。
Variants§
RealtimeControl
实时控制命令(可丢弃)
用于高频控制命令(500Hz-1kHz),如关节位置控制。 如果队列满,新命令会覆盖旧命令(Overwrite 策略)。 这确保了最新的控制命令总是被发送,即使意味着丢弃旧命令。
ReliableCommand
可靠命令(不可丢弃)
用于配置帧、状态机切换帧等关键命令。 使用 FIFO 队列,按顺序发送,不会覆盖。 如果队列满,会阻塞或返回错误(取决于 API)。
Trait Implementations§
Source§impl Clone for CommandPriority
impl Clone for CommandPriority
Source§fn clone(&self) -> CommandPriority
fn clone(&self) -> CommandPriority
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 CommandPriority
impl Debug for CommandPriority
Source§impl PartialEq for CommandPriority
impl PartialEq for CommandPriority
impl Copy for CommandPriority
impl Eq for CommandPriority
impl StructuralPartialEq for CommandPriority
Auto Trait Implementations§
impl Freeze for CommandPriority
impl RefUnwindSafe for CommandPriority
impl Send for CommandPriority
impl Sync for CommandPriority
impl Unpin for CommandPriority
impl UnwindSafe for CommandPriority
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