use crate::{
impl_command_display, impl_command_ops, impl_default, impl_message_from_buf, impl_message_ops,
len::DISABLE_COMMAND, CommandOps, MessageOps, MessageType,
};
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct DisableCommand {
buf: [u8; DISABLE_COMMAND],
}
impl DisableCommand {
pub fn new() -> Self {
let mut msg = Self {
buf: [0u8; DISABLE_COMMAND],
};
msg.init();
msg.set_command(MessageType::Disable);
msg
}
}
impl_default!(DisableCommand);
impl_command_display!(DisableCommand);
impl_message_from_buf!(DisableCommand);
impl_message_ops!(DisableCommand);
impl_command_ops!(DisableCommand);