libdballe  9.11
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | List of all members
dballe::impl::Message Class Reference

Storage for related physical data. More...

#include <msg.h>

Inheritance diagram for dballe::impl::Message:
dballe::Message

Public Member Functions

 Message (const Message &)=default
 
 Message (Message &&)=default
 
Messageoperator= (const Message &m)=default
 
Messageoperator= (Message &&m)=default
 
std::shared_ptr< dballe::Messageclone () const override
 Return a copy of this message.
 
Datetime get_datetime () const override
 Get the reference Datetime for this message.
 
Coords get_coords () const override
 Get the reference coordinates for this message.
 
Ident get_ident () const override
 Get the station identifier for this message.
 
std::string get_report () const override
 Get the report for this message.
 
MessageType get_type () const override
 Return the type of the data in the message.
 
bool foreach_var (std::function< bool(const Level &, const Trange &, const wreport::Var &)>) const override
 Iterate the contents of the message.
 
void print (FILE *out) const override
 Print all the contents of this message to an output stream.
 
unsigned diff (const dballe::Message &msg) const override
 Compute the differences between two Messages. More...
 
void clear ()
 Reset the messages as if it was just created.
 
const wreport::Varget (const Shortcut &shortcut) const
 Find a datum given its shortcut. More...
 
void set (const Shortcut &shortcut, const wreport::Var &var)
 Add or replace a value. More...
 
void set_datetime (const Datetime &dt)
 Shortcut to set year...second variables in a single call.
 
bool remove_context (const Level &lev, const Trange &tr)
 Remove a context from the message. More...
 
const msg::Contextfind_context (const Level &lev, const Trange &tr) const
 Find a msg::Context given its description. More...
 
const Valuesfind_station_context () const
 Find the station info context. More...
 
msg::Contextedit_context (const Level &lev, const Trange &tr)
 Find a msg::Context given its description. More...
 
msg::Contextobtain_context (const Level &lev, const Trange &tr)
 Find a msg::Context given its description, creating it if it does not exist. More...
 
wreport::Varedit (wreport::Varcode code, const Level &lev, const Trange &tr)
 Find a variable given its description. More...
 
void sounding_pack_levels ()
 Remove the sounding significance from the level descriptions and pack together the data at the same pressure level. More...
 
bool from_csv (CSVReader &in)
 Read data from a CSV input. More...
 
void to_csv (CSVWriter &out) const
 Output in CSV format.
 
std::shared_ptr< dballe::CursorStationquery_stations (const Query &query) const override
 Return a Cursor to access the station information in the message. More...
 
std::shared_ptr< dballe::CursorStationDataquery_station_data (const Query &query) const override
 Query the station variables in the message. More...
 
std::shared_ptr< dballe::CursorDataquery_data (const Query &query) const override
 Query the variables in the message. More...
 
std::shared_ptr< dballe::CursorDataquery_station_and_data (const Query &query) const
 
void set_st_type (int val, int conf=-1)
 Set the value of "Type of station" from a variable of type int.
 
void set_st_type_var (const wreport::Var &val)
 Set the value of "Type of station" from a wreport::Var.
 
const wreport::Varget_st_type_var () const
 Get the "Type of station" physical value stored in the message.
 
void set_st_name (const char *val, int conf=-1)
 Set the value of "Station or site name" from a variable of type const char*.
 
void set_st_name_var (const wreport::Var &val)
 Set the value of "Station or site name" from a wreport::Var.
 
const wreport::Varget_st_name_var () const
 Get the "Station or site name" physical value stored in the message.
 
void set_st_name_icao (const char *val, int conf=-1)
 Set the value of "ICAO location indicator" from a variable of type const char*.
 
void set_st_name_icao_var (const wreport::Var &val)
 Set the value of "ICAO location indicator" from a wreport::Var.
 
const wreport::Varget_st_name_icao_var () const
 Get the "ICAO location indicator" physical value stored in the message.
 
void set_rep_memo (const char *val, int conf=-1)
 Set the value of "Report mnemonic" from a variable of type const char*.
 
void set_rep_memo_var (const wreport::Var &val)
 Set the value of "Report mnemonic" from a wreport::Var.
 
const wreport::Varget_rep_memo_var () const
 Get the "Report mnemonic" physical value stored in the message.
 
void set_report (const char *val, int conf=-1)
 Set the value of "Report mnemonic" from a variable of type const char*.
 
void set_report_var (const wreport::Var &val)
 Set the value of "Report mnemonic" from a wreport::Var.
 
const wreport::Varget_report_var () const
 Get the "Report mnemonic" physical value stored in the message.
 
void set_network (const char *val, int conf=-1)
 Set the value of "Report mnemonic" from a variable of type const char*.
 
void set_network_var (const wreport::Var &val)
 Set the value of "Report mnemonic" from a wreport::Var.
 
const wreport::Varget_network_var () const
 Get the "Report mnemonic" physical value stored in the message.
 
void set_poll_lcode (int val, int conf=-1)
 Set the value of "Air quality observing station local code" from a variable of type int.
 
void set_poll_lcode_var (const wreport::Var &val)
 Set the value of "Air quality observing station local code" from a wreport::Var.
 
const wreport::Varget_poll_lcode_var () const
 Get the "Air quality observing station local code" physical value stored in the message.
 
void set_poll_scode (int val, int conf=-1)
 Set the value of "Airbase air quality observing station code" from a variable of type int.
 
void set_poll_scode_var (const wreport::Var &val)
 Set the value of "Airbase air quality observing station code" from a wreport::Var.
 
const wreport::Varget_poll_scode_var () const
 Get the "Airbase air quality observing station code" physical value stored in the message.
 
