GNU Radio 3.5.1 C++ API
gr_encode_ccsds_27_bb.h
Go to the documentation of this file.
00001 /* -*- c++ -*- */
00002 /*
00003  * Copyright 2008 Free Software Foundation, Inc.
00004  * 
00005  * GNU Radio is free software; you can redistribute it and/or modify
00006  * it under the terms of the GNU General Public License as published by
00007  * the Free Software Foundation; either version 3, or (at your option)
00008  * any later version.
00009  * 
00010  * GNU Radio is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  * GNU General Public License for more details.
00014  * 
00015  * You should have received a copy of the GNU General Public License
00016  * along with GNU Radio; see the file COPYING.  If not, write to
00017  * the Free Software Foundation, Inc., 51 Franklin Street,
00018  * Boston, MA 02110-1301, USA.
00019  */
00020 #ifndef INCLUDED_GR_ENCODE_CCSDS_27_BB_H
00021 #define INCLUDED_GR_ENCODE_CCSDS_27_BB_H
00022 
00023 #include <gr_core_api.h>
00024 #include <gr_sync_interpolator.h>
00025 
00026 class gr_encode_ccsds_27_bb;
00027 
00028 typedef boost::shared_ptr<gr_encode_ccsds_27_bb> gr_encode_ccsds_27_bb_sptr;
00029 
00030 GR_CORE_API gr_encode_ccsds_27_bb_sptr gr_make_encode_ccsds_27_bb();
00031 
00032 /*! \brief A rate 1/2, k=7 convolutional encoder for the CCSDS standard
00033  * \ingroup ecc
00034  *  
00035  * This block performs convolutional encoding using the CCSDS standard
00036  * polynomial ("Voyager").
00037  *  
00038  * The input is an MSB first packed stream of bits.
00039  *
00040  * The output is a stream of symbols 0 or 1 representing the encoded data.
00041  *
00042  * As a rate 1/2 code, there will be 16 output symbols for every input byte.
00043  *
00044  * This block is designed for continuous data streaming, not packetized data.
00045  * There is no provision to "flush" the encoder.
00046  */
00047 
00048 class GR_CORE_API gr_encode_ccsds_27_bb : public gr_sync_interpolator
00049 {
00050 private:
00051   friend GR_CORE_API gr_encode_ccsds_27_bb_sptr gr_make_encode_ccsds_27_bb();
00052 
00053   gr_encode_ccsds_27_bb();
00054   unsigned char d_encstate;
00055   
00056  public:
00057   ~gr_encode_ccsds_27_bb();
00058 
00059   int work (int noutput_items,
00060             gr_vector_const_void_star &input_items,
00061             gr_vector_void_star &output_items);
00062 };
00063 
00064 #endif /* INCLUDED_GR_ENCODE_CCSDS_27_BB_H */