mbed IoT Gateway board demo. This program received wireless data from JeeNode and uploads to Pachube. http://www.skpang.co.uk/catalog/mbed-iot-gateway-board-p-1051.html Full kit: http://www.skpang.co.uk/catalog/mbed-iot-gateway-full-kit-p-1052.html

Dependencies:   EthernetNetIf mbed

Committer:
pangsk
Date:
Mon Jan 02 20:03:01 2012 +0000
Revision:
0:7f301f08b68f
Initial release.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
pangsk 0:7f301f08b68f 1 /**
pangsk 0:7f301f08b68f 2 * Pachube API interface driver. (Version 0.0.1)
pangsk 0:7f301f08b68f 3 *
pangsk 0:7f301f08b68f 4 * Copyright (C) 2010 Shinichiro Nakamura (CuBeatSystems)
pangsk 0:7f301f08b68f 5 * http://shinta.main.jp/
pangsk 0:7f301f08b68f 6 */
pangsk 0:7f301f08b68f 7
pangsk 0:7f301f08b68f 8 #ifndef _PACHUBE_V2_CSV_H_
pangsk 0:7f301f08b68f 9 #define _PACHUBE_V2_CSV_H_
pangsk 0:7f301f08b68f 10
pangsk 0:7f301f08b68f 11 #include "Pachube.h"
pangsk 0:7f301f08b68f 12
pangsk 0:7f301f08b68f 13 class PachubeV2CSV : public Pachube {
pangsk 0:7f301f08b68f 14 public:
pangsk 0:7f301f08b68f 15
pangsk 0:7f301f08b68f 16 explicit PachubeV2CSV(std::string APIKEY);
pangsk 0:7f301f08b68f 17
pangsk 0:7f301f08b68f 18 virtual ~PachubeV2CSV();
pangsk 0:7f301f08b68f 19
pangsk 0:7f301f08b68f 20 /*
pangsk 0:7f301f08b68f 21 * =================================================================
pangsk 0:7f301f08b68f 22 * Environments (feeds)
pangsk 0:7f301f08b68f 23 * =================================================================
pangsk 0:7f301f08b68f 24 */
pangsk 0:7f301f08b68f 25
pangsk 0:7f301f08b68f 26 /**
pangsk 0:7f301f08b68f 27 * List all available feeds: GET /v2/feeds
pangsk 0:7f301f08b68f 28 *
pangsk 0:7f301f08b68f 29 * @param page Integer indicating which page of results you are requesting.
pangsk 0:7f301f08b68f 30 * @param per_page Integer defining how many results to return per page (1 to 1000).
pangsk 0:7f301f08b68f 31 * @param content String parameter ('full' or 'summary') describing whether we want full or summary results. Full results means all datastream values are returned, summary just returns the environment meta data for each feed.
pangsk 0:7f301f08b68f 32 * @param q Full text search parameter. Should return any feeds matching this string.
pangsk 0:7f301f08b68f 33 * @param tag Returns feeds containing datastreams tagged with the search query.
pangsk 0:7f301f08b68f 34 * @param user Returns feeds created by the user specified.
pangsk 0:7f301f08b68f 35 * @param units Returns feeds containing datastreams with units specified by the search query.
pangsk 0:7f301f08b68f 36 * @param status Possible values ('live', 'frozen', or 'all'). Whether to search for only live feeds, only frozen feeds, or all feeds. Defaults to all.
pangsk 0:7f301f08b68f 37 * @param order Order of returned feeds. Possible values ('created_at', 'retrieved_at', or 'relevance').
pangsk 0:7f301f08b68f 38 */
pangsk 0:7f301f08b68f 39 virtual int listAllAvailableFeeds(
pangsk 0:7f301f08b68f 40 int page,
pangsk 0:7f301f08b68f 41 int per_page,
pangsk 0:7f301f08b68f 42 std::string content,
pangsk 0:7f301f08b68f 43 std::string q,
pangsk 0:7f301f08b68f 44 std::string tag,
pangsk 0:7f301f08b68f 45 std::string user,
pangsk 0:7f301f08b68f 46 std::string units,
pangsk 0:7f301f08b68f 47 std::string status,
pangsk 0:7f301f08b68f 48 std::string order,
pangsk 0:7f301f08b68f 49 std::string &datatext);
pangsk 0:7f301f08b68f 50
pangsk 0:7f301f08b68f 51 /**
pangsk 0:7f301f08b68f 52 * Create new feed: POST /v2/feeds
pangsk 0:7f301f08b68f 53 */
pangsk 0:7f301f08b68f 54 virtual int createNewFeed(void);
pangsk 0:7f301f08b68f 55
pangsk 0:7f301f08b68f 56 /**
pangsk 0:7f301f08b68f 57 * Read feed: GET /v2/feeds/<feed_id>
pangsk 0:7f301f08b68f 58 */
pangsk 0:7f301f08b68f 59 virtual int readFeed(int feed_id, std::string &datatext);
pangsk 0:7f301f08b68f 60
pangsk 0:7f301f08b68f 61 /**
pangsk 0:7f301f08b68f 62 * Update feed: PUT /v2/feeds/<feed_id>
pangsk 0:7f301f08b68f 63 */
pangsk 0:7f301f08b68f 64 virtual int updateFeed(int feed_id);
pangsk 0:7f301f08b68f 65
pangsk 0:7f301f08b68f 66 /**
pangsk 0:7f301f08b68f 67 * Delete feed: DELETE /v2/feeds/<feed_id>
pangsk 0:7f301f08b68f 68 */
pangsk 0:7f301f08b68f 69 virtual int deleteFeed(int feed_id);
pangsk 0:7f301f08b68f 70
pangsk 0:7f301f08b68f 71 /*
pangsk 0:7f301f08b68f 72 * =================================================================
pangsk 0:7f301f08b68f 73 * Datastreams
pangsk 0:7f301f08b68f 74 * =================================================================
pangsk 0:7f301f08b68f 75 */
pangsk 0:7f301f08b68f 76
pangsk 0:7f301f08b68f 77 /**
pangsk 0:7f301f08b68f 78 * Create new datastream: POST /v2/feeds/<feed_id>/datastreams
pangsk 0:7f301f08b68f 79 *
pangsk 0:7f301f08b68f 80 * @param feed_id Feed ID.
pangsk 0:7f301f08b68f 81 * @param stream_id Stream ID text.
pangsk 0:7f301f08b68f 82 * @param value value.
pangsk 0:7f301f08b68f 83 *
pangsk 0:7f301f08b68f 84 * @return Return code from a web server.
pangsk 0:7f301f08b68f 85 */
pangsk 0:7f301f08b68f 86 virtual int createNewDataStream(int feed_id, std::string stream_id, std::string value);
pangsk 0:7f301f08b68f 87
pangsk 0:7f301f08b68f 88 /**
pangsk 0:7f301f08b68f 89 * Read datastream - GET /v2/feeds/<feed_id>/datastreams/<datastream_id>
pangsk 0:7f301f08b68f 90 *
pangsk 0:7f301f08b68f 91 * @param feed_id Feed ID.
pangsk 0:7f301f08b68f 92 * @param stream_id Stream ID text.
pangsk 0:7f301f08b68f 93 *
pangsk 0:7f301f08b68f 94 * @return Return code from a web server.
pangsk 0:7f301f08b68f 95 */
pangsk 0:7f301f08b68f 96 virtual int readDataStream(int feed_id, std::string stream_id, std::string &datatext);
pangsk 0:7f301f08b68f 97
pangsk 0:7f301f08b68f 98 /**
pangsk 0:7f301f08b68f 99 * Update datastream: PUT /v2/feeds/<feed_id>/datastreams/<datastream_id>
pangsk 0:7f301f08b68f 100 *
pangsk 0:7f301f08b68f 101 * @param feed_id Feed ID.
pangsk 0:7f301f08b68f 102 * @param stream_id Stream ID text.
pangsk 0:7f301f08b68f 103 * @param value value.
pangsk 0:7f301f08b68f 104 *
pangsk 0:7f301f08b68f 105 * @return Return code from a web server.
pangsk 0:7f301f08b68f 106 */
pangsk 0:7f301f08b68f 107 virtual int updateDataStream(int feed_id, std::string stream_id, std::string value);
pangsk 0:7f301f08b68f 108
pangsk 0:7f301f08b68f 109 /**
pangsk 0:7f301f08b68f 110 * Delete datastream: DELETE /v2/feeds/<feed_id>/datastreams/<datastream_id>
pangsk 0:7f301f08b68f 111 *
pangsk 0:7f301f08b68f 112 * @param feed_id Feed ID.
pangsk 0:7f301f08b68f 113 * @param stream_id Stream ID text.
pangsk 0:7f301f08b68f 114 *
pangsk 0:7f301f08b68f 115 * @return Return code from a web server.
pangsk 0:7f301f08b68f 116 */
pangsk 0:7f301f08b68f 117 virtual int deleteDataStream(int feed_id, std::string stream_id);
pangsk 0:7f301f08b68f 118
pangsk 0:7f301f08b68f 119 };
pangsk 0:7f301f08b68f 120
pangsk 0:7f301f08b68f 121 #endif