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

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

#include "../include/Lev2File.h"

Public Types

enum  Type { RAW , COMP }
 
enum  DataType { REF , VEL , SPECT }
 

Public Member Functions

 Lev2File ()
 
 Lev2File (const char *filename, int rtype)
 
 ~Lev2File ()
 
int init ()
 
int open (const char *filename, int rtype)
 
int close ()
 
bool isOpen ()
 
int readData ()
 
int readBytes (unsigned char *data, int dsize)
 
int bseek (int byte)
 
int boffset (int byte)
 
int getByte ()
 
int getUByte ()
 
int getShort ()
 
int getLong ()
 
float getFloat ()
 
int setId (const char *rid)
 
const char * getId ()
 
int setDataType (int type)
 
int getNumData ()
 
int setCompress (int val)
 
int getCompress ()
 
int getHeader (Lev2Info &info)
 
int getBlock (Lev2Data &data)
 
int nextBlock ()
 
float getData ()
 
bool hasRef ()
 
bool hasVel ()
 
bool hasSpect ()
 

Detailed Description

This class reads and decodes NIDS data from file.

Author
Dan Vietor

Member Enumeration Documentation

◆ DataType

Data type

Enumerator
REF 

Reflectivity

VEL 

Velocity

SPECT 

Spectrum width

◆ Type

File type

Enumerator
RAW 

Raw uncompressed data

COMP 

Compressed data

Constructor & Destructor Documentation

◆ Lev2File() [1/2]

Lev2File::Lev2File ( )

Constructor. Initializes class data

References init().

◆ Lev2File() [2/2]

Lev2File::Lev2File ( const char *  filename,
int  rtype 
)

Constructor. Opens file.

Parameters
filenameFile to open

References init(), and open().

◆ ~Lev2File()

Lev2File::~Lev2File ( )

Destructor.

Member Function Documentation

◆ close()

int Lev2File::close ( )

Closes the file

References WXP::File::close().

◆ getByte()

int Lev2File::getByte ( )

Reads in a byte value

◆ getCompress()

int WXP::Lev2File::getCompress ( )
inline

Returns whether data are compressed

◆ getLong()

int Lev2File::getLong ( )

Reads in a integer value (4 bytes)

◆ getShort()

int Lev2File::getShort ( )

Reads in a short value (2 bytes)

◆ getUByte()

int Lev2File::getUByte ( )

Reads in a byte value

◆ init()

int Lev2File::init ( )

Initializes class data

References COMP, WXP::Buffer::init(), and REF.

Referenced by Lev2File().

◆ isOpen()

bool Lev2File::isOpen ( )

Is file opened

Returns
True if open

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

◆ open()

int Lev2File::open ( const char *  filename,
int  rtype 
)

Opens a NIDS file

Parameters
filenameFile to open

References COMP, WXP::File::isOpen(), and WXP::File::open().

Referenced by WXP::Lev2Plot::draw(), WXP::Lev2Plot::getDomain(), and Lev2File().


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