Skip to main content

vlcb_defs/
fast_clock.rs

1use num_enum::{FromPrimitive, IntoPrimitive};
2
3/// Week day for fast clock implementation
4///
5/// The enum values represent the VLCB fast clock protocol specification
6/// for week days.
7///
8/// Default value is `1` ([`FastClockWeekday::Sunday`])
9#[derive(FromPrimitive, IntoPrimitive, Debug, Clone, PartialEq, Eq, Copy)]
10#[repr(u8)]
11pub enum FastClockWeekday {
12    #[default]
13    Sunday = 1,
14    Monday = 2,
15    Tuesday = 3,
16    Wednesday = 4,
17    Thursday = 5,
18    Friday = 6,
19    Saturday = 7,
20}
21
22/// Month for fast clock implementation
23///
24/// The enum values represent the VLCB fast clock protocol specification
25/// for months.
26///
27/// Default value is `1` ([`FastClockMonth::January`])
28#[derive(FromPrimitive, IntoPrimitive, Debug, Clone, PartialEq, Eq, Copy)]
29#[repr(u8)]
30pub enum FastClockMonth {
31    #[default]
32    January = 1,
33    February = 2,
34    March = 3,
35    April = 4,
36    May = 5,
37    June = 6,
38    July = 7,
39    August = 8,
40    September = 9,
41    October = 10,
42    November = 11,
43    December = 12,
44}