void set_poll_gemscode (int val, int conf=-1)
 Set the value of "GEMS air quality observing station code" from a variable of type int.
 
void set_poll_gemscode_var (const wreport::Var &val)
 Set the value of "GEMS air quality observing station code" from a wreport::Var.
 
const wreport::Varget_poll_gemscode_var () const
 Get the "GEMS air quality observing station code" physical value stored in the message.
 
void set_poll_source (int val, int conf=-1)
 Set the value of "Air quality observing station dominant emission source" from a variable of type int.
 
void set_poll_source_var (const wreport::Var &val)
 Set the value of "Air quality observing station dominant emission source" from a wreport::Var.
 
const wreport::Varget_poll_source_var () const
 Get the "Air quality observing station dominant emission source" physical value stored in the message.
 
void set_poll_atype (int val, int conf=-1)
 Set the value of "Air quality observing station area type" from a variable of type int.
 
void set_poll_atype_var (const wreport::Var &val)
 Set the value of "Air quality observing station area type" from a wreport::Var.
 
const wreport::Varget_poll_atype_var () const
 Get the "Air quality observing station area type" physical value stored in the message.
 
void set_poll_ttype (int val, int conf=-1)
 Set the value of "Air quality observing station terrain type" from a variable of type int.
 
void set_poll_ttype_var (const wreport::Var &val)
 Set the value of "Air quality observing station terrain type" from a wreport::Var.
 
const wreport::Varget_poll_ttype_var () const
 Get the "Air quality observing station terrain type" physical value stored in the message.
 
void set_flight_reg_no (const char *val, int conf=-1)
 Set the value of "Aircraft registration number or other identification" from a variable of type const char*.
 
void set_flight_reg_no_var (const wreport::Var &val)
 Set the value of "Aircraft registration number or other identification" from a wreport::Var.
 
const wreport::Varget_flight_reg_no_var () const
 Get the "Aircraft registration number or other identification" physical value stored in the message.
 
void set_flight_phase (int val, int conf=-1)
 Set the value of "Phase of aircraft flight" from a variable of type int.
 
void set_flight_phase_var (const wreport::Var &val)
 Set the value of "Phase of aircraft flight" from a wreport::Var.
 
const wreport::Varget_flight_phase_var () const
 Get the "Phase of aircraft flight" physical value stored in the message.
 
void set_flight_roll (double val, int conf=-1)
 Set the value of "Aircraft roll angle" from a variable of type double.
 
void set_flight_roll_var (const wreport::Var &val)
 Set the value of "Aircraft roll angle" from a wreport::Var.
 
const wreport::Varget_flight_roll_var () const
 Get the "Aircraft roll angle" physical value stored in the message.
 
void set_navsys (int val, int conf=-1)
 Set the value of "Aircraft navigational system" from a variable of type int.
 
void set_navsys_var (const wreport::Var &val)
 Set the value of "Aircraft navigational system" from a wreport::Var.
 
const wreport::Varget_navsys_var () const
 Get the "Aircraft navigational system" physical value stored in the message.
 
void set_data_relay (int val, int conf=-1)
 Set the value of "Aircraft data relay system" from a variable of type int.
 
void set_data_relay_var (const wreport::Var &val)
 Set the value of "Aircraft data relay system" from a wreport::Var.
 
const wreport::Varget_data_relay_var () const
 Get the "Aircraft data relay system" physical value stored in the message.
 
void set_wind_inst (int val, int conf=-1)
 Set the value of "Type of instrumentation for wind measurement" from a variable of type int.
 
void set_wind_inst_var (const wreport::Var &val)
 Set the value of "Type of instrumentation for wind measurement" from a wreport::Var.
 
const wreport::Varget_wind_inst_var () const
 Get the "Type of instrumentation for wind measurement" physical value stored in the message.
 
void set_temp_precision (double val, int conf=-1)
 Set the value of "Precision of temperature observation" from a variable of type double.
 
void set_temp_precision_var (const wreport::Var &val)
 Set the value of "Precision of temperature observation" from a wreport::Var.
 
const wreport::Varget_temp_precision_var () const
 Get the "Precision of temperature observation" physical value stored in the message.
 
void set_latlon_spec (int val, int conf=-1)
 Set the value of "Original specification of latitude/longitude" from a variable of type int.
 
void set_latlon_spec_var (const wreport::Var &val)
 Set the value of "Original specification of latitude/longitude" from a wreport::Var.
 
const wreport::Varget_latlon_spec_var () const
 Get the "Original specification of latitude/longitude" physical value stored in the message.
 
void set_timesig (int val, int conf=-1)
 Set the value of "Time significance" from a variable of type int.
 
void set_timesig_var (const wreport::Var &val)
 Set the value of "Time significance" from a wreport::Var.
 
const wreport::Varget_timesig_var () const
 Get the "Time significance" physical value stored in the message.
 
void set_block (int val, int conf=-1)
 Set the value of "WMO block number" from a variable of type int.
 
void set_block_var (const wreport::Var &val)
 Set the value of "WMO block number" from a wreport::Var.
 
const wreport::Varget_block_var () const
 Get the "WMO block number" physical value stored in the message.
 
void set_station (int val, int conf=-1)
 Set the value of "WMO station number" from a variable of type int.
 
void set_station_var (const wreport::Var &val)
 Set the value of "WMO station number" from a wreport::Var.
 
const wreport::Varget_station_var () const
 Get the "WMO station number" physical value stored in the message.
 
void set_ident (const char *val, int conf=-1)
 Set the value of "Mobile station identifier" from a variable of type const char*.
 
void set_ident_var (const wreport::Var &val)
 Set the value of "Mobile station identifier" from a wreport::Var.
 
const wreport::Varget_ident_var () const
 Get the "Mobile station identifier" physical value stored in the message.
 
