Struct ssp::disable::DisableCommand
source · #[repr(C)]pub struct DisableCommand { /* private fields */ }Expand description
Disable - Command (0x09)
This single byte command disables the unit. This means the unit will enter its disabled state and not execute any further commands or perform any other actions. A poll to the unit while in this state will report disabled (0xE8)
Implementations§
source§impl DisableCommand
impl DisableCommand
sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new DisableCommand message.
Trait Implementations§
source§impl Clone for DisableCommand
impl Clone for DisableCommand
source§fn clone(&self) -> DisableCommand
fn clone(&self) -> DisableCommand
Returns a copy 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 CommandOps for DisableCommand
impl CommandOps for DisableCommand
source§fn command(&self) -> MessageType
fn command(&self) -> MessageType
Gets the Command message type.
source§fn set_command(&mut self, command: MessageType)
fn set_command(&mut self, command: MessageType)
Sets the Command message type.
source§impl Debug for DisableCommand
impl Debug for DisableCommand
source§impl Default for DisableCommand
impl Default for DisableCommand
source§impl Display for DisableCommand
impl Display for DisableCommand
source§impl MessageOps for DisableCommand
impl MessageOps for DisableCommand
source§fn set_data_len(&mut self, len: u8)
fn set_data_len(&mut self, len: u8)
Sets the data length of the message.
source§fn message_type(&self) -> MessageType
fn message_type(&self) -> MessageType
Gets the message type.
source§fn is_command(&self) -> bool
fn is_command(&self) -> bool
Gets whether the message is a command message.
source§fn is_response(&self) -> bool
fn is_response(&self) -> bool
Gets whether the message is a response message.
source§fn is_variable(&self) -> bool
fn is_variable(&self) -> bool
Gets whether the message has a variable data length.
source§fn metadata_len(&self) -> usize
fn metadata_len(&self) -> usize
Gets the length of the metadata fields in the message buffer.
source§fn sequence_id(&self) -> SequenceId
fn sequence_id(&self) -> SequenceId
Gets the SequenceId field.
source§fn set_sequence_id(&mut self, id: SequenceId)
fn set_sequence_id(&mut self, id: SequenceId)
Sets the SequenceId field.
source§fn toggle_sequence_id(&mut self)
fn toggle_sequence_id(&mut self)
Toggles the SequenceFlag value of the SequenceId.
fn set_data(&mut self, data: &[u8]) -> Result<()>
source§fn toggle_sequence_flag(&mut self)
fn toggle_sequence_flag(&mut self)
Toggles the value of the SequenceFlag.
source§fn calculate_checksum(&mut self) -> u16
fn calculate_checksum(&mut self) -> u16
Calculates the CRC-16 checksum of the message.
source§fn verify_checksum(&self) -> Result<()>
fn verify_checksum(&self) -> Result<()>
Verifies the checksum in the message buffer matches the calculated value.
source§impl PartialEq<DisableCommand> for DisableCommand
impl PartialEq<DisableCommand> for DisableCommand
source§fn eq(&self, other: &DisableCommand) -> bool
fn eq(&self, other: &DisableCommand) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl TryFrom<&[u8]> for DisableCommand
impl TryFrom<&[u8]> for DisableCommand
impl Copy for DisableCommand
impl StructuralPartialEq for DisableCommand
Auto Trait Implementations§
impl RefUnwindSafe for DisableCommand
impl Send for DisableCommand
impl Sync for DisableCommand
impl Unpin for DisableCommand
impl UnwindSafe for DisableCommand
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