|
WXP C++ Library Version 6.74.9
|
This class reads in lightning data from file. More...
#include "../include/LightFile.h"
Public Types | |
| enum | Type { UNK , ALBANY , UNISYS , KAV , NOAA , GAIS , GAI_ASC , USPLN , USPLNT , USPLNB , VAISALA_ASC , NLDN_ASC } |
Public Member Functions | |
| LightFile () | |
| LightFile (const char *filename, int rtype) | |
| int | init () |
| int | open (const char *filename, int rtype) |
| bool | isOpen () |
| int | close () |
| int | read (LightData &data) |
Static Public Member Functions | |
| static int | getType (const char *str) |
This class reads in lightning data from file.
| enum WXP::LightFile::Type |
File type
| LightFile::LightFile | ( | ) |
Constructor
References init().
| LightFile::LightFile | ( | const char * | filename, |
| int | rtype | ||
| ) |
| int LightFile::close | ( | ) |
|
static |
Gets the file type
| str | The file type (albany, unisys, kav, gais, noaa, uspln) |
References ALBANY, WXP::StrLib::equal(), GAI_ASC, GAIS, KAV, NLDN_ASC, NOAA, UNISYS, UNK, USPLN, USPLNB, USPLNT, and VAISALA_ASC.
Referenced by WXP::LightPlot::setInput(), and WXP::LightPlot::setNameConv().
| int LightFile::init | ( | ) |
| bool LightFile::isOpen | ( | ) |
Returns true if file is open
Referenced by WXP::LightPlot::draw().
| int LightFile::open | ( | const char * | filename, |
| int | rtype | ||
| ) |
Opens the input file
| filename | The file name |
| rtype | The lightning file type |
References ALBANY, GAI_ASC, GAIS, WXP::Swap::init(), WXP::File::isOpen(), KAV, NLDN_ASC, NOAA, WXP::File::open(), WXP::Wxp::outWarning(), WXP::File::read(), WXP::File::seek(), WXP::File::skipLine(), UNISYS, USPLN, USPLNB, USPLNT, VAISALA_ASC, and WXP::Wxp::validLicense().
Referenced by WXP::LightPlot::draw(), and LightFile().
| int LightFile::read | ( | LightData & | data | ) |
Reads data from the file
| data | The output lightning data |
References ALBANY, WXP::DateVal::day, GAI_ASC, GAIS, WXP::Date::get(), WXP::File::getLine(), WXP::DateVal::hour, KAV, WXP::DateVal::min, WXP::Const::MISS, WXP::DateVal::month, NLDN_ASC, NOAA, WXP::File::read(), WXP::File::scanf(), WXP::DateVal::sec, WXP::File::seek(), WXP::LightData::setDate(), WXP::Date::setDays(), WXP::LightData::setFsec(), WXP::Date::setHour(), WXP::LightData::setLat(), WXP::LightData::setLon(), WXP::Date::setMinute(), WXP::LightData::setMulti(), WXP::Date::setSecond(), WXP::LightData::setSignal(), UNISYS, USPLN, USPLNB, USPLNT, VAISALA_ASC, and WXP::DateVal::year.
Referenced by WXP::LightPlot::draw().