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;
45 int ye, mo, da, ho, mi, se;
48 virtual void run() = 0;
54 virtual MsgType scanType(
const wreport::Bulletin& bulletin)
const = 0;
56 void import(
const wreport::Subset& subset,
Msg& msg);
74 void import_var(
const wreport::Var& var);
94 bool height_sensor_seen;
95 bool swell_wave_group;
98 void peek_var(
const wreport::Var& var);
105 int time_period_offset;
106 bool time_period_seen;
112 void peek_var(
const wreport::Var& var,
unsigned pos);
122 const Level& clcmch();
125 void on_vss(
const wreport::Subset& subset,
unsigned pos);
148 void init(
Msg& msg,
bool simplified);
150 void set_gen_sensor(
const wreport::Var& var, wreport::Varcode code,
const Level& defaultLevel,
const Trange& trange);
151 void set_gen_sensor(
const wreport::Var& var,
int shortcut);
152 void set_gen_sensor(
const wreport::Var& var,
int shortcut,
const Trange& tr_std,
bool tr_careful=
false);
153 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);
154 void set_baro_sensor(
const wreport::Var& var,
int shortcut);
155 void set_past_weather(
const wreport::Var& var,
int shortcut);
156 void set_wind(
const wreport::Var& var,
int shortcut);
157 void set_wind_max(
const wreport::Var& var,
int shortcut);
158 void set_pressure(
const wreport::Var& var);
159 void set_water_temperature(
const wreport::Var& var);
160 void set_swell_waves(
const wreport::Var& var);
163 void ib_start(
int shortcut,
const wreport::Var& var);
168 void ib_annotate_level();
169 void ib_annotate_trange();
170 void ib_level_use_real(
const Level& standard) { chosen_lev = lev_real(standard); }
171 void ib_trange_use_real(
const Trange& standard) { chosen_tr = tr_real(standard); }
172 void ib_level_use_shorcut_and_discard_rest() { chosen_lev = lev_shortcut(); }
173 void ib_trange_use_shortcut_and_discard_rest() { chosen_tr = tr_shortcut(); }
174 void ib_level_use_shorcut_and_preserve_rest(
const Level& standard);
175 void ib_trange_use_shorcut_and_preserve_rest(
const Trange& standard);
176 void ib_level_use_standard_and_preserve_rest(
const Level& standard);
177 void ib_trange_use_standard_and_preserve_rest(
const Trange& standard);
178 void ib_level_use_shorcut_if_standard_else_real(
const Level& standard);
179 void ib_trange_use_shorcut_if_standard_else_real(
const Trange& standard);
194 virtual void peek_var(
const wreport::Var& var);
195 virtual void import_var(
const wreport::Var& var);
Storage for related physical data.
Definition: msg.h:133
int p2
Time range P2 indicator.
Definition: vars.h:38
Information on how a value has been sampled or computed with regards to time.
Definition: types.h:565
Keep track of level context changes.
Definition: base.h:88
Copyright (C) 2008–2010 ARPA-SIM urpsim@smr.arpa.emr.it
Definition: cmdline.h:17
int l2
L2 value of the level.
Definition: vars.h:32
Vertical level or layer.
Definition: types.h:515
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:118
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:102
int ltype1
Type of the first level.
Definition: vars.h:26
Definition: conversion.h:6
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:186
MsgType
Source of the data.
Definition: msg.h:104
int pind
Time range type indicator.
Definition: vars.h:34