use zigbee_macros::impl_byte;
impl_byte! {
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub struct SwitchKey {
pub sequence_number: u8,
}
}
#[cfg(test)]
mod tests {
use byte::TryRead;
use byte::TryWrite;
use crate::aps::frame::command::Command;
#[test]
fn round_trip_switch_key() {
let frame_buf = [
0x09, 0x07, ];
let (cmd, _) = Command::try_read(&frame_buf, ()).unwrap();
let mut got_buf = [0u8; _];
cmd.try_write(&mut got_buf, ()).unwrap();
assert_eq!(frame_buf, got_buf);
}
}