1use grib_template_derive::{CodeTable, Dump, TryFromSlice, WriteToBuffer};
2
3#[derive(Debug, PartialEq, Eq, Clone, Copy, TryFromSlice, WriteToBuffer, Dump, CodeTable)]
4#[code_table(file = "def/CCT/C11.csv", format = wmo_cct_c11)]
5#[dump(code_table)]
6pub struct CentreId(
7 pub u16,
10);
11
12#[derive(Debug, PartialEq, Eq, Clone, Copy, TryFromSlice, WriteToBuffer, Dump)]
13pub struct SubcentreId(
14 pub u16,
17);
18
19#[derive(Debug, PartialEq, Eq, Clone, Copy, TryFromSlice, WriteToBuffer, Dump, CodeTable)]
20#[code_table(file = "def/CCT/C00.csv", format = wmo_cct_c00)]
21#[dump(code_table)]
22pub struct MasterTableVer(
23 pub u8,
25);
26
27#[derive(Debug, PartialEq, Eq, Clone, Copy, TryFromSlice, WriteToBuffer, Dump, CodeTable)]
28#[code_table(file = "def/GRIB2/GRIB2_CodeFlag_1_1_CodeTable_en.csv", format = wmo_grib2_tables)]
29#[dump(code_table)]
30pub struct LocalTableVer(
31 pub u8,
34);
35
36#[derive(Debug, PartialEq, Eq, Clone, Copy, TryFromSlice, WriteToBuffer, Dump, CodeTable)]
37#[code_table(file = "def/GRIB2/GRIB2_CodeFlag_1_2_CodeTable_en.csv", format = wmo_grib2_tables)]
38#[dump(code_table)]
39pub struct RefTimeSignificance(
40 pub u8,
42);
43
44crate::helpers::code_labels! {
45 impl RefTimeSignificance {
46 Analysis = 0,
48 StartOfForecast = 1,
50 VerifyingTimeOfForecast = 2,
52 ObservationTime = 3,
54 LocalTime = 4,
56 SimulationStart = 5,
58 }
59}
60
61#[derive(Debug, PartialEq, Eq, Clone, Copy, TryFromSlice, WriteToBuffer, Dump, CodeTable)]
62#[code_table(file = "def/GRIB2/GRIB2_CodeFlag_1_3_CodeTable_en.csv", format = wmo_grib2_tables)]
63#[dump(code_table)]
64pub struct ProductionStatus(
65 pub u8,
68);
69
70#[derive(Debug, PartialEq, Eq, Clone, Copy, TryFromSlice, WriteToBuffer, Dump, CodeTable)]
71#[code_table(file = "def/GRIB2/GRIB2_CodeFlag_1_4_CodeTable_en.csv", format = wmo_grib2_tables)]
72#[dump(code_table)]
73pub struct ProcessedDataType(
74 pub u8,
76);
77
78#[derive(Debug, PartialEq, Eq, Clone, Copy, TryFromSlice, WriteToBuffer, Dump, CodeTable)]
79#[code_table(file = "def/GRIB2/GRIB2_CodeFlag_1_5_CodeTable_en.csv", format = wmo_grib2_tables)]
80#[dump(code_table)]
81pub struct IdentificationTemplateNum(
82 pub u16,
84);
85
86#[derive(Debug, PartialEq, Eq, Clone, Copy, TryFromSlice, WriteToBuffer, Dump, CodeTable)]
87#[code_table(file = "def/GRIB2/GRIB2_CodeFlag_1_6_CodeTable_en.csv", format = wmo_grib2_tables)]
88#[dump(code_table)]
89pub struct CalendarType(
90 pub u8,
92);