Adapted to LoRa Semtech + Nucleo

Dependents:   LoRaWAN-lmic-app LoRaWAN-lmic-app LoRaWAN-test-10secs LoRaPersonalizedDeviceForEverynet ... more

Fork of cantcoap by Ashley Mills

Revision:
2:d0d57af6c9df
Parent:
1:5eec2844ad47
--- a/cantcoap.h	Thu Jan 30 14:07:56 2014 +0000
+++ b/cantcoap.h	Fri Nov 20 12:30:26 2015 +0000
@@ -1,31 +1,12 @@
-/**
-Copyright (c) 2013, Ashley Mills.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met: 
-
-1. Redistributions of source code must retain the above copyright notice, this
-   list of conditions and the following disclaimer. 
-2. Redistributions in binary form must reproduce the above copyright notice,
-   this list of conditions and the following disclaimer in the documentation
-   and/or other materials provided with the distribution. 
+#pragma once
+#pragma clang diagnostic ignored "-Wdeprecated-writable-strings"
+#pragma clang diagnostic ignored "-Wconstant-logical-operand"
+#pragma clang diagnostic ignored "-Wtautological-constant-out-of-range-compare"
 
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#pragma once
-
+/// Copyright (c) 2013, Ashley Mills.
+//#include <unistd.h>
 #include <stdint.h>
+#include "dbg.h"
 
 #define COAP_HDR_SIZE 4
 #define COAP_OPTION_HDR_BYTE 1
@@ -150,6 +131,7 @@
 		int setTokenLength(uint8_t tokenLength);
 		int getTokenLength();
 		uint8_t* getTokenPointer();
+        long getLongToken();
 		int setToken(uint8_t *token, uint8_t tokenLength);
 
 		// message code
@@ -261,4 +243,4 @@
 #define COAP_CODE_SERVICE_UNAVAILABLE        0xA3
 #define COAP_CODE_GATEWAY_TIMEOUT            0xA4
 #define COAP_CODE_PROXYING_NOT_SUPPORTED     0xA5
-*/
\ No newline at end of file
+*/