27 #pragma warning(disable:4512) //we don't need any = operator!
43 GSNIO(
const std::string& configfile);
49 std::vector< std::vector<MeteoData> >& vecMeteo);
52 void convertUnits(
MeteoData& meteo)
const;
53 bool buildStation(
const std::string& vs_name,
const std::string& full_name,
const double& lat,
const double& lon,
54 const double& alt,
const double& slope_angle,
const double& slope_azi,
StationData &sd)
const;
55 bool parseMetadata(std::stringstream& ss,
StationData &sd, std::string &fields, std::string &units)
const;
56 void readData(
const Date& dateStart,
const Date& dateEnd, std::vector<MeteoData>& vecMeteo,
const size_t& stationindex);
57 void map_parameters(
const std::string& fields,
const std::string& units,
MeteoData& md, std::vector<size_t>& index);
58 void parse_streamElement(
const std::string& line,
const std::vector<size_t>& index,
MeteoData& tmpmeteo)
const;
60 void initGSNConnection();
61 static size_t data_write(
void* buf,
size_t size,
size_t nmemb,
void* userp);
62 bool curl_read(
const std::string& url, std::ostream& os);
65 std::vector<std::string> vecStationName;
66 std::map<size_t, double> multiplier, offset;
67 std::string coordin, coordinparam, coordout, coordoutparam;
68 std::string endpoint, userid, passwd;
69 double default_timezone;
73 static const int http_timeout_dflt;
74 static const std::string sensors_endpoint, sensors_format, null_string;
virtual void readStationData(const Date &date, std::vector< StationData > &vecStation)
Fill vecStation with StationData objects for a certain date of interest.
Definition: GSNIO.cc:126
A class representing the IO Layer of the software Alpine3D. For each type of IO (File, DB, Webservice, etc) a derived class is to be created that holds the specific implementation of the appropriate virtual methods. The IOHandler class is a wrapper class that is able to deal with all above implementations of the IOInterface abstract base class.
Definition: IOInterface.h:43
GSNIO(const std::string &configfile)
Definition: GSNIO.cc:88
virtual void readMeteoData(const Date &dateStart, const Date &dateEnd, std::vector< std::vector< MeteoData > > &vecMeteo)
Fill vecMeteo with a time series of objects corresponding to the interval indicated by dateStart and ...
Definition: GSNIO.cc:226
A class that reads a key/value file. These files (typically named *.ini) follow the INI file format s...
Definition: Config.h:58
A class to handle timestamps. This class handles conversion between different time display formats (I...
Definition: Date.h:79
A class to represent meteo stations with attributes like longitude, latitude, etc.
Definition: StationData.h:38
A class to represent a singular measurement received from one station at a certain time (represented ...
Definition: MeteoData.h:101
This class enables the access to the GSN RESTful web service.
Definition: GSNIO.h:41