* adding additional tests for 10MHz and 20MHz channel BW
* applying patches 8 and 9 contributed from S. Held git-svn-id: http://svn.eurecom.fr/openair4G/trunk@6536 818b1a75-f10b-46b9-bf7c-635c3b92a50f
This commit is contained in:
@@ -38,6 +38,7 @@
|
||||
#define NULL 0
|
||||
|
||||
#include "list.h"
|
||||
#include <string.h>
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/*
|
||||
@@ -48,10 +49,9 @@ void
|
||||
list_init (list_t * listP, char *nameP)
|
||||
{
|
||||
//-----------------------------------------------------------------------------
|
||||
int i = 0;
|
||||
|
||||
if (nameP) {
|
||||
while ((listP->name[i] = nameP[i]) && (i++ < LIST_NAME_MAX_CHAR));
|
||||
strncpy( listP->name, nameP, LIST_NAME_MAX_CHAR );
|
||||
listP->name[LIST_NAME_MAX_CHAR-1] = 0; // terminate string
|
||||
}
|
||||
listP->tail = NULL;
|
||||
listP->head = NULL;
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
#define NULL 0
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/*
|
||||
@@ -33,10 +35,9 @@ void
|
||||
list2_init (list2_t * listP, char *nameP)
|
||||
{
|
||||
//-----------------------------------------------------------------------------
|
||||
unsigned char i = 0;
|
||||
|
||||
if (nameP) {
|
||||
while ((listP->name[i] = nameP[i]) && (i++ < LIST_NAME_MAX_CHAR));
|
||||
strncpy( listP->name, nameP, LIST_NAME_MAX_CHAR );
|
||||
listP->name[LIST_NAME_MAX_CHAR-1] = 0; // terminate string
|
||||
}
|
||||
listP->tail = NULL;
|
||||
listP->head = NULL;
|
||||
|
||||
@@ -366,7 +366,7 @@ The following diagram is based on graphviz (http://www.graphviz.org/), you need
|
||||
typedef struct
|
||||
{
|
||||
char *command;
|
||||
char *file;
|
||||
char *file; //!< 256 bytes memory (see oaisim_config.c)
|
||||
int start;
|
||||
int end;
|
||||
int step;
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
*/
|
||||
|
||||
#include "id_manager.h"
|
||||
#include "assertions.h"
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
@@ -135,13 +136,8 @@ void remove_oaiID_by_SUMO(char *sumo_id, IDManagerPtr ID_manager) {
|
||||
char* get_sumo_entry(int oai_id, Map_list Map_Vector) {
|
||||
Map_list tmp = Map_Vector;
|
||||
|
||||
if(Map_Vector == NULL) {
|
||||
printf("bug here..should not be NULL");
|
||||
}
|
||||
|
||||
if(Map_Vector->map == NULL) {
|
||||
printf("bug here..map should have been initialized");
|
||||
}
|
||||
AssertFatal( Map_Vector, "bug here..should not be NULL" );
|
||||
AssertFatal( Map_Vector->map, "bug here..map should have been initialized" );
|
||||
|
||||
if (tmp->map->oai_id == oai_id) {
|
||||
//printf("got it...at the head and value is %s \n",tmp->map->sumo_id);
|
||||
|
||||
@@ -78,7 +78,7 @@ init_omg_global_params (void)
|
||||
job_vector_end[mob_t] = NULL;
|
||||
}
|
||||
|
||||
for (node_t = eNB; node_t < MAX_NUM_MOB_TYPES; node_t++)
|
||||
for (node_t = eNB; node_t < MAX_NUM_NODE_TYPES; node_t++)
|
||||
{
|
||||
node_vector[node_t] = NULL;
|
||||
node_vector_end[node_t] = NULL;
|
||||
|
||||
@@ -345,13 +345,12 @@ update_rwalk_nodes (double cur_time)
|
||||
node_struct *my_node;
|
||||
while (tmp != NULL && done == 0)
|
||||
{
|
||||
my_node = (node_struct *) tmp->pair->b;
|
||||
|
||||
//case1:time to next event equals to current time
|
||||
if (tmp->pair != NULL
|
||||
&& ((double) tmp->pair->next_event_t >= cur_time - omg_eps)
|
||||
&& ((double) tmp->pair->next_event_t <= cur_time + omg_eps))
|
||||
{
|
||||
my_node = tmp->pair->b;
|
||||
if (my_node->mobile == 1)
|
||||
sleep_rwalk_node (tmp->pair, cur_time);
|
||||
else
|
||||
@@ -364,6 +363,7 @@ update_rwalk_nodes (double cur_time)
|
||||
&& (cur_time - omg_eps) > tmp->pair->next_event_t)
|
||||
{
|
||||
|
||||
my_node = tmp->pair->b;
|
||||
while (cur_time >= tmp->pair->next_event_t)
|
||||
{
|
||||
if (my_node->mobile == 1)
|
||||
|
||||
@@ -320,13 +320,12 @@ update_rwp_nodes (double cur_time)
|
||||
node_struct *my_node;
|
||||
while (tmp != NULL && done == 0)
|
||||
{
|
||||
my_node = (node_struct *) tmp->pair->b;
|
||||
|
||||
//case1:time to next event equals to current time
|
||||
if (tmp->pair != NULL
|
||||
&& ((double) tmp->pair->next_event_t >= cur_time - omg_eps)
|
||||
&& ((double) tmp->pair->next_event_t <= cur_time + omg_eps))
|
||||
{
|
||||
my_node = tmp->pair->b;
|
||||
if (my_node->mobile == 1)
|
||||
sleep_rwp_node (tmp->pair, cur_time);
|
||||
else
|
||||
@@ -339,6 +338,7 @@ update_rwp_nodes (double cur_time)
|
||||
&& (cur_time - omg_eps) > tmp->pair->next_event_t)
|
||||
{
|
||||
|
||||
my_node = tmp->pair->b;
|
||||
while (cur_time >= tmp->pair->next_event_t)
|
||||
{
|
||||
if (my_node->mobile == 1)
|
||||
|
||||
@@ -525,13 +525,12 @@ update_steadystaterwp_nodes (double cur_time)
|
||||
node_struct *my_node;
|
||||
while (tmp != NULL && done == 0)
|
||||
{
|
||||
my_node = (node_struct *) tmp->pair->b;
|
||||
|
||||
//case1:time to next event equals to current time
|
||||
if (tmp->pair != NULL
|
||||
&& ((double) tmp->pair->next_event_t >= cur_time - omg_eps)
|
||||
&& ((double) tmp->pair->next_event_t <= cur_time + omg_eps))
|
||||
{
|
||||
my_node = tmp->pair->b;
|
||||
if (my_node->mobile == 1)
|
||||
sleep_rwp_node (tmp->pair, cur_time);
|
||||
else
|
||||
@@ -544,6 +543,7 @@ update_steadystaterwp_nodes (double cur_time)
|
||||
&& (cur_time - omg_eps) > tmp->pair->next_event_t)
|
||||
{
|
||||
|
||||
my_node = tmp->pair->b;
|
||||
while (cur_time >= tmp->pair->next_event_t)
|
||||
{
|
||||
if (my_node->mobile == 1)
|
||||
|
||||
@@ -50,6 +50,7 @@
|
||||
#include "sumo.h"
|
||||
|
||||
#include "client_traci_OMG.h"
|
||||
#include "assertions.h"
|
||||
|
||||
|
||||
int
|
||||
@@ -170,6 +171,9 @@ start_sumo_generator (omg_global_param omg_param_list)
|
||||
node->generator = SUMO; // SUMO
|
||||
node->mob = mobility;
|
||||
|
||||
DevAssert( SUMO >= sizeof(node_vector_end) ); // FIXME node_vector_end is declared with MAX_NUM_NODE_TYPES elements, but here we are indexing with SUMO from enum mobility_types
|
||||
DevAssert( SUMO >= sizeof(node_vector) ); // FIXME node_vector is declared with MAX_NUM_NODE_TYPES elements, but here we are indexing with SUMO from enum mobility_types
|
||||
|
||||
node_vector_end[SUMO] =
|
||||
(node_list *) add_entry (node, node_vector_end[SUMO]);
|
||||
|
||||
|
||||
@@ -469,6 +469,7 @@ void trace_pdu(int direction, uint8_t *pdu_buffer, unsigned int pdu_buffer_size,
|
||||
1, 0, 1, //guint8 isPredefinedData, guint8 retx, guint8 crcStatus
|
||||
oob_event,oob_event_value,
|
||||
pdu_buffer, pdu_buffer_size);
|
||||
break;
|
||||
case OPT_PCAP:
|
||||
if (file_fd == NULL) {
|
||||
return;
|
||||
@@ -496,15 +497,16 @@ int init_opt(char *path, char *ip, char *port, radio_type_t radio_type_p)
|
||||
{
|
||||
subframesSinceCaptureStart = 0;
|
||||
|
||||
if (ip != NULL) {
|
||||
strcpy(&in_path[0], path);
|
||||
} else {
|
||||
strcpy(&in_path[0], "oai_opt.pcap");
|
||||
}
|
||||
if (path != NULL) {
|
||||
strcpy(&in_ip[0], ip);
|
||||
strncpy( in_path, sizeof(in_path), path );
|
||||
in_path[sizeof(in_path) - 1] = 0; // terminate string
|
||||
} else {
|
||||
strcpy(&in_ip[0], "127.0.0.1");
|
||||
strcpy( in_path, "oai_opt.pcap" );
|
||||
}
|
||||
if (ip != NULL) {
|
||||
strncpy( in_ip, sizeof(in_ip), ip );
|
||||
} else {
|
||||
strcpy( in_ip, "127.0.0.1" );
|
||||
}
|
||||
if (port != NULL) {
|
||||
in_port = atoi(port);
|
||||
@@ -544,6 +546,8 @@ int init_opt(char *path, char *ip, char *port, radio_type_t radio_type_p)
|
||||
break;
|
||||
case OPT_TSHARK:
|
||||
LOG_D(OPT, "Tshark is currently not supported\n");
|
||||
opt_type = OPT_NONE;
|
||||
break;
|
||||
default:
|
||||
opt_type = OPT_NONE;
|
||||
break;
|
||||
|
||||
+6
-14
@@ -127,15 +127,12 @@ int get_ctime(void){
|
||||
void free_otg(){
|
||||
int i,j,k;
|
||||
|
||||
for (i=0; i<g_otg->num_nodes; i++){
|
||||
if (NULL != g_otg->dst_ip[i]){
|
||||
free(g_otg->dst_ip[i]);
|
||||
}
|
||||
}
|
||||
for (i=0; i<g_otg->num_nodes; i++)
|
||||
for (j=0; j<g_otg->num_nodes; j++)
|
||||
free( g_otg->dst_ip[i][j] );
|
||||
|
||||
if (NULL !=g_otg){
|
||||
free(g_otg);
|
||||
}
|
||||
free( g_otg );
|
||||
g_otg = 0;
|
||||
|
||||
LOG_D(OTG,"DEBUG TARMA: free_otg() called \n");
|
||||
for(i=0; i<NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX; i++){
|
||||
@@ -157,11 +154,6 @@ void free_otg(){
|
||||
}
|
||||
}
|
||||
|
||||
if (NULL !=otg_info){
|
||||
free(otg_info);
|
||||
}
|
||||
|
||||
|
||||
|
||||
free(otg_info);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user