4 #include <dballe/message.h> 7 #include <dballe/core/matcher.h> 29 Messages messages_from_csv(CSVReader& in);
34 void messages_to_csv(
const Messages& msgs, CSVWriter& out);
76 int find_index(
const Level& lev,
const Trange& tr)
const;
92 std::vector<msg::Context*>
data;
103 Msg& operator=(
const Msg& m);
120 std::unique_ptr<Message> clone()
const override;
125 void print(FILE* out)
const override;
126 unsigned diff(
const Message& msg)
const override;
128 void set_rep_memo(
const std::string& r) { m_rep_memo = r; }
129 void set_coords(
const Coords& c) { m_coords = c; }
130 void set_ident(
const Ident& i) { m_ident = i; }
131 void set_datetime(
const Datetime& dt) { m_datetime = dt; }
141 void add_context(std::unique_ptr<msg::Context>&& ctx);
148 bool remove_context(
const Level& lev,
const Trange& tr);
293 void set(std::unique_ptr<wreport::Var>&& var,
const Level& lev,
const Trange& tr);
363 void sounding_pack_levels(
Msg& dst)
const;
375 void sounding_unpack_levels(
Msg& dst)
const;
396 static MsgType type_from_repmemo(
const char* repmemo);
401 static const char* repmemo_from_type(
MsgType type);
403 #include <dballe/msg/msg-extravars.h> 409 void lua_push(
struct lua_State* L);
416 static Msg* lua_check(
struct lua_State* L,
int idx);
429 matcher::Result match_var_id(
int val)
const override;
430 matcher::Result match_station_id(
int val)
const override;
431 matcher::Result match_station_wmo(
int block,
int station=-1)
const override;
432 matcher::Result match_datetime(
const DatetimeRange& range)
const override;
433 matcher::Result match_coords(
const LatRange& latrange,
const LonRange& lonrange)
const override;
434 matcher::Result match_rep_memo(
const char* memo)
const override;
447 matcher::Result match_var_id(
int val)
const override;
448 matcher::Result match_station_id(
int val)
const override;
449 matcher::Result match_station_wmo(
int block,
int station=-1)
const override;
450 matcher::Result match_datetime(
const DatetimeRange& range)
const override;
451 matcher::Result match_coords(
const LatRange& latrange,
const LonRange& lonrange)
const override;
452 matcher::Result match_rep_memo(
const char* memo)
const override;
Store an array of physical data all on the same level.
Definition: context.h:44
Synop measured data.
Definition: msg.h:43
Metar data.
Definition: msg.h:52
Temp ship sounding data.
Definition: msg.h:46
Match adapter for Messages.
Definition: msg.h:440
Data from unspecified source.
Definition: msg.h:42
Common interface for things that are matched.
Definition: matcher.h:31
Storage for related physical data.
Definition: msg.h:70
Create wreport variables from the DB-All.e B table.
Pilot sounding data.
Definition: msg.h:44
Shortcut IDs and functions to quickly refer to commonly used values inside a dballe::msg::Msg.
Coordinates.
Definition: types.h:337
Information on how a value has been sampled or computed with regards to time.
Definition: types.h:587
A bulletin that has been decoded and physically interpreted.
Definition: message.h:28
MsgType type
Source of the data.
Definition: msg.h:89
Acars airplane data.
Definition: msg.h:49
std::vector< msg::Context * > data
Context in the message.
Definition: msg.h:92
Copyright (C) 2008–2010 ARPA-SIM urpsim@smr.arpa.emr.it
Definition: cmdline.h:17
Airep airplane data.
Definition: msg.h:47
Ident m_ident
Identifier of the contents originator.
Definition: msg.h:83
std::string m_rep_memo
Sensor network of origin of the Msg contents.
Definition: msg.h:79
Vertical level or layer.
Definition: types.h:532
A station identifier, that can be any string (including the empty string) or a missing value...
Definition: core/defs.h:19
Match adapter for Msg.
Definition: msg.h:422
Buoy measured data.
Definition: msg.h:51
Range of datetimes.
Definition: types.h:272
Range of latitudes.
Definition: types.h:407
Coords m_coords
Reference coordinates for the Msg contents.
Definition: msg.h:81
Ordered collection of messages.
Definition: message.h:67
const char * msg_type_name(MsgType type)
Return a string with the name of a dba_msg_type.
Datetime m_datetime
Reference time for the Msg contents.
Definition: msg.h:85
Satellite data.
Definition: msg.h:53
Date and time.
Definition: types.h:158
Temp sounding data.
Definition: msg.h:45
Pollution data.
Definition: msg.h:54
Ship measured data.
Definition: msg.h:50
Range of longitudes.
Definition: types.h:481
Datetime get_datetime() const override
Get the reference Datetime for this message.
Definition: msg.h:121
Amdar airplane data.
Definition: msg.h:48
MsgType
Source of the data.
Definition: msg.h:41