Library for handling subset of coap functionality by radio transmitter.

Dependencies:   nRF24L01P cantcoap

Dependents:   server2

Revision:
2:c3ca8b8526e0
Parent:
1:1d936c763440
Child:
4:9f635ab44d8e
diff -r 1d936c763440 -r c3ca8b8526e0 coapServer.h
--- a/coapServer.h	Sun Jan 20 13:48:02 2019 +0000
+++ b/coapServer.h	Sun Jan 20 23:27:10 2019 +0000
@@ -15,7 +15,8 @@
     enum ERROR {
         SMALL_BUFFER = -3,
         RADIO_NOT_WORKING = -4,
-        UNKNOWN_URI = -5
+        UNKNOWN_URI = -5,
+        COAP_ERROR = -5
     };
 
     enum METHOD {
@@ -25,15 +26,16 @@
 
 private:
     uint16_t lastMessageId;
-    uint8_t lastMessageToken[4];
+    uint8_t lastMessageToken[1];
     int listeningTimeout;
     RadioWrapper radioWrapper;
     int urisNumber;
-    std::string *uris;
+    std::string* uris;
 
 
 public:
-    CoapServer(int timeout, std::string* uris, int urisNumber, int channel, unsigned long long rx_address,  unsigned long long tx_address);
+    CoapServer(int timeout, std::string* uris, int urisNumber, int channel, unsigned long long rx_address,
+               unsigned long long tx_address);
 
     int listen(uint8_t* buffer, int len, METHOD* requestMethod, int* uriNumber);