WXP C++ Library Version 6.74.9
Loading...
Searching...
No Matches
WXP::NidsFile Class Reference

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

Detailed Description

This class reads and decodes NIDS data from file.

Author
Dan Vietor

Constructor & Destructor Documentation

◆ NidsFile() [1/2]

NidsFile::NidsFile ( )

Constructor. Initializes class data

References init().

◆ NidsFile() [2/2]

NidsFile::NidsFile ( const char * filename)

Constructor. Opens file.

Parameters
filenameFile to open

References init(), and open().

◆ ~NidsFile()

NidsFile::~NidsFile ( )

Destructor.

Member Function Documentation

◆ close()

int NidsFile::close ( )

Closes the file

◆ init()

int NidsFile::init ( )

Initializes class data

Referenced by NidsFile(), NidsFile(), and open().

◆ isOpen()

bool NidsFile::isOpen ( )

Is file opened

Returns
True if open

Referenced by WXP::NidsImage::readSite(), and WXP::NidsImage::setImage().

◆ open()

int NidsFile::open ( const char * filename)

Opens a NIDS file

Parameters
filenameFile to open

References init().

Referenced by WXP::NidsPlot::getDomain(), and NidsFile().

◆ readBytes()

int NidsFile::readBytes ( unsigned char * data,
int dsize )

Reads a set number of bytes from the file. This manages both compressed and uncompressed data

Return values
dataBuffer to put data
Parameters
dsizeNumber of bytes to read in

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

Referenced by readRun(), and readShort().

◆ readRadial()

int NidsFile::readRadial ( NidsRadial & radial)

Gets the individual radial header. This specifies which radial data are coming from.

Parameters
radialThe radial header data
Returns
1=success, 0=no data, -1=error

References WXP::NidsRadial::ang0, WXP::NidsRadial::ang1, WXP::Wxp::isDebug(), WXP::Wxp::outDebug(), and readShort().

Referenced by WXP::NidsImage::setImage().

◆ readRun()

int NidsFile::readRun ( NidsRun & data)

Gets the runlength encoded data.

Parameters
dataThe run length data
Returns
1=success, 0=no data, -1=error

References WXP::NidsRun::ival, WXP::Const::MISS, readBytes(), WXP::NidsRun::run, and WXP::NidsRun::val.

Referenced by WXP::NidsImage::setImage().

◆ readShort()

int NidsFile::readShort ( short & val)

Reads in a short integer value (2 bytes)

Return values
valBuffer to put data

References readBytes().

Referenced by readRadial(), and readVector().

◆ readVector()

int NidsFile::readVector ( NidsVector & vect)

Gets a single vector which includes starting and ending locations.

Parameters
vectThe vector data
Returns
1=success, 0=no data, -1=error

References readShort(), WXP::NidsVector::val, WXP::NidsVector::x1, WXP::NidsVector::x2, WXP::NidsVector::y1, and WXP::NidsVector::y2.

◆ skipLine()

int NidsFile::skipLine ( )

Skips a line in the file


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