void set_year (int val, int conf=-1)
 Set the value of "Year of the observation" from a variable of type int.
 
void set_year_var (const wreport::Var &val)
 Set the value of "Year of the observation" from a wreport::Var.
 
const wreport::Varget_year_var () const
 Get the "Year of the observation" physical value stored in the message.
 
void set_month (int val, int conf=-1)
 Set the value of "Month of the observation" from a variable of type int.
 
void set_month_var (const wreport::Var &val)
 Set the value of "Month of the observation" from a wreport::Var.
 
const wreport::Varget_month_var () const
 Get the "Month of the observation" physical value stored in the message.
 
void set_day (int val, int conf=-1)
 Set the value of "Day of the observation" from a variable of type int.
 
void set_day_var (const wreport::Var &val)
 Set the value of "Day of the observation" from a wreport::Var.
 
const wreport::Varget_day_var () const
 Get the "Day of the observation" physical value stored in the message.
 
void set_hour (int val, int conf=-1)
 Set the value of "Hour of the observation" from a variable of type int.
 
void set_hour_var (const wreport::Var &val)
 Set the value of "Hour of the observation" from a wreport::Var.
 
const wreport::Varget_hour_var () const
 Get the "Hour of the observation" physical value stored in the message.
 
void set_minute (int val, int conf=-1)
 Set the value of "Minute of the observation" from a variable of type int.
 
void set_minute_var (const wreport::Var &val)
 Set the value of "Minute of the observation" from a wreport::Var.
 
const wreport::Varget_minute_var () const
 Get the "Minute of the observation" physical value stored in the message.
 
void set_second (int val, int conf=-1)
 Set the value of "Second of the observation" from a variable of type int.
 
void set_second_var (const wreport::Var &val)
 Set the value of "Second of the observation" from a wreport::Var.
 
const wreport::Varget_second_var () const
 Get the "Second of the observation" physical value stored in the message.
 
void set_latitude (double val, int conf=-1)
 Set the value of "Latitude of the station" from a variable of type double.
 
void set_latitude_var (const wreport::Var &val)
 Set the value of "Latitude of the station" from a wreport::Var.
 
const wreport::Varget_latitude_var () const
 Get the "Latitude of the station" physical value stored in the message.
 
void set_longitude (double val, int conf=-1)
 Set the value of "Longiture of the station" from a variable of type double.
 
void set_longitude_var (const wreport::Var &val)
 Set the value of "Longiture of the station" from a wreport::Var.
 
const wreport::Varget_longitude_var () const
 Get the "Longiture of the station" physical value stored in the message.
 
void set_height_station (double val, int conf=-1)
 Set the value of "Height of station" from a variable of type double.
 
void set_height_station_var (const wreport::Var &val)
 Set the value of "Height of station" from a wreport::Var.
 
const wreport::Varget_height_station_var () const
 Get the "Height of station" physical value stored in the message.
 
void set_height_baro (double val, int conf=-1)
 Set the value of "Height of barometer above mean sea level" from a variable of type double.
 
void set_height_baro_var (const wreport::Var &val)
 Set the value of "Height of barometer above mean sea level" from a wreport::Var.
 
const wreport::Varget_height_baro_var () const
 Get the "Height of barometer above mean sea level" physical value stored in the message.
 
void set_height_release (double val, int conf=-1)
 Set the value of "Height of release of sonde above msl" from a variable of type double.
 
void set_height_release_var (const wreport::Var &val)
 Set the value of "Height of release of sonde above msl" from a wreport::Var.
 
const wreport::Varget_height_release_var () const
 Get the "Height of release of sonde above msl" physical value stored in the message.
 
void set_station_height_quality (int val, int conf=-1)
 Set the value of "Station elevation quality mark (for mobile stations)" from a variable of type int.
 
void set_station_height_quality_var (const wreport::Var &val)
 Set the value of "Station elevation quality mark (for mobile stations)" from a wreport::Var.
 
const wreport::Varget_station_height_quality_var () const
 Get the "Station elevation quality mark (for mobile stations)" physical value stored in the message.
 
void set_isobaric_surface (double val, int conf=-1)
 Set the value of "Isobaric surface" from a variable of type double.
 
void set_isobaric_surface_var (const wreport::Var &val)
 Set the value of "Isobaric surface" from a wreport::Var.
 
const wreport::Varget_isobaric_surface_var () const
 Get the "Isobaric surface" physical value stored in the message.
 
void set_st_dir (int val, int conf=-1)
 Set the value of "Direction of motion of moving observing platform" from a variable of type int.
 
void set_st_dir_var (const wreport::Var &val)
 Set the value of "Direction of motion of moving observing platform" from a wreport::Var.
 
const wreport::Varget_st_dir_var () const
 Get the "Direction of motion of moving observing platform" physical value stored in the message.
 
void set_st_speed (int val, int conf=-1)
 Set the value of "Speed of motion of moving observing platform" from a variable of type int.
 
void set_st_speed_var (const wreport::Var &val)
 Set the value of "Speed of motion of moving observing platform" from a wreport::Var.
 
const wreport::Varget_st_speed_var () const
 Get the "Speed of motion of moving observing platform" physical value stored in the message.
 
void set_meas_equip_type (int val, int conf=-1)
 Set the value of "Type of measuring equipment used" from a variable of type int.
 
void set_meas_equip_type_var (const wreport::Var &val)
 Set the value of "Type of measuring equipment used" from a wreport::Var.
 
const wreport::Varget_meas_equip_type_var () const
 Get the "Type of measuring equipment used" physical value stored in the message.
 
void set_sonde_type (int val, int conf=-1)
 Set the value of "Radiosonde type" from a variable of type int.
 
