Aloha implementation of LoRa technology

Dependencies:   SX1276Lib mbed

Fork of SX1276PingPong by Semtech

Aloha.h

Committer:
rba90
Date:
2016-05-31
Revision:
15:f790f35839db
Child:
16:c3c6b13c3c42

File content as of revision 15:f790f35839db:

#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