WXP C++ Library Version 6.74.9
Loading...
Searching...
No Matches
UpaWxpFile.h
1#ifndef _WINC_UPAWXPFILE
2#define _WINC_UPAWXPFILE
3
4#include <WXP/Date.h>
5#include <WXP/File.h>
6#include <WXP/String.h>
7#include <WXP/UpaRawinData.h>
8
9namespace WXP {
10 class UpaWxpFile {
11 int type;
12 int ver;
13 int access;
14 long pos;
15 int cnt;
16 File file;
17
18 char date_str[40];
19 Date date;
20 bool opened;
21
22 public:
23
24 UpaWxpFile( );
25 UpaWxpFile( const char *filename );
26 UpaWxpFile( const char *filename, int access );
27 ~UpaWxpFile( );
28
29 int init();
30 int open( const char *filename, int access );
31 int getDate( Date &rdate );
32 int setDate( Date &rdate );
33 inline bool isOpen(){ return opened; };
34 int rewind( );
35 int close( );
36 int read( UpaRawinData &data );
37 int readId( String &rid );
38 Date getDate();
39 const char *getDatestr();
40 int write( UpaRawinData &data );
41
42 static int checkType( const char *filename );
43 static int decodePH( const char *str, float &pres, float &hght );
44 static int decodeTD( const char *str, float &temp, float &dewpt );
45 static int decodeWD( const char *str, float &dir, float &spd );
46 static int encodePH( float pres, float hght, char *str );
47 static int encodeTD( float temp, float dewpt, char *str );
48 static int encodeWD( float dir, float spd, char *str );
49 };
50}
51#endif
52
This class stores date and time information.
Definition Date.h:8
This class accesses files.
Definition File.h:15
This is a variable length string class.
Definition String.h:5
This class stores upper air sounding data by type (mandatory, significant, wind levels)
Definition UpaRawinData.h:10
This class reads in and parses upper air data from a converted file.
Definition UpaWxpFile.h:10
int getDate(Date &rdate)
Definition UpaWxpFile.cc:155
int setDate(Date &rdate)
Definition UpaWxpFile.cc:146
All WXP classes fall under the WXP namespace.
Definition Angle.h:4