void set_sonde_type_var (const wreport::Var &val)
 Set the value of "Radiosonde type" from a wreport::Var.
 
const wreport::Varget_sonde_type_var () const
 Get the "Radiosonde type" physical value stored in the message.
 
void set_sonde_method (int val, int conf=-1)
 Set the value of "Radiosonde computational method" from a variable of type int.
 
void set_sonde_method_var (const wreport::Var &val)
 Set the value of "Radiosonde computational method" from a wreport::Var.
 
const wreport::Varget_sonde_method_var () const
 Get the "Radiosonde computational method" physical value stored in the message.
 
void set_sonde_correction (int val, int conf=-1)
 Set the value of "Solar and infrared radiation correction" from a variable of type int.
 
void set_sonde_correction_var (const wreport::Var &val)
 Set the value of "Solar and infrared radiation correction" from a wreport::Var.
 
const wreport::Varget_sonde_correction_var () const
 Get the "Solar and infrared radiation correction" physical value stored in the message.
 
void set_sonde_tracking (int val, int conf=-1)
 Set the value of "Tracking technique/status of system used" from a variable of type int.
 
void set_sonde_tracking_var (const wreport::Var &val)
 Set the value of "Tracking technique/status of system used" from a wreport::Var.
 
const wreport::Varget_sonde_tracking_var () const
 Get the "Tracking technique/status of system used" physical value stored in the message.
 
void set_press (double val, int conf=-1)
 Set the value of "Pressure at ground level" from a variable of type double.
 
void set_press_var (const wreport::Var &val)
 Set the value of "Pressure at ground level" from a wreport::Var.
 
const wreport::Varget_press_var () const
 Get the "Pressure at ground level" physical value stored in the message.
 
void set_press_3h (double val, int conf=-1)
 Set the value of "3 hour pressure change at ground level" from a variable of type double.
 
void set_press_3h_var (const wreport::Var &val)
 Set the value of "3 hour pressure change at ground level" from a wreport::Var.
 
const wreport::Varget_press_3h_var () const
 Get the "3 hour pressure change at ground level" physical value stored in the message.
 
void set_press_24h (double val, int conf=-1)
 Set the value of "24 hour pressure change at ground level" from a variable of type double.
 
void set_press_24h_var (const wreport::Var &val)
 Set the value of "24 hour pressure change at ground level" from a wreport::Var.
 
const wreport::Varget_press_24h_var () const
 Get the "24 hour pressure change at ground level" physical value stored in the message.
 
void set_water_temp (double val, int conf=-1)
 Set the value of "Sea/water surface temperature" from a variable of type double.
 
void set_water_temp_var (const wreport::Var &val)
 Set the value of "Sea/water surface temperature" from a wreport::Var.
 
const wreport::Varget_water_temp_var () const
 Get the "Sea/water surface temperature" physical value stored in the message.
 
void set_height_anem (double val, int conf=-1)
 Set the value of "Anemometer height" from a variable of type double.
 
void set_height_anem_var (const wreport::Var &val)
 Set the value of "Anemometer height" from a wreport::Var.
 
const wreport::Varget_height_anem_var () const
 Get the "Anemometer height" physical value stored in the message.
 
void set_press_tend (double val, int conf=-1)
 Set the value of "Characteristic of pressure tendency" from a variable of type double.
 
void set_press_tend_var (const wreport::Var &val)
 Set the value of "Characteristic of pressure tendency" from a wreport::Var.
 
const wreport::Varget_press_tend_var () const
 Get the "Characteristic of pressure tendency" physical value stored in the message.
 
void set_visibility (double val, int conf=-1)
 Set the value of "Visibility" from a variable of type double.
 
void set_visibility_var (const wreport::Var &val)
 Set the value of "Visibility" from a wreport::Var.
 
const wreport::Varget_visibility_var () const
 Get the "Visibility" physical value stored in the message.
 
void set_pres_wtr (int val, int conf=-1)
 Set the value of "Present weather" from a variable of type int.
 
void set_pres_wtr_var (const wreport::Var &val)
 Set the value of "Present weather" from a wreport::Var.
 
const wreport::Varget_pres_wtr_var () const
 Get the "Present weather" physical value stored in the message.
 
void set_past_wtr1_3h (int val, int conf=-1)
 Set the value of "Past weather (1 - 3h)" from a variable of type int.
 
void set_past_wtr1_3h_var (const wreport::Var &val)
 Set the value of "Past weather (1 - 3h)" from a wreport::Var.
 
const wreport::Varget_past_wtr1_3h_var () const
 Get the "Past weather (1 - 3h)" physical value stored in the message.
 
void set_past_wtr1_6h (int val, int conf=-1)
 Set the value of "Past weather (1 - 6h)" from a variable of type int.
 
void set_past_wtr1_6h_var (const wreport::Var &val)
 Set the value of "Past weather (1 - 6h)" from a wreport::Var.
 
const wreport::Varget_past_wtr1_6h_var () const
 Get the "Past weather (1 - 6h)" physical value stored in the message.
 
void set_past_wtr2_3h (int val, int conf=-1)
 Set the value of "Past weather (2 - 3h)" from a variable of type int.
 
void set_past_wtr2_3h_var (const wreport::Var &val)
 Set the value of "Past weather (2 - 3h)" from a wreport::Var.
 
const wreport::Varget_past_wtr2_3h_var () const
 Get the "Past weather (2 - 3h)" physical value stored in the message.
 
void set_past_wtr2_6h (int val, int conf=-1)
 Set the value of "Past weather (2 - 6h)" from a variable of type int.
 
void set_past_wtr2_6h_var (const wreport::Var &val)
 Set the value of "Past weather (2 - 6h)" from a wreport::Var.
 
