Ambient library. It provides "set" function to set data to a packet and "send" function to send the packet to the Ambient server. It also provides "bulk_send" function to send multiple data. (Japanese: IoT用のクラウドサービス「Ambient」のデーター送信ライブラリーです。Ambientはマイコンから送られたセンサーデーターを受信し、蓄積し、可視化(グラフ化)します。http://ambidata.io)

Dependents:   AmbientExampleSITB AmbientHeartRateMonitor AmbientHeartBeat AmbientExampleSITB_ws ... more

Revision:
1:dcc2714b5bcb
Parent:
0:7dca16f75bae
Child:
2:a319af936fd5
--- a/Ambient.cpp	Sat May 07 01:40:02 2016 +0000
+++ b/Ambient.cpp	Mon Jun 06 11:41:56 2016 +0000
@@ -17,11 +17,11 @@
 
 const char * ambient_keys[] = {"\"d1\":\"", "\"d2\":\"", "\"d3\":\"", "\"d4\":\"", "\"d5\":\"", "\"d6\":\"", "\"d7\":\"", "\"d8\":\"", "\"lat\":\"", "\"lng\":\"", "\"created\":\""};
 
-AMBIENT::AMBIENT() {
+Ambient::Ambient() {
 }
 
 bool
-AMBIENT::init(unsigned int channelId, const char * writeKey, TCPSocketConnection * s, int dev) {
+Ambient::init(unsigned int channelId, const char * writeKey, TCPSocketConnection * s, int dev) {
     this->channelId = channelId;
 
     if (sizeof(writeKey) > AMBIENT_WRITEKEY_SIZE) {
@@ -50,7 +50,7 @@
 }
 
 bool
-AMBIENT::set(int field, char * data) {
+Ambient::set(int field, char * data) {
     --field;
     if (field < 0 || field >= AMBIENT_NUM_PARAMS) {
         return false;
@@ -65,7 +65,7 @@
 }
 
 bool
-AMBIENT::clear(int field) {
+Ambient::clear(int field) {
     --field;
     if (field < 0 || field >= AMBIENT_NUM_PARAMS) {
         return false;
@@ -76,7 +76,7 @@
 }
 
 bool
-AMBIENT::send() {
+Ambient::send() {
 
     int retry;
     for (retry = 0; retry < AMBIENT_MAX_RETRY; retry++) {