Changed fn_time to use time_spec_t copied from libUHD

This commit is contained in:
Piotr Krysik 2017-10-31 12:57:26 +01:00
parent 34ce7a02f0
commit 1dd2afe367
10 changed files with 12 additions and 10 deletions

View File

@ -35,5 +35,6 @@ install(FILES
tmsi_dumper.h
msg_to_tag.h
controlled_fractional_resampler_cc.h
time_spec.h
fn_time.h DESTINATION include/grgsm/misc_utils
)

View File

@ -25,7 +25,7 @@
#define INCLUDED_GRGSM_FN_TIME_H
#include <stdint.h>
#include <uhd/types/time_spec.hpp>
#include <grgsm/misc_utils/time_spec.h>
namespace gr {
namespace gsm {
@ -41,8 +41,8 @@ namespace gr {
* frame numbers
* @return difference between fn_ref and fn
*/
uhd::time_spec_t fn_time_delta(uint32_t fn_ref, uhd::time_spec_t time_ref, uint32_t fn_x,
uhd::time_spec_t time_hint, uint32_t ts_num, uint32_t ts_ref);
time_spec_t fn_time_delta2(uint32_t fn_ref, time_spec_t time_ref, uint32_t fn_x,
time_spec_t time_hint, uint32_t ts_num, uint32_t ts_ref);
} // namespace grgsm
} // namespace gr

View File

@ -32,6 +32,7 @@ add_sources(
message_printer_impl.cc
msg_to_tag_impl.cc
tmsi_dumper_impl.cc
time_spec.cc
fn_time.cc
)

View File

@ -23,7 +23,6 @@
#include <grgsm/misc_utils/fn_time.h>
#include <math.h>
#include <uhd/types/time_spec.hpp>
#define GSM_HYPER_FRAME 26 * 51 * 2048
#define GSM_SYM_RATE 13.0e6 / 48.0
@ -33,7 +32,6 @@
namespace gr {
namespace gsm {
using namespace uhd;
/**
* Computes difference between two frame numbers modulo
* GSM_HYPER_FRAME / 2. The result is correct if difference
@ -79,7 +77,7 @@ namespace gr {
* frame numbers
* @return difference between fn_ref and fn
*/
time_spec_t fn_time_delta(uint32_t fn_ref, time_spec_t time_ref, uint32_t fn_x,
time_spec_t fn_time_delta2(uint32_t fn_ref, time_spec_t time_ref, uint32_t fn_x,
time_spec_t time_hint, uint32_t ts_num, uint32_t ts_ref)
{
time_spec_t time_diff_hint = time_hint - time_ref;

View File

@ -23,6 +23,5 @@ add_sources(
receiver_config.cc
receiver_impl.cc
viterbi_detector.cc
time_spec.cc
time_sample_ref.cc
)

View File

@ -24,7 +24,7 @@
#define INCLUDED_TIME_SAMPLE_REF_IMPL_H
#include <stdint.h>
#include "time_spec.h"
#include <grgsm/misc_utils/time_spec.h>
namespace gr {
namespace gsm {

View File

@ -22,5 +22,6 @@ GR_PYTHON_INSTALL(
arfcn.py
clock_offset_corrector_tagged.py
hier_block.py
fn_time.py DESTINATION ${GR_PYTHON_DIR}/grgsm
fn_time.py
DESTINATION ${GR_PYTHON_DIR}/grgsm
)

View File

@ -65,6 +65,7 @@
#include "grgsm/misc_utils/msg_to_tag.h"
#include "grgsm/misc_utils/controlled_fractional_resampler_cc.h"
#include "grgsm/trx_interface/trx.h"
#include "grgsm/misc_utils/time_spec.h"
#include "grgsm/misc_utils/fn_time.h"
%}
@ -147,4 +148,5 @@ GR_SWIG_BLOCK_MAGIC2(gsm, message_source);
GR_SWIG_BLOCK_MAGIC2(gsm, message_sink);
%include "grgsm/trx_interface/trx.h"
GR_SWIG_BLOCK_MAGIC2(grgsm, trx);
%include "grgsm/misc_utils/fn_time.h"
//%include "grgsm/misc_utils/time_spec.h"
//%include "grgsm/misc_utils/fn_time.h"