const wreport::Varget_past_wtr2_6h_var () const
 Get the "Past weather (2 - 6h)" physical value stored in the message.
 
void set_metar_wtr (int val, int conf=-1)
 Set the value of "General weather indicator (TAF/METAR)" from a variable of type int.
 
void set_metar_wtr_var (const wreport::Var &val)
 Set the value of "General weather indicator (TAF/METAR)" from a wreport::Var.
 
const wreport::Varget_metar_wtr_var () const
 Get the "General weather indicator (TAF/METAR)" physical value stored in the message.
 
void set_tot_prec1 (double val, int conf=-1)
 Set the value of "Total precipitation in the last hour" from a variable of type double.
 
void set_tot_prec1_var (const wreport::Var &val)
 Set the value of "Total precipitation in the last hour" from a wreport::Var.
 
const wreport::Varget_tot_prec1_var () const
 Get the "Total precipitation in the last hour" physical value stored in the message.
 
void set_tot_prec3 (double val, int conf=-1)
 Set the value of "Total precipitation in the last 3 hours" from a variable of type double.
 
void set_tot_prec3_var (const wreport::Var &val)
 Set the value of "Total precipitation in the last 3 hours" from a wreport::Var.
 
const wreport::Varget_tot_prec3_var () const
 Get the "Total precipitation in the last 3 hours" physical value stored in the message.
 
void set_tot_prec6 (double val, int conf=-1)
 Set the value of "Total precipitation in the last 6 hours" from a variable of type double.
 
void set_tot_prec6_var (const wreport::Var &val)
 Set the value of "Total precipitation in the last 6 hours" from a wreport::Var.
 
const wreport::Varget_tot_prec6_var () const
 Get the "Total precipitation in the last 6 hours" physical value stored in the message.
 
void set_tot_prec12 (double val, int conf=-1)
 Set the value of "Total precipitation in the last 12 hours" from a variable of type double.
 
void set_tot_prec12_var (const wreport::Var &val)
 Set the value of "Total precipitation in the last 12 hours" from a wreport::Var.
 
const wreport::Varget_tot_prec12_var () const
 Get the "Total precipitation in the last 12 hours" physical value stored in the message.
 
void set_tot_prec24 (double val, int conf=-1)
 Set the value of "Total precipitation in the last 24 hours" from a variable of type double.
 
void set_tot_prec24_var (const wreport::Var &val)
 Set the value of "Total precipitation in the last 24 hours" from a wreport::Var.
 
const wreport::Varget_tot_prec24_var () const
 Get the "Total precipitation in the last 24 hours" physical value stored in the message.
 
void set_tot_snow (double val, int conf=-1)
 Set the value of "Total show depth" from a variable of type double.
 
void set_tot_snow_var (const wreport::Var &val)
 Set the value of "Total show depth" from a wreport::Var.
 
const wreport::Varget_tot_snow_var () const
 Get the "Total show depth" physical value stored in the message.
 
void set_state_ground (double val, int conf=-1)
 Set the value of "State of ground (with or without snow)" from a variable of type double.
 
void set_state_ground_var (const wreport::Var &val)
 Set the value of "State of ground (with or without snow)" from a wreport::Var.
 
const wreport::Varget_state_ground_var () const
 Get the "State of ground (with or without snow)" physical value stored in the message.
 
void set_press_msl (double val, int conf=-1)
 Set the value of "Pressure reduced to mean sea level" from a variable of type double.
 
void set_press_msl_var (const wreport::Var &val)
 Set the value of "Pressure reduced to mean sea level" from a wreport::Var.
 
const wreport::Varget_press_msl_var () const
 Get the "Pressure reduced to mean sea level" physical value stored in the message.
 
void set_qnh (double val, int conf=-1)
 Set the value of "Altimeter setting (QNH)" from a variable of type double.
 
void set_qnh_var (const wreport::Var &val)
 Set the value of "Altimeter setting (QNH)" from a wreport::Var.
 
const wreport::Varget_qnh_var () const
 Get the "Altimeter setting (QNH)" physical value stored in the message.
 
void set_temp_2m (double val, int conf=-1)
 Set the value of "Temperature at 2 metres above ground" from a variable of type double.
 
void set_temp_2m_var (const wreport::Var &val)
 Set the value of "Temperature at 2 metres above ground" from a wreport::Var.
 
const wreport::Varget_temp_2m_var () const
 Get the "Temperature at 2 metres above ground" physical value stored in the message.
 
void set_wet_temp_2m (double val, int conf=-1)
 Set the value of "Wet bulb temperature at 2 metres above ground" from a variable of type double.
 
void set_wet_temp_2m_var (const wreport::Var &val)
 Set the value of "Wet bulb temperature at 2 metres above ground" from a wreport::Var.
 
const wreport::Varget_wet_temp_2m_var () const
 Get the "Wet bulb temperature at 2 metres above ground" physical value stored in the message.
 
void set_dewpoint_2m (double val, int conf=-1)
 Set the value of "Dew point at 2 metres above ground" from a variable of type double.
 
void set_dewpoint_2m_var (const wreport::Var &val)
 Set the value of "Dew point at 2 metres above ground" from a wreport::Var.
 
const wreport::Varget_dewpoint_2m_var () const
 Get the "Dew point at 2 metres above ground" physical value stored in the message.
 
void set_humidity (double val, int conf=-1)
 Set the value of "Humidity at 2 metres above ground" from a variable of type double.
 
void set_humidity_var (const wreport::Var &val)
 Set the value of "Humidity at 2 metres above ground" from a wreport::Var.
 
const wreport::Varget_humidity_var () const
 Get the "Humidity at 2 metres above ground" physical value stored in the message.
 
