#[cfg(feature = "serde")]
use super::SerializeUbxPacketFields;
#[cfg(feature = "serde")]
use crate::serde::ser::SerializeMap;
#[allow(unused_imports, reason = "It is only unused in some feature sets")]
use crate::FieldIter;
use crate::{error::ParserError, UbxPacketMeta};
use ublox_derive::ubx_packet_recv;
#[ubx_packet_recv]
#[ubx(class = 0x0a, id = 0x21, fixed_payload_len = 1)]
struct MonRxr {
#[ubx(map_type = MonRxrFlags)]
flags: u8,
}
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
#[cfg_attr(feature = "serde", derive(serde::Serialize))]
pub struct MonRxrFlags(u8);
impl MonRxrFlags {
pub fn awake(&self) -> bool {
self.0 & 0x01 != 0
}
pub fn raw(&self) -> u8 {
self.0
}
}
impl From<u8> for MonRxrFlags {
fn from(value: u8) -> Self {
Self(value)
}
}