Permalink
Browse files

Merge pull request #2 from temboo/Version-1-1-3

Version 1.1.3 update
  • Loading branch information...
cormacdriver-temboo committed Sep 17, 2015
2 parents a71b352 + 9ba0a04 commit cc133832c346a58635c65a26805a278887bca876
Showing with 8,523 additions and 120 deletions.
  1. +14 −1 README.adoc
  2. +0 −31 extras/readme.txt
  3. +5 −0 keywords.txt
  4. +1 −1 library.properties
  5. +10 −53 src/Temboo.cpp
  6. +18 −15 src/Temboo.h
  7. +935 −0 src/TembooCoAPEdgeDevice.cpp
  8. +307 −0 src/TembooCoAPEdgeDevice.h
  9. +861 −0 src/TembooMQTTEdgeDevice.cpp
  10. +238 −0 src/TembooMQTTEdgeDevice.h
  11. +62 −0 src/utility/ArduinoTimer.h
  12. +400 −0 src/utility/CoapMessageLayer.cpp
  13. +128 −0 src/utility/CoapMessageLayer.h
  14. +714 −0 src/utility/CoapMsg.cpp
  15. +192 −0 src/utility/CoapMsg.h
  16. +176 −0 src/utility/CoapRRLayer.cpp
  17. +82 −0 src/utility/CoapRRLayer.h
  18. +208 −0 src/utility/FP.h
  19. +954 −0 src/utility/MQTTClient.h
  20. +136 −0 src/utility/MQTTConnect.h
  21. +214 −0 src/utility/MQTTConnectClient.c
  22. +148 −0 src/utility/MQTTConnectServer.c
  23. +107 −0 src/utility/MQTTDeserializePublish.c
  24. +256 −0 src/utility/MQTTFormat.c
  25. +37 −0 src/utility/MQTTFormat.h
  26. +41 −0 src/utility/MQTTLogging.h
  27. +410 −0 src/utility/MQTTPacket.c
  28. +133 −0 src/utility/MQTTPacket.h
  29. +38 −0 src/utility/MQTTPublish.h
  30. +168 −0 src/utility/MQTTSerializePublish.c
  31. +39 −0 src/utility/MQTTSubscribe.h
  32. +137 −0 src/utility/MQTTSubscribeClient.c
  33. +112 −0 src/utility/MQTTSubscribeServer.c
  34. +38 −0 src/utility/MQTTUnsubscribe.h
  35. +106 −0 src/utility/MQTTUnsubscribeClient.c
  36. +102 −0 src/utility/MQTTUnsubscribeServer.c
  37. +78 −0 src/utility/StackTrace.h
  38. +101 −0 src/utility/TembooCoAPIPStack.h
  39. +199 −0 src/utility/TembooCoAPSession.cpp
  40. +111 −0 src/utility/TembooCoAPSession.h
  41. +96 −0 src/utility/TembooMQTTIPStack.h
  42. +189 −0 src/utility/TembooMQTTSession.cpp
  43. +108 −0 src/utility/TembooMQTTSession.h
  44. +15 −19 src/utility/TembooSession.cpp
  45. +37 −0 src/utility/TembooTags.h
  46. +62 −0 src/utility/TembooTimer.h
@@ -1,6 +1,6 @@
= Temboo Library for Arduino =
This library allows an Arduino Yun to connect to the Temboo service.
This library allows an Arduino to connect to the Temboo service.
== License ==
@@ -17,3 +17,16 @@ software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
either express or implied. See the License for the specific
language governing permissions and limitations under the License.
This library includes elements of the Paho MQTT client, used
with permission under the Eclipse Public License - v1.0:
http://www.eclipse.org/legal/epl-v10.html
and the Eclipse Distribution License v1.0:
http://www.eclipse.org/org/documents/edl-v10.php
The Eclipse MQTT Paho client source is available here:
http://www.eclipse.org/paho/

This file was deleted.

