GNU Radio's GSM Package
time_sample_ref.h
Go to the documentation of this file.
1
/* -*- c++ -*- */
2
/*
3
* @file
4
* @author (C) 2017 by Piotr Krysik <ptrkrysik@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
#ifndef INCLUDED_TIME_SAMPLE_REF_IMPL_H
24
#define INCLUDED_TIME_SAMPLE_REF_IMPL_H
25
26
#include <stdint.h>
27
#include <
grgsm/misc_utils/time_spec.h
>
28
29
namespace
gr
{
30
namespace
gsm {
31
/*
32
Class for storing time reference and for conversions time<->sample number
33
*/
34
class
time_sample_ref
35
{
36
private
:
37
double
d_samp_rate;
38
time_spec_t
d_last_rx_time;
39
uint64_t d_current_start_offset;
40
public
:
41
time_sample_ref
(
double
samp_rate);
42
~time_sample_ref
();
43
void
update
(
time_spec_t
last_rx_time, uint64_t current_start_offset);
44
time_spec_t
offset_to_time
(uint64_t offset);
45
uint64_t
time_to_offset
(
time_spec_t
time);
46
};
47
}
// namespace gsm
48
}
// namespace gr
49
#endif// INCLUDED_TIME_SAMPLE_REF_IMPL_H
time_spec.h
gr::gsm::time_sample_ref
Definition:
time_sample_ref.h:34
gr::gsm::time_sample_ref::offset_to_time
time_spec_t offset_to_time(uint64_t offset)
gr::gsm::time_sample_ref::update
void update(time_spec_t last_rx_time, uint64_t current_start_offset)
gr::gsm::time_sample_ref::time_sample_ref
time_sample_ref(double samp_rate)
gr::gsm::time_sample_ref::~time_sample_ref
~time_sample_ref()
gr::gsm::time_sample_ref::time_to_offset
uint64_t time_to_offset(time_spec_t time)
gr::gsm::time_spec_t
Definition:
time_spec.h:40
gr
Definition:
constants.h:29
lib
receiver
time_sample_ref.h
Generated by
1.8.17