blob: 560ee4a17f375f02e120dd5d97e8b14213202d79 [file] [log] [blame]
Piotr Krysik34ce7a02017-10-31 11:30:59 +01001/* -*- c++ -*- */
2/* @file
3 * @author Piotr Krysik <ptrkrysik@gmail.com>
4 * @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
23
24#ifndef INCLUDED_GRGSM_FN_TIME_H
25#define INCLUDED_GRGSM_FN_TIME_H
26
27#include <stdint.h>
Piotr Krysik1dd2afe2017-10-31 12:57:26 +010028#include <grgsm/misc_utils/time_spec.h>
Piotr Krysik34ce7a02017-10-31 11:30:59 +010029
30namespace gr {
31 namespace gsm {
32
33 /**
34 * Computes difference between reference frame number
35 * and a second frame number.
36 * @param fn_ref reference frame number modulo GSM_HYPER_FRAME
37 * @param fn second frame number modulo GSM_HYPER_FRAME
38 * @param time_ref precise timestamp of the first sample in the fn_ref
39 * @param time_hint coarse time for fn that is used as a hint to avoid
40 * ambiguities caused by modulo operation applied to
41 * frame numbers
42 * @return difference between fn_ref and fn
43 */
Piotr Krysik1dd2afe2017-10-31 12:57:26 +010044 time_spec_t fn_time_delta2(uint32_t fn_ref, time_spec_t time_ref, uint32_t fn_x,
45 time_spec_t time_hint, uint32_t ts_num, uint32_t ts_ref);
Piotr Krysik34ce7a02017-10-31 11:30:59 +010046
47 } // namespace grgsm
48} // namespace gr
49
50#endif /* INCLUDED_GRGSM_FN_TIME_H */
51