GNU Radio 3.6.5 C++ API
|
Given a stream of bits and access_code flags, assemble packets. More...
#include <gr_framer_sink_1.h>
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_CORE_API gr_framer_sink_1_sptr | gr_make_framer_sink_1 (gr_msg_queue_sptr target_queue) |
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.
gr_framer_sink_1::gr_framer_sink_1 | ( | gr_msg_queue_sptr | target_queue | ) | [protected] |
gr_framer_sink_1::~gr_framer_sink_1 | ( | ) |
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.
GR_CORE_API gr_framer_sink_1_sptr gr_make_framer_sink_1 | ( | gr_msg_queue_sptr | target_queue | ) | [friend] |