gr_packet_sink Class Reference
[Signal Sinks]

#include <gr_packet_sink.h>

Inheritance diagram for gr_packet_sink:

Inheritance graph
[legend]
Collaboration diagram for gr_packet_sink:

Collaboration graph
[legend]

List of all members.


Detailed Description

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

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_packet_sink_sptr gr_make_packet_sink (const std::vector< unsigned char > &sync_vector, gr_msg_queue_sptr target_queue, int threshold)

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]

References enter_search().

gr_packet_sink::~gr_packet_sink (  ) 


Member Function Documentation

void gr_packet_sink::enter_search (  )  [inline, protected]

References VERBOSE.

Referenced by gr_packet_sink(), and work().

void gr_packet_sink::enter_have_sync (  )  [inline, protected]

References VERBOSE.

Referenced by work().

void gr_packet_sink::enter_have_header ( int  payload_len  )  [inline, protected]

References VERBOSE.

Referenced by work().

int gr_packet_sink::slice ( float  x  )  [inline, protected]

Referenced by work().

bool gr_packet_sink::header_ok (  )  [inline, protected]

Referenced by work().

int gr_packet_sink::header_payload_len (  )  [inline, protected]

Referenced by work().

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.

References enter_have_header(), enter_have_sync(), enter_search(), gr_count_bits64(), gr_make_message(), header_ok(), header_payload_len(), slice(), and VERBOSE.

bool gr_packet_sink::carrier_sensed (  )  const [inline]

return true if we detect carrier


Friends And Related Function Documentation

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 files:

Generated on Thu Mar 27 15:01:16 2008 for GNU Radio 3.1.1 by  doxygen 1.5.5