From ccb5e689e1fce642c23ddfb091bee7bedffd0b55 Mon Sep 17 00:00:00 2001 From: Piotr Krysik Date: Tue, 7 Nov 2017 19:34:22 +0100 Subject: Added tx bursts preprocessing block --- include/grgsm/transmitter/CMakeLists.txt | 4 +- include/grgsm/transmitter/preprocess_tx_burst.h | 60 +++++++++++++++++++++++++ 2 files changed, 63 insertions(+), 1 deletion(-) create mode 100644 include/grgsm/transmitter/preprocess_tx_burst.h (limited to 'include/grgsm') diff --git a/include/grgsm/transmitter/CMakeLists.txt b/include/grgsm/transmitter/CMakeLists.txt index 78aad43..29ccc4b 100644 --- a/include/grgsm/transmitter/CMakeLists.txt +++ b/include/grgsm/transmitter/CMakeLists.txt @@ -21,5 +21,7 @@ # Install public header files ######################################################################## install(FILES - txtime_setter.h DESTINATION include/grgsm/transmitter + txtime_setter.h + preprocess_tx_burst.h + DESTINATION include/grgsm/transmitter ) diff --git a/include/grgsm/transmitter/preprocess_tx_burst.h b/include/grgsm/transmitter/preprocess_tx_burst.h new file mode 100644 index 0000000..2a07dd5 --- /dev/null +++ b/include/grgsm/transmitter/preprocess_tx_burst.h @@ -0,0 +1,60 @@ +/* -*- c++ -*- */ +/* @file + * @author Piotr Krysik + * @section LICENSE + * + * Gr-gsm is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3, or (at your option) + * any later version. + * + * Gr-gsm is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with gr-gsm; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, + * Boston, MA 02110-1301, USA. + * + */ + + +#ifndef INCLUDED_GSM_PREPROCESS_TX_BURST_H +#define INCLUDED_GSM_PREPROCESS_TX_BURST_H + +#include +#include + +namespace gr { + namespace gsm { + + /*! + * \brief A block that does preprocessing tasks before sending bursts to modulator. + * \ingroup gsm + * + * Currently it removes GSMTAP header from a burst and puts it in first part of PDU + * pair and removes tailing zeros from Access Bursts coming from TRX interface. + */ + class GRGSM_API preprocess_tx_burst : virtual public gr::block + { + public: + typedef boost::shared_ptr sptr; + + /*! + * \brief Return a shared_ptr to a new instance of gsm::preprocess_tx_burst. + * + * To avoid accidental use of raw pointers, gsm::preprocess_tx_burst's + * constructor is in a private implementation + * class. gsm::preprocess_tx_burst::make is the public interface for + * creating new instances. + */ + static sptr make(); + }; + + } // namespace gsm +} // namespace gr + +#endif /* INCLUDED_GSM_PREPROCESS_TX_BURST_H */ + -- cgit v1.2.3