blob: cc7d9b4026ec2bc99ece74c975d0764f5bac9266 [file] [log] [blame]
Roman Khassraf462fa452015-07-20 17:46:52 +02001/* -*- c++ -*- */
2/* @file
Piotr Krysika6268a52017-08-23 16:02:19 +02003 * @author (C) 2015 by Roman Khassraf <rkhassraf@gmail.com>
Roman Khassraf462fa452015-07-20 17:46:52 +02004 * @section LICENSE
5 *
6 * Gr-gsm is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 3, or (at your option)
9 * any later version.
10 *
11 * Gr-gsm is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with gr-gsm; see the file COPYING. If not, write to
18 * the Free Software Foundation, Inc., 51 Franklin Street,
19 * Boston, MA 02110-1301, USA.
20 *
21 */
22
Roman Khassraf1ce44692015-08-03 11:16:10 +020023#ifndef INCLUDED_GSM_BURST_SOURCE_IMPL_H
24#define INCLUDED_GSM_BURST_SOURCE_IMPL_H
Roman Khassraf462fa452015-07-20 17:46:52 +020025
26#define BURST_SIZE 148
27
Roman Khassraf1ce44692015-08-03 11:16:10 +020028#include <grgsm/qa_utils/burst_source.h>
Roman Khassraf462fa452015-07-20 17:46:52 +020029#include <fstream>
30
31
32namespace gr {
33 namespace gsm {
34
Roman Khassraf1ce44692015-08-03 11:16:10 +020035 class burst_source_impl : public burst_source
Roman Khassraf462fa452015-07-20 17:46:52 +020036 {
37 private:
38 boost::shared_ptr<gr::thread::thread> d_thread;
39 std::vector<int> d_framenumbers;
40 std::vector<int> d_timeslots;
41 std::vector<std::string> d_burst_data;
42 bool d_finished;
43 void run();
44 public:
Roman Khassraf1ce44692015-08-03 11:16:10 +020045 burst_source_impl(const std::vector<int> &framenumbers,
Roman Khassraf462fa452015-07-20 17:46:52 +020046 const std::vector<int> &timeslots,
47 const std::vector<std::string> &burst_data);
Roman Khassraf1ce44692015-08-03 11:16:10 +020048 ~burst_source_impl();
Roman Khassraf462fa452015-07-20 17:46:52 +020049 virtual void set_framenumbers(const std::vector<int> &framenumbers);
50 virtual void set_timeslots(const std::vector<int> &timeslots);
51 virtual void set_burst_data(const std::vector<std::string> &burst_data);
52 bool start();
53 bool stop();
54 bool finished();
55 };
56 } // namespace gsm
57} // namespace gr
58
Roman Khassraf1ce44692015-08-03 11:16:10 +020059#endif /* INCLUDED_GSM_BURST_SOURCE_IMPL_H */
Roman Khassraf462fa452015-07-20 17:46:52 +020060
61