GNU Radio's IEEE802_11 Package
utils.h File Reference
#include <gnuradio/config.h>
#include <ieee802_11/api.h>
#include <ieee802_11/mapper.h>
#include <cinttypes>
#include <iostream>

Go to the source code of this file.

Classes

struct  mac_header
class  ofdm_param
class  frame_param

Macros

#define MAX_PAYLOAD_SIZE   1500
#define MAX_PSDU_SIZE   (MAX_PAYLOAD_SIZE + 28)
#define MAX_SYM   (((16 + 8 * MAX_PSDU_SIZE + 6) / 24) + 1)
#define MAX_BITS_PER_SYM   288
#define MAX_ENCODED_BITS   ((16 + 8 * MAX_PSDU_SIZE + 6) * 2 + MAX_BITS_PER_SYM)
#define dout   d_debug&& std::cout
#define mylog(...)

Enumerations

enum  Encoding

Functions

void generate_mac_data_frame (const char *msdu, int msdu_size, char **psdu, int *psdu_size, char seq)
void scramble (const char *input, char *out, frame_param &frame, char initial_state)
void reset_tail_bits (char *scrambled_data, frame_param &frame)
void convolutional_encoding (const char *input, char *out, frame_param &frame)
void puncturing (const char *input, char *out, frame_param &frame, ofdm_param &ofdm)
void interleave (const char *input, char *out, frame_param &frame, ofdm_param &ofdm, bool reverse=false)
void split_symbols (const char *input, char *out, frame_param &frame, ofdm_param &ofdm)
void generate_bits (const char *psdu, char *data_bits, frame_param &frame)

Macro Definition Documentation

◆ dout

#define dout   d_debug&& std::cout

◆ MAX_BITS_PER_SYM

#define MAX_BITS_PER_SYM   288

◆ MAX_ENCODED_BITS

#define MAX_ENCODED_BITS   ((16 + 8 * MAX_PSDU_SIZE + 6) * 2 + MAX_BITS_PER_SYM)

◆ MAX_PAYLOAD_SIZE

#define MAX_PAYLOAD_SIZE   1500

◆ MAX_PSDU_SIZE

#define MAX_PSDU_SIZE   (MAX_PAYLOAD_SIZE + 28)

◆ MAX_SYM

#define MAX_SYM   (((16 + 8 * MAX_PSDU_SIZE + 6) / 24) + 1)

◆ mylog

#define mylog ( ...)
Value:
do { \
if (d_log) { \
d_logger->info(__VA_ARGS__); \
} \
} while (0);

Enumeration Type Documentation

◆ Encoding

Function Documentation

◆ convolutional_encoding()

void convolutional_encoding ( const char * input,
char * out,
frame_param & frame )

◆ generate_bits()

void generate_bits ( const char * psdu,
char * data_bits,
frame_param & frame )

◆ generate_mac_data_frame()

void generate_mac_data_frame ( const char * msdu,
int msdu_size,
char ** psdu,
int * psdu_size,
char seq )

Given a payload, generates a MAC data frame (i.e., a PSDU) to be given to the physical layer for encoding.

Parameters
msduthe payload for the MAC frame
msdu_sizethe size of the msdu in bytes
psdupointer to a byte array where to store the MAC frame. Memory will be alloced by the function
psdu_sizepointer to an integer where the size of the psdu in bytes will be stored
seqsequence number of the frame

◆ interleave()

void interleave ( const char * input,
char * out,
frame_param & frame,
ofdm_param & ofdm,
bool reverse = false )

◆ puncturing()

void puncturing ( const char * input,
char * out,
frame_param & frame,
ofdm_param & ofdm )

◆ reset_tail_bits()

void reset_tail_bits ( char * scrambled_data,
frame_param & frame )

◆ scramble()

void scramble ( const char * input,
char * out,
frame_param & frame,
char initial_state )

◆ split_symbols()

void split_symbols ( const char * input,
char * out,
frame_param & frame,
ofdm_param & ofdm )