void set_wind_dir (double val, int conf=-1)
 Set the value of "Wind direction at 10 metres above ground" from a variable of type double.
 
void set_wind_dir_var (const wreport::Var &val)
 Set the value of "Wind direction at 10 metres above ground" from a wreport::Var.
 
const wreport::Varget_wind_dir_var () const
 Get the "Wind direction at 10 metres above ground" physical value stored in the message.
 
void set_wind_speed (double val, int conf=-1)
 Set the value of "Wind speed at 10 metres above ground" from a variable of type double.
 
void set_wind_speed_var (const wreport::Var &val)
 Set the value of "Wind speed at 10 metres above ground" from a wreport::Var.
 
const wreport::Varget_wind_speed_var () const
 Get the "Wind speed at 10 metres above ground" physical value stored in the message.
 
void set_wind_gust_max_speed (double val, int conf=-1)
 Set the value of "Maximum wind gust speed at 10 metres above ground" from a variable of type double.
 
void set_wind_gust_max_speed_var (const wreport::Var &val)
 Set the value of "Maximum wind gust speed at 10 metres above ground" from a wreport::Var.
 
const wreport::Varget_wind_gust_max_speed_var () const
 Get the "Maximum wind gust speed at 10 metres above ground" physical value stored in the message.
 
void set_wind_gust_max_dir (double val, int conf=-1)
 Set the value of "Maximum wind gust direction at 10 metres above ground" from a variable of type double.
 
void set_wind_gust_max_dir_var (const wreport::Var &val)
 Set the value of "Maximum wind gust direction at 10 metres above ground" from a wreport::Var.
 
const wreport::Varget_wind_gust_max_dir_var () const
 Get the "Maximum wind gust direction at 10 metres above ground" physical value stored in the message.
 
void set_ex_ccw_wind (double val, int conf=-1)
 Set the value of "Extreme counterclockwise wind direction of a variable wind at 10 metres above ground" from a variable of type double.
 
void set_ex_ccw_wind_var (const wreport::Var &val)
 Set the value of "Extreme counterclockwise wind direction of a variable wind at 10 metres above ground" from a wreport::Var.
 
const wreport::Varget_ex_ccw_wind_var () const
 Get the "Extreme counterclockwise wind direction of a variable wind at 10 metres above ground" physical value stored in the message.
 
void set_ex_cw_wind (double val, int conf=-1)
 Set the value of "Extreme clockwise wind direction of a variable wind at 10 metres above ground" from a variable of type double.
 
void set_ex_cw_wind_var (const wreport::Var &val)
 Set the value of "Extreme clockwise wind direction of a variable wind at 10 metres above ground" from a wreport::Var.
 
const wreport::Varget_ex_cw_wind_var () const
 Get the "Extreme clockwise wind direction of a variable wind at 10 metres above ground" physical value stored in the message.
 
void set_cloud_n (int val, int conf=-1)
 Set the value of "Total cloud cover (N)" from a variable of type int.
 
void set_cloud_n_var (const wreport::Var &val)
 Set the value of "Total cloud cover (N)" from a wreport::Var.
 
const wreport::Varget_cloud_n_var () const
 Get the "Total cloud cover (N)" physical value stored in the message.
 
void set_cloud_nh (int val, int conf=-1)
 Set the value of "Cloud amount (NH)" from a variable of type int.
 
void set_cloud_nh_var (const wreport::Var &val)
 Set the value of "Cloud amount (NH)" from a wreport::Var.
 
const wreport::Varget_cloud_nh_var () const
 Get the "Cloud amount (NH)" physical value stored in the message.
 
void set_cloud_hh (double val, int conf=-1)
 Set the value of "Height of base of cloud (HH)" from a variable of type double.
 
void set_cloud_hh_var (const wreport::Var &val)
 Set the value of "Height of base of cloud (HH)" from a wreport::Var.
 
const wreport::Varget_cloud_hh_var () const
 Get the "Height of base of cloud (HH)" physical value stored in the message.
 
void set_cloud_cl (int val, int conf=-1)
 Set the value of "Cloud type (CL)" from a variable of type int.
 
void set_cloud_cl_var (const wreport::Var &val)
 Set the value of "Cloud type (CL)" from a wreport::Var.
 
const wreport::Varget_cloud_cl_var () const
 Get the "Cloud type (CL)" physical value stored in the message.
 
void set_cloud_cm (int val, int conf=-1)
 Set the value of "Cloud type (CM)" from a variable of type int.
 
void set_cloud_cm_var (const wreport::Var &val)
 Set the value of "Cloud type (CM)" from a wreport::Var.
 
const wreport::Varget_cloud_cm_var () const
 Get the "Cloud type (CM)" physical value stored in the message.
 
void set_cloud_ch (int val, int conf=-1)
 Set the value of "Cloud type (CH)" from a variable of type int.
 
void set_cloud_ch_var (const wreport::Var &val)
 Set the value of "Cloud type (CH)" from a wreport::Var.
 
const wreport::Varget_cloud_ch_var () const
 Get the "Cloud type (CH)" physical value stored in the message.
 
void set_cloud_n1 (int val, int conf=-1)
 Set the value of "Cloud amount (N1)" from a variable of type int.
 
void set_cloud_n1_var (const wreport::Var &val)
 Set the value of "Cloud amount (N1)" from a wreport::Var.
 
const wreport::Varget_cloud_n1_var () const
 Get the "Cloud amount (N1)" physical value stored in the message.
 
void set_cloud_c1 (int val, int conf=-1)
 Set the value of "Cloud amount (C1)" from a variable of type int.
 
void set_cloud_c1_var (const wreport::Var &val)
 Set the value of "Cloud amount (C1)" from a wreport::Var.
 
