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/GRIB2/GRIB2_CodeFlag_5_0_CodeTable_en.csv", format = wmo_grib2_tables)]
5#[dump(code_table)]
6pub struct DataRepresentationTemplateNum(
7 pub u16,
9);
10
11#[derive(Debug, PartialEq, Eq, Clone, Copy, TryFromSlice, WriteToBuffer, Dump, CodeTable)]
12#[code_table(file = "def/GRIB2/GRIB2_CodeFlag_5_1_CodeTable_en.csv", format = wmo_grib2_tables)]
13#[dump(code_table)]
14pub struct OriginalFieldValueType(
15 pub u8,
17);
18
19#[derive(Debug, PartialEq, Eq, Clone, Copy, TryFromSlice, WriteToBuffer, Dump, CodeTable)]
20#[code_table(file = "def/GRIB2/GRIB2_CodeFlag_5_2_CodeTable_en.csv", format = wmo_grib2_tables)]
21#[dump(code_table)]
22pub struct MatrixCoordinateValueFuncDefinition(
23 pub u8,
25);
26
27#[derive(Debug, PartialEq, Eq, Clone, Copy, TryFromSlice, WriteToBuffer, Dump, CodeTable)]
28#[code_table(file = "def/GRIB2/GRIB2_CodeFlag_5_3_CodeTable_en.csv", format = wmo_grib2_tables)]
29#[dump(code_table)]
30pub struct MatrixCoordinateParam(
31 pub u8,
33);
34
35#[derive(Debug, PartialEq, Eq, Clone, Copy, TryFromSlice, WriteToBuffer, Dump, CodeTable)]
36#[code_table(file = "def/GRIB2/GRIB2_CodeFlag_5_4_CodeTable_en.csv", format = wmo_grib2_tables)]
37#[dump(code_table)]
38pub struct GroupSplittingMethod(
39 pub u8,
41);
42
43#[derive(Debug, PartialEq, Eq, Clone, Copy, TryFromSlice, WriteToBuffer, Dump, CodeTable)]
44#[code_table(file = "def/GRIB2/GRIB2_CodeFlag_5_5_CodeTable_en.csv", format = wmo_grib2_tables)]
45#[dump(code_table)]
46pub struct ComplexPackingMissingValueManagement(
47 pub u8,
49);
50
51#[derive(Debug, PartialEq, Eq, Clone, Copy, TryFromSlice, WriteToBuffer, Dump, CodeTable)]
52#[code_table(file = "def/GRIB2/GRIB2_CodeFlag_5_6_CodeTable_en.csv", format = wmo_grib2_tables)]
53#[dump(code_table)]
54pub struct SpatialDifferencingOrder(
55 pub u8,
57);
58
59crate::helpers::code_labels! {
60 impl SpatialDifferencingOrder {
61 FirstOrder = 1,
63 SecondOrder = 2,
65 }
66}
67
68#[derive(Debug, PartialEq, Eq, Clone, Copy, TryFromSlice, WriteToBuffer, Dump, CodeTable)]
69#[code_table(file = "def/GRIB2/GRIB2_CodeFlag_5_7_CodeTable_en.csv", format = wmo_grib2_tables)]
70#[dump(code_table)]
71pub struct FloatPrecision(
72 pub u8,
74);
75
76#[derive(Debug, PartialEq, Eq, Clone, Copy, TryFromSlice, WriteToBuffer, Dump, CodeTable)]
77#[code_table(file = "def/GRIB2/GRIB2_CodeFlag_5_25_CodeTable_en.csv", format = wmo_grib2_tables)]
78#[dump(code_table)]
79pub struct BiFourierSubtruncationType(
80 pub u8,
82);
83
84#[derive(Debug, PartialEq, Eq, Clone, Copy, TryFromSlice, WriteToBuffer, Dump)]
85pub struct BiFourierPackMode(
86 pub u8,
88);
89
90#[derive(Debug, PartialEq, Eq, Clone, Copy, TryFromSlice, WriteToBuffer, Dump, CodeTable)]
91#[code_table(file = "def/GRIB2/GRIB2_CodeFlag_5_40_CodeTable_en.csv", format = wmo_grib2_tables)]
92#[dump(code_table)]
93pub struct CompressionType(
94 pub u8,
96);
97
98#[derive(Debug, PartialEq, Eq, Clone, Copy, TryFromSlice, WriteToBuffer, Dump)]
99#[dump(flag)]
100pub struct OrderingFlags(
101 pub u8,
103);