libwreport 2.1
Namespaces | Data Structures | Typedefs | Enumerations | Functions
wreport Namespace Reference

Main namespace. More...

Namespaces

namespace  bulletin
 

The bulletin namespace contains bulletin implementation details, internals and utility functions.


namespace  notes
 

Collect notes about unusual things that happen during processing.


Data Structures

struct  Bulletin
 Storage for the decoded data of a BUFR or CREX message. More...
struct  BufrCodecOptions
 Options used to configure BUFR decoding. More...
struct  BufrBulletin
 BUFR bulletin implementation. More...
struct  CrexBulletin
 CREX bulletin implementation. More...
struct  DTable
 D-table with Dxxyyy aggregate code expansions. More...
struct  error
 Base class for DB-All.e exceptions. More...
struct  error_notfound
 Reports that a search-like function could not find what was requested. More...
struct  error_type
 For functions handling data with multiple types, reports a mismatch between the type requested and the type found. More...
struct  error_alloc
 Reports that memory allocation has failed. More...
struct  error_handles
 For functions working with handles, reports a problem with handling handles, such as impossibility to allocate a new one, or an invalid handle being passed to the function. More...
struct  error_toolong
 Report an error with a buffer being to short for the data it needs to fit. More...
struct  error_system
 Report a system error message. More...
struct  error_consistency
 Report an error when a consistency check failed. More...
struct  error_parse
 Report an error when parsing informations. More...
struct  error_regexp
 Report an error while handling regular expressions. More...
struct  error_unimplemented
 Reports that a feature is still not implemented. More...
struct  error_domain
 Report an error with a buffer being to short for the data it needs to fit. More...
struct  Opcodes
 Sequence of opcodes, as a slice of a Varcode vector. More...
struct  Subset
 Represent a BUFR/CREX data subset as a list of decoded variables. More...
class  Var
 Holds a wreport variable. More...
struct  _Varinfo
 Holds the information about a DBALLE variable. More...
class  MutableVarinfo
 Smart pointer to handle/use varinfos. More...
class  Varinfo
 Smart pointer to handle/use varinfos. More...
class  Vartable
 Holds a variable information table. More...

Typedefs

typedef short unsigned int Varcode
 Holds the WMO variable code of a variable.
typedef short unsigned int Alteration
 Describes how a wreport::Varinfo has been altered: it is used for supporting variables coming from BUFR and CREX messages that use C codes to alter variable information.

Enumerations

enum  ErrorCode {
  WR_ERR_NONE = 0, WR_ERR_NOTFOUND = 1, WR_ERR_TYPE = 2, WR_ERR_ALLOC = 3,
  WR_ERR_ODBC = 4, WR_ERR_HANDLES = 5, WR_ERR_TOOLONG = 6, WR_ERR_SYSTEM = 7,
  WR_ERR_CONSISTENCY = 8, WR_ERR_PARSE = 9, WR_ERR_WRITE = 10, WR_ERR_REGEX = 11,
  WR_ERR_UNIMPLEMENTED = 12, WR_ERR_DOMAIN = 13
}
 C-style error codes used by exceptions. More...

Functions

double convert_units (const char *from, const char *to, double val)
 Convert between different units.
double convert_icao_to_press (double from)
 Convert ICAO height (in meters) to pressure (in hpa) and back.
double convert_press_to_icao (double from)
 Convert pressure (in hpa) to ICAO height (in meters)
int convert_AOFVSS_to_BUFR08042 (int from)
 Convert vertical sounding significance from the AOF encoding to BUFR code table 08001.
double convert_units_get_mul (const char *from, const char *to)
 Get the multiplier used in the given conversion.
bool convert_units_allowed (const char *from, const char *to)
 Check if conversion is possible among the given units.
std::string varcode_format (Varcode code)
 Format a varcode into a string.
Varcode descriptor_code (const char *desc)
 Convert a FXXYYY string descriptor code into its short integer representation.
int convert_WMO0500_to_BUFR20012 (int from)
 Conversion functions between various code tables.
int convert_WMO0509_to_BUFR20012 (int from)
 Cloud type (CH)
int convert_WMO0515_to_BUFR20012 (int from)
 Cloud type (CM)
int convert_WMO0513_to_BUFR20012 (int from)
 Cloud type (CL)
int convert_WMO4677_to_BUFR20003 (int from)
 Present weather.
int convert_WMO4561_to_BUFR20004 (int from)
 Past weather.
int convert_BUFR20012_to_WMO0500 (int from)
 Cloud type.
int convert_BUFR20012_to_WMO0509 (int from)
 Cloud type (CH)
int convert_BUFR20012_to_WMO0515 (int from)
 Cloud type (CM)
int convert_BUFR20012_to_WMO0513 (int from)
 Cloud type (CL)
int convert_BUFR20003_to_WMO4677 (int from)
 Present weather.
int convert_BUFR20004_to_WMO4561 (int from)
 Past weather.
int convert_BUFR08001_to_BUFR08042 (int from)
 Vertical sounding significance.
int convert_BUFR08042_to_BUFR08001 (int from)
 Vertical sounding significance.

Detailed Description

Main namespace.


Enumeration Type Documentation

C-style error codes used by exceptions.

Enumerator:
WR_ERR_NONE 

No error.

WR_ERR_NOTFOUND 

Item not found.

WR_ERR_TYPE 

Wrong variable type.

WR_ERR_ALLOC 

Cannot allocate memory.

WR_ERR_ODBC 

ODBC error.

WR_ERR_HANDLES 

Handle management error.

WR_ERR_TOOLONG 

Buffer is too short to fit data.

WR_ERR_SYSTEM 

Error reported by the system.

WR_ERR_CONSISTENCY 

Consistency check failed.

WR_ERR_PARSE 

Parse error.

WR_ERR_WRITE 

Write error.

WR_ERR_REGEX 

Regular expression error.

WR_ERR_UNIMPLEMENTED 

Feature not implemented.

WR_ERR_DOMAIN 

Value outside acceptable domain.


Function Documentation

double wreport::convert_units ( const char *  from,
const char *  to,
double  val 
)

Convert between different units.

Parameters:
fromUnit of the value to convert (see wreport::Varinfo)
toUnit to convert to (see wreport::Varinfo)
valValue to convert
Return values:
resConverted value
Returns:
The error indicator for the function (See error.h)
bool wreport::convert_units_allowed ( const char *  from,
const char *  to 
)

Check if conversion is possible among the given units.

Parameters:
fromUnit of the value to convert (see wreport::Varinfo)
toUnit to convert to (see wreport::Varinfo)
Returns:
True if conversion is supported, else false.
double wreport::convert_units_get_mul ( const char *  from,
const char *  to 
)

Get the multiplier used in the given conversion.

Parameters:
fromUnit of the value to convert (see wreport::Varinfo)
toUnit to convert to (see wreport::Varinfo)
Returns:
Multiplier factor used in the conversion
int wreport::convert_WMO0500_to_BUFR20012 ( int  from)

Conversion functions between various code tables.

Cloud type

Varcode wreport::descriptor_code ( const char *  desc)

Convert a FXXYYY string descriptor code into its short integer representation.

Parameters:
descThe 6-byte string descriptor as FXXYYY
Returns:
The short integer code that can be queried with the WR_GET_* macros