67 #include <dballe/message.h> 70 #include <dballe/core/matcher.h> 139 int find_index(
const Level& lev,
const Trange& tr)
const;
155 std::vector<msg::Context*>
data;
166 Msg& operator=(
const Msg& m);
183 std::unique_ptr<Message> clone()
const override;
186 const wreport::Var*
get(wreport::Varcode code,
const Level& lev,
const Trange& tr)
const override;
188 void print(FILE* out)
const override;
189 unsigned diff(
const Message& msg)
const override;
191 void set_datetime(
const Datetime& dt) { m_datetime = dt; }
201 void add_context(std::unique_ptr<msg::Context>&& ctx);
208 bool remove_context(
const Level& lev,
const Trange& tr);
270 wreport::Var* edit(wreport::Varcode code,
const Level& lev,
const Trange& tr);
284 bool remove(wreport::Varcode code,
const Level& lev,
const Trange& tr);
296 const wreport::Var* find_by_id(
int id)
const;
320 wreport::Var* edit_by_id(
int id);
335 void set(
const wreport::Var& var, wreport::Varcode code,
const Level& lev,
const Trange& tr);
345 void set_by_id(
const wreport::Var& var,
int shortcut);
359 void set(std::unique_ptr<wreport::Var>&& var,
const Level& lev,
const Trange& tr);
377 void seti(wreport::Varcode code,
int val,
int conf,
const Level& lev,
const Trange& tr);
395 void setd(wreport::Varcode code,
double val,
int conf,
const Level& lev,
const Trange& tr);
413 void setc(wreport::Varcode code,
const char* val,
int conf,
const Level& lev,
const Trange& tr);
429 void sounding_pack_levels(
Msg& dst)
const;
441 void sounding_unpack_levels(
Msg& dst)
const;
456 void to_csv(std::ostream& out)
const;
459 static void csv_header(std::ostream& out);
464 static MsgType type_from_repmemo(
const char* repmemo);
469 static const char* repmemo_from_type(
MsgType type);
471 #include <dballe/msg/msg-extravars.h> 477 void lua_push(
struct lua_State* L);
484 static Msg* lua_check(
struct lua_State* L,
int idx);
497 matcher::Result match_var_id(
int val)
const override;
498 matcher::Result match_station_id(
int val)
const override;
499 matcher::Result match_station_wmo(
int block,
int station=-1)
const override;
500 matcher::Result match_datetime(
const DatetimeRange& range)
const override;
501 matcher::Result match_coords(
const LatRange& latrange,
const LonRange& lonrange)
const override;
502 matcher::Result match_rep_memo(
const char* memo)
const override;
515 matcher::Result match_var_id(
int val)
const override;
516 matcher::Result match_station_id(
int val)
const override;
517 matcher::Result match_station_wmo(
int block,
int station=-1)
const override;
518 matcher::Result match_datetime(
const DatetimeRange& range)
const override;
519 matcher::Result match_coords(
const LatRange& latrange,
const LonRange& lonrange)
const override;
520 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:106
Metar data.
Definition: msg.h:115
Temp ship sounding data.
Definition: msg.h:109
Match adapter for Messages.
Definition: msg.h:508
Data from unspecified source.
Definition: msg.h:105
Common interface for things that are matched.
Definition: matcher.h:31
Storage for related physical data.
Definition: msg.h:133
Create wreport variables from the DB-All.e B table.
Pilot sounding data.
Definition: msg.h:107
Shortcut IDs and functions to quickly refer to commonly used values inside a ::dba_msg.
Coordinates.
Definition: types.h:320
Information on how a value has been sampled or computed with regards to time.
Definition: types.h:565
A bulletin that has been decoded and physically interpreted.
Definition: message.h:25
MsgType type
Source of the data.
Definition: msg.h:152
Acars airplane data.
Definition: msg.h:112
std::vector< msg::Context * > data
Context in the message.
Definition: msg.h:155
Copyright (C) 2008–2010 ARPA-SIM urpsim@smr.arpa.emr.it
Definition: cmdline.h:17
Airep airplane data.
Definition: msg.h:110
Ident m_ident
Identifier of the contents originator.
Definition: msg.h:146
void messages_to_csv(const Messages &msgs, std::ostream &out)
Output in CSV format.
Vertical level or layer.
Definition: types.h:515
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:490
Buoy measured data.
Definition: msg.h:114
Range of datetimes.
Definition: types.h:255
Range of latitudes.
Definition: types.h:390
Coords m_coords
Reference coordinates for the Msg contents.
Definition: msg.h:144
Ordered collection of messages.
Definition: message.h:64
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:148
Satellite data.
Definition: msg.h:116
Date and time.
Definition: types.h:147
Temp sounding data.
Definition: msg.h:108
Pollution data.
Definition: msg.h:117
Messages messages_from_csv(CSVReader &in)
Read data from a CSV input.
Ship measured data.
Definition: msg.h:113
std::string m_network
Sensor network of origin of the Msg contents.
Definition: msg.h:142
Range of longitudes.
Definition: types.h:464
Datetime get_datetime() const override
Get the reference Datetime for this message.
Definition: msg.h:184
Amdar airplane data.
Definition: msg.h:111
MsgType
Source of the data.
Definition: msg.h:104