watch using the RSSI of Bluetooth
Dependencies: BaseUsbHost ConfigFile EthernetInterface HTTPClient-long mbed-rtos mbed
CosmClient/CosmClient.h@0:600fe65e7c88, 2013-01-20 (annotated)
- Committer:
- va009039
- Date:
- Sun Jan 20 09:22:31 2013 +0000
- Revision:
- 0:600fe65e7c88
first commit
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
va009039 | 0:600fe65e7c88 | 1 | #ifndef COSM_CLIENT_H |
va009039 | 0:600fe65e7c88 | 2 | #define COSM_CLIENT_H |
va009039 | 0:600fe65e7c88 | 3 | #include "HTTPClient.h" |
va009039 | 0:600fe65e7c88 | 4 | #include <string> |
va009039 | 0:600fe65e7c88 | 5 | |
va009039 | 0:600fe65e7c88 | 6 | class CosmClient { |
va009039 | 0:600fe65e7c88 | 7 | public: |
va009039 | 0:600fe65e7c88 | 8 | CosmClient(const char* apiKey = NULL, const char* feedID = NULL); |
va009039 | 0:600fe65e7c88 | 9 | void setApikey(const char* apiKey) { |
va009039 | 0:600fe65e7c88 | 10 | m_apiKey = apiKey; |
va009039 | 0:600fe65e7c88 | 11 | } |
va009039 | 0:600fe65e7c88 | 12 | void setFeedID(const char* feedID) { |
va009039 | 0:600fe65e7c88 | 13 | m_feedID = feedID; |
va009039 | 0:600fe65e7c88 | 14 | } |
va009039 | 0:600fe65e7c88 | 15 | void putCsv(const char* feedID, ...); |
va009039 | 0:600fe65e7c88 | 16 | void clear(); |
va009039 | 0:600fe65e7c88 | 17 | void add(const char* id, int value, const char* format="%d"); |
va009039 | 0:600fe65e7c88 | 18 | void add(const char* id, float value, const char* format="%f"); |
va009039 | 0:600fe65e7c88 | 19 | void add(int id, float value, const char* format="%f"); |
va009039 | 0:600fe65e7c88 | 20 | int update(); |
va009039 | 0:600fe65e7c88 | 21 | private: |
va009039 | 0:600fe65e7c88 | 22 | string m_buf; |
va009039 | 0:600fe65e7c88 | 23 | string m_apiKey; |
va009039 | 0:600fe65e7c88 | 24 | string m_feedID; |
va009039 | 0:600fe65e7c88 | 25 | }; |
va009039 | 0:600fe65e7c88 | 26 | |
va009039 | 0:600fe65e7c88 | 27 | #endif //COSM_CLIENT_H |