#[repr(u8)]pub enum Region {
China900 = 1,
Us = 2,
Europe = 3,
China800 = 4,
Korea = 6,
}Expand description
Operating region for the reader
Variants§
China900 = 1
China 900 MHz band
Us = 2
US band
Europe = 3
Europe band
China800 = 4
China 800 MHz band
Korea = 6
South Korea band
Implementations§
Source§impl Region
impl Region
Sourcepub fn base_frequency(&self) -> f64
pub fn base_frequency(&self) -> f64
Get the base frequency for this region in MHz
Sourcepub fn channel_spacing(&self) -> f64
pub fn channel_spacing(&self) -> f64
Get the channel spacing for this region in MHz
Sourcepub fn channel_from_frequency(&self, freq_mhz: f64) -> u8
pub fn channel_from_frequency(&self, freq_mhz: f64) -> u8
Calculate channel index from frequency
Sourcepub fn frequency_from_channel(&self, channel: u8) -> f64
pub fn frequency_from_channel(&self, channel: u8) -> f64
Calculate frequency from channel index
Trait Implementations§
impl Copy for Region
impl Eq for Region
impl StructuralPartialEq for Region
Auto Trait Implementations§
impl Freeze for Region
impl RefUnwindSafe for Region
impl Send for Region
impl Sync for Region
impl Unpin for Region
impl UnwindSafe for Region
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