Aloha implementation of LoRa technology

Dependencies:   SX1276Lib mbed

Fork of SX1276PingPong by Semtech

Revision:
15:f790f35839db
Child:
16:c3c6b13c3c42
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Aloha.h	Tue May 31 09:52:21 2016 +0000
@@ -0,0 +1,38 @@
+#ifndef ALOHA_H_
+#define ALOHA_H_
+
+#include "mbed.h"
+
+#define ALOHA_MAX_ATTEMPT 3
+
+class Aloha
+{
+public:
+    typedef enum
+    {
+        IDLE = 0,
+        PENDING,
+        RETRANSMIT,
+        EXPIRED
+    } AlohaState_t;
+    
+public:
+    Timeout AlohaAckTimeout;
+    uint32_t delay;
+    int attempts;
+    
+    AlohaState_t state;
+    
+public:
+    Aloha()
+    {
+        attempts = 0;
+        state = Aloha::IDLE;
+    }
+    ~Aloha()
+    {
+        
+    }
+};
+
+#endif
\ No newline at end of file