multihop protocol

Dependencies:   mbed

packet.h

Committer:
mfrede
Date:
2015-11-17
Revision:
8:fd217a8f8658
Parent:
4:024e613151a5

File content as of revision 8:fd217a8f8658:

#ifndef LAB5PACKET
#define LAB5PACKET


class packet
{
    #define HELLO_TYPE 1
    #define ROUTE_REQ_TYPE 2
    #define ROUTE_ACK_TYPE 3
    #define DATA_TYPE 4
    public:
    packet(unsigned short from, unsigned short to, unsigned short TYPE, float data1, float data2) {
        TTL = 4;
        from = from;
        to = to;
        TYPE = TYPE;
        data1 = data1;
        data2 = data2;
    };
    
    uint8_t from;
    uint8_t to;
    uint8_t TTL;
    uint8_t TYPE;
    float data1;
    float data2;
    
};

#endif