Commit d4ae319f authored by Florian Kaltenberger's avatar Florian Kaltenberger

adding some error checks on trx_read

parent 6bc86f88
...@@ -337,7 +337,7 @@ static void *UE_thread_synch(void *arg) { ...@@ -337,7 +337,7 @@ static void *UE_thread_synch(void *arg) {
if ( threads.iq != -1 ) if ( threads.iq != -1 )
CPU_SET(threads.iq, &cpuset); CPU_SET(threads.iq, &cpuset);
// this thread priority must be lower that the main acquisition thread // this thread priority must be lower that the main acquisition thread
sprintf(threadname, "sync UE %d\n", UE->Mod_id); sprintf(threadname, "sync UE %d", UE->Mod_id);
init_thread(100000, 500000, FIFO_PRIORITY-1, &cpuset, threadname); init_thread(100000, 500000, FIFO_PRIORITY-1, &cpuset, threadname);
UE->is_synchronized = 0; UE->is_synchronized = 0;
...@@ -856,7 +856,7 @@ void *UE_thread(void *arg) { ...@@ -856,7 +856,7 @@ void *UE_thread(void *arg) {
&timestamp, &timestamp,
rxp, rxp,
UE->frame_parms.samples_per_subframe*10, UE->frame_parms.samples_per_subframe*10,
UE->frame_parms.nb_antennas_rx), ""); UE->frame_parms.nb_antennas_rx), "error reading samples");
AssertFatal ( 0== pthread_mutex_lock(&UE->proc.mutex_synch), ""); AssertFatal ( 0== pthread_mutex_lock(&UE->proc.mutex_synch), "");
instance_cnt_synch = ++UE->proc.instance_cnt_synch; instance_cnt_synch = ++UE->proc.instance_cnt_synch;
...@@ -878,11 +878,12 @@ void *UE_thread(void *arg) { ...@@ -878,11 +878,12 @@ void *UE_thread(void *arg) {
rxp[i] = (void*)&dummy_rx[i][0]; rxp[i] = (void*)&dummy_rx[i][0];
for (int sf=0; sf<LTE_NUMBER_OF_SUBFRAMES_PER_FRAME; sf++) for (int sf=0; sf<LTE_NUMBER_OF_SUBFRAMES_PER_FRAME; sf++)
// printf("Reading dummy sf %d\n",sf); // printf("Reading dummy sf %d\n",sf);
AssertFatal(UE->frame_parms.samples_per_subframe==
UE->rfdevice.trx_read_func(&UE->rfdevice, UE->rfdevice.trx_read_func(&UE->rfdevice,
&timestamp, &timestamp,
rxp, rxp,
UE->frame_parms.samples_per_subframe, UE->frame_parms.samples_per_subframe,
UE->frame_parms.nb_antennas_rx); UE->frame_parms.nb_antennas_rx), "error reading samples");
} }
#endif #endif
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment