From 36f875e20f46eb31347884d72c1f0c2279fbc192 Mon Sep 17 00:00:00 2001
From: Navid Nikaein <navid.nikaein@eurecom.fr>
Date: Fri, 28 Nov 2014 17:48:32 +0000
Subject: [PATCH] fix few compilation erros

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@6121 818b1a75-f10b-46b9-bf7c-635c3b92a50f
---
 openair1/PHY/impl_defs_top.h    |  1 -
 openair2/ENB_APP/enb_config.h   |  8 ++++----
 targets/RT/USER/Makefile        |  4 ++--
 targets/RT/USER/lte-softmodem.c | 23 +++++++++++++----------
 4 files changed, 19 insertions(+), 17 deletions(-)

diff --git a/openair1/PHY/impl_defs_top.h b/openair1/PHY/impl_defs_top.h
index 5f907c556a..be9b619b86 100755
--- a/openair1/PHY/impl_defs_top.h
+++ b/openair1/PHY/impl_defs_top.h
@@ -339,7 +339,6 @@ typedef struct {
 #endif
 
 #define NUMBER_OF_RN_MAX 3
-
 typedef enum {no_relay=1,unicast_relay_type1,unicast_relay_type2, multicast_relay} relaying_type_t;
 
 typedef struct
diff --git a/openair2/ENB_APP/enb_config.h b/openair2/ENB_APP/enb_config.h
index a944fed577..2b74ad8eb4 100755
--- a/openair2/ENB_APP/enb_config.h
+++ b/openair2/ENB_APP/enb_config.h
@@ -41,8 +41,8 @@
 
 #include "commonDef.h"
 #include "platform_types.h"
+#include "platform_constants.h"
 #include "PHY/impl_defs_lte.h"
-#include "PHY/impl_defs_top.h"
 #include "s1ap_messages_types.h"
 #include "RRC/LITE/MESSAGES/SystemInformationBlockType2.h"
 
@@ -186,9 +186,9 @@ typedef struct Enb_properties_s {
   /* Nb of OTG elements */
   uint8_t            num_otg_elements;
   /* element config*/
-  uint16_t            otg_ue_id[NUMBER_OF_UE_MAX+1];
-  uint8_t          otg_app_type[NUMBER_OF_UE_MAX+1];
-  uint8_t            otg_bg_traffic[NUMBER_OF_UE_MAX+1];
+  uint16_t          otg_ue_id[NB_MODULES_MAX+1];
+  uint8_t          otg_app_type[NB_MODULES_MAX+1];
+  uint8_t            otg_bg_traffic[NB_MODULES_MAX+1];
    // log config
   int16_t           glog_level;
   int16_t           glog_verbosity;
diff --git a/targets/RT/USER/Makefile b/targets/RT/USER/Makefile
index a0228ee514..595ab608c2 100644
--- a/targets/RT/USER/Makefile
+++ b/targets/RT/USER/Makefile
@@ -22,11 +22,11 @@ KERNEL_VERSION=$(shell echo `uname -r | cut -d. -f-2`)
 KERNEL_TYPE=$(shell echo `uname -r | cut -d. -f-3 | cut -d- -f3`)
 LOWLATENCY_KERNEL=$(shell if [ $(KERNEL_TYPE) = "lowlatency" ]; then echo "1" ; else echo "0" ; fi)
 
-ifdef LOWLATENCY # this ifdef is to be removed after the debugging
+#ifdef LOWLATENCY # this ifdef is to be removed after the debugging
 ifeq ($(LOWLATENCY_KERNEL),1)
 CFLAGS+=-DLOWLATENCY
 endif 
-endif 
+#endif 
 
 ifndef USRP
 USRP=0
diff --git a/targets/RT/USER/lte-softmodem.c b/targets/RT/USER/lte-softmodem.c
index bf5e757599..64cb50694f 100644
--- a/targets/RT/USER/lte-softmodem.c
+++ b/targets/RT/USER/lte-softmodem.c
@@ -108,12 +108,13 @@ static int hw_subframe;
 unsigned short config_frames[4] = {2,9,11,13};
 #endif
 #include "UTIL/LOG/log_extern.h"
-#include "UTIL/OTG/otg.h"
+#include "UTIL/OTG/otg_tx.h"
 #include "UTIL/OTG/otg_externs.h"
 #include "UTIL/MATH/oml.h"
 #include "UTIL/LOG/vcd_signal_dumper.h"
 #include "UTIL/OPT/opt.h"
 #include "enb_config.h"
+//#include "PHY/TOOLS/time_meas.h"
 
 #if defined(ENABLE_ITTI)
 # include "intertask_interface_init.h"
@@ -349,6 +350,8 @@ time_stats_t softmodem_stats_mt; // main thread
 time_stats_t softmodem_stats_hw; //  hw acquisation
 time_stats_t softmodem_stats_tx_sf[10]; // total tx time 
 time_stats_t softmodem_stats_rx_sf[10]; // total rx time 
+void reset_opp_meas(void);
+void print_opp_meas(void);
 int transmission_mode=1;
 
 int16_t           glog_level         = LOG_DEBUG;
@@ -967,7 +970,7 @@ static void * eNB_thread_tx(void *param) {
   attr.sched_nice = 0;
   attr.sched_priority = 0;
   
-  /* This creates a 10ms/30ms reservation */
+  /* This creates a 1ms reservation every 10ms period*/
   attr.sched_policy = SCHED_DEADLINE;
   attr.sched_runtime = 1 * 1000000;  // each tx thread requires 1ms to finish its job
   attr.sched_deadline =1 * 1000000; // each tx thread will finish within 1ms
@@ -1122,11 +1125,11 @@ static void * eNB_thread_rx(void *param) {
   attr.sched_nice = 0;
   attr.sched_priority = 0;
   
-  /* This creates a 10ms/30ms reservation */
+  /* This creates a 2ms reservation every 10ms period*/
   attr.sched_policy = SCHED_DEADLINE;
-  attr.sched_runtime = 1 * 2000000;  // each rx thread must finish its job in the worst case in 2ms
-  attr.sched_deadline =1 * 2000000; // each rx thread will finish within 2ms
-  attr.sched_period = 1 * 10000000; // each rx thread has a period of 10ms from the starting point
+  attr.sched_runtime  = 1 * 2000000;  // each rx thread must finish its job in the worst case in 2ms
+  attr.sched_deadline = 1 * 2000000; // each rx thread will finish within 2ms
+  attr.sched_period   = 1 * 10000000; // each rx thread has a period of 10ms from the starting point
   
   if (sched_setattr(0, &attr, flags) < 0 ){
     perror("[SCHED] eNB RX sched_setattr failed\n");
@@ -1397,11 +1400,11 @@ static void *eNB_thread(void *arg)
    attr.sched_nice = 0;
    attr.sched_priority = 0;
    
-   /* This creates a 10ms/30ms reservation */
+   /* This creates a .5 ms  reservation */
    attr.sched_policy = SCHED_DEADLINE;
-   attr.sched_runtime = 1 * 500000;
-   attr.sched_deadline =1 * 500000;
-   attr.sched_period = 1 * 1000000;
+   attr.sched_runtime  = 1 * 1000000;
+   attr.sched_deadline = 1 * 1000000;
+   attr.sched_period   = 1 * 1000000;
    
    /* pin the eNB main thread to CPU0*/
    /* if (pthread_setaffinity_np(pthread_self(), sizeof(mask),&mask) <0) {
-- 
GitLab