This class reads in BUFR data from a file. More...
#include "../include/BufrFile.h"
Public Types | |
| enum | FileType { NONE, WXP, LDM, RAW } |
Public Member Functions | |
| BufrFile () | |
| int | init () |
| int | open (const char *filename) |
| bool | isOpen () |
| int | close () |
| int | readHeader () |
| int | readPDB () |
| int | readData (BufrData &data) |
| int | getParamInd () |
| int | getLoop () |
| int | getLoopNum () |
| int | getLoopInd () |
| int | getLoopBeg () |
| int | getLoopEnd () |
| int | getNumSubsets () |
| int | nextDataset () |
| int | printParams () |
| 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
| int BufrFile::checkType | ( | const char * | filename | ) | [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 | ( | ) |
| int WXP::BufrFile::getLoop | ( | ) | [inline] |
Get index into parameter list
| int WXP::BufrFile::getLoopBeg | ( | ) | [inline] |
Get current count in loop
| int WXP::BufrFile::getLoopEnd | ( | ) | [inline] |
Parameter index of start of loop
| int WXP::BufrFile::getLoopInd | ( | ) | [inline] |
Get number of times to go through the loop
| int WXP::BufrFile::getLoopNum | ( | ) | [inline] |
Get loop index
| int WXP::BufrFile::getNumSubsets | ( | ) | [inline] |
Parameter index of end of loop
| bool BufrFile::isOpen | ( | ) |
Returns open status
| int WXP::BufrFile::nextDataset | ( | ) | [inline] |
Get number of data subsets
| 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(), WXP::File::isOpen(), and WXP::File::open().
| int BufrFile::print | ( | ) |
Print object data
| int BufrFile::printCodes | ( | ) |
Prints the code list
Referenced by readPDB().
| int BufrFile::printParams | ( | ) |
| int BufrFile::readData | ( | BufrData & | data | ) |
Reads in the BUFR data
| data | Output data |
References WXP::StrLib::copy(), WXP::Const::MISS, and WXP::Wxp::outDebug().
| 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().
| int BufrFile::readPDB | ( | ) |
Reads in the BUFR product definition block
References WXP::Wxp::isDebug(), WXP::Wxp::outDebug(), WXP::Wxp::outMessage(), printCodes(), and printParams().
1.6.1