1#ifndef DBALLE_MSG_WRIMPORTER_BASE_H
2#define DBALLE_MSG_WRIMPORTER_BASE_H
5#include <dballe/msg/fwd.h>
6#include <dballe/msg/wr_codec.h>
30 virtual void postprocess();
38 virtual ~Importer() {}
45 static std::unique_ptr<Importer>
48 static std::unique_ptr<Importer>
51 static std::unique_ptr<Importer>
53 static std::unique_ptr<Importer>
56 static std::unique_ptr<Importer>
58 static std::unique_ptr<Importer>
62class WMOImporter :
public Importer
77 ~WMOImporter()
override {}
83 static constexpr double missing = std::numeric_limits<double>::max();
89 bool height_sensor_seen;
90 bool swell_wave_group;
100 int time_period_offset;
101 bool time_period_seen;
117 const Level& clcmch();
139 bool is_unsupported()
const;
151 std::unique_ptr<wreport::Var>
var;
175 virtual void set_sensor_height(
const LevelContext& ctx) = 0;
176 virtual void set_barometer_height(
const LevelContext& ctx) = 0;
184 void set_sensor_height(
const LevelContext& ctx)
override;
185 void set_barometer_height(
const LevelContext& ctx)
override;
193 void set_sensor_height(
const LevelContext& ctx)
override;
194 void set_barometer_height(
const LevelContext& ctx)
override;
199template <
typename... Args>
200std::unique_ptr<Interpreted> create_interpreted(
bool simplified, Args&&... args)
203 return std::unique_ptr<Interpreted>(
206 return std::unique_ptr<Interpreted>(
213class SynopBaseImporter :
public WMOImporter
220 std::vector<Interpreted*> queued;
225 void set_gen_sensor(
const wreport::Var& var, wreport::Varcode code,
236 void set(std::unique_ptr<Interpreted> val);
240 ~SynopBaseImporter()
override;
242 void init()
override;
Options to control message import.
Definition importer.h:25
Storage for related physical data.
Definition msg.h:134
Vertical level or layer.
Definition types.h:625
Information on how a value has been sampled or computed with regards to time.
Definition types.h:689
Definition shortcuts.h:12
Keep track of the current cloud metadata.
Definition base.h:114
Interpreted(const Shortcut &shortcut, const wreport::Var &var)
Beging building using a copy of var, and level and timerange from shortcut.
Interpreted(const Shortcut &shortcut, const wreport::Var &var)
Beging building using a copy of var, and level and timerange from shortcut.
Interpreted(const Shortcut &shortcut, const wreport::Var &var)
Beging building using a copy of var, and level and timerange from shortcut.
std::unique_ptr< wreport::Var > var
Interpreted value being built.
Definition base.h:151
unsigned level_deviation
Distance from the standard level to the real one.
Definition base.h:162
Trange trange
Interpreted time range.
Definition base.h:155
Level level
Interpreted level.
Definition base.h:153
Keep track of level context changes.
Definition base.h:82
Keep track of time range context changes.
Definition base.h:98
Check if the current context state of BUFR information is something that we currently cannot handle.
Definition base.h:136