GNU Radio 3.5.3.2 C++ API
gr_packet_sink Class Reference

process received bits looking for packet sync, header, and process bits into packet More...

#include <gr_packet_sink.h>

Inheritance diagram for gr_packet_sink:

List of all members.

Public Member Functions

 ~gr_packet_sink ()
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 carrier_sensed () const
 return true if we detect carrier

Protected Member Functions

 gr_packet_sink (const std::vector< unsigned char > &sync_vector, gr_msg_queue_sptr target_queue, int threshold)
void enter_search ()
void enter_have_sync ()
void enter_have_header (int payload_len)
int slice (float x)
bool header_ok ()
int header_payload_len ()

Friends

GR_CORE_API gr_packet_sink_sptr gr_make_packet_sink (const std::vector< unsigned char > &sync_vector, gr_msg_queue_sptr target_queue, int threshold)

Detailed Description

process received bits looking for packet sync, header, and process bits into packet


Constructor & Destructor Documentation

gr_packet_sink::gr_packet_sink ( const std::vector< unsigned char > &  sync_vector,
gr_msg_queue_sptr  target_queue,
int  threshold 
) [protected]
gr_packet_sink::~gr_packet_sink ( )

Member Function Documentation

bool gr_packet_sink::carrier_sensed ( ) const [inline]

return true if we detect carrier

void gr_packet_sink::enter_have_header ( int  payload_len) [protected]
void gr_packet_sink::enter_have_sync ( ) [protected]
void gr_packet_sink::enter_search ( ) [protected]
bool gr_packet_sink::header_ok ( ) [inline, protected]
int gr_packet_sink::header_payload_len ( ) [inline, protected]
int gr_packet_sink::slice ( float  x) [inline, protected]
int gr_packet_sink::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_CORE_API gr_packet_sink_sptr gr_make_packet_sink ( const std::vector< unsigned char > &  sync_vector,
gr_msg_queue_sptr  target_queue,
int  threshold 
) [friend]

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