22 #ifndef DBALLE_MSG_WRIMPORTER_BASE_H
23 #define DBALLE_MSG_WRIMPORTER_BASE_H
25 #include <dballe/msg/wr_codec.h>
43 const wreport::Subset* subset;
46 virtual void init() {}
47 virtual void run() = 0;
53 virtual MsgType scanType(
const wreport::Bulletin& bulletin)
const = 0;
55 void import(
const wreport::Subset& subset,
Msg& msg)
57 this->subset = ⊂
79 void import_var(
const wreport::Var& var);
99 bool height_sensor_seen;
100 bool swell_wave_group;
103 void peek_var(
const wreport::Var& var);
110 int time_period_offset;
111 bool time_period_seen;
117 void peek_var(
const wreport::Var& var,
unsigned pos);
127 const Level& clcmch();
130 void on_vss(
const wreport::Subset& subset,
unsigned pos);
153 void init(
Msg& msg,
bool simplified);
155 void set_gen_sensor(
const wreport::Var& var, wreport::Varcode code,
const Level& defaultLevel,
const Trange& trange);
156 void set_gen_sensor(
const wreport::Var& var,
int shortcut);
157 void set_gen_sensor(
const wreport::Var& var,
int shortcut,
const Trange& tr_std,
bool tr_careful=
false);
158 void set_gen_sensor(
const wreport::Var& var,
int shortcut,
const Level& lev_std,
const Trange& tr_std,
bool lev_careful=
false,
bool tr_careful=
false);
159 void set_baro_sensor(
const wreport::Var& var,
int shortcut);
160 void set_past_weather(
const wreport::Var& var,
int shortcut);
161 void set_wind(
const wreport::Var& var,
int shortcut);
162 void set_wind_max(
const wreport::Var& var,
int shortcut);
163 void set_pressure(
const wreport::Var& var);
164 void set_water_temperature(
const wreport::Var& var);
165 void set_swell_waves(
const wreport::Var& var);
168 void ib_start(
int shortcut,
const wreport::Var& var);
173 void ib_annotate_level();
174 void ib_annotate_trange();
175 void ib_level_use_real(
const Level& standard) { chosen_lev = lev_real(standard); }
176 void ib_trange_use_real(
const Trange& standard) { chosen_tr = tr_real(standard); }
177 void ib_level_use_shorcut_and_discard_rest() { chosen_lev = lev_shortcut(); }
178 void ib_trange_use_shortcut_and_discard_rest() { chosen_tr = tr_shortcut(); }
179 void ib_level_use_shorcut_and_preserve_rest(
const Level& standard);
180 void ib_trange_use_shorcut_and_preserve_rest(
const Trange& standard);
181 void ib_level_use_standard_and_preserve_rest(
const Level& standard);
182 void ib_trange_use_standard_and_preserve_rest(
const Trange& standard);
183 void ib_level_use_shorcut_if_standard_else_real(
const Level& standard);
184 void ib_trange_use_shorcut_if_standard_else_real(
const Trange& standard);
199 virtual void peek_var(
const wreport::Var& var);
200 virtual void import_var(
const wreport::Var& var);
Storage for related physical data.
Definition: msg.h:119
int p2
Time range P2 indicator.
Definition: vars.h:38
Keep track of level context changes.
Definition: base.h:93
int l2
L2 value of the level.
Definition: vars.h:32
int p1
Time range P1 indicator.
Definition: vars.h:36
Abstraction for a weather report message which is independent from the encoding, used to make sense o...
Keep track of the current cloud metadata.
Definition: base.h:123
int ltype2
Type of the second level.
Definition: vars.h:30
Full data corresponding to a shortcut ID.
Definition: vars.h:22
Keep track of time range context changes.
Definition: base.h:107
int ltype1
Type of the first level.
Definition: vars.h:26
Definition: conversion.h:31
int l1
L1 value of the level.
Definition: vars.h:28
Base class for synop, ship and other importer with synop-like data.
Definition: base.h:191
int pind
Time range type indicator.
Definition: vars.h:34