1#ifndef DBALLE_MSG_WRIMPORTER_BASE_H
2#define DBALLE_MSG_WRIMPORTER_BASE_H
4#include <dballe/msg/wr_codec.h>
5#include <dballe/msg/fwd.h>
28 virtual void run() = 0;
35 virtual ~Importer() {}
52class WMOImporter :
public Importer
67 virtual ~WMOImporter() {}
73 static constexpr double missing = std::numeric_limits<double>::max();
79 bool height_sensor_seen;
80 bool swell_wave_group;
90 int time_period_offset;
91 bool time_period_seen;
107 const Level& clcmch();
129 bool is_unsupported()
const;
141 std::unique_ptr<wreport::Var>
var;
163 virtual void set_sensor_height(
const LevelContext& ctx) = 0;
164 virtual void set_barometer_height(
const LevelContext& ctx) = 0;
172 void set_sensor_height(
const LevelContext& ctx)
override;
173 void set_barometer_height(
const LevelContext& ctx)
override;
181 void set_sensor_height(
const LevelContext& ctx)
override;
182 void set_barometer_height(
const LevelContext& ctx)
override;
187template<
typename ...Args>
188std::unique_ptr<Interpreted> create_interpreted(
bool simplified, Args&& ...args)
193 return std::unique_ptr<Interpreted>(
new InterpretedPrecise(std::forward<Args>(args)...));
199class SynopBaseImporter :
public WMOImporter
206 std::vector<Interpreted*> queued;
220 void set(std::unique_ptr<Interpreted> val);
224 ~SynopBaseImporter();
226 void init()
override;
Options to control message import.
Definition importer.h:25
Storage for related physical data.
Definition msg.h:131
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:687
Definition shortcuts.h:12
Keep track of the current cloud metadata.
Definition base.h:104
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:141
unsigned level_deviation
Distance from the standard level to the real one.
Definition base.h:152
Trange trange
Interpreted time range.
Definition base.h:145
Level level
Interpreted level.
Definition base.h:143
Keep track of level context changes.
Definition base.h:72
Keep track of time range context changes.
Definition base.h:88
Check if the current context state of BUFR information is something that we currently cannot handle.
Definition base.h:126