Dependencies: EthernetNetIf TextLCD mbed
PachubeClient/PachubeClient.h@0:48abe2923d34, 2011-06-20 (annotated)
- Committer:
- Torsten
- Date:
- Mon Jun 20 11:21:15 2011 +0000
- Revision:
- 0:48abe2923d34
Initial
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Torsten | 0:48abe2923d34 | 1 | #ifndef PACHUBECLIENT_H_ |
Torsten | 0:48abe2923d34 | 2 | #define PACHUBECLIENT_H_ |
Torsten | 0:48abe2923d34 | 3 | |
Torsten | 0:48abe2923d34 | 4 | #include <mbed.h> |
Torsten | 0:48abe2923d34 | 5 | #include <HTTPClient.h> |
Torsten | 0:48abe2923d34 | 6 | |
Torsten | 0:48abe2923d34 | 7 | class PachubeClient { |
Torsten | 0:48abe2923d34 | 8 | |
Torsten | 0:48abe2923d34 | 9 | public: |
Torsten | 0:48abe2923d34 | 10 | // constructor and destructor |
Torsten | 0:48abe2923d34 | 11 | PachubeClient(const string& apiKey); |
Torsten | 0:48abe2923d34 | 12 | virtual ~PachubeClient(); |
Torsten | 0:48abe2923d34 | 13 | |
Torsten | 0:48abe2923d34 | 14 | // put csv method to feed |
Torsten | 0:48abe2923d34 | 15 | void PutCsv(const string& environmentID, const string& data); |
Torsten | 0:48abe2923d34 | 16 | |
Torsten | 0:48abe2923d34 | 17 | // put csv method to datastream |
Torsten | 0:48abe2923d34 | 18 | void PutCsv(const string& environmentID, const string& datastreamID, const string& data); |
Torsten | 0:48abe2923d34 | 19 | |
Torsten | 0:48abe2923d34 | 20 | // http result and response |
Torsten | 0:48abe2923d34 | 21 | HTTPResult Result(); |
Torsten | 0:48abe2923d34 | 22 | int Response(); |
Torsten | 0:48abe2923d34 | 23 | |
Torsten | 0:48abe2923d34 | 24 | private: |
Torsten | 0:48abe2923d34 | 25 | // http client and data |
Torsten | 0:48abe2923d34 | 26 | HTTPClient _client; |
Torsten | 0:48abe2923d34 | 27 | HTTPText _csvContent; |
Torsten | 0:48abe2923d34 | 28 | |
Torsten | 0:48abe2923d34 | 29 | // http result and response |
Torsten | 0:48abe2923d34 | 30 | HTTPResult _result; |
Torsten | 0:48abe2923d34 | 31 | int _response; |
Torsten | 0:48abe2923d34 | 32 | |
Torsten | 0:48abe2923d34 | 33 | }; |
Torsten | 0:48abe2923d34 | 34 | |
Torsten | 0:48abe2923d34 | 35 | #endif // PACHUBECLIENT_H_ |