const wreport::Varget_cloud_c1_var () const
 Get the "Cloud amount (C1)" physical value stored in the message.
 
void set_cloud_h1 (double val, int conf=-1)
 Set the value of "Height of base of cloud (H1)" from a variable of type double.
 
void set_cloud_h1_var (const wreport::Var &val)
 Set the value of "Height of base of cloud (H1)" from a wreport::Var.
 
const wreport::Varget_cloud_h1_var () const
 Get the "Height of base of cloud (H1)" physical value stored in the message.
 
void set_cloud_n2 (int val, int conf=-1)
 Set the value of "Cloud amount (N2)" from a variable of type int.
 
void set_cloud_n2_var (const wreport::Var &val)
 Set the value of "Cloud amount (N2)" from a wreport::Var.
 
const wreport::Varget_cloud_n2_var () const
 Get the "Cloud amount (N2)" physical value stored in the message.
 
void set_cloud_c2 (int val, int conf=-1)
 Set the value of "Cloud amount (C2)" from a variable of type int.
 
void set_cloud_c2_var (const wreport::Var &val)
 Set the value of "Cloud amount (C2)" from a wreport::Var.
 
const wreport::Varget_cloud_c2_var () const
 Get the "Cloud amount (C2)" physical value stored in the message.
 
void set_cloud_h2 (double val, int conf=-1)
 Set the value of "Height of base of cloud (H2)" from a variable of type double.
 
void set_cloud_h2_var (const wreport::Var &val)
 Set the value of "Height of base of cloud (H2)" from a wreport::Var.
 
const wreport::Varget_cloud_h2_var () const
 Get the "Height of base of cloud (H2)" physical value stored in the message.
 
void set_cloud_n3 (int val, int conf=-1)
 Set the value of "Cloud amount (N3)" from a variable of type int.
 
void set_cloud_n3_var (const wreport::Var &val)
 Set the value of "Cloud amount (N3)" from a wreport::Var.
 
const wreport::Varget_cloud_n3_var () const
 Get the "Cloud amount (N3)" physical value stored in the message.
 
void set_cloud_c3 (int val, int conf=-1)
 Set the value of "Cloud amount (C3)" from a variable of type int.
 
void set_cloud_c3_var (const wreport::Var &val)
 Set the value of "Cloud amount (C3)" from a wreport::Var.
 
const wreport::Varget_cloud_c3_var () const
 Get the "Cloud amount (C3)" physical value stored in the message.
 
void set_cloud_h3 (double val, int conf=-1)
 Set the value of "Height of base of cloud (H3)" from a variable of type double.
 
void set_cloud_h3_var (const wreport::Var &val)
 Set the value of "Height of base of cloud (H3)" from a wreport::Var.
 
const wreport::Varget_cloud_h3_var () const
 Get the "Height of base of cloud (H3)" physical value stored in the message.
 
void set_cloud_n4 (int val, int conf=-1)
 Set the value of "Cloud amount (N4)" from a variable of type int.
 
void set_cloud_n4_var (const wreport::Var &val)
 Set the value of "Cloud amount (N4)" from a wreport::Var.
 
const wreport::Varget_cloud_n4_var () const
 Get the "Cloud amount (N4)" physical value stored in the message.
 
void set_cloud_c4 (int val, int conf=-1)
 Set the value of "Cloud amount (C4)" from a variable of type int.
 
void set_cloud_c4_var (const wreport::Var &val)
 Set the value of "Cloud amount (C4)" from a wreport::Var.
 
const wreport::Varget_cloud_c4_var () const
 Get the "Cloud amount (C4)" physical value stored in the message.
 
void set_cloud_h4 (double val, int conf=-1)
 Set the value of "Height of base of cloud (H4)" from a variable of type double.
 
void set_cloud_h4_var (const wreport::Var &val)
 Set the value of "Height of base of cloud (H4)" from a wreport::Var.
 
const wreport::Varget_cloud_h4_var () const
 Get the "Height of base of cloud (H4)" physical value stored in the message.
 
- Public Member Functions inherited from dballe::Message
 Message (const Message &)=default
 
Messageoperator= (const Message &o)=default
 
Messageoperator= (Message &&o)=default
 
const wreport::Varget (const Level &lev, const Trange &tr, wreport::Varcode code) const
 Get a variable given its code, level and time range information. More...
 
const wreport::Varget (const char *shortcut) const
 Get a variable given its shortcut name. More...
 
const wreport::Varget (const std::string &shortcut) const
 Get a variable given its shortcut name. More...
 
void set (const Level &lev, const Trange &tr, wreport::Varcode code, const wreport::Var &var)
 Add or replace a value. More...
 
void set (const Level &lev, const Trange &tr, const wreport::Var &var)
 Add or replace a value. More...
 
void set (const Level &lev, const Trange &tr, std::unique_ptr< wreport::Var > var)
 Add or replace a value, taking ownership of the source variable without copying it. More...
 
void set (const char *shortcut, std::unique_ptr< wreport::Var > var)
 Add or replace a value, taking ownership of the source variable without copying it. More...
 
void set (const char *shortcut, const wreport::Var &var)
 Add or replace a value. More...
 

Static Public Member Functions

static std::shared_ptr< Messagecreate ()
 
static const Messagedowncast (const dballe::Message &o)
 Return a reference to o downcasted as an impl::Message. More...
 
static Messagedowncast (dballe::Message &o)
 Return a reference to o downcasted as an impl::Message. More...
 
static std::shared_ptr< Messagedowncast (std::shared_ptr< dballe::Message > o)
 Returns a pointer to o downcasted as an impl::Message. More...
 
static void csv_header (CSVWriter &out)
 Output the CSV header.
 
