Merge branch 'next' of github.com:softwareradiosystems/srsLTE into next

master
Ismael Gomez 7 years ago
commit ef7b52045e

@ -28,6 +28,8 @@ SRSLTE_API void srslte_ringbuffer_reset(srslte_ringbuffer_t *q);
SRSLTE_API int srslte_ringbuffer_status(srslte_ringbuffer_t *q);
SRSLTE_API int srslte_ringbuffer_space(srslte_ringbuffer_t *q);
SRSLTE_API int srslte_ringbuffer_write(srslte_ringbuffer_t *q,
void *ptr,
int nof_bytes);

@ -13,11 +13,10 @@ int srslte_ringbuffer_init(srslte_ringbuffer_t *q, int capacity)
}
q->active = true;
q->capacity = capacity;
srslte_ringbuffer_reset(q);
pthread_mutex_init(&q->mutex, NULL);
pthread_cond_init(&q->cvar, NULL);
srslte_ringbuffer_reset(q);
return 0;
}
@ -48,6 +47,11 @@ int srslte_ringbuffer_status(srslte_ringbuffer_t *q)
return q->count;
}
int srslte_ringbuffer_space(srslte_ringbuffer_t *q)
{
return q->capacity - q->count;
}
int srslte_ringbuffer_write(srslte_ringbuffer_t *q, void *p, int nof_bytes)
{
uint8_t *ptr = (uint8_t*) p;

@ -63,8 +63,16 @@ public:
void write_trace(std::string filename);
int read_ce_abs(float *ce_abs, uint32_t tx_antenna, uint32_t rx_antenna);
uint32_t get_cell_nof_ports() {return cell.nof_ports;};
uint32_t get_rx_nof_antennas() {return ue_dl.nof_rx_antennas;};
uint32_t get_cell_nof_ports() {
if (cell_initiated) {
return cell.nof_ports;
} else {
return 1;
}
};
uint32_t get_rx_nof_antennas() {
return ue_dl.nof_rx_antennas;
};
int read_pdsch_d(cf_t *pdsch_d);
void start_plot();

@ -156,7 +156,7 @@ rrc_state_t rrc::get_state() {
}
bool rrc::is_connected() {
return (RRC_STATE_CONNECTED >= state && state < RRC_STATE_LEAVE_CONNECTED);
return (state >= RRC_STATE_CONNECTED && state < RRC_STATE_LEAVE_CONNECTED);
}
bool rrc::have_drb() {

Loading…
Cancel
Save