23 #ifndef INCLUDED_GR_OFDM_FRAME_SINK2_H
24 #define INCLUDED_GR_OFDM_FRAME_SINK2_H
29 #include <gr_constellation.h>
37 float phase_gain=0.25,
float freq_gain=0.25*0.25/4.0);
54 float phase_gain,
float freq_gain);
57 enum state_t {STATE_SYNC_SEARCH, STATE_HAVE_SYNC, STATE_HAVE_HEADER};
59 static const int MAX_PKT_LEN = 4096;
60 static const int HEADERBYTELEN = 4;
64 unsigned int d_header;
65 int d_headerbytelen_cnt;
67 unsigned char *d_bytes_out;
69 unsigned int d_occupied_carriers;
70 unsigned int d_byte_offset;
71 unsigned int d_partial_byte;
73 unsigned char d_packet[MAX_PKT_LEN];
75 int d_packet_whitener_offset;
80 gr_constellation_sptr d_constell;
81 std::vector<gr_complex> d_dfe;
84 unsigned char d_resid;
85 unsigned int d_nresid;
92 std::vector<int> d_subcarrier_map;
97 float phase_gain,
float freq_gain);
100 void enter_have_sync();
101 void enter_have_header();
106 return ((d_header >> 16) ^ (d_header & 0xffff)) == 0;
116 int work(
int noutput_items,
117 gr_vector_const_void_star &input_items,
118 gr_vector_void_star &output_items);
Takes an OFDM symbol in, demaps it into bits of 0's and 1's, packs them into packets, and sends to to a message queue sink.NOTE: The mod input parameter simply chooses a pre-defined demapper/slicer. Eventually, we want to be able to pass in a reference to an object to do the demapping and slicing for a given modulation type.
Definition: gr_ofdm_frame_sink2.h:49
Definition: gr_sync_block.h:27
shared_ptr documentation stub
Definition: shared_ptr_docstub.h:15
#define GR_CORE_API
Definition: gr_core_api.h:30
std::complex< float > gr_complex
Definition: gr_complex.h:26
GR_CORE_API gr_ofdm_frame_sink2_sptr gr_make_ofdm_frame_sink2(gr_constellation_sptr constell, gr_msg_queue_sptr target_queue, unsigned int occupied_tones, float phase_gain=0.25, float freq_gain=0.25 *0.25/4.0)
virtual int work(int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
just like gr_block::general_work, only this arranges to call consume_each for you ...
bool header_ok()
Definition: gr_ofdm_frame_sink2.h:103