WXP C++ Library Version 6.74.9
Loading...
Searching...
No Matches
Lev2File.h
1#ifndef _WINC_LEV2FILE
2#define _WINC_LEV2FILE
3
4#include <WXP/Buffer.h>
5#include <WXP/BZlib.h>
6#include <WXP/Date.h>
7#include <WXP/File.h>
8#include <WXP/Lev2Data.h>
9#include <WXP/Lev2Info.h>
10
11namespace WXP {
12 class Lev2File {
13 File file;
14 bool opened;
15 Date date;
16 int type;
17 int compress; // Compressed or Encypted
18
19 // Bzip2 parameters
20 Buffer in;
21 Buffer out;
22 BZlib bz;
23 int err;
24
25 int blk_off;
26 int blk_next;
27 int blk_size;
28 int blk_num;
29
30 // Product description
31 char id[10];
32 float lat,lon;
33 int msg_type;
34 int scan_type;
35 int refl_ptr;
36 int vel_ptr;
37 int spect_ptr;
38 int vol_ptr;
39 int elev_ptr;
40 int rad_ptr;
41 int num_refl;
42 int num_vel;
43
44 float refl_size;
45 int refl_bits;
46 float refl_scl;
47 float refl_off;
48
49 float vel_size;
50 int vel_bits;
51 float vel_scl;
52 float vel_off;
53
54 float spect_size;
55 int spect_bits;
56 float spect_scl;
57 float spect_off;
58
59 int initClass();
60 public:
61 Lev2File();
62 Lev2File( const char *filename, int rtype );
63 ~Lev2File();
64 int init();
65 int open( const char *filename, int rtype );
66 int close();
67 bool isOpen();
68 int readData();
69 int readBytes( unsigned char *data, int dsize );
70 int bseek( int byte );
71 int boffset( int byte );
72 int getByte();
73 int getUByte();
74 int getShort();
75 int getLong();
76 float getFloat();
77 int setId( const char *rid );
78 const char *getId(){ return id; };
79 int setDataType( int type );
80 int getNumData();
81 int setCompress( int val );
83 inline int getCompress(){ return compress; };
84 int getHeader( Lev2Info &info );
85 int getBlock( Lev2Data &data );
86 int nextBlock();
87 float getData();
88
89 bool hasRef();
90 bool hasVel();
91 bool hasSpect();
92
94 enum Type {
96 COMP
97 };
98
100 enum DataType {
103 SPECT
104 };
105
106 };
107}
108#endif
This class manages bzip2 decompression.
Definition BZlib.h:9
This class creates a generic buffer for data.
Definition Buffer.h:5
This class stores date and time information.
Definition Date.h:8
This class accesses files.
Definition File.h:15
This class reads and decodes NIDS data from file.
Definition Lev2File.h:12
int getLong()
Definition Lev2File.cc:253
int getCompress()
Definition Lev2File.h:83
int getShort()
Definition Lev2File.cc:241
Lev2File()
Definition Lev2File.cc:25
~Lev2File()
Definition Lev2File.cc:43
int getByte()
Definition Lev2File.cc:221
int close()
Definition Lev2File.cc:93
int open(const char *filename, int rtype)
Definition Lev2File.cc:72
int getUByte()
Definition Lev2File.cc:231
int init()
Definition Lev2File.cc:54
bool isOpen()
Definition Lev2File.cc:86
DataType
Definition Lev2File.h:100
@ VEL
Definition Lev2File.h:102
@ SPECT
Definition Lev2File.h:103
@ REF
Definition Lev2File.h:101
Type
Definition Lev2File.h:94
@ COMP
Definition Lev2File.h:96
@ RAW
Definition Lev2File.h:95
This structure stores LevelII radar header information.
Definition Lev2Info.h:7
All WXP classes fall under the WXP namespace.
Definition Angle.h:4
This struct stores Nexrad Level II block header information.
Definition Lev2Data.h:5