Struct dcf77::DCF77Time
[−]
[src]
pub struct DCF77Time(pub u64);
A structure to facilitate the decoding of a DCF77 signal which consists of 59 consecutive bits of data
Methods
impl DCF77Time
[src]
pub fn new(dcf77bits: u64) -> Self
[src]
Generate an empty value for the storage of the DCF77 data
pub fn validate_start(&self) -> Result<(), ()>
[src]
Validate the correct value of the start bit
pub fn cest_unchecked(&self) -> bool
[src]
Return whether summer time is signalled (without verifying the information)
pub fn cest(&self) -> Result<bool, ()>
[src]
Return whether summer time is signalled with verification of the counter bit
pub fn minutes_unchecked(&self) -> u8
[src]
Return the current minutes of the hour (without verifying the information)
pub fn minutes(&self) -> Result<u8, ()>
[src]
Return the current minutes of the hour and verify parity and value < 60
pub fn hours_unchecked(&self) -> u8
[src]
Return the current hours of the day (without verifying the information)
pub fn hours(&self) -> Result<u8, ()>
[src]
Return the current hours of the day and verify parity and value < 23
pub fn day_unchecked(&self) -> u8
[src]
Return the current day of month (without verifying the information)
pub fn day(&self) -> Result<u8, ()>
[src]
Return the current day of month and do a basic value check
pub fn weekday_unchecked(&self) -> u8
[src]
Return the current day of the week (without verifying the information) 0 meaning Monday
pub fn month_unchecked(&self) -> u8
[src]
Return the current month of the year (without verifying the information)
pub fn year_unchecked(&self) -> u16
[src]
Return the current year (without verifying the information)
pub fn date(&self) -> Result<(u16, u8, u8, u8), ()>
[src]
Return a tuple of (year, month, day, weekday) if it passes a parity check