1#[derive(Debug, Copy, Clone, Default, PartialEq)]
6pub enum MessageID {
7 SiteMonumentMarker = 0,
10 Ephemeris = 1,
12 Observation = 2,
14 Meteo = 3,
16 ReceiverInfo = 4,
18 ProcessedSolutions = 5,
20 ReceiverInfoPrototype = 125,
22 MeteoPrototype = 126,
24 ObservationPrototype = 127,
26 #[default]
28 Unknown = 0xffffffff,
29}
30
31impl From<u32> for MessageID {
32 fn from(val: u32) -> Self {
33 match val {
34 0 => Self::SiteMonumentMarker,
35 1 => Self::Ephemeris,
36 2 => Self::Observation,
37 3 => Self::Meteo,
38 4 => Self::ReceiverInfo,
39 5 => Self::ProcessedSolutions,
40 125 => Self::ReceiverInfoPrototype,
41 126 => Self::MeteoPrototype,
42 127 => Self::ObservationPrototype,
43 _ => Self::Unknown,
44 }
45 }
46}
47
48impl From<MessageID> for u32 {
49 fn from(val: MessageID) -> u32 {
50 match val {
51 MessageID::SiteMonumentMarker => 0,
52 MessageID::Ephemeris => 1,
53 MessageID::Observation => 2,
54 MessageID::Meteo => 3,
55 MessageID::ReceiverInfo => 4,
56 MessageID::ProcessedSolutions => 5,
57 MessageID::ReceiverInfoPrototype => 125,
58 MessageID::MeteoPrototype => 126,
59 MessageID::ObservationPrototype => 127,
60 _ => 0xff,
61 }
62 }
63}