aboutsummaryrefslogtreecommitdiffstats
path: root/lib/misc_utils
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2017-10-17 08:52:27 +0700
committerPiotr Krysik <ptrkrysik@users.noreply.github.com>2017-11-05 17:33:26 +0100
commit6bac5746867d50cfffb0c2e2dd6498550ccb3fd7 (patch)
treeee9d1a3dbc0af927cab2b67a936538f058286054 /lib/misc_utils
parent25916f390845ec8a01339f7ad52e5eccb722e6cd (diff)
misc_utils/trx_burst_if: get rid of clock interface
Clock indications are only required for BTS operation, while MS can obtain current frame number from the messages on DATA interface.
Diffstat (limited to 'lib/misc_utils')
-rw-r--r--lib/misc_utils/trx_burst_if_impl.cc24
-rw-r--r--lib/misc_utils/trx_burst_if_impl.h2
2 files changed, 1 insertions, 25 deletions
diff --git a/lib/misc_utils/trx_burst_if_impl.cc b/lib/misc_utils/trx_burst_if_impl.cc
index 432ad2f..6d63edf 100644
--- a/lib/misc_utils/trx_burst_if_impl.cc
+++ b/lib/misc_utils/trx_burst_if_impl.cc
@@ -75,16 +75,12 @@ namespace gr {
boost::bind(&trx_burst_if_impl::handle_dl_burst, this, _1));
// Prepare port numbers
- std::string clck_src_port = boost::lexical_cast<std::string> (base_port + 0);
- std::string clck_dst_port = boost::lexical_cast<std::string> (base_port + 100);
std::string data_src_port = boost::lexical_cast<std::string> (base_port + 2);
std::string data_dst_port = boost::lexical_cast<std::string> (base_port + 102);
- // Init DATA & CLCK interfaces
+ // Init DATA interface
d_data_sock = new udp_socket(remote_addr,
data_src_port, data_dst_port, DATA_IF_MTU);
- d_clck_sock = new udp_socket(remote_addr,
- clck_src_port, clck_dst_port, DATA_IF_MTU);
// Bind DATA interface handler
d_data_sock->udp_rx_handler = boost::bind(
@@ -101,7 +97,6 @@ namespace gr {
{
// Release all UDP sockets and free memory
delete d_data_sock;
- delete d_clck_sock;
}
/*
@@ -138,19 +133,6 @@ namespace gr {
}
/*
- * Create an UDP payload with clock indication
- */
- void
- trx_burst_if_impl::clck_ind_send(uint32_t frame_nr)
- {
- char buf[20];
- size_t n;
-
- n = snprintf(buf, 20, "IND CLOCK %u", frame_nr);
- d_clck_sock->udp_send((uint8_t *) buf, n + 1);
- }
-
- /*
* Create an UDP payload with burst bits
* and some channel data.
*/
@@ -169,10 +151,6 @@ namespace gr {
// Extract frame number
uint32_t frame_nr = be32toh(header->frame_number);
- // HACK: send clock indications every 51-th frame
- if (frame_nr % 51 == 0)
- clck_ind_send(frame_nr);
-
// Pack frame number
buf[1] = (frame_nr >> 24) & 0xff;
buf[2] = (frame_nr >> 16) & 0xff;
diff --git a/lib/misc_utils/trx_burst_if_impl.h b/lib/misc_utils/trx_burst_if_impl.h
index 23d2264..fd5a42d 100644
--- a/lib/misc_utils/trx_burst_if_impl.h
+++ b/lib/misc_utils/trx_burst_if_impl.h
@@ -35,11 +35,9 @@ namespace gr {
{
private:
udp_socket *d_data_sock;
- udp_socket *d_clck_sock;
int d_ts_filter_tn;
bool detect_rach(uint8_t *burst);
- void clck_ind_send(uint32_t frame_nr);
void burst_pack(pmt::pmt_t msg, uint8_t *buf);
public: