WXP::NidsFile Class Reference

This class reads and decodes NIDS data from file. More...

#include "../include/NidsFile.h"

List of all members.

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 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 (long &val)
long readLong ()
int readUlong (unsigned long &val)
int getHeader (NidsInfo &info)
int messHeader ()
int prodDesc ()
int prodSymb ()
int prodSymbLayer ()
int gotoGraphic ()
int graphic ()
int graphicLayer ()
int packet ()
int getRastor ()
int getRadial (NidsRadial &radial)
int getRun (NidsRun &data)
int getVector (NidsVector &vect)
int skipVector ()
int getText (NidsText &text)
int skipText ()
int getWind (NidsWind &wind)
int skipWind ()
int getCode ()
bool isBRef ()
bool isBSW ()
bool isCRef ()
bool isVel ()
bool isSRVel ()
bool isTops ()
bool isLRef ()
bool isVIL ()
bool isVAD ()
bool isPrec ()
bool isDPA ()
bool isDHR ()
bool isDSP ()
bool isPacketRadial ()
bool isPacketRastor ()
bool isPacketVector ()
bool isPacketWindbarb ()
bool isPacketText ()
bool isPacketDpa ()
int getPacketCode ()
int getNbin ()
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::NidsFile (  ) 

Constructor. Initializes class data

References init().

NidsFile::NidsFile ( const char *  filename  ) 

Constructor. Opens file.

Parameters:
filename File to open

References init(), and open().

NidsFile::~NidsFile (  ) 

Destructor.


Member Function Documentation

int NidsFile::close (  ) 

Closes the file

References WXP::File::close().

int NidsFile::getRadial ( NidsRadial radial  ) 

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

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

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

int NidsFile::getRun ( NidsRun data  ) 

Gets the runlength encoded data.

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

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

int NidsFile::getVector ( NidsVector vect  ) 

Gets a single vector which includes starting and ending locations.

Parameters:
vect The vector data
Returns:
1=success, 0=no data, -1=error

References readShort().

Referenced by WXP::NidsPlot::drawData().

int NidsFile::init (  ) 

Initializes class data

References WXP::Buffer::init().

Referenced by NidsFile(), and open().

bool NidsFile::isOpen (  ) 

Is file opened

Returns:
True if open

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

int NidsFile::open ( const char *  filename  ) 

Opens a NIDS file

Parameters:
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 
)
int NidsFile::readShort ( short &  val  ) 

Reads in a short integer value (2 bytes)

Return values:
val Buffer to put data

References readBytes().

Referenced by getRadial(), and getVector().

int NidsFile::skipLine (  ) 

Skips a line in the file

References WXP::File::read().


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

Generated on 8 Jan 2010 for WXP C++ Library by  doxygen 1.6.1