1e3/RU2UE[ru_id][UE_id][CC_id]->sampling_rate,// sampling time (ns)
(double)PHY_vars_UE_g[UE_id][CC_id]->rx_total_gain_dB-66.227);// rx_gain (dB) (66.227 = 20*log10(pow2(11)) = gain from the adc that will be applied later)
#ifdef DEBUG_SIM
rx_pwr=signal_energy_fp(r_re0,r_im0,
nb_antennas_rx,
length<length_meas?length:length_meas,
0)/(12.0*frame_parms->N_RB_DL);
LOG_D(OCM,"[SIM][DL] UE %d : ADC in (RU %d) %f dBm/RE for subframe %d\n",
1e3/UE2RU[0][ru_id][CC_id]->sampling_rate,// sampling time (ns)
(double)RC.ru[ru_id]->max_rxgain-(double)RC.ru[ru_id]->att_rx-66.227);// rx_gain (dB) (66.227 = 20*log10(pow2(11)) = gain from the adc that will be applied later)
printf("-Q Activate and set the MBMS service: 0 : not used (default eMBMS disabled), 1: eMBMS and RRC Connection enabled, 2: eMBMS relaying and RRC Connection enabled, 3: eMBMS enabled, RRC Connection disabled, 4: eMBMS relaying enabled, RRC Connection disabled\n");
printf("-R [6,15,25,50,75,100] Sets N_RB_DL\n");
printf("-r Activates rate adaptation (DL for now)\n");
printf("-s snr_dB set a fixed (average) SNR, this deactivates the openair channel model generator (OCM)\n");
printf("-S snir_dB set a fixed (average) SNIR, this deactivates the openair channel model generator (OCM)\n");
printf("-t Gives a fixed UL mcs for eNB scheduler\n");
printf("-T activate the traffic generator. Valide options are m2m,scbr,mcbr,bcbr,auto_pilot,bicycle_race,open_arena,team_fortress,m2m_traffic,auto_pilot_l,auto_pilot_m,auto_pilot_h,auto_pilot_e,virtual_game_l,virtual_game_m,virtual_game_h,virtual_game_f,alarm_humidity,alarm_smoke,alarm_temperature,openarena_dl,openarena_ul,voip_g711,voip_g729,video_vbr_10mbps,video_vbr_4mbps,video_vbr_2mbp,video_vbr_768kbps,video_vbr_384kbps,video_vbr_192kpbs,background_users\n");
printf("-u Set the number of local UE\n");
printf("-U Set the mobility model for UE, options are: STATIC, RWP, RWALK\n");
printf("-V [vcd_file] Enable VCD dump into vcd_file\n");
printf("-w number of CBA groups, if not specified or zero, CBA is inactive\n");
#ifdef SMBV
printf("-W IP address to connect to Rohde&Schwarz SMBV100A and configure SMBV from config file. -W0 uses default IP 192.168.12.201\n");
#else
printf("-W [Rohde&Schwarz SMBV100A functions disabled. Recompile with SMBV=1]\n");
#endif
printf("-x deprecated. Set the transmission mode in config file!\n");
printf("-y Set the number of receive antennas at the UE (1 or 2)\n");
printf("-Y Set the global log verbosity (none, low, medium, high, full) \n");
printf("-z Set the cooperation flag (0 for no cooperation, 1 for delay diversity and 2 for distributed alamouti\n");
printf("-Z Reserved\n");
printf("--xforms Activate the grapical scope\n");
#if T_TRACER
printf("--T_port [port] use given port\n");
printf("--T_nowait don't wait for tracer, start immediately\n");
printf("--T_dont_fork to ease debugging with gdb\n");
AssertFatal(result==EXIT_SUCCESS,"Failed to free memory (%d)!\n",result);
}
}while(message_p!=NULL);
#endif
//Run the aperiodic user-defined events
if(oai_emulation.info.oeh_enabled==1)
execute_events(frame);
if(ue_connection_test==1){
if((frame%20)==0){
snr_dB+=snr_direction;
sinr_dB-=snr_direction;
}
if(snr_dB==-20){
snr_direction=snr_step;
}elseif(snr_dB==20){
snr_direction=-snr_step;
}
}
oai_emulation.info.frame=frame;
//oai_emulation.info.time_ms += 1;
oai_emulation.info.time_s+=0.01;// emu time in s, each frame lasts for 10 ms // JNote: TODO check the coherency of the time and frame (I corrected it to 10 (instead of 0.01)
update_omg(frame);// frequency is defined in the omg_global params configurable by the user
if(g_otg->application_type[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]]==0){// no app is defined for this pair src.dst
if(g_otg->application_type[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]]==0){// no app is defined for this pair src.dst
if(g_otg->application_type[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]]==0){// no app is defined for this pair src.dst
if(g_otg->application_type[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]]==0){// no app is defined for this pair src.dst
if(g_otg->application_type[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]]==0){// no app is defined for this pair src.dst
LOG_I(OTG,"customized:: OCG_config_OTG: (2) FORMAT (%s:%s) source = %d, dest = %d, dist type for size = %d [TODO: check code, printed value may not be correct, checks the indexes of the arry access] start/duration %d/%d\n",source_id_start,source_id_end,source_id_index,
if(g_otg->application_type[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]]==0){// no app is defined for this pair src.dst
LOG_N(EMU,"Total number of RN %d (local %d, remote %d) mobility (the same as eNB) %s \n",NB_RN_INST,oai_emulation.info.nb_rn_local,oai_emulation.info.nb_rn_remote,
LOG_D(EMU,"UE %d: DL simulation 1: UE_trx_read : current TS now %"PRIi64", last TS %"PRIi64"\n",UE_id,current_UE_rx_timestamp[UE_id][CC_id],last_UE_rx_timestamp[UE_id][CC_id]);
while(current_UE_rx_timestamp[UE_id][CC_id]<
(last_UE_rx_timestamp[UE_id][CC_id]+read_size)){
LOG_D(EMU,"UE %d: DL simulation 2: UE_trx_read : current TS %"PRIi64", last TS %"PRIi64", sleeping\n",UE_id,current_UE_rx_timestamp[UE_id][CC_id],last_UE_rx_timestamp[UE_id][CC_id]);
usleep(500);
}
LOG_D(EMU,"UE %d: DL simulation 3: UE_trx_read : current TS now %"PRIi64", last TS %"PRIi64"\n",UE_id,current_UE_rx_timestamp[UE_id][CC_id],last_UE_rx_timestamp[UE_id][CC_id]);
// to make channel reciprocal uncomment following line instead of previous. However this only works for SISO at the moment. For MIMO the channel would need to be transposed.