1use crate::{
2 impl_command_display, impl_command_ops, impl_default, impl_message_from_buf, impl_message_ops,
3 len, CommandOps, MessageOps, MessageType,
4};
5
6#[repr(C)]
13#[derive(Clone, Copy, Debug, PartialEq)]
14pub struct HoldCommand {
15 buf: [u8; len::HOLD_COMMAND],
16}
17
18impl HoldCommand {
19 pub fn new() -> Self {
21 let mut msg = Self {
22 buf: [0u8; len::HOLD_COMMAND],
23 };
24
25 msg.init();
26 msg.set_command(MessageType::Hold);
27
28 msg
29 }
30}
31
32impl_default!(HoldCommand);
33impl_command_display!(HoldCommand);
34impl_message_from_buf!(HoldCommand);
35impl_message_ops!(HoldCommand);
36impl_command_ops!(HoldCommand);