GNU Radio 3.4.2 C++ API
gr_framer_sink_1 Class Reference

Given a stream of bits and access_code flags, assemble packets.input: stream of bytes from gr_correlate_access_code_bb output: none. Pushes assembled packet into target queue. More...

#include <gr_framer_sink_1.h>

Inheritance diagram for gr_framer_sink_1:

List of all members.

Public Member Functions

 ~gr_framer_sink_1 ()
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

Protected Member Functions

 gr_framer_sink_1 (gr_msg_queue_sptr target_queue)
void enter_search ()
void enter_have_sync ()
void enter_have_header (int payload_len, int whitener_offset)
bool header_ok ()
void header_payload (int *len, int *offset)

Friends

gr_framer_sink_1_sptr gr_make_framer_sink_1 (gr_msg_queue_sptr target_queue)

Detailed Description

Given a stream of bits and access_code flags, assemble packets.

input: stream of bytes from gr_correlate_access_code_bb output: none. Pushes assembled packet into target queue.

The framer expects a fixed length header of 2 16-bit shorts containing the payload length, followed by the payload. If the 2 16-bit shorts are not identical, this packet is ignored. Better algs are welcome.

The input data consists of bytes that have two bits used. Bit 0, the LSB, contains the data bit. Bit 1 if set, indicates that the corresponding bit is the the first bit of the packet. That is, this bit is the first one after the access code.


Constructor & Destructor Documentation

gr_framer_sink_1::gr_framer_sink_1 ( gr_msg_queue_sptr  target_queue) [protected]
gr_framer_sink_1::~gr_framer_sink_1 ( )

Member Function Documentation

void gr_framer_sink_1::enter_have_header ( int  payload_len,
int  whitener_offset 
) [protected]
void gr_framer_sink_1::enter_have_sync ( ) [protected]
void gr_framer_sink_1::enter_search ( ) [protected]
bool gr_framer_sink_1::header_ok ( ) [inline, protected]
void gr_framer_sink_1::header_payload ( int *  len,
int *  offset 
) [inline, protected]
int gr_framer_sink_1::work ( int  noutput_items,
gr_vector_const_void_star input_items,
gr_vector_void_star output_items 
) [virtual]

just like gr_block::general_work, only this arranges to call consume_each for you

The user must override work to define the signal processing code

Implements gr_sync_block.


Friends And Related Function Documentation

gr_framer_sink_1_sptr gr_make_framer_sink_1 ( gr_msg_queue_sptr  target_queue) [friend]

The documentation for this class was generated from the following file: