Skip to content

Commit

Permalink
Fix library layout to make sure it is compliant with 1.5x version
Browse files Browse the repository at this point in the history
  • Loading branch information
forGGe committed Oct 1, 2018
1 parent 6474e91 commit 148ac61
Show file tree
Hide file tree
Showing 7 changed files with 78 additions and 0 deletions.
20 changes: 20 additions & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Copyright (c) 2008-2015 Nicholas O'Leary

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ThingsBoard client for Arduino
==============================
25 changes: 25 additions & 0 deletions keywords.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#######################################
# Syntax Coloring Map For ThingsBoard
#######################################

#######################################
# Datatypes (KEYWORD1)
#######################################

PubSubClient ThingsBoard

#######################################
# Methods and Functions (KEYWORD2)
#######################################

connect KEYWORD2
connected KEYWORD2
sendInt KEYWORD2
sendFloat KEYWORD2
sendString KEYWORD2
sendJson KEYWORD2
loop KEYWORD2

#######################################
# Constants (LITERAL1)
#######################################
12 changes: 12 additions & 0 deletions library.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"name": "ThingsBoard",
"keywords": "mqtt, m2m, iot, thingsboard",
"description": "A library for connecting to the ThingsBoard IoT platform. Thin wrapper on PubSubClient",
"repository": {
"type": "git",
"url": "https://github.com/forGGe/ThingsBoardArduino"
},
"version": "0.1",
"examples": "examples/*/*.ino",
"frameworks": "arduino"
}
10 changes: 10 additions & 0 deletions library.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name=ThingsBoard
version=0.1
author=Max Payne <[email protected]>
maintainer=Max Payne <[email protected]>
sentence=ThingsBoard library for Arduino.
paragraph=A library for connecting to the ThingsBoard IoT platform. Thin wrapper on PubSubClient.
category=Communication
url=https://github.com/forGGe/ThingsBoardArduino
architectures=*
includes=ThingsBoard.h
1 change: 1 addition & 0 deletions ThingsBoard.cpp → src/ThingsBoard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
Based on PubSub MQTT library.
Created by Olender M. Oct 2018.
Released into the public domain.
https://thingsboard.io/
*/

#include "ThingsBoard.h"
Expand Down
8 changes: 8 additions & 0 deletions ThingsBoard.h → src/ThingsBoard.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,28 @@
class ThingsBoard
{
public:
//
ThingsBoard(Client &client);

//
bool connect(const String &host, const String &access_token, int port = 1883);

//
bool connected();

//
bool sendInt(const String &key, int value);

//
bool sendFloat(const String &key, float value);

//
bool sendString(const String &key, const String &value);

//
bool sendJson(const String &json);

//
void loop();

private:
Expand Down

0 comments on commit 148ac61

Please sign in to comment.