Merge branch 'develop-nr' into uhd_set_thread_prio
Conflicts: openair1/SCHED_NR/phy_procedures_nr_gNB.c targets/RT/USER/nr-ru.c
This commit is contained in:
@@ -98,6 +98,7 @@ typedef struct {
|
||||
int64_t rx_count;
|
||||
int wait_for_first_pps;
|
||||
int use_gps;
|
||||
int first_tx;
|
||||
//! timestamp of RX packet
|
||||
openair0_timestamp rx_timestamp;
|
||||
|
||||
@@ -323,10 +324,10 @@ static int trx_usrp_start(openair0_device *device) {
|
||||
|
||||
cmd.stream_now = false; // start at constant delay
|
||||
s->rx_stream->issue_stream_cmd(cmd);
|
||||
s->tx_md.time_spec = cmd.time_spec + uhd::time_spec_t(1-(double)s->tx_forward_nsamps/s->sample_rate);
|
||||
/*s->tx_md.time_spec = cmd.time_spec + uhd::time_spec_t(1-(double)s->tx_forward_nsamps/s->sample_rate);
|
||||
s->tx_md.has_time_spec = true;
|
||||
s->tx_md.start_of_burst = true;
|
||||
s->tx_md.end_of_burst = false;
|
||||
s->tx_md.end_of_burst = false;*/
|
||||
s->rx_count = 0;
|
||||
s->tx_count = 0;
|
||||
s->rx_timestamp = 0;
|
||||
@@ -465,14 +466,13 @@ static int trx_usrp_write(openair0_device *device, openair0_timestamp timestamp,
|
||||
}
|
||||
}
|
||||
|
||||
boolean_t first_packet_state=false,last_packet_state=false,first_packet_has_timespec=false;
|
||||
boolean_t first_packet_state=false,last_packet_state=false;
|
||||
|
||||
if (flags == 2) { // start of burst
|
||||
// s->tx_md.start_of_burst = true;
|
||||
// s->tx_md.end_of_burst = false;
|
||||
first_packet_state = true;
|
||||
last_packet_state = false;
|
||||
first_packet_has_timespec=true;
|
||||
} else if (flags == 3) { // end of burst
|
||||
//s->tx_md.start_of_burst = false;
|
||||
//s->tx_md.end_of_burst = true;
|
||||
@@ -483,7 +483,6 @@ static int trx_usrp_write(openair0_device *device, openair0_timestamp timestamp,
|
||||
// s->tx_md.end_of_burst = true;
|
||||
first_packet_state = true;
|
||||
last_packet_state = true;
|
||||
first_packet_has_timespec=true;
|
||||
} else if (flags==1) { // middle of burst
|
||||
// s->tx_md.start_of_burst = false;
|
||||
// s->tx_md.end_of_burst = false;
|
||||
@@ -497,11 +496,13 @@ static int trx_usrp_write(openair0_device *device, openair0_timestamp timestamp,
|
||||
first_packet_state=false;
|
||||
last_packet_state=true;
|
||||
}
|
||||
s->tx_md.has_time_spec = first_packet_has_timespec;
|
||||
s->tx_md.start_of_burst = first_packet_state;
|
||||
s->tx_md.has_time_spec = true;
|
||||
s->tx_md.start_of_burst = (s->tx_count==0) ? true : first_packet_state;
|
||||
s->tx_md.end_of_burst = last_packet_state;
|
||||
s->tx_md.time_spec = uhd::time_spec_t::from_ticks(timestamp, s->sample_rate);
|
||||
|
||||
s->tx_count++;
|
||||
|
||||
if (cc>1) {
|
||||
std::vector<void *> buff_ptrs;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user