WXP C++ Library Version 6.74.9
Loading...
Searching...
No Matches
MosFile.h
1#ifndef _WINC_MOSFILE
2#define _WINC_MOSFILE
3
4#include <WXP/Date.h>
5#include <WXP/Filename.h>
6#include <WXP/MosData.h>
7#include <WXP/WmoParse.h>
8
9namespace WXP {
10 class MosFile {
11 int type;
12 int model;
13 WmoParse parse;
14 Date date;
15 bool opened;
16
17 public:
18 MosFile();
19 MosFile( const char *filename, int type );
20 MosFile( const char *filename );
21 MosFile( Filename &filename, int type );
22 MosFile( Filename &filename );
23 ~MosFile();
24 int init();
25 int setModel( int mod );
26 int setModel( const char *str );
27 const char*getModel();
28 int open( const char *filename, int type );
29 int open( const char *filename );
30 int open( Filename &filename, int type );
31 int open( Filename &filename );
32 int rewind( );
33 int close( );
35 inline bool isOpen(){ return opened; };
36 int getDate( Date &rdate );
37 int read( MosData &data );
38 int decodeNGM( const char *str, MosData &data );
39 int decodeETA( const char *str, MosData &data );
40 int decodeNAM( const char *str, MosData &data );
41 int decodeAVN( const char *str, MosData &data );
42 int decodeGFS( const char *str, MosData &data );
43 int decodeMRF( const char *str, MosData &data );
44 int decodeGFSX( const char *str, MosData &data );
45 int decodeLAMP( const char *str, MosData &data );
47 inline const char *getWmo(){ return parse.getHeader(); };
48
49 static const char*getModel( int mod );
50
52 enum Model {
53 NONE,
62 PFM
63 };
64 enum Type {
65 UNK,
68 CDF
69 };
70 };
71}
72#endif
This class stores date and time information.
Definition Date.h:8
This class creates filenames.
Definition Filename.h:11
This class stores MOS data.
Definition MosData.h:9
This class reads MOS data files.
Definition MosFile.h:10
int decodeGFS(const char *str, MosData &data)
Definition MosFile.cc:923
const char * getModel()
Definition MosFile.cc:216
Model
Definition MosFile.h:52
@ LAMP
Definition MosFile.h:61
@ GFSX
Definition MosFile.h:60
@ NGM
Definition MosFile.h:54
@ MRF
Definition MosFile.h:59
@ GFS
Definition MosFile.h:58
@ ETA
Definition MosFile.h:55
@ AVN
Definition MosFile.h:57
@ PFM
Definition MosFile.h:62
@ NAM
Definition MosFile.h:56
int decodeLAMP(const char *str, MosData &data)
Definition MosFile.cc:1402
int decodeETA(const char *str, MosData &data)
Definition MosFile.cc:913
int decodeNGM(const char *str, MosData &data)
Definition MosFile.cc:390
int decodeMRF(const char *str, MosData &data)
Definition MosFile.cc:1392
const char * getWmo()
Definition MosFile.h:47
int getDate(Date &rdate)
Definition MosFile.cc:254
int open(const char *filename, int type)
Definition MosFile.cc:83
int close()
Definition MosFile.cc:234
~MosFile()
Definition MosFile.cc:244
int decodeGFSX(const char *str, MosData &data)
Definition MosFile.cc:1217
Type
Definition MosFile.h:64
@ BUFR
Definition MosFile.h:67
@ CDF
Definition MosFile.h:68
@ WMO
Definition MosFile.h:66
int decodeNAM(const char *str, MosData &data)
Definition MosFile.cc:626
int decodeAVN(const char *str, MosData &data)
Definition MosFile.cc:1207
MosFile()
Definition MosFile.cc:26
int setModel(int mod)
Definition MosFile.cc:148
int init()
Definition MosFile.cc:71
int read(MosData &data)
Definition MosFile.cc:263
bool isOpen()
Definition MosFile.h:35
int rewind()
Definition MosFile.cc:223
This class parses text files.
Definition WmoParse.h:10
const char * getHeader()
Definition WmoParse.cc:183
All WXP classes fall under the WXP namespace.
Definition Angle.h:4