Radio Structures in OOP

Dependencies:   mbed mbed-rtos

utils/RTP.h

Committer:
jjones646
Date:
2014-12-28
Revision:
2:7d523bdd2f50
Child:
6:4a3dbfbc30f1

File content as of revision 2:7d523bdd2f50:

#ifndef REAL_TIME_PACKET_H
#define REAL_TIME_PACKET_H

#include "mbed.h"

#define RTP_MAX_DATA_SIZE 32

typedef struct _RTP_t {
    uint8_t size;
    union {
        struct {
            union {
                uint8_t header;
                struct {
                    uint8_t port;
                    uint8_t subclass;
                };
            };
            uint8_t data[RTP_MAX_DATA_SIZE];
        };
        uint8_t raw[RTP_MAX_DATA_SIZE + 1];
    };
} RTP_t;

#endif  // REAL_TIME_PACKET_H