blob: c81481097a51e8f558cd07dfe1900cec831c9f16 [file] [log] [blame]
piotr6c692872014-02-08 14:16:26 +01001/* -*- c++ -*- */
2/*
3 * Copyright 2014 <+YOU OR YOUR COMPANY+>.
4 *
5 * This is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 3, or (at your option)
8 * any later version.
9 *
10 * This software is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this software; see the file COPYING. If not, write to
17 * the Free Software Foundation, Inc., 51 Franklin Street,
18 * Boston, MA 02110-1301, USA.
19 */
20
21
22#ifndef INCLUDED_GSM_BURSTS_PRINTER_H
23#define INCLUDED_GSM_BURSTS_PRINTER_H
24
25#include <gsm/api.h>
26#include <gnuradio/block.h>
piotrc00ce9c2014-08-04 11:21:24 +020027#include <string>
28#include <vector>
29
30
31
32class chan_info {
33 public:
34 unsigned int id;
35 int8_t pwr_db;
36 unsigned int arfcn;
37 float freq;
38 unsigned int lac;
39 unsigned int cell_id;
40 unsigned int mnc;
41
42 chan_info() : id(-1), pwr_db(0), arfcn(0), freq(0), lac(0), cell_id(0), mnc(0){}
43 chan_info(const chan_info & info) : id(info.id), pwr_db(info.pwr_db), arfcn(info.arfcn), freq(info.freq), lac(info.lac), cell_id(info.cell_id), mnc(info.mnc){}
44 ~chan_info(){}
45};
46
47struct compare_id {
48 inline bool operator()(const chan_info &a, const chan_info &b) const
49 {
50 return a.id < b.id;
51 }
52};
53struct compare_pwr {
54 inline bool operator()(const chan_info &a, const chan_info &b) const
55 {
56 return a.pwr_db < b.pwr_db;
57 }
58};
piotr6c692872014-02-08 14:16:26 +010059
60namespace gr {
61 namespace gsm {
62
63 /*!
64 * \brief <+description of block+>
65 * \ingroup gsm
66 *
67 */
68 class GSM_API bursts_printer : virtual public gr::block
69 {
70 public:
71 typedef boost::shared_ptr<bursts_printer> sptr;
72
73 /*!
74 * \brief Return a shared_ptr to a new instance of gsm::bursts_printer.
75 *
76 * To avoid accidental use of raw pointers, gsm::bursts_printer's
77 * constructor is in a private implementation
78 * class. gsm::bursts_printer::make is the public interface for
79 * creating new instances.
80 */
81 static sptr make();
82 };
83
84 } // namespace gsm
85} // namespace gr
86
87#endif /* INCLUDED_GSM_BURSTS_PRINTER_H */
88