C++ Wrapper around the IBM LMiC LoRaWAN implementation

Dependencies:   LMiC SX1276Lib

Committer:
Sille Van Landschoot
Date:
Sun Oct 16 09:57:58 2016 +0200
Revision:
9:cfe697b53d71
Parent:
2:6fac10decfb3
Child:
10:9bf05e9b4cde
add linkcheck control

Who changed what in which revision?

UserRevisionLine numberNew contents of line
sillevl 1:7cfc59ba0797 1 /* The MIT License (MIT)
sillevl 2:6fac10decfb3 2 *
sillevl 1:7cfc59ba0797 3 * Copyright (c) 2016 Sille Van Landschoot
sillevl 2:6fac10decfb3 4 *
sillevl 1:7cfc59ba0797 5 * Permission is hereby granted, free of charge, to any person obtaining a copy
sillevl 1:7cfc59ba0797 6 * of this software and associated documentation files (the "Software"), to deal
sillevl 1:7cfc59ba0797 7 * in the Software without restriction, including without limitation the rights
sillevl 1:7cfc59ba0797 8 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
sillevl 1:7cfc59ba0797 9 * copies of the Software, and to permit persons to whom the Software is
sillevl 1:7cfc59ba0797 10 * furnished to do so, subject to the following conditions:
sillevl 2:6fac10decfb3 11 *
sillevl 1:7cfc59ba0797 12 * The above copyright notice and this permission notice shall be included in all
sillevl 1:7cfc59ba0797 13 * copies or substantial portions of the Software.
sillevl 2:6fac10decfb3 14 *
sillevl 1:7cfc59ba0797 15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
sillevl 1:7cfc59ba0797 16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
sillevl 1:7cfc59ba0797 17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
sillevl 1:7cfc59ba0797 18 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
sillevl 1:7cfc59ba0797 19 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
sillevl 1:7cfc59ba0797 20 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
sillevl 1:7cfc59ba0797 21 * SOFTWARE.
sillevl 1:7cfc59ba0797 22 */
sillevl 1:7cfc59ba0797 23
sillevl 1:7cfc59ba0797 24 #ifndef SIMPLE_LORAWAN_NODE_H_
sillevl 1:7cfc59ba0797 25 #define SIMPLE_LORAWAN_NODE_H_
sillevl 1:7cfc59ba0797 26
sillevl 1:7cfc59ba0797 27 #include "lmic.h"
sillevl 1:7cfc59ba0797 28 #include "stdint.h"
sillevl 1:7cfc59ba0797 29
sillevl 2:6fac10decfb3 30 namespace SimpleLoRaWAN
sillevl 2:6fac10decfb3 31 {
sillevl 1:7cfc59ba0797 32
sillevl 2:6fac10decfb3 33 class Node
sillevl 2:6fac10decfb3 34 {
sillevl 1:7cfc59ba0797 35 public:
sillevl 1:7cfc59ba0797 36 Node();
sillevl 1:7cfc59ba0797 37 virtual ~Node();
sillevl 1:7cfc59ba0797 38 void send(char* data, int size);
sillevl 1:7cfc59ba0797 39 static void onEvent(ev_t ev);
sillevl 1:7cfc59ba0797 40 void process();
sillevl 1:7cfc59ba0797 41
Sille Van Landschoot 9:cfe697b53d71 42 void enableLinkCheck();
Sille Van Landschoot 9:cfe697b53d71 43 void disableLinkCheck();
Sille Van Landschoot 9:cfe697b53d71 44 void setLinkCheck(int state);
Sille Van Landschoot 9:cfe697b53d71 45
sillevl 2:6fac10decfb3 46 private:
sillevl 2:6fac10decfb3 47 void init();
Sille Van Landschoot 9:cfe697b53d71 48 void setLinkCheck();
sillevl 1:7cfc59ba0797 49 };
sillevl 1:7cfc59ba0797 50
sillevl 1:7cfc59ba0797 51 } /* namespace SimpleLoRaWAN */
sillevl 1:7cfc59ba0797 52
sillevl 2:6fac10decfb3 53 #endif /* SIMPLE_LORAWAN_NODE_H_ */