Aloha implementation of LoRa technology

Dependencies:   SX1276Lib mbed

Fork of SX1276PingPong by Semtech

Aloha.h

Committer:
rba90
Date:
2016-06-08
Revision:
16:c3c6b13c3c42
Parent:
15:f790f35839db

File content as of revision 16:c3c6b13c3c42:

#ifndef ALOHA_H_
#define ALOHA_H_

#include "mbed.h"

#define ALOHA_MAX_ATTEMPT 5

class Aloha
{
public:
    typedef enum
    {
        IDLE = 0,
        PENDING,
        RETRANSMIT,
        EXPIRED,
        ACK_RESP
    } AlohaState_t;
    
public:
    Timeout AlohaAckTimeout;
    float delay;
    int attempts;
    
    AlohaState_t state;
    
public:
    Aloha()
    {
        attempts = 0;
        state = Aloha::IDLE;
    }
    ~Aloha()
    {
        
    }
};

#endif