C++ Wrapper around the IBM LMiC LoRaWAN implementation
Node.h@2:6fac10decfb3, 2016-06-30 (annotated)
- Committer:
- sillevl
- Date:
- Thu Jun 30 18:49:11 2016 +0000
- Revision:
- 2:6fac10decfb3
- Parent:
- 1:7cfc59ba0797
- Child:
- 6:a93e81aa299d
- Child:
- 9:cfe697b53d71
using OTAANode class
Who changed what in which revision?
User | Revision | Line number | New 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 | |
sillevl | 2:6fac10decfb3 | 42 | private: |
sillevl | 2:6fac10decfb3 | 43 | void init(); |
sillevl | 2:6fac10decfb3 | 44 | |
sillevl | 1:7cfc59ba0797 | 45 | }; |
sillevl | 1:7cfc59ba0797 | 46 | |
sillevl | 1:7cfc59ba0797 | 47 | } /* namespace SimpleLoRaWAN */ |
sillevl | 1:7cfc59ba0797 | 48 | |
sillevl | 2:6fac10decfb3 | 49 | #endif /* SIMPLE_LORAWAN_NODE_H_ */ |