Oops, something went wrong.
@@ -7,12 +7,16 @@
#######################################
Temboo KEYWORD1
TembooMQTTEdgeDevice KEYWORD1
TembooCoAPEdgeDevice KEYWORD1
#######################################
# Datatypes (KEYWORD2)
#######################################
TembooChoreo KEYWORD2
TembooCoAPChoreo KEYWORD2
TembooMQTTChoreo KEYWORD2
#######################################
# Methods and Functions (KEYWORD2)
@@ -29,3 +33,4 @@ addInput KEYWORD2
addOutputFilter KEYWORD2
setSettingsFileToWrite KEYWORD2
setSettingsFileToRead KEYWORD2
setGatewayAddress KEYWORD2
@@ -6,5 +6,5 @@ paragraph=Use this library to connect your Arduino board to Temboo, making it si
category=Communication
url=http://www.temboo.com/arduino
architectures=*
version=1.1.2
version=1.1.3
core-dependencies=arduino (>=1.5.0)
@@ -24,60 +24,9 @@
#if defined (ARDUINO_AVR_YUN) || defined (ARDUINO_AVR_TRE)
///////////////////////////////////////////////////////
// BEGIN ARDUINO YUN AND TRE SUPPORT
// ARDUINO YUN AND TRE SUPPORT IN HEADER FILE
///////////////////////////////////////////////////////
#include <Temboo.h>
void TembooChoreo::begin() {
Process::begin("temboo");
}
void TembooChoreo::setAccountName(const String& accountName) {
addParameter("-a" + accountName);
}
void TembooChoreo::setAppKeyName(const String& appKeyName) {
addParameter("-u" + appKeyName);
}
void TembooChoreo::setAppKey(const String& appKey) {
addParameter("-p" + appKey);
}
void TembooChoreo::setChoreo(const String& choreo) {
addParameter("-c" + choreo);
}
void TembooChoreo::setCredential(const String& credentialName) {
addParameter("-e" + credentialName);
}
void TembooChoreo::setSavedInputs(const String& savedInputsName) {
addParameter("-e" + savedInputsName);
}
void TembooChoreo::setProfile(const String& profileName) {
addParameter("-e" + profileName);
}
void TembooChoreo::addInput(const String& inputName, const String& inputValue) {
addParameter("-i" + inputName + ":" + inputValue);
}
void TembooChoreo::addOutputFilter(const String& outputName, const String& filterPath, const String& variableName) {
addParameter("-o" + outputName + ":" + filterPath + ":" + variableName);
}
void TembooChoreo::setSettingsFileToWrite(const String& filePath) {
addParameter("-w" + filePath);
}
void TembooChoreo::setSettingsFileToRead(const String& filePath) {
addParameter("-r" + filePath);
}
#else //ARDUINO_AVR_YUN
///////////////////////////////////////////////////////
@@ -241,6 +190,10 @@ int TembooChoreo::run(uint16_t timeoutSecs) {
return run(INADDR_NONE, 80, timeoutSecs);
}
int TembooChoreo::run(IPAddress addr, uint16_t port) {
return run(addr, port, TEMBOO_CHOREO_DEFAULT_TIMEOUT_SECS);
}
int TembooChoreo::run(IPAddress addr, uint16_t port, uint16_t timeoutSecs) {
m_nextChar = NULL;
@@ -351,7 +304,11 @@ int TembooChoreo::peek() {
// If we're still sending the HTTP response code,
// return the next character in that sequence.
if (m_nextChar != NULL) {
return (int)*m_nextChar;
if(m_nextState != HTTP_CODE_VALUE) {
return (int)pgm_read_byte(m_nextChar);
} else {
return (int)*m_nextChar;
}
}
// Otherwise, return whatever is in the client buffer.
@@ -35,18 +35,20 @@
class TembooChoreo : public Process {
public:
void begin();
void setAccountName(const String& accountName);
void setAppKeyName(const String& appKeyName);
void setAppKey(const String& appKey);
void setChoreo(const String& choreo);
void setCredential(const String& credentialName);
void setSavedInputs(const String& saveInputsName);
void setProfile(const String& profileName);
void addInput(const String& inputName, const String& inputValue);
void addOutputFilter(const String& filterName, const String& filterPath, const String& variableName);
void setSettingsFileToWrite(const String& filePath);
void setSettingsFileToRead(const String& filePath);
void begin() {Process::begin("temboo");}
void setAccountName(const String& accountName) { addParameter("-a" + accountName);}
void setAppKeyName(const String& appKeyName) { addParameter("-u" + appKeyName);}
void setAppKey(const String& appKey) { addParameter("-p" + appKey);}
void setChoreo(const String& choreo) { addParameter("-c" + choreo);}
void setCredential(const String& credentialName) { addParameter("-e" + credentialName);}
void setSavedInputs(const String& savedInputsName) { addParameter("-e" + savedInputsName);}
void setProfile(const String& profileName) { addParameter("-e" + profileName);}
void addInput(const String& inputName, const String& inputValue) { addParameter("-i" + inputName + ":" + inputValue);}
void addOutputFilter(const String& filterName, const String& filterPath, const String& variableName) { addParameter("-o" + filterName + ":" + filterPath + ":" + variableName);}
void setSettingsFileToWrite(const String& filePath) { addParameter("-w" + filePath);}
void setSettingsFileToRead(const String& filePath) { addParameter("-r" + filePath);}
unsigned int setGatewayAddress(const String& addr) { addParameter("-s" + addr);}
};
@@ -134,10 +136,11 @@ class TembooChoreo : public Stream {
// run the choreo using the current input info
int run();
// run the choreo on the Temboo server at the given IP address and port
// (used only when instructed by Temboo customer support.)
// run the choreo with a user specified timeout
int run(uint16_t timeoutSecs);
// run the choreo on the Temboo server at the given IP address and port
int run(IPAddress addr, uint16_t port);
int run(IPAddress addr, uint16_t port, uint16_t timeoutSecs);
void close();
Oops, something went wrong.

0 comments on commit cc13383

Please sign in to comment.