1use grib_template_derive::{CodeTable, Dump, FixedSize, TryFromSlice, WriteToBuffer};
2
3#[derive(Debug, PartialEq, Eq, Clone, Copy, TryFromSlice, WriteToBuffer, Dump, CodeTable)]
4#[code_table(file = "def/GRIB2/GRIB2_CodeFlag_4_0_CodeTable_en.csv", format = wmo_grib2_tables)]
5#[dump(code_table)]
6pub struct ProductDefinitionTemplateNum(
7 pub u16,
9);
10
11#[derive(
12 Debug, PartialEq, Eq, Clone, Copy, TryFromSlice, WriteToBuffer, Dump, CodeTable, FixedSize,
13)]
14#[code_table(
15 file = "def/GRIB2/GRIB2_CodeFlag_4_1_CodeTable_en.csv",
16 format = wmo_grib2_tables,
17 context = crate::Grib2Context,
18 key = (context.discipline,),
19)]
20#[dump(code_table, context = crate::Grib2Context)]
21pub struct ParamCategory(
22 pub u8,
24);
25
26#[derive(
27 Debug, PartialEq, Eq, Clone, Copy, TryFromSlice, WriteToBuffer, Dump, CodeTable, FixedSize,
28)]
29#[code_table(
30 file = "def/GRIB2/GRIB2_CodeFlag_4_2_CodeTable_en.csv",
31 format = wmo_grib2_tables,
32 context = crate::ParameterContext,
33 key = (context.discipline, context.category),
34)]
35#[dump(code_table, context = crate::ParameterContext)]
36pub struct ParamNum(
37 pub u8,
39);
40
41#[derive(
42 Debug, PartialEq, Eq, Clone, Copy, TryFromSlice, WriteToBuffer, Dump, CodeTable, FixedSize,
43)]
44#[code_table(file = "def/GRIB2/GRIB2_CodeFlag_4_3_CodeTable_en.csv", format = wmo_grib2_tables)]
45#[dump(code_table)]
46pub struct GeneratingProcessType(
47 pub u8,
49);
50
51#[derive(
52 Debug, PartialEq, Eq, Clone, Copy, TryFromSlice, WriteToBuffer, Dump, CodeTable, FixedSize,
53)]
54#[code_table(file = "def/GRIB2/GRIB2_CodeFlag_4_4_CodeTable_en.csv", format = wmo_grib2_tables)]
55#[dump(code_table)]
56pub struct TimeRangeUnit(
57 pub u8,
59);
60
61#[derive(Debug, PartialEq, Eq, Clone, Copy, TryFromSlice, WriteToBuffer, Dump, CodeTable)]
62#[code_table(file = "def/GRIB2/GRIB2_CodeFlag_4_5_CodeTable_en.csv", format = wmo_grib2_tables)]
63#[dump(code_table)]
64pub struct FixedSurfaceType(
65 pub u8,
67);
68
69#[derive(Debug, PartialEq, Eq, Clone, Copy, TryFromSlice, WriteToBuffer, Dump, CodeTable)]
70#[code_table(file = "def/GRIB2/GRIB2_CodeFlag_4_6_CodeTable_en.csv", format = wmo_grib2_tables)]
71#[dump(code_table)]
72pub struct EnsembleForecastType(
73 pub u8,
75);
76
77#[derive(Debug, PartialEq, Eq, Clone, Copy, TryFromSlice, WriteToBuffer, Dump, CodeTable)]
78#[code_table(file = "def/GRIB2/GRIB2_CodeFlag_4_7_CodeTable_en.csv", format = wmo_grib2_tables)]
79#[dump(code_table)]
80pub struct DerivedForecastType(
81 pub u8,
83);
84
85#[derive(Debug, PartialEq, Eq, Clone, Copy, TryFromSlice, WriteToBuffer, Dump, CodeTable)]
86#[code_table(file = "def/GRIB2/GRIB2_CodeFlag_4_9_CodeTable_en.csv", format = wmo_grib2_tables)]
87#[dump(code_table)]
88pub struct ProbabilityForecastType(
89 pub u8,
91);
92
93#[derive(Debug, PartialEq, Eq, Clone, Copy, TryFromSlice, WriteToBuffer, Dump, CodeTable)]
94#[code_table(file = "def/GRIB2/GRIB2_CodeFlag_4_10_CodeTable_en.csv", format = wmo_grib2_tables)]
95#[dump(code_table)]
96pub struct StatisticalProcessType(
97 pub u8,
101);
102
103#[derive(Debug, PartialEq, Eq, Clone, Copy, TryFromSlice, WriteToBuffer, Dump, CodeTable)]
104#[code_table(file = "def/GRIB2/GRIB2_CodeFlag_4_11_CodeTable_en.csv", format = wmo_grib2_tables)]
105#[dump(code_table)]
106pub struct TimeIncrementType(
107 pub u8,
110);