22 #ifndef DBALLE_MSG_WR_CODEC_H
23 #define DBALLE_MSG_WR_CODEC_H
27 #include <wreport/varinfo.h>
80 virtual void to_bulletin(
const Msgs& msgs, wreport::Bulletin& msg)
const;
95 virtual std::auto_ptr<wreport::Bulletin>
make_bulletin()
const;
105 virtual std::auto_ptr<wreport::Bulletin>
make_bulletin()
const;
110 struct TemplateRegistry;
115 virtual void setupBulletin(wreport::Bulletin& bulletin);
116 virtual void to_subset(
const Msg& msg, wreport::Subset& subset);
118 void add(wreport::Varcode code,
const msg::Context* ctx,
int shortcut)
const;
119 void add(wreport::Varcode code,
const msg::Context* ctx, wreport::Varcode srccode)
const;
120 void add(wreport::Varcode code,
const msg::Context* ctx)
const;
121 void add(wreport::Varcode code,
int shortcut)
const;
122 void add(wreport::Varcode code, wreport::Varcode srccode,
const Level& level,
const Trange& trange)
const;
123 void add(wreport::Varcode code,
const wreport::Var* var)
const;
125 void add_st_name(wreport::Varcode dstcode,
const msg::Context* ctx)
const;
127 void do_ecmwf_past_wtr()
const;
128 void do_D01001()
const;
129 void do_D01004()
const;
130 void do_D01011()
const;
131 int do_D01012()
const;
132 void do_D01013()
const;
133 void do_D01021()
const;
134 void do_D01022()
const;
142 wreport::Subset* subset;
145 : opts(opts), msgs(msgs), msg(0), subset(0) {}
148 virtual const char* name()
const = 0;
149 virtual const char* description()
const = 0;
150 virtual void to_bulletin(wreport::Bulletin& bulletin);
156 std::string description;
183 #include <dballe/bufrex/msg.h>
199 dba_err bufrex_encode_bufr(dba_msgs msgs,
int type,
int subtype,
int localsubtype, dba_rawmsg* raw);
215 dba_err bufrex_encode_crex(dba_msgs msgs,
int type,
int subtype, dba_rawmsg* raw);
228 dba_err bufrex_msg_from_dba_msg(bufrex_msg raw, dba_msg msg);
240 dba_err bufrex_msg_from_dba_msgs(bufrex_msg raw, dba_msgs msgs);
254 dba_err bufrex_msg_to_dba_msgs(bufrex_msg raw, dba_msg_codec_options opts, dba_msgs* msgs);
269 dba_err bufrex_infer_type_subtype(dba_msg msg,
int* type,
int* subtype,
int* localsubtype);
Store an array of physical data all on the same level.
Definition: msg/context.h:44
Definition: wr_codec.h:153
Definition: wr_codec.h:42
Storage for related physical data.
Definition: msg.h:119
virtual void from_rawmsg(const Rawmsg &msg, Msgs &msgs) const
Decode a message from its raw encoded representation.
Message importer.
Definition: codec.h:53
virtual std::auto_ptr< wreport::Bulletin > make_bulletin() const
Create a bulletin that works with this exporter.
Definition: wr_codec.h:162
virtual void from_rawmsg(const Rawmsg &msg, Msgs &msgs) const
Decode a message from its raw encoded representation.
Definition: wr_codec.h:112
virtual void to_rawmsg(const Msgs &msgs, Rawmsg &msg) const
Encode a message.
Abstraction for a weather report message which is independent from the encoding, used to make sense o...
virtual std::auto_ptr< wreport::Bulletin > make_bulletin() const
Create a bulletin that works with this exporter.
In-memory storage of an encoded weather report.
Definition: wr_codec.h:62
Definition: wr_codec.h:98
Definition: conversion.h:31
Dynamic array of dba_msg.
Definition: msgs.h:38
Definition: wr_codec.h:53
Annotated string buffer for encoded messages.
Definition: rawmsg.h:38
virtual void from_bulletin(const wreport::Bulletin &msg, Msgs &msgs) const
Import a decoded BUFR/CREX message.
Definition: wr_codec.h:88
Message exporter.
Definition: codec.h:111
Definition: wr_codec.h:72
std::string infer_template(const Msgs &msgs) const
Infer a template name from the message contents.
Dynamic array of dba_msg.
virtual void to_bulletin(const Msgs &msgs, wreport::Bulletin &msg) const
Import a decoded BUFR/CREX message.
virtual void to_rawmsg(const Msgs &msgs, Rawmsg &msg) const
Encode a message.