static MessageType type_from_repmemo (const char *repmemo)
 Get the message source type corresponding to the given report code.
 
static const char * repmemo_from_type (MessageType type)
 Get the report code corresponding to the given message source type.
 
- Static Public Member Functions inherited from dballe::Message
static std::shared_ptr< Messagecreate (MessageType type)
 Create a new empty message.
 

Public Attributes

MessageType type = MessageType::GENERIC
 Source of the data.
 
Values station_data
 
msg::Contexts data
 

Protected Member Functions

int find_index (const Level &lev, const Trange &tr) const
 Return the index of the given context, or -1 if it was not found.
 
const wreport::Varget_impl (const Level &lev, const Trange &tr, wreport::Varcode code) const override
 Implementation of get(const Level&, const Trange&, wreport::Varcode)
 
void set_impl (const Level &lev, const Trange &tr, std::unique_ptr< wreport::Var > var) override
 Implementation of set(const Level& const Trange&, std::unique_ptr<wreport::Var>)
 
void seti (const Level &lev, const Trange &tr, wreport::Varcode code, int val, int conf)
 
void setd (const Level &lev, const Trange &tr, wreport::Varcode code, double val, int conf)
 
void setc (const Level &lev, const Trange &tr, wreport::Varcode code, const char *val, int conf)
 

Detailed Description

Storage for related physical data.

Member Function Documentation

◆ diff()

unsigned dballe::impl::Message::diff ( const dballe::Message msg) const
overridevirtual

Compute the differences between two Messages.

Details of the differences found will be formatted using the wreport notes system (

See also
wreport/notes.h).
Returns
The number of differences found

Implements dballe::Message.

◆ downcast() [1/3]

static const Message& dballe::impl::Message::downcast ( const dballe::Message o)
static

Return a reference to o downcasted as an impl::Message.

Throws an exception if o is not an impl::Message.

◆ downcast() [2/3]

static Message& dballe::impl::Message::downcast ( dballe::Message o)
static

Return a reference to o downcasted as an impl::Message.

Throws an exception if o is not an impl::Message.

◆ downcast() [3/3]

static std::shared_ptr<Message> dballe::impl::Message::downcast ( std::shared_ptr< dballe::Message o)
static

Returns a pointer to o downcasted as an impl::Message.

Throws an exception if o is not an impl::Message.

◆ edit()

wreport::Var* dballe::impl::Message::edit ( wreport::Varcode  code,
const Level lev,
const Trange tr 
)

Find a variable given its description.

Parameters
codeThe wreport::Varcode of the variable to query.
levThe Level to query
trThe Trange to query
Returns
The variable found, or NULL if it was not found.

◆ edit_context()

msg::Context* dballe::impl::Message::edit_context ( const Level lev,
const Trange tr 
)

Find a msg::Context given its description.

Parameters
levThe Level to query
trThe Trange to query
Returns
The context found, or NULL if it was not found.

◆ find_context()

const msg::Context* dballe::impl::Message::find_context ( const Level lev,
const Trange tr 
) const

Find a msg::Context given its description.

Parameters
levThe Level to query
trThe Trange to query
Returns
The context found, or NULL if it was not found.

◆ find_station_context()

const Values& dballe::impl::Message::find_station_context ( ) const

Find the station info context.

Returns
The context found, or NULL if it was not found.

◆ from_csv()

bool dballe::impl::Message::from_csv ( CSVReader in)

Read data from a CSV input.

Reading stops when one of Longitude, Latitude, Report or Date changes.

Returns
true if some CSV data has been found, false on EOF

◆ get()

const wreport::Var* dballe::impl::Message::get ( const Shortcut shortcut) const

Find a datum given its shortcut.

Parameters
shortcutShortcut of the value to set.
Returns
The value found, or nullptr if it was not found.

◆ obtain_context()

msg::Context& dballe::impl::Message::obtain_context ( const Level lev,
const Trange tr 
)

Find a msg::Context given its description, creating it if it does not exist.

Parameters
levThe Level to query
trThe Trange to query
Returns
The context found

◆ query_data()

std::shared_ptr<dballe::CursorData> dballe::impl::Message::query_data ( const Query query) const
overridevirtual

Query the variables in the message.

Parameters
queryThe query data (note: currently ignored)
Returns
The cursor to use to iterate over the results

Implements dballe::Message.

◆ query_station_data()

std::shared_ptr<dballe::CursorStationData> dballe::impl::Message::query_station_data ( const Query query) const
overridevirtual

Query the station variables in the message.

Parameters
queryThe query data (note: currently ignored)
Returns
The cursor to use to iterate over the results

Implements dballe::Message.

◆ query_stations()

std::shared_ptr<dballe::CursorStation> dballe::impl::Message::query_stations ( const Query query) const
overridevirtual

Return a Cursor to access the station information in the message.

The cursor will have only one result, with the one station present in the message, contain all station vars.

Parameters
queryThe query data (note: currently ignored)
Returns
The cursor to use to iterate over the results

Implements dballe::Message.

◆ remove_context()

bool dballe::impl::Message::remove_context ( const Level lev,
const Trange tr 
)

Remove a context from the message.

Returns
true if the context was removed, false if it did not exist

◆ set()

void dballe::impl::Message::set ( const Shortcut shortcut,
const wreport::Var var 
)

Add or replace a value.

Parameters
shortcutShortcut ID of the value to set
varThe Var with the value to set

◆ sounding_pack_levels()

void dballe::impl::Message::sounding_pack_levels ( )

Remove the sounding significance from the level descriptions and pack together the data at the same pressure level.

This is used to postprocess data after decoding, where the l2 field of the level description is temporarily used to store the vertical sounding significance, to simplify decoding.


The documentation for this class was generated from the following file: