GNU Radio's GSM Package
fn_time.h
Go to the documentation of this file.
1/* -*- c++ -*- */
2/* @file
3 * @author Piotr Krysik <ptrkrysik@gmail.com>
4 * @author Vadim Yanitskiy <axilirator@gmail.com>
5 * @section LICENSE
6 *
7 * Gr-gsm is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 3, or (at your option)
10 * any later version.
11 *
12 * Gr-gsm is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with gr-gsm; see the file COPYING. If not, write to
19 * the Free Software Foundation, Inc., 51 Franklin Street,
20 * Boston, MA 02110-1301, USA.
21 *
22 */
23
24
25#ifndef INCLUDED_GSM_FN_TIME_H
26#define INCLUDED_GSM_FN_TIME_H
27
28#include <gsm/api.h>
29#include <stdint.h>
30#include <utility>
31
32namespace gr {
33 namespace gsm {
34
35 /**
36 * Computes difference between reference frame number
37 * and a second frame number.
38 * @param fn_ref reference frame number modulo GSM_HYPER_FRAME
39 * @param fn second frame number modulo GSM_HYPER_FRAME
40 * @param time_ref precise timestamp of the first sample in the fn_ref
41 * @param time_hint coarse time for fn that is used as a hint to avoid
42 * ambiguities caused by modulo operation applied to
43 * frame numbers
44 * @return difference between fn_ref and fn
45 */
46 typedef std::pair<unsigned long long, double> time_format;
47
48 GSM_API time_format fn_time_delta_cpp(uint32_t fn_ref, time_format time_ref, uint32_t fn_x,
49 time_format time_hint, uint32_t ts_num, uint32_t ts_ref);
50
51 } // namespace gsm
52} // namespace gr
53
54#endif /* INCLUDED_GSM_FN_TIME_H */
55
#define GSM_API
Definition api.h:19
std::pair< unsigned long long, double > time_format
Definition fn_time.h:46
GSM_API time_format fn_time_delta_cpp(uint32_t fn_ref, time_format time_ref, uint32_t fn_x, time_format time_hint, uint32_t ts_num, uint32_t ts_ref)
Definition constants.h:29