WXP C++ Library Version 6.74.9
|
This class reads in BUFR data from a file. More...
#include "../include/BufrFile.h"
Public Types | |
enum | FileType { NONE , WXP , LDM , NCEP , RAW } |
Public Member Functions | |
BufrFile () | |
~BufrFile () | |
int | init () |
int | open (const char *filename) |
bool | isOpen () |
int | close () |
int | readHeader () |
int | readPDB () |
int | readIS () |
int | readOS () |
int | readDDS () |
int | readDS () |
int | readData (BufrData &data) |
int | getCodeInd () |
int | getLoop () |
int | getLoopNum () |
int | getLoopInd () |
int | getLoopBeg () |
int | getLoopEnd () |
int | getNumSubsets () |
int | nextDataset () |
int | printCodes () |
int | print () |
Static Public Member Functions | |
static int | checkType (const char *filename) |
This class reads in BUFR data from a file.
BufrFile::BufrFile | ( | ) |
Constructor
References init().
BufrFile::~BufrFile | ( | ) |
Destructor
|
static |
Attempts to determine the file type by parsing start of file.
filename | The filename to check |
References WXP::File::close(), WXP::StrLib::equal(), WXP::File::isOpen(), WXP::File::open(), and WXP::File::read().
Referenced by open().
int BufrFile::close | ( | ) |
|
inline |
Get index into codes list
|
inline |
Get loop index
|
inline |
Parameter index of start of loop
|
inline |
Parameter index of end of loop
|
inline |
Get current count in loop
|
inline |
Get number of times to go through the loop
|
inline |
Get number of data subsets
Referenced by WXP::ProfFile::open().
int BufrFile::init | ( | ) |
Initializes the object parameters
Referenced by BufrFile(), and open().
bool BufrFile::isOpen | ( | ) |
int BufrFile::nextDataset | ( | ) |
Resetting to beginning of data to read in next dataset
References WXP::Wxp::outDebug().
Referenced by WXP::ProfFile::read().
int BufrFile::open | ( | const char * | filename | ) |
Opens the file
filename | Filename to open |
References WXP::FileTool::addPath(), checkType(), close(), WXP::String::get(), WXP::Wxp::getDatabasePath(), init(), WXP::File::isOpen(), and WXP::File::open().
Referenced by WXP::ProfFile::open().
int BufrFile::print | ( | ) |
Print object data
int BufrFile::printCodes | ( | ) |
int BufrFile::readData | ( | BufrData & | data | ) |
Reads in the BUFR data
data | Output data |
References WXP::StrLib::append(), WXP::StrLib::copy(), WXP::BufrData::init(), WXP::Const::MISS, and WXP::Wxp::outDebug().
int BufrFile::readDDS | ( | ) |
Reads in the BUFR product definition block
References WXP::Wxp::checkMessage(), WXP::Wxp::isDebug(), WXP::Wxp::outDebug(), WXP::Wxp::outMessage(), WXP::Wxp::outWarning(), printCodes(), and WXP::BufrCode::set().
int BufrFile::readHeader | ( | ) |
Reads in the product header and positions at the front of the BUFR data. This is dependent on the type of datafile and how the BUFR data is encapsulated.
References WXP::StrLib::equal(), WXP::File::getLine(), WXP::Wxp::outDebug(), WXP::File::skipLine(), and WXP::File::tell().
Referenced by WXP::ProfFile::open().
int BufrFile::readIS | ( | ) |
Reads in the BUFR product definition block
References WXP::Wxp::outDebug(), and WXP::Wxp::outMessage().
int BufrFile::readOS | ( | ) |
Reads in the BUFR product definition block
References WXP::Wxp::outMessage().