pub enum Command {
WriteParameter {
address: Address,
value: u8,
},
ReadParameter {
address: Address,
size: u32,
},
GetVersion,
}Expand description
Command types for VR-6HD
Variants§
WriteParameter
Write parameter (DTH)
ReadParameter
Read parameter (RQH)
GetVersion
Get version information (VER)
Implementations§
Source§impl Command
impl Command
Sourcepub fn encode(&self) -> String
pub fn encode(&self) -> String
Encode command to string format
For Telnet, STX (0x02) is optional and omitted here. For RS-232, STX should be prepended by the transport layer.
Requires alloc for String allocation.
Sourcepub fn encode_with_stx(&self) -> String
pub fn encode_with_stx(&self) -> String
Encode command with STX prefix (for RS-232)
Requires alloc for String allocation.
Trait Implementations§
impl Eq for Command
impl StructuralPartialEq for Command
Auto Trait Implementations§
impl Freeze for Command
impl RefUnwindSafe for Command
impl Send for Command
impl Sync for Command
impl Unpin for Command
impl UnwindSafe for Command
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