Commit a6d1aa8d authored by Rohit Gupta's avatar Rohit Gupta
Browse files

Merge branch 'develop' into feature-34-test_framework

parents 8b849e5c 9eec54ae
......@@ -130,7 +130,7 @@ int emm_proc_status(unsigned int ueid, int emm_cause)
emm_sap_t emm_sap;
emm_security_context_t *sctx = NULL;
struct emm_data_context_s *ctx = NULL;
//struct emm_data_context_s *ctx = NULL;
LOG_TRACE(INFO,"EMM-PROC - EMM status procedure requested");
......
......@@ -261,7 +261,7 @@ int lowerlayer_data_req(unsigned int ueid, const OctetString *data)
int rc;
emm_sap_t emm_sap;
emm_security_context_t *sctx = NULL;
struct emm_data_context_s *ctx = NULL;
//struct emm_data_context_s *ctx = NULL;
emm_sap.primitive = EMMAS_DATA_REQ;
emm_sap.u.emm_as.u.data.guti = _emm_data.guti;
......
......@@ -215,7 +215,7 @@ emm_fsm_state_t _emm_fsm_status[EMM_FSM_NB_UE_MAX];
***************************************************************************/
void emm_fsm_initialize(void)
{
int ueid;
//int ueid;
LOG_FUNC_IN;
_emm_fsm_status[0] = EMM_NULL;
......
......@@ -114,6 +114,9 @@ int emm_reg_send(const emm_reg_t *msg)
emm_reg_primitive_t primitive = msg->primitive;
assert( (primitive > _EMMREG_START) && (primitive < _EMMREG_END));
/* avoid gcc warnings */
(void)primitive;
/* Execute the EMM procedure */
rc = emm_fsm_process(msg);
......
......@@ -114,7 +114,7 @@ int esm_ebr_context_create(
int bid = 0;
esm_data_context_t *esm_ctx = NULL;
esm_pdn_t *pdn = NULL;
unsigned int ueid = 0;
//unsigned int ueid = 0;
LOG_FUNC_IN;
......@@ -212,7 +212,7 @@ int esm_ebr_context_create(
{
char *tmp = NULL;
char ipv4_addr[INET_ADDRSTRLEN];
char ipv6_addr[INET6_ADDRSTRLEN];
//char ipv6_addr[INET6_ADDRSTRLEN];
char *netmask = NULL;
char broadcast[INET_ADDRSTRLEN];
struct in_addr in_addr;
......@@ -221,7 +221,8 @@ int esm_ebr_context_create(
switch (pdn->type) {
case NET_PDN_TYPE_IPV4V6:
ipv6_addr[0] = pdn->ip_addr[4];
//ipv6_addr[0] = pdn->ip_addr[4];
/* TODO? */
// etc
case NET_PDN_TYPE_IPV4:
......@@ -283,11 +284,12 @@ int esm_ebr_context_create(
res = sprintf(command_line,
"ifconfig oip1 %s netmask %s broadcast %s up",
ipv4_addr, netmask, broadcast);
(void)res; /* avoid gcc warning "set but not used" */
// AssertFatal((res > 0) && (res < 128),
// "error in system command line");
LOG_TRACE(INFO, "ESM-PROC - executing %s ",
command_line);
system(command_line);
if (system(command_line)) ; /* TODO: what to do? */
break;
case NET_PDN_TYPE_IPV6:
......@@ -341,7 +343,7 @@ int esm_ebr_context_release(
esm_pdn_t *pdn = NULL;
esm_data_context_t *esm_ctx;
unsigned int ueid = 0;
//unsigned int ueid = 0;
LOG_FUNC_IN;
......
......@@ -4,7 +4,7 @@
asn_enc_rval_t OCTET_STRING_encode_aper(asn_TYPE_descriptor_t *td, asn_per_constraints_t *cts, void *sptr, asn_per_outp_t *po) { asn_enc_rval_t er = { 0, 0, 0 }; (void)td; (void)cts; (void)sptr; (void)po; return er; }
+asn_comp_rval_t * OCTET_STRING_compare(asn_TYPE_descriptor_t *td1, void *sptr1, asn_TYPE_descriptor_t *td2, void *sptr2) { (void)td1; (void)sptr1; (void)td2; (void)sptr2; return 0; }
+asn_comp_rval_t * OCTET_STRING_compare(asn_TYPE_descriptor_t *td1, const void *sptr1, asn_TYPE_descriptor_t *td2, const void *sptr2) { (void)td1; (void)sptr1; (void)td2; (void)sptr2; return 0; }
+
size_t xer_whitespace_span(const void *chunk_buf, size_t chunk_size) { (void)chunk_buf; (void)chunk_size; return 0; }
--- libasn1compiler/asn1c_C.c 2015-12-08 14:39:33.366543533 +0100
......@@ -51,9 +51,9 @@
+ if(HIDE_INNER_DEFS) OUT("_%d", expr->_type_unique_index);
+ OUT("_compare(asn_TYPE_descriptor_t *td1,\n");
+ INDENTED(
+ OUT("\tvoid *structure1,\n");
+ OUT("\tconst void *structure1,\n");
+ OUT("\tasn_TYPE_descriptor_t *td2,\n");
+ OUT("\tvoid *structure2) {\n");
+ OUT("\tconst void *structure2) {\n");
+ OUT("asn_comp_rval_t * res = NULL;\n");
+ OUT("%s_%d_inherit_TYPE_descriptor(td1);\n",
+ p, expr->_type_unique_index);
......@@ -142,8 +142,8 @@
+typedef struct asn_comp_rval_s {
+ enum COMPARE_ERR_CODE_e err_code;
+ char *name; // e_S1ap_ProtocolIE_ID not available for all ASN1 use (RRC vs S1AP, X2AP)
+ void *structure1;
+ void *structure2;
+ const void *structure1;
+ const void *structure2;
+ struct asn_comp_rval_s *next;
+} asn_comp_rval_t;
+
......@@ -234,7 +234,7 @@
+
+asn_comp_rval_t *
+BOOLEAN_compare(asn_TYPE_descriptor_t *td1,
+ void *sptr1, asn_TYPE_descriptor_t *td2, void *sptr2) {
+ const void *sptr1, asn_TYPE_descriptor_t *td2, const void *sptr2) {
+ const BOOLEAN_t *st1 = (const BOOLEAN_t *)sptr1;
+ const BOOLEAN_t *st2 = (const BOOLEAN_t *)sptr2;
+ asn_comp_rval_t *res = NULL;
......@@ -279,9 +279,9 @@
+
+typedef asn_comp_rval_t * (type_compare_f)(
+ struct asn_TYPE_descriptor_s *type_descriptor1,
+ void *struct_ptr1,
+ const void *struct_ptr1,
+ struct asn_TYPE_descriptor_s *type_descriptor2,
+ void *struct_ptr2
+ const void *struct_ptr2
+);
+
+
......@@ -299,7 +299,7 @@
}
+
+asn_comp_rval_t *
+CHOICE_compare(asn_TYPE_descriptor_t *td1, void *sptr1, asn_TYPE_descriptor_t *td2, void *sptr2)
+CHOICE_compare(asn_TYPE_descriptor_t *td1, const void *sptr1, asn_TYPE_descriptor_t *td2, const void *sptr2)
+{
+ asn_CHOICE_specifics_t *specs1 = (asn_CHOICE_specifics_t *)td1->specifics;
+ asn_CHOICE_specifics_t *specs2 = (asn_CHOICE_specifics_t *)td2->specifics;
......@@ -392,14 +392,13 @@
}
--- skeletons/constr_SEQUENCE.c 2015-12-08 14:39:33.346543533 +0100
+++ skeletons/constr_SEQUENCE.c 2015-12-08 10:39:52.442558000 +0100
@@ -1761,3 +1761,66 @@
@@ -1761,3 +1761,65 @@
_ASN_ENCODED_OK(er);
}
+
+asn_comp_rval_t * SEQUENCE_compare(asn_TYPE_descriptor_t *td1, void *sptr1, asn_TYPE_descriptor_t *td2, void *sptr2) {
+asn_comp_rval_t * SEQUENCE_compare(asn_TYPE_descriptor_t *td1, const void *sptr1, asn_TYPE_descriptor_t *td2, const void *sptr2) {
+ int edx;
+ int ret;
+ asn_comp_rval_t *res = NULL;
+ asn_comp_rval_t *res2 = NULL;
+
......@@ -498,7 +497,7 @@
}
+
+asn_comp_rval_t *
+SET_compare(asn_TYPE_descriptor_t *td1, void *sptr1, asn_TYPE_descriptor_t *td2, void *sptr2)
+SET_compare(asn_TYPE_descriptor_t *td1, const void *sptr1, asn_TYPE_descriptor_t *td2, const void *sptr2)
+{
+ int edx;
+ asn_comp_rval_t *res = NULL;
......@@ -563,19 +562,18 @@
* Some handy helpers. *
--- skeletons/constr_SET_OF.c 2015-12-08 14:39:33.338543533 +0100
+++ skeletons/constr_SET_OF.c 2015-12-08 10:45:54.466557000 +0100
@@ -1039,3 +1039,55 @@
@@ -1039,3 +1039,54 @@
rv.consumed = 0;
return rv;
}
+
+asn_comp_rval_t *
+SET_OF_compare(asn_TYPE_descriptor_t *td1, void *sptr1, asn_TYPE_descriptor_t *td2, void *sptr2)
+SET_OF_compare(asn_TYPE_descriptor_t *td1, const void *sptr1, asn_TYPE_descriptor_t *td2, const void *sptr2)
+{
+ asn_TYPE_member_t *elm1 = td1->elements;
+ asn_TYPE_member_t *elm2 = td2->elements;
+ const asn_anonymous_set_ *list1 = _A_CSET_FROM_VOID(sptr1);
+ const asn_anonymous_set_ *list2 = _A_CSET_FROM_VOID(sptr2);
+ int ret;
+ int i;
+ asn_comp_rval_t *res = NULL;
+ asn_comp_rval_t *res2 = NULL;
......@@ -667,10 +665,10 @@
}
+
+asn_comp_rval_t *
+ENUMERATED_compare(asn_TYPE_descriptor_t *td1, void *sptr1,
+ asn_TYPE_descriptor_t *td2, void *sptr2) {
+ ENUMERATED_t *st1 = (ENUMERATED_t *)sptr1;
+ ENUMERATED_t *st2 = (ENUMERATED_t *)sptr2;
+ENUMERATED_compare(asn_TYPE_descriptor_t *td1, const void *sptr1,
+ asn_TYPE_descriptor_t *td2, const void *sptr2) {
+ const ENUMERATED_t *st1 = (const ENUMERATED_t *)sptr1;
+ const ENUMERATED_t *st2 = (const ENUMERATED_t *)sptr2;
+ asn_comp_rval_t *res = NULL;
+
+ COMPARE_CHECK_ARGS(td1, td2, sptr1, sptr2, res)
......@@ -774,10 +772,10 @@
+asn_comp_rval_t *
+INTEGER_compare(asn_TYPE_descriptor_t *td1, void *sptr1,
+ asn_TYPE_descriptor_t *td2, void *sptr2) {
+ INTEGER_t *st1 = (INTEGER_t *)sptr1;
+ INTEGER_t *st2 = (INTEGER_t *)sptr2;
+INTEGER_compare(asn_TYPE_descriptor_t *td1, const void *sptr1,
+ asn_TYPE_descriptor_t *td2, const void *sptr2) {
+ const INTEGER_t *st1 = (const INTEGER_t *)sptr1;
+ const INTEGER_t *st2 = (const INTEGER_t *)sptr2;
+ asn_comp_rval_t *res = NULL;
+
+ COMPARE_CHECK_ARGS(td1, td2, sptr1, sptr2, res)
......@@ -857,8 +855,8 @@
}
+
+asn_comp_rval_t *
+NativeEnumerated_compare(asn_TYPE_descriptor_t *td1, void *sptr1,
+ asn_TYPE_descriptor_t *td2, void *sptr2) {
+NativeEnumerated_compare(asn_TYPE_descriptor_t *td1, const void *sptr1,
+ asn_TYPE_descriptor_t *td2, const void *sptr2) {
+ const asn_INTEGER_enum_map_t *a = sptr1;
+ const asn_INTEGER_enum_map_t *b = sptr2;
+ asn_comp_rval_t *res = NULL;
......@@ -902,8 +900,8 @@
+
+asn_comp_rval_t *
+NativeInteger_compare(asn_TYPE_descriptor_t *td1, void *sptr1,
+ asn_TYPE_descriptor_t *td2, void *sptr2) {
+NativeInteger_compare(asn_TYPE_descriptor_t *td1, const void *sptr1,
+ asn_TYPE_descriptor_t *td2, const void *sptr2) {
+ const long *native1 = (const long *)sptr1;
+ const long *native2 = (const long *)sptr2;
+ asn_comp_rval_t *res = NULL;
......@@ -945,10 +943,10 @@
}
+asn_comp_rval_t *
+NativeReal_compare(asn_TYPE_descriptor_t *td1, void *sptr1,
+ asn_TYPE_descriptor_t *td2, void *sptr2) {
+ REAL_t *st1 = (REAL_t *)sptr1;
+ REAL_t *st2 = (REAL_t *)sptr2;
+NativeReal_compare(asn_TYPE_descriptor_t *td1, const void *sptr1,
+ asn_TYPE_descriptor_t *td2, const void *sptr2) {
+ const REAL_t *st1 = (const REAL_t *)sptr1;
+ const REAL_t *st2 = (const REAL_t *)sptr2;
+ asn_comp_rval_t *res = NULL;
+
+ COMPARE_CHECK_ARGS(td1, td2, sptr1, sptr2, res)
......@@ -999,8 +997,8 @@
}
+
+asn_comp_rval_t *
+NULL_compare(asn_TYPE_descriptor_t *td1, void *sptr1,
+ asn_TYPE_descriptor_t *td2, void *sptr2) {
+NULL_compare(asn_TYPE_descriptor_t *td1, const void *sptr1,
+ asn_TYPE_descriptor_t *td2, const void *sptr2) {
+
+ return NULL;
+}
......@@ -1068,9 +1066,9 @@
+asn_comp_rval_t *
+OCTET_STRING_compare(asn_TYPE_descriptor_t *td1,
+ void *sptr1, asn_TYPE_descriptor_t *td2, void *sptr2) {
+ OCTET_STRING_t *st1 = (OCTET_STRING_t *)sptr1;
+ OCTET_STRING_t *st2 = (OCTET_STRING_t *)sptr2;
+ const void *sptr1, asn_TYPE_descriptor_t *td2, const void *sptr2) {
+ const OCTET_STRING_t *st1 = (const OCTET_STRING_t *)sptr1;
+ const OCTET_STRING_t *st2 = (const OCTET_STRING_t *)sptr2;
+ asn_comp_rval_t *res = NULL;
+
+ COMPARE_CHECK_ARGS(td1, td2, sptr1, sptr2, res)
......@@ -1134,10 +1132,10 @@
+
+
+asn_comp_rval_t *
+REAL_compare(asn_TYPE_descriptor_t *td1, void *sptr1,
+ asn_TYPE_descriptor_t *td2, void *sptr2) {
+ REAL_t *st1 = (REAL_t *)sptr1;
+ REAL_t *st2 = (REAL_t *)sptr2;
+REAL_compare(asn_TYPE_descriptor_t *td1, const void *sptr1,
+ asn_TYPE_descriptor_t *td2, const void *sptr2) {
+ const REAL_t *st1 = (const REAL_t *)sptr1;
+ const REAL_t *st2 = (const REAL_t *)sptr2;
+ asn_comp_rval_t *res = NULL;
+
+ COMPARE_CHECK_ARGS(td1, td2, sptr1, sptr2, res)
......
......@@ -859,11 +859,12 @@ int s1ap_eNB_handle_ue_context_release_command(uint32_t assoc_id,
break;
#warning "TODO mapping mme_ue_s1ap_id enb_ue_s1ap_id?"
//#warning "TODO mapping mme_ue_s1ap_id enb_ue_s1ap_id?"
case S1ap_UE_S1AP_IDs_PR_mME_UE_S1AP_ID:
mme_ue_s1ap_id = ueContextReleaseCommand_p->uE_S1AP_IDs.choice.mME_UE_S1AP_ID;
S1AP_ERROR("TO DO mapping mme_ue_s1ap_id enb_ue_s1ap_id");
(void)mme_ue_s1ap_id; /* TODO: remove - it's to remove gcc warning about unused var */
case S1ap_UE_S1AP_IDs_PR_NOTHING:
default:
......
......@@ -191,7 +191,7 @@ int s1ap_eNB_handle_nas_first_req(
* The cell identity is defined on 28 bits but as we use macro enb id,
* we have to pad.
*/
#warning "TODO get cell id from RRC"
//#warning "TODO get cell id from RRC"
MACRO_ENB_ID_TO_CELL_IDENTITY(instance_p->eNB_id,
0, // Cell ID
&initial_ue_message_p->eutran_cgi.cell_ID);
......@@ -400,7 +400,7 @@ int s1ap_eNB_nas_uplink(instance_t instance, s1ap_uplink_nas_t *s1ap_uplink_nas_
s1ap_eNB_instance_p->mnc_digit_length,
&uplink_NAS_transport_p->eutran_cgi.pLMNidentity);
#warning "TODO get cell id from RRC"
//#warning "TODO get cell id from RRC"
MACRO_ENB_ID_TO_CELL_IDENTITY(s1ap_eNB_instance_p->eNB_id,
0,
&uplink_NAS_transport_p->eutran_cgi.cell_ID);
......
......@@ -148,7 +148,7 @@ sctp_handle_new_association_req(
DevAssert(sctp_new_association_req_p != NULL);
/* Create new socket with IPv6 affinity */
#warning "SCTP may Force IPv4 only, here"
//#warning "SCTP may Force IPv4 only, here"
#ifdef NO_VIRTUAL_MACHINE
// in init chunk appears a list of host addresses, IPv4 and IPv4 in an arbitrary (unsorted) order
......
......@@ -49,7 +49,7 @@ int nas_stream_encrypt_eea1(nas_stream_cipher_t *stream_cipher, uint8_t *out)
int n ;
int i = 0;
uint32_t zero_bit = 0;
uint32_t byte_length;
//uint32_t byte_length;
uint32_t *KS;
uint32_t K[4],IV[4];
......@@ -60,7 +60,7 @@ int nas_stream_encrypt_eea1(nas_stream_cipher_t *stream_cipher, uint8_t *out)
n = ( stream_cipher->blength + 31 ) / 32;
zero_bit = stream_cipher->blength & 0x7;
byte_length = stream_cipher->blength >> 3;
//byte_length = stream_cipher->blength >> 3;
memset(&snow_3g_context, 0, sizeof(snow_3g_context));
/*Initialisation*/
......
......@@ -112,6 +112,7 @@ int nas_stream_encrypt_eia2(nas_stream_cipher_t *stream_cipher, uint8_t out[4])
cmac_ctx = CMAC_CTX_new();
ret = CMAC_Init(cmac_ctx, stream_cipher->key, stream_cipher->key_length, cipher, NULL);
ret = CMAC_Update(cmac_ctx, m, m_length + 8);
(void)ret; /* avoid gcc warning "set but not used" */
CMAC_Final(cmac_ctx, data, &size);
CMAC_CTX_free(cmac_ctx);
......
......@@ -300,8 +300,8 @@ void *udp_eNB_task(void *args_p)
int nb_events;
struct epoll_event *events;
MessageDef *received_message_p = NULL;
const char *msg_name = NULL;
instance_t instance = 0;
//const char *msg_name = NULL;
//instance_t instance = 0;
udp_enb_init(NULL);
itti_mark_task_ready(TASK_UDP);
......@@ -316,8 +316,8 @@ void *udp_eNB_task(void *args_p)
if (received_message_p != NULL) {
msg_name = ITTI_MSG_NAME (received_message_p);
instance = ITTI_MSG_INSTANCE (received_message_p);
//msg_name = ITTI_MSG_NAME (received_message_p);
//instance = ITTI_MSG_INSTANCE (received_message_p);
switch (ITTI_MSG_ID(received_message_p)) {
case UDP_INIT: {
......
......@@ -147,7 +147,8 @@ int openair0_device_load(openair0_device *device, openair0_config_t *openair0_cf
int rc;
//ToDo: EXMIMO harmonization is not complete. That is the reason for this ifdef
#ifdef EXMIMO
device_init(device, openair0_cfg);
int device_init(openair0_device *device, openair0_config_t *openair0_cfg);
rc = device_init(device, openair0_cfg);
#else
rc=load_lib(device, openair0_cfg, NULL,BBU_LOCAL_RADIO_HEAD );
if ( rc >= 0) {
......
......@@ -190,15 +190,13 @@ static int __init openair_init_module( void )
mmio_length[card] = pci_resource_len (pdev[card], 0);
mmio_flags[card] = pci_resource_flags(pdev[card], 0);
if (check_mem_region(mmio_start[card],256) < 0) {
if (request_mem_region(mmio_start[card],256,"openair_rf") == NULL) {
printk("[openair][INIT_MODULE][FATAL] : Cannot get memory region 0, aborting\n");
mmio_start[card] = 0;
openair_cleanup();
return -EBUSY;
} else
printk("[openair][INIT_MODULE][INFO] : Reserving memory region 0 : mmio_start = 0x%x\n",(unsigned int)mmio_start[card]);
request_mem_region(mmio_start[card], 256, "openair_rf");
printk("[openair][INIT_MODULE][INFO] : Reserved memory region 0 : mmio_start = 0x%x\n",(unsigned int)mmio_start[card]);
bar[card] = pci_iomap( pdev[card], 0, mmio_length[card] ); // get virtual kernel address for BAR0
......
......@@ -30,8 +30,10 @@
#define TARGET_RX_POWER 50 // Target digital power for the AGC
#define TARGET_RX_POWER_MAX 53 // Maximum digital power for AGC
#define TARGET_RX_POWER_MIN 48 // Minimum digital power for AGC
#ifndef min
#define min(a,b) (((a)<(b))?(a):(b))
#define max(a,b) (((a)>(b))?(a):(b))
#endif
void gain_control_all (unsigned int rx_power_fil_dB, unsigned int card);
void gain_control (unsigned int rx_power_fil_dB, unsigned int ant, unsigned int card);
......@@ -98,4 +98,6 @@ unsigned int *openair0_daq_cnt(void);
// set the TX and RX frequencies (card 0 only for now, to retain USRP compatibility)
int openair0_set_frequencies(openair0_device* device, openair0_config_t *openair0_cfg,int exmimo_dump_config);
int openair0_set_gains(openair0_device* device, openair0_config_t *openair0_cfg);
#endif
......@@ -394,7 +394,7 @@ struct timespec clock_difftime(struct timespec start, struct timespec end)
return temp;
}
void print_difftimes()
void print_difftimes(void)
{
#ifdef DEBUG
printf("difftimes min = %lu ns ; max = %lu ns\n", min_diff_time.tv_nsec, max_diff_time.tv_nsec);
......@@ -1055,7 +1055,7 @@ static void* eNB_thread_tx( void* param )
static int eNB_thread_tx_status[NUM_ENB_THREADS];
eNB_proc_t *proc = (eNB_proc_t*)param;
FILE *tx_time_file;
FILE *tx_time_file = NULL;
char tx_time_name[101];
if (opp_enabled == 1) {
......@@ -1274,9 +1274,9 @@ static void* eNB_thread_rx( void* param )
eNB_proc_t *proc = (eNB_proc_t*)param;
FILE *rx_time_file;
FILE *rx_time_file = NULL;
char rx_time_name[101];
int i;
//int i;
if (opp_enabled == 1){
snprintf(rx_time_name, 100,"/tmp/%s_rx_time_thread_sf_%d", "eNB", proc->subframe);
......@@ -1638,6 +1638,11 @@ static void* eNB_thread( void* arg )
int CC_id=0;
struct timespec trx_time0, trx_time1, trx_time2;
/* avoid gcc warnings */
(void)trx_time0;
(void)trx_time1;
(void)trx_time2;
#ifdef RTAI
RT_TASK* task = rt_task_init_schmod(nam2num("eNBmain"), 0, 0, 0, SCHED_FIFO, 0xF);
#else
......@@ -1681,7 +1686,7 @@ static void* eNB_thread( void* arg )
#ifdef RTAI
printf( "[SCHED][eNB] Started eNB main thread (id %p)\n", task );
#else
printf( "[SCHED][eNB] Started eNB main thread on CPU %d TID %d\n", sched_getcpu(), gettid());
printf( "[SCHED][eNB] Started eNB main thread on CPU %d TID %ld\n", sched_getcpu(), gettid());
#endif
#ifdef HARD_RT
......@@ -3225,10 +3230,11 @@ int main( int argc, char **argv )
if (input_fd) {
printf("Reading in from file to antenna buffer %d\n",0);
fread(UE[0]->lte_ue_common_vars.rxdata[0],
sizeof(int32_t),
frame_parms[0]->samples_per_tti*10,
input_fd);
if (fread(UE[0]->lte_ue_common_vars.rxdata[0],
sizeof(int32_t),
frame_parms[0]->samples_per_tti*10,
input_fd) != frame_parms[0]->samples_per_tti*10)
printf("error reading from file\n");
}
//p_exmimo_config->framing.tdd_config = TXRXSWITCH_TESTRX;
} else {
......
......@@ -463,7 +463,7 @@ static void *UE_thread_synch(void *arg)
if( UE->mode == rx_dump_frame ){
FILE *fd;
if ((UE->frame_rx&1) == 0) { // this guarantees SIB1 is present
if (fd = fopen("rxsig_frame0.dat","w")) {
if ((fd = fopen("rxsig_frame0.dat","w")) != NULL) {
fwrite((void*)&UE->lte_ue_common_vars.rxdata[0][0],
sizeof(int32_t),
10*UE->lte_frame_parms.samples_per_tti,
......@@ -607,7 +607,7 @@ static void *UE_thread_synch(void *arg)
static void *UE_thread_tx(void *arg)
{
static int UE_thread_tx_retval;
int ret;
//int ret;
PHY_VARS_UE *UE = (PHY_VARS_UE*)arg;
......@@ -1401,14 +1401,14 @@ void *UE_thread(void *arg)
RT_TASK *task;
#endif
// RTIME in, out, diff;
int slot=0,frame=0,hw_slot,last_slot,next_slot;
int slot=0,frame=0,hw_slot;
// unsigned int aa;
int delay_cnt;
RTIME time_in;
int hw_slot_offset=0,rx_offset_mbox=0,mbox_target=0,mbox_current=0;
int /* hw_slot_offset=0, */ rx_offset_mbox=0,mbox_target=0,mbox_current=0;
int diff2;
int i, ret;
int CC_id,card;
int /* i, */ ret;
int /* CC_id, */ card;
volatile unsigned int *DAQ_MBOX = openair0_daq_cnt();
int wait_sync_cnt = 0;
......@@ -1688,7 +1688,7 @@ void *UE_thread(void *arg)
frame++;
}
} else if (UE->is_synchronized == 0) { // we are not yet synchronized
hw_slot_offset = 0;
//hw_slot_offset = 0;
first_synch = 1;
slot = 0;
......
......@@ -38,6 +38,10 @@
* \warning
*/
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include "rt_wrapper.h"
static int latency_target_fd = -1;
static int32_t latency_target_value = 0;
......@@ -154,6 +158,7 @@ int fill_modeled_runtime_table(uint16_t runtime_phy_rx[29][6],
runtime_phy_tx[i][j] = cell_processing_dl[j] + platform_processing_dl + user_processing_dl_err[j] + user_processing_dl_a[j]*i+ user_processing_dl_b[j];
}
}
return 0;
}
// int runtime_upper_layers[6]; // values for different RBs
......
......@@ -97,7 +97,7 @@ void do_DL_sig(double **r_re0,double **r_im0,
double rx_pwr;
int32_t rx_pwr2;
uint32_t i,aa;
uint32_t slot_offset,slot_offset_meas;
uint32_t slot_offset,slot_offset_meas = 0;
double min_path_loss=-200;
uint8_t hold_channel=0;
......@@ -105,7 +105,7 @@ void do_DL_sig(double **r_re0,double **r_im0,
uint8_t nb_antennas_rx = eNB2UE[0][0][CC_id]->nb_rx; // number of rx antennas at UE
uint8_t nb_antennas_tx = eNB2UE[0][0][CC_id]->nb_tx; // number of tx antennas at eNB
LTE_DL_FRAME_PARMS *fp;
//LTE_DL_FRAME_PARMS *fp;
// int subframe_sched = ((next_slot>>1) == 0) ? 9 : ((next_slot>>1)-1);
......
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