22 #ifndef INCLUDED_DIGITAL_HEADER_FORMAT_BASE_H
23 #define INCLUDED_DIGITAL_HEADER_FORMAT_BASE_H
29 #include <boost/enable_shared_from_this.hpp>
124 :
public boost::enable_shared_from_this<gr::digital::header_format_base>
127 typedef boost::shared_ptr<header_format_base>
sptr;
132 sptr
base() {
return shared_from_this(); };
150 virtual bool format(
int nbytes_in,
151 const unsigned char *input,
175 virtual bool parse(
int nbits_in,
176 const unsigned char *input,
177 std::vector<pmt::pmt_t> &info,
178 int &nbits_processed) = 0;
184 virtual size_t header_nbits()
const = 0;
190 size_t header_nbytes()
const;
193 enum state_t {STATE_SYNC_SEARCH, STATE_HAVE_SYNC};
200 virtual void enter_search();
203 virtual void enter_have_sync();
206 virtual void enter_have_header(
int payload_len);
209 virtual bool header_ok() = 0;
214 virtual int header_payload() = 0;
state_t
Definition: header_format_base.h:193
#define DIGITAL_API
Definition: gr-digital/include/gnuradio/digital/api.h:30
Include this header to use the message passing features.
Definition: logger.h:131
log4cpp::Category * logger_ptr
GR_LOG macrosThese macros wrap the standard LOG4CPP_LEVEL macros. The availablie macros are: LOG_DEBU...
Definition: logger.h:149
boost::intrusive_ptr< pmt_base > pmt_t
typedef for shared pointer (transparent reference counting). See http://www.boost.org/libs/smart_ptr/smart_ptr.htm
Definition: pmt.h:56