| WXP C++ Library Version 6.74.9
    | 
This class reads and decodes NIDS data from file. More...
#include "../include/NidsFile.h"
| Public Types | |
| enum | Mode { OM , CLEARAIR , PRECIP } | 
| enum | Type { REG , ZCOMP , ENC , BCOMP } | 
| Public Member Functions | |
| NidsFile () | |
| NidsFile (const char *filename) | |
| ~NidsFile () | |
| int | init () | 
| int | open (const char *filename) | 
| int | close () | 
| bool | isOpen () | 
| int | skipLine () | 
| int | readRaw () | 
| int | readBytes (unsigned char *data, int size) | 
| int | dump (int num, int flag) | 
| int | readShort (short &val) | 
| short | readShort () | 
| int | readUshort (unsigned short &val) | 
| int | readLong (int &val) | 
| int | readLong () | 
| int | readUlong (unsigned int &val) | 
| float | float16 (int val) | 
| float | float32 (int val1, int val2) | 
| int | readHeader (NidsInfo &info) | 
| int | messHeader () | 
| int | prodDesc () | 
| int | prodSymb () | 
| int | prodSymbLayer () | 
| int | gotoGraphic () | 
| int | graphic () | 
| int | graphicLayer () | 
| int | readPacket () | 
| int | readRastor () | 
| int | readRadial (NidsRadial &radial) | 
| int | readRun (NidsRun &data) | 
| int | readVector (NidsVector &vect) | 
| int | skipVector () | 
| int | readText (NidsText &text) | 
| int | skipText () | 
| int | readWind (NidsWind &wind) | 
| int | skipWind () | 
| int | readData (NidsData &data) | 
| int | getCode () | 
| bool | isBRef () | 
| bool | isBSW () | 
| bool | isCRef () | 
| bool | isVel () | 
| bool | isSRVel () | 
| bool | isTops () | 
| bool | isEnhTops () | 
| bool | isLRef () | 
| bool | isVIL () | 
| bool | isDigVIL () | 
| bool | isVAD () | 
| bool | isPrec () | 
| bool | isDPrec () | 
| bool | isDPrRate () | 
| bool | isHydroClass () | 
| bool | isCorrel () | 
| bool | isDPA () | 
| bool | isDHR () | 
| bool | isDSP () | 
| bool | isDRef () | 
| bool | isDual () | 
| bool | isPacketRadial () | 
| bool | isPacketRastor () | 
| bool | isPacketVector () | 
| bool | isPacketWindbarb () | 
| bool | isPacketText () | 
| bool | isPacketDpa () | 
| int | getPacketCode () | 
| int | getNbin () | 
| int | getNrad () | 
| DomainVal | getDomainVal () | 
| Static Public Attributes | |
| static const int | RADIAL = 0xAF1F | 
| static const int | RASTOR = 0xBA0F | 
This class reads and decodes NIDS data from file.
| NidsFile::NidsFile | ( | ) | 
Constructor. Initializes class data
References init().
| NidsFile::NidsFile | ( | const char * | filename | ) | 
| NidsFile::~NidsFile | ( | ) | 
Destructor.
| int NidsFile::close | ( | ) | 
Closes the file
References WXP::File::close().
| int NidsFile::init | ( | ) | 
Initializes class data
References WXP::Buffer::init().
Referenced by NidsFile(), NidsFile(), and open().
| bool NidsFile::isOpen | ( | ) | 
Is file opened
Referenced by WXP::NidsPlot::draw(), WXP::NidsPlot::getDomain(), WXP::NidsImage::readSite(), and WXP::NidsImage::setImage().
| int NidsFile::open | ( | const char * | filename | ) | 
Opens a NIDS file
| filename | File to open | 
References WXP::File::close(), init(), WXP::File::isOpen(), and WXP::File::open().
Referenced by WXP::NidsPlot::draw(), WXP::NidsPlot::getDomain(), and NidsFile().
| int NidsFile::readBytes | ( | unsigned char * | data, | 
| int | dsize | ||
| ) | 
Reads a set number of bytes from the file. This manages both compressed and uncompressed data
| data | Buffer to put data | 
| dsize | Number of bytes to read in | 
References WXP::Buffer::clear(), WXP::Buffer::clearUsed(), WXP::File::endFile(), WXP::Buffer::get(), WXP::Buffer::getAvail(), WXP::BZlib::init(), WXP::Wxp::isDebug(), WXP::Wxp::outDebug(), and WXP::Buffer::read().
Referenced by readRun(), and readShort().
| int NidsFile::readRadial | ( | NidsRadial & | radial | ) | 
Gets the individual radial header. This specifies which radial data are coming from.
| radial | The radial header data | 
References WXP::NidsRadial::ang0, WXP::NidsRadial::ang1, WXP::Wxp::isDebug(), WXP::Wxp::outDebug(), and readShort().
Referenced by WXP::NidsImage::setImage().
| int NidsFile::readRun | ( | NidsRun & | data | ) | 
Gets the runlength encoded data.
| data | The run length data | 
References WXP::NidsRun::ival, WXP::Const::MISS, readBytes(), WXP::NidsRun::run, and WXP::NidsRun::val.
Referenced by WXP::NidsImage::setImage().
| int NidsFile::readShort | ( | short & | val | ) | 
Reads in a short integer value (2 bytes)
| val | Buffer to put data | 
References readBytes().
Referenced by readRadial(), and readVector().
| int NidsFile::readVector | ( | NidsVector & | vect | ) | 
Gets a single vector which includes starting and ending locations.
| vect | The vector data | 
References readShort(), WXP::NidsVector::val, WXP::NidsVector::x1, WXP::NidsVector::x2, WXP::NidsVector::y1, and WXP::NidsVector::y2.
Referenced by WXP::NidsPlot::drawData().
| int NidsFile::skipLine | ( | ) | 
Skips a line in the file
References WXP::File::read().