Main Page | Modules | Namespace List | Class Hierarchy | Class List | File List | Class Members | File Members

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]
 

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  )  [inline, protected]
 

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

void gr_packet_sink::enter_search (   )  [inline, 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_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 Sat Jul 8 17:13:44 2006 for GNU Radio 2.x by  doxygen 1.4.1