WXP C++ Library Version 6.74.6
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | List of all members
WXP::BufrFile Class Reference

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)
 

Detailed Description

This class reads in BUFR data from a file.

Author
Dan Vietor

Constructor & Destructor Documentation

◆ BufrFile()

BufrFile::BufrFile ( )

Constructor

References init().

◆ ~BufrFile()

BufrFile::~BufrFile ( )

Destructor

Member Function Documentation

◆ checkType()

int BufrFile::checkType ( const char *  filename)
static

Attempts to determine the file type by parsing start of file.

Parameters
filenameThe filename to check
Returns
The type of file (WXP, LDM, RAW)

References WXP::File::close(), WXP::StrLib::equal(), WXP::File::isOpen(), WXP::File::open(), and WXP::File::read().

Referenced by open().

◆ close()

int BufrFile::close ( )

Closes the file

References WXP::File::close().

Referenced by WXP::ProfFile::close(), and open().

◆ getCodeInd()

int WXP::BufrFile::getCodeInd ( )
inline

Get index into codes list

◆ getLoop()

int WXP::BufrFile::getLoop ( )
inline

Get loop index

◆ getLoopBeg()

int WXP::BufrFile::getLoopBeg ( )
inline

Parameter index of start of loop

◆ getLoopEnd()

int WXP::BufrFile::getLoopEnd ( )
inline

Parameter index of end of loop

◆ getLoopInd()

int WXP::BufrFile::getLoopInd ( )
inline

Get current count in loop

◆ getLoopNum()

int WXP::BufrFile::getLoopNum ( )
inline

Get number of times to go through the loop

◆ getNumSubsets()

int WXP::BufrFile::getNumSubsets ( )
inline

Get number of data subsets

Referenced by WXP::ProfFile::open().

◆ init()

int BufrFile::init ( )

Initializes the object parameters

Referenced by BufrFile(), and open().

◆ isOpen()

bool BufrFile::isOpen ( )

Returns open status

Returns
True if file opened

Referenced by WXP::ProfFile::open().

◆ nextDataset()

int BufrFile::nextDataset ( )

Resetting to beginning of data to read in next dataset

References WXP::Wxp::outDebug().

Referenced by WXP::ProfFile::read().

◆ open()

int BufrFile::open ( const char *  filename)

◆ print()

int BufrFile::print ( )

Print object data

◆ printCodes()

int BufrFile::printCodes ( )

Prints the code list

References WXP::BufrCode::print().

Referenced by readDDS().

◆ readData()

int BufrFile::readData ( BufrData data)

Reads in the BUFR data

Return values
dataOutput data
Returns
0 if end of data

References WXP::StrLib::append(), WXP::StrLib::copy(), WXP::BufrData::init(), and WXP::Wxp::outDebug().

◆ readDDS()

int BufrFile::readDDS ( )

◆ readHeader()

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().

◆ readIS()

int BufrFile::readIS ( )

Reads in the BUFR product definition block

References WXP::Wxp::outDebug(), and WXP::Wxp::outMessage().

◆ readOS()

int BufrFile::readOS ( )

Reads in the BUFR product definition block

References WXP::Wxp::outMessage().


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