Merge remote-tracking branch 'origin/develop' into enhancement-ltem
Conflicts: openair1/PHY/INIT/lte_init.c openair1/PHY/LTE_ESTIMATION/lte_ul_channel_estimation.c openair1/PHY/LTE_TRANSPORT/dci.c openair1/PHY/LTE_TRANSPORT/dci_tools.c openair1/PHY/LTE_TRANSPORT/dlsch_coding.c openair1/PHY/LTE_TRANSPORT/edci.c openair1/PHY/LTE_TRANSPORT/if4_tools.c openair1/PHY/LTE_TRANSPORT/prach.c openair1/PHY/LTE_TRANSPORT/print_stats.c openair1/PHY/LTE_TRANSPORT/pucch.c openair1/PHY/LTE_TRANSPORT/transport_eNB.h openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c openair1/PHY/LTE_UE_TRANSPORT/transport_proto_ue.h openair1/PHY/impl_defs_lte.h openair1/SCHED/fapi_l1.c openair1/SCHED/phy_procedures_lte_eNb.c openair2/COMMON/rrc_messages_types.h openair2/ENB_APP/enb_config.c openair2/ENB_APP/enb_paramdef.h openair2/LAYER2/MAC/config.c openair2/LAYER2/MAC/defs.h openair2/LAYER2/MAC/eNB_scheduler.c openair2/LAYER2/MAC/eNB_scheduler_RA.c openair2/LAYER2/MAC/eNB_scheduler_bch.c openair2/LAYER2/MAC/eNB_scheduler_dlsch.c openair2/LAYER2/MAC/eNB_scheduler_primitives.c openair2/LAYER2/MAC/eNB_scheduler_ulsch.c openair2/LAYER2/MAC/pre_processor.c openair2/LAYER2/MAC/rar_tools.c openair2/LAYER2/MAC/ue_procedures.c openair2/PHY_INTERFACE/IF_Module.c openair2/RRC/LITE/rrc_common.c openair2/RRC/LTE/L2_interface_ue.c openair2/RRC/LTE/MESSAGES/asn1_msg.c openair2/RRC/LTE/rrc_eNB.c targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp targets/RT/USER/lte-enb.c targets/RT/USER/lte-ru.c
This commit is contained in:
@@ -29,7 +29,7 @@
|
||||
*/
|
||||
|
||||
#include "link_manager.h"
|
||||
#include "log.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
*/
|
||||
|
||||
#include "message_queue.h"
|
||||
#include "log.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
*/
|
||||
|
||||
#include "ringbuffer_queue.h"
|
||||
#include "log.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
|
||||
message_queue_t * new_message_queue(int size) {
|
||||
|
||||
@@ -117,7 +117,7 @@ int message_get(message_queue_t *queue, void **data, int *size, int *priority) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
message_queue_t destroy_message_queue(message_queue_t *queue) {
|
||||
void destroy_message_queue(message_queue_t *queue) {
|
||||
struct lfds700_misc_prng_state ls;
|
||||
|
||||
message_t *m;
|
||||
|
||||
@@ -48,6 +48,6 @@ typedef struct {
|
||||
message_queue_t * new_message_queue(int size);
|
||||
int message_put(message_queue_t *queue, void *data, int size, int priority);
|
||||
int message_get(message_queue_t *queue, void **data, int *size, int *priority);
|
||||
message_queue_t destroy_message_queue(message_queue_t *queue);
|
||||
void destroy_message_queue(message_queue_t *queue);
|
||||
|
||||
#endif /* RINGBUFFER_QUEUE_H */
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
*/
|
||||
|
||||
#include "socket_link.h"
|
||||
#include "log.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
@@ -38,30 +38,14 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
# ifdef COMPONENT_CLI
|
||||
# ifdef COMPONENT_CLI_IF
|
||||
# define private_cli_if(x) x
|
||||
# define friend_cli_if(x) x
|
||||
# define public_cli_if(x) x
|
||||
# else
|
||||
# define private_cli_if(x)
|
||||
# define friend_cli_if(x) extern x
|
||||
# define public_cli_if(x) extern x
|
||||
# endif
|
||||
# else
|
||||
# define private_cli_if(x)
|
||||
# define friend_cli_if(x)
|
||||
# define public_cli_if(x) extern x
|
||||
# endif
|
||||
|
||||
/** @defgroup _cli_if Interfaces of CLI
|
||||
* @{*/
|
||||
|
||||
|
||||
public_cli_if( void cli_init (void); )
|
||||
public_cli_if( int cli_server_init(cli_handler_t handler); )
|
||||
public_cli_if(void cli_server_cleanup(void);)
|
||||
public_cli_if(void cli_server_recv(const void * data, socklen_t len);)
|
||||
void cli_init (void);
|
||||
int cli_server_init(cli_handler_t handler);
|
||||
void cli_server_cleanup(void);
|
||||
void cli_server_recv(const void * data, socklen_t len);
|
||||
/* @}*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -32,21 +32,6 @@
|
||||
|
||||
#include "types.h"
|
||||
//-----------------------------------------------------------------------------
|
||||
# ifdef list_C
|
||||
# define private_list(x) x
|
||||
# define public_list(x) x
|
||||
# else
|
||||
# define private_list(x)
|
||||
# define public_list(x) extern x
|
||||
# endif
|
||||
# ifdef LIST2_C
|
||||
# define private_list2(x) x
|
||||
# define public_list2(x) x
|
||||
# else
|
||||
# define private_list2(x)
|
||||
# define public_list2(x) extern x
|
||||
# endif
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
typedef struct Job_List_s {
|
||||
Job_elt_t *head;
|
||||
@@ -67,36 +52,36 @@ typedef struct Packet_OTG_List_s {
|
||||
} Packet_OTG_List_t;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
public_list( void job_list_init (Job_List_t*);)
|
||||
public_list( void job_list_free (Job_List_t* listP);)
|
||||
public_list( Job_elt_t* job_list_get_head (Job_List_t*);)
|
||||
public_list( Job_elt_t* job_list_remove_head (Job_List_t* );)
|
||||
public_list( Job_elt_t* job_list_remove_element (Job_elt_t*, Job_List_t*);)
|
||||
public_list( void job_list_add_head (Job_elt_t* , Job_List_t* );)
|
||||
public_list( void job_list_add_tail_eurecom (Job_elt_t* , Job_List_t* );)
|
||||
public_list( void job_list_add_list (Job_List_t* , Job_List_t* );)
|
||||
public_list( void job_list_display (Job_List_t* );)
|
||||
void job_list_init (Job_List_t*);
|
||||
void job_list_free (Job_List_t* listP);
|
||||
Job_elt_t* job_list_get_head (Job_List_t*);
|
||||
Job_elt_t* job_list_remove_head (Job_List_t* );
|
||||
Job_elt_t* job_list_remove_element (Job_elt_t*, Job_List_t*);
|
||||
void job_list_add_head (Job_elt_t* , Job_List_t* );
|
||||
void job_list_add_tail_eurecom (Job_elt_t* , Job_List_t* );
|
||||
void job_list_add_list (Job_List_t* , Job_List_t* );
|
||||
void job_list_display (Job_List_t* );
|
||||
|
||||
public_list( void event_list_init (Event_List_t*);)
|
||||
public_list( void event_list_free (Event_List_t* listP);)
|
||||
public_list( Event_elt_t* event_list_get_head (Event_List_t*);)
|
||||
public_list( Event_elt_t* event_list_remove_head (Event_List_t* );)
|
||||
public_list( Event_elt_t* event_list_remove_element (Event_elt_t*, Event_List_t*);)
|
||||
public_list( void event_list_add_head (Event_elt_t* , Event_List_t* );)
|
||||
public_list( void event_list_add_element (Event_elt_t* , Event_elt_t* , Event_List_t* );)
|
||||
public_list( void event_list_add_tail_eurecom (Event_elt_t* , Event_List_t* );)
|
||||
public_list( void event_list_add_list (Event_List_t* , Event_List_t* );)
|
||||
public_list( void event_list_display (Event_List_t* );)
|
||||
void event_list_init (Event_List_t*);
|
||||
void event_list_free (Event_List_t* listP);
|
||||
Event_elt_t* event_list_get_head (Event_List_t*);
|
||||
Event_elt_t* event_list_remove_head (Event_List_t* );
|
||||
Event_elt_t* event_list_remove_element (Event_elt_t*, Event_List_t*);
|
||||
void event_list_add_head (Event_elt_t* , Event_List_t* );
|
||||
void event_list_add_element (Event_elt_t* , Event_elt_t* , Event_List_t* );
|
||||
void event_list_add_tail_eurecom (Event_elt_t* , Event_List_t* );
|
||||
void event_list_add_list (Event_List_t* , Event_List_t* );
|
||||
void event_list_display (Event_List_t* );
|
||||
|
||||
public_list( void pkt_list_init (Packet_OTG_List_t*);)
|
||||
public_list( void pkt_list_free (Packet_OTG_List_t* listP);)
|
||||
public_list( Packet_otg_elt_t* pkt_list_get_head (Packet_OTG_List_t*);)
|
||||
public_list( Packet_otg_elt_t* pkt_list_remove_head (Packet_OTG_List_t* );)
|
||||
public_list( Packet_otg_elt_t* pkt_list_remove_element (Packet_otg_elt_t*, Packet_OTG_List_t*);)
|
||||
public_list( void pkt_list_add_head (Packet_otg_elt_t* , Packet_OTG_List_t* );)
|
||||
public_list( void pkt_list_add_element (Packet_otg_elt_t* , Packet_otg_elt_t* , Packet_OTG_List_t* );)
|
||||
public_list( void pkt_list_add_tail_eurecom (Packet_otg_elt_t* , Packet_OTG_List_t* );)
|
||||
public_list( void pkt_list_add_list (Packet_OTG_List_t* , Packet_OTG_List_t* );)
|
||||
public_list( void pkt_list_display (Packet_OTG_List_t* );)
|
||||
void pkt_list_init (Packet_OTG_List_t*);
|
||||
void pkt_list_free (Packet_OTG_List_t* listP);
|
||||
Packet_otg_elt_t* pkt_list_get_head (Packet_OTG_List_t*);
|
||||
Packet_otg_elt_t* pkt_list_remove_head (Packet_OTG_List_t* );
|
||||
Packet_otg_elt_t* pkt_list_remove_element (Packet_otg_elt_t*, Packet_OTG_List_t*);
|
||||
void pkt_list_add_head (Packet_otg_elt_t* , Packet_OTG_List_t* );
|
||||
void pkt_list_add_element (Packet_otg_elt_t* , Packet_otg_elt_t* , Packet_OTG_List_t* );
|
||||
void pkt_list_add_tail_eurecom (Packet_otg_elt_t* , Packet_OTG_List_t* );
|
||||
void pkt_list_add_list (Packet_OTG_List_t* , Packet_OTG_List_t* );
|
||||
void pkt_list_display (Packet_OTG_List_t* );
|
||||
|
||||
#endif
|
||||
|
||||
+62
-57
@@ -39,66 +39,38 @@
|
||||
#ifndef __LIST_H__
|
||||
# define __LIST_H__
|
||||
|
||||
# include "UTIL/MEM/mem_block.h"
|
||||
//-----------------------------------------------------------------------------
|
||||
# ifdef LIST_C
|
||||
# define private_list(x) x
|
||||
# define public_list(x) x
|
||||
# else
|
||||
# define private_list(x)
|
||||
# define public_list(x) extern x
|
||||
# endif
|
||||
# ifdef LIST2_C
|
||||
# define private_list2(x) x
|
||||
# define public_list2(x) x
|
||||
# else
|
||||
# define private_list2(x)
|
||||
# define public_list2(x) extern x
|
||||
# endif
|
||||
//-----------------------------------------------------------------------------
|
||||
#include "platform_constants.h"
|
||||
#include<linux/types.h>
|
||||
#include<stdlib.h>
|
||||
#include<sys/queue.h>
|
||||
|
||||
#define LIST_NAME_MAX_CHAR 32
|
||||
#include <string.h>
|
||||
|
||||
|
||||
typedef struct {
|
||||
struct mem_block_t *head;
|
||||
struct mem_block_t *tail;
|
||||
int nb_elements;
|
||||
char name[LIST_NAME_MAX_CHAR];
|
||||
} list2_t;
|
||||
#include "UTIL/MEM/mem_block.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
typedef struct {
|
||||
struct mem_block_t *head;
|
||||
struct mem_block_t *tail;
|
||||
int nb_elements;
|
||||
char name[LIST_NAME_MAX_CHAR];
|
||||
} list_t;
|
||||
void list_init (list_t* , char *);
|
||||
void list_free (list_t* listP);
|
||||
mem_block_t* list_get_head (list_t*);
|
||||
mem_block_t* list_remove_head (list_t* );
|
||||
mem_block_t* list_remove_element (mem_block_t*, list_t*);
|
||||
void list_add_head (mem_block_t* , list_t* );
|
||||
void list_add_tail_eurecom (mem_block_t* , list_t* );
|
||||
void list_add_list (list_t* , list_t* );
|
||||
void list_display (list_t* );
|
||||
//-----------------------------------------------------------------------------
|
||||
public_list( void list_init (list_t* , char *);)
|
||||
public_list( void list_free (list_t* listP);)
|
||||
public_list( mem_block_t* list_get_head (list_t*);)
|
||||
public_list( mem_block_t* list_remove_head (list_t* );)
|
||||
public_list( mem_block_t* list_remove_element (mem_block_t*, list_t*);)
|
||||
public_list( void list_add_head (mem_block_t* , list_t* );)
|
||||
public_list( void list_add_tail_eurecom (mem_block_t* , list_t* );)
|
||||
public_list( void list_add_list (list_t* , list_t* );)
|
||||
public_list( void list_display (list_t* );)
|
||||
//-----------------------------------------------------------------------------
|
||||
public_list2( void list2_init (list2_t*, char*);)
|
||||
public_list2( void list2_free (list2_t* );)
|
||||
public_list2( mem_block_t* list2_get_head (list2_t*);)
|
||||
public_list2( mem_block_t* list2_get_tail (list2_t*);)
|
||||
public_list2( mem_block_t* list2_remove_element (mem_block_t* , list2_t* );)
|
||||
public_list2( mem_block_t* list2_remove_head (list2_t* );)
|
||||
public_list2( mem_block_t* list2_remove_tail (list2_t* );)
|
||||
public_list2( void list2_add_head (mem_block_t* , list2_t* );)
|
||||
public_list2( void list2_add_tail (mem_block_t* , list2_t* );)
|
||||
public_list2( void list2_add_list (list2_t* , list2_t* );)
|
||||
public_list2( void list2_display (list2_t* );)
|
||||
void list2_init (list2_t*, char*);
|
||||
void list2_free (list2_t* );
|
||||
mem_block_t* list2_get_head (list2_t*);
|
||||
mem_block_t* list2_get_tail (list2_t*);
|
||||
mem_block_t* list2_remove_element (mem_block_t* , list2_t* );
|
||||
mem_block_t* list2_remove_head (list2_t* );
|
||||
mem_block_t* list2_remove_tail (list2_t* );
|
||||
void list2_add_head (mem_block_t* , list2_t* );
|
||||
void list2_add_tail (mem_block_t* , list2_t* );
|
||||
void list2_add_list (list2_t* , list2_t* );
|
||||
void list2_display (list2_t* );
|
||||
//-----------------------------------------------------------------------------
|
||||
/* The following lists are used for sorting numbers */
|
||||
#ifndef LINUX_LIST
|
||||
@@ -126,11 +98,44 @@ struct list {
|
||||
};
|
||||
#endif
|
||||
//-----------------------------------------------------------------------------
|
||||
public_list2( void push_front (struct list*, double); )
|
||||
public_list2( void initialize (struct list*); )
|
||||
public_list2( void del (struct list*); )
|
||||
public_list2( void totable (double*, struct list*);)
|
||||
public_list2( int compare (const void * a, const void * b);)
|
||||
public_list2( int32_t calculate_median(struct list *loc_list);)
|
||||
void push_front (struct list*, double);
|
||||
void initialize (struct list*);
|
||||
void del (struct list*);
|
||||
void totable (double*, struct list*);
|
||||
int compare (const void * a, const void * b);
|
||||
int32_t calculate_median(struct list *loc_list);
|
||||
|
||||
|
||||
typedef struct {
|
||||
size_t size;
|
||||
size_t mallocedSize;
|
||||
size_t atomSize;
|
||||
size_t increment;
|
||||
} varArray_t;
|
||||
|
||||
static inline varArray_t * initVarArray(size_t increment, size_t atomSize) {
|
||||
varArray_t * tmp=malloc(sizeof(varArray_t)+increment*atomSize);
|
||||
tmp->size=0;
|
||||
tmp->atomSize=atomSize;
|
||||
tmp->mallocedSize=increment;
|
||||
tmp->increment=increment;
|
||||
return(tmp);
|
||||
}
|
||||
|
||||
static inline void * dataArray(varArray_t * input) {
|
||||
return input+1;
|
||||
}
|
||||
|
||||
static inline void appendVarArray(varArray_t * input, void* data) {
|
||||
if (input->size>=input->mallocedSize) {
|
||||
input->mallocedSize+=input->increment;
|
||||
input=realloc(input,sizeof(varArray_t)+input->mallocedSize*input->atomSize);
|
||||
}
|
||||
memcpy((uint8_t*)(input+1)+input->atomSize*input->size++, data, input->atomSize);
|
||||
}
|
||||
|
||||
static inline void freeVarArray(varArray_t * input) {
|
||||
free(input);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -38,11 +38,7 @@
|
||||
***************************************************************************/
|
||||
#define LIST2_C
|
||||
#include "list.h"
|
||||
#ifdef USER_MODE
|
||||
#include "assertions.h"
|
||||
#else
|
||||
#define NULL 0
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
|
||||
@@ -336,9 +332,7 @@ list2_display (list2_t * listP)
|
||||
nb_elements++;
|
||||
}
|
||||
msg (" found nb_elements %d nb_elements %d\n", nb_elements, listP->nb_elements);
|
||||
#ifdef USER_MODE
|
||||
AssertFatal(nb_elements == listP->nb_elements, "Bad count of elements %d != %d", nb_elements, listP->nb_elements);
|
||||
#endif
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
VCD Plugin v0.1
|
||||
|
||||
The VCD plugin outputs signals to a .vcd file which is readable by gtkwave (http://en.wikipedia.org/wiki/GTKWave).
|
||||
Signals may have two types:
|
||||
- Variables to dump the state of a variable (range 0..2^64 - 1).
|
||||
- Functions to log function usage (implies two call to VCD API: IN and OUT)
|
||||
|
||||
This module is always built in, but is only used when -V oaisim option is added.
|
||||
The VCD file generated is called openair_vcd_dump.vcd and is located in the execution folder.
|
||||
|
||||
Usage:
|
||||
1) To dump function usage:
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(FUNCTION_NAME, VCD_FUNCTION_IN); at start of function
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(FUNCTION_NAME, VCD_FUNCTION_OUT); at end of function
|
||||
FUNCTION_NAME should be defined in the enum in vcd_signal_dumper.h and the function name should be addded at the right place in the vcd_signal_dumper.c file.
|
||||
|
||||
2) To dump a variable:
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VARIABLE_NAME, value); where VARIABLE_NAME is defined as described above for functions and value is the state of the variable at log time.
|
||||
|
||||
TODO list:
|
||||
- Add support for signed variables
|
||||
- Create more than two module (for now: one for variable, one for functions)
|
||||
- Integrate date in filename
|
||||
- Use a more accurate clock (if necessary) or use a host specific clock (for other systems than Linux)
|
||||
|
||||
Useful link:
|
||||
http://www.beyondttl.com/vcd.php
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,501 +0,0 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
/*! \file log.h
|
||||
* \brief openair log generator (OLG) for
|
||||
* \author Navid Nikaein
|
||||
* \date 2009 - 2014
|
||||
* \version 0.5
|
||||
* @ingroup util
|
||||
|
||||
*/
|
||||
|
||||
#ifndef __LOG_H__
|
||||
# define __LOG_H__
|
||||
|
||||
/*--- INCLUDES ---------------------------------------------------------------*/
|
||||
#ifdef USER_MODE
|
||||
#include <unistd.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <syslog.h>
|
||||
#include <assert.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
#include <stdarg.h>
|
||||
#include <time.h>
|
||||
#include <stdint.h>
|
||||
#ifndef __STDC_FORMAT_MACROS
|
||||
#define __STDC_FORMAT_MACROS
|
||||
#endif
|
||||
#include <inttypes.h>
|
||||
#ifndef _GNU_SOURCE
|
||||
#define _GNU_SOURCE
|
||||
#endif
|
||||
#include <pthread.h>
|
||||
#else
|
||||
#include "rtai_fifos.h"
|
||||
#endif
|
||||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/** @defgroup _LOG LOG Generator
|
||||
* @{*/
|
||||
/* @}*/
|
||||
|
||||
/** @defgroup _macro Macro Definition
|
||||
* @ingroup _LOG
|
||||
* @brief these macros are used in the code of LOG
|
||||
* @{*/
|
||||
/* @}*/
|
||||
|
||||
/** @defgroup _max_length Maximum Length of LOG
|
||||
* @ingroup _macro
|
||||
* @brief the macros that describe the maximum length of LOG
|
||||
* @{*/
|
||||
#define MAX_LOG_ITEM 100 /*!< \brief the maximum length of a LOG item, what is LOG_ITEM ??? */
|
||||
#define MAX_LOG_INFO 1000 /*!< \brief the maximum length of a log */
|
||||
#define MAX_LOG_TOTAL 1500 /*!< \brief the maximum length of a log */
|
||||
/* @}*/
|
||||
|
||||
/** @defgroup _log_level Message levels defined by LOG
|
||||
* @ingroup _macro
|
||||
* @brief LOG defines 9 levels of messages for users. Importance of these levels decrease gradually from 0 to 8
|
||||
* @{*/
|
||||
# define LOG_EMERG 0 /*!< \brief system is unusable */
|
||||
# define LOG_ALERT 1 /*!< \brief action must be taken immediately */
|
||||
# define LOG_CRIT 2 /*!< \brief critical conditions */
|
||||
# define LOG_ERR 3 /*!< \brief error conditions */
|
||||
# define LOG_WARNING 4 /*!< \brief warning conditions */
|
||||
# define LOG_NOTICE 5 /*!< \brief normal but significant condition */
|
||||
# define LOG_INFO 6 /*!< \brief informational */
|
||||
# define LOG_DEBUG 7 /*!< \brief debug-level messages */
|
||||
# define LOG_FILE 8 /*!< \brief message sequence chart -level */
|
||||
# define LOG_TRACE 9 /*!< \brief trace-level messages */
|
||||
#define NUM_LOG_LEVEL 10 /*!< \brief the number of message levels users have with LOG */
|
||||
/* @}*/
|
||||
|
||||
|
||||
/** @defgroup _log_format Defined log format
|
||||
* @ingroup _macro
|
||||
* @brief Macro of log formats defined by LOG
|
||||
* @{*/
|
||||
|
||||
/* .log_format = 0x13 uncolored standard messages
|
||||
* .log_format = 0x93 colored standard messages */
|
||||
|
||||
#define LOG_RED "\033[1;31m" /*!< \brief VT100 sequence for bold red foreground */
|
||||
#define LOG_GREEN "\033[32m" /*!< \brief VT100 sequence for green foreground */
|
||||
#define LOG_ORANGE "\033[93m" /*!< \brief VT100 sequence for orange foreground */
|
||||
#define LOG_BLUE "\033[34m" /*!< \brief VT100 sequence for blue foreground */
|
||||
#define LOG_CYBL "\033[40;36m" /*!< \brief VT100 sequence for cyan foreground on black background */
|
||||
#define LOG_RESET "\033[0m" /*!< \brief VT100 sequence for reset (black) foreground */
|
||||
/* @}*/
|
||||
|
||||
|
||||
/** @defgroup _syslog_conf Macros for write in syslog.conf
|
||||
* @ingroup _macro
|
||||
* @brief Macros used to write lines (local/remote) in syslog.conf
|
||||
* @{*/
|
||||
#define LOG_LOCAL 0x01
|
||||
#define LOG_REMOTE 0x02
|
||||
|
||||
#define FLAG_COLOR 0x001 /*!< \brief defaults */
|
||||
#define FLAG_PID 0x002 /*!< \brief defaults */
|
||||
#define FLAG_COMP 0x004
|
||||
#define FLAG_THREAD 0x008 /*!< \brief all : 255/511 */
|
||||
#define FLAG_LEVEL 0x010
|
||||
#define FLAG_FUNCT 0x020
|
||||
#define FLAG_FILE_LINE 0x040
|
||||
#define FLAG_TIME 0x100
|
||||
|
||||
#define LOG_NONE 0x00
|
||||
#define LOG_LOW 0x5
|
||||
#define LOG_MED 0x15
|
||||
#define LOG_HIGH 0x35
|
||||
#define LOG_FULL 0x75
|
||||
|
||||
#define OAI_OK 0 /*!< \brief all ok */
|
||||
#define OAI_ERR 1 /*!< \brief generic error */
|
||||
#define OAI_ERR_READ_ONLY 2 /*!< \brief tried to write to read-only item */
|
||||
#define OAI_ERR_NOTFOUND 3 /*!< \brief something wasn't found */
|
||||
/* @}*/
|
||||
|
||||
|
||||
//static char *log_level_highlight_start[] = {LOG_RED, LOG_RED, LOG_RED, LOG_RED, LOG_BLUE, "", "", "", LOG_GREEN}; /*!< \brief Optional start-format strings for highlighting */
|
||||
|
||||
//static char *log_level_highlight_end[] = {LOG_RESET, LOG_RESET, LOG_RESET, LOG_RESET, LOG_RESET, "", "", "", LOG_RESET}; /*!< \brief Optional end-format strings for highlighting */
|
||||
|
||||
typedef enum {
|
||||
MIN_LOG_COMPONENTS = 0,
|
||||
PHY = MIN_LOG_COMPONENTS,
|
||||
MAC,
|
||||
EMU,
|
||||
OCG,
|
||||
OMG,
|
||||
OPT,
|
||||
OTG,
|
||||
OTG_LATENCY,
|
||||
OTG_LATENCY_BG,
|
||||
OTG_GP,
|
||||
OTG_GP_BG,
|
||||
OTG_JITTER,
|
||||
RLC,
|
||||
PDCP,
|
||||
RRC,
|
||||
NAS,
|
||||
PERF,
|
||||
OIP,
|
||||
CLI,
|
||||
MSC,
|
||||
OCM,
|
||||
UDP_,
|
||||
GTPU,
|
||||
SPGW,
|
||||
S1AP,
|
||||
SCTP,
|
||||
HW,
|
||||
OSA,
|
||||
RAL_ENB,
|
||||
RAL_UE,
|
||||
ENB_APP,
|
||||
FLEXRAN_AGENT,
|
||||
TMR,
|
||||
USIM,
|
||||
LOCALIZE,
|
||||
RRH,
|
||||
X2AP,
|
||||
MAX_LOG_COMPONENTS,
|
||||
}
|
||||
comp_name_t;
|
||||
|
||||
//#define msg printf
|
||||
|
||||
typedef struct {
|
||||
char *name; /*!< \brief string name of item */
|
||||
int value; /*!< \brief integer value of mapping */
|
||||
} mapping;
|
||||
|
||||
|
||||
typedef struct {
|
||||
const char *name;
|
||||
int level;
|
||||
int flag;
|
||||
int interval;
|
||||
int fd;
|
||||
int filelog;
|
||||
char *filelog_name;
|
||||
|
||||
/* SR: make the log buffer component relative */
|
||||
char log_buffer[MAX_LOG_TOTAL];
|
||||
} log_component_t;
|
||||
|
||||
typedef struct {
|
||||
unsigned int remote_ip;
|
||||
unsigned int audit_ip;
|
||||
int remote_level;
|
||||
int facility;
|
||||
int audit_facility;
|
||||
int format;
|
||||
} log_config_t;
|
||||
|
||||
|
||||
typedef struct {
|
||||
log_component_t log_component[MAX_LOG_COMPONENTS];
|
||||
log_config_t config;
|
||||
char* level2string[NUM_LOG_LEVEL];
|
||||
int level;
|
||||
int onlinelog;
|
||||
int flag;
|
||||
int syslog;
|
||||
int filelog;
|
||||
char* filelog_name;
|
||||
} log_t;
|
||||
|
||||
typedef struct LOG_params {
|
||||
const char *file;
|
||||
const char *func;
|
||||
int line;
|
||||
int comp;
|
||||
int level;
|
||||
const char *format;
|
||||
char l_buff_info [MAX_LOG_INFO];
|
||||
int len;
|
||||
} LOG_params;
|
||||
|
||||
#if defined(ENABLE_ITTI)
|
||||
typedef enum log_instance_type_e {
|
||||
LOG_INSTANCE_UNKNOWN,
|
||||
LOG_INSTANCE_ENB,
|
||||
LOG_INSTANCE_UE,
|
||||
} log_instance_type_t;
|
||||
|
||||
void log_set_instance_type (log_instance_type_t instance);
|
||||
#endif
|
||||
|
||||
|
||||
/*--- INCLUDES ---------------------------------------------------------------*/
|
||||
# include "log_if.h"
|
||||
/*----------------------------------------------------------------------------*/
|
||||
int logInit (void);
|
||||
void logRecord_mt(const char *file, const char *func, int line,int comp, int level, const char *format, ...) __attribute__ ((format (printf, 6, 7)));
|
||||
void logRecord(const char *file, const char *func, int line,int comp, int level, const char *format, ...) __attribute__ ((format (printf, 6, 7)));
|
||||
int set_comp_log(int component, int level, int verbosity, int interval);
|
||||
int set_log(int component, int level, int interval);
|
||||
void set_glog(int level, int verbosity);
|
||||
void set_log_syslog(int enable);
|
||||
void set_glog_onlinelog(int enable);
|
||||
void set_glog_filelog(int enable);
|
||||
|
||||
void set_component_filelog(int comp);
|
||||
int map_str_to_int(mapping *map, const char *str);
|
||||
char *map_int_to_str(mapping *map, int val);
|
||||
void logClean (void);
|
||||
int is_newline( char *str, int size);
|
||||
void *log_thread_function(void * list);
|
||||
|
||||
/** @defgroup _logIt logIt function
|
||||
* @ingroup _macro
|
||||
* @brief Macro used to call tr_log_full_ex with file, function and line information
|
||||
* @{*/
|
||||
#ifdef USER_MODE
|
||||
//#define logIt(component, level, format, args...) do {logRecord(__FILE__, __FUNCTION__, __LINE__, component, level, format, ##args);} while(0);
|
||||
#ifdef LOG_NO_THREAD
|
||||
#define logIt(component, level, format, args...) logRecord_mt(__FILE__, __FUNCTION__, __LINE__, component, level, format, ##args)
|
||||
#else //default
|
||||
#define logIt(component, level, format, args...) logRecord(__FILE__, __FUNCTION__, __LINE__, component, level, format, ##args)
|
||||
#endif
|
||||
#else
|
||||
#ifdef LOG_NO_THREAD
|
||||
#define logIt(component, level, format, args...) logRecord_mt(NULL, __FUNCTION__, __LINE__, component, level, format, ##args)
|
||||
#else // default
|
||||
#define logIt(component, level, format, args...) logRecord(NULL, __FUNCTION__, __LINE__, component, level, format, ##args)
|
||||
#endif
|
||||
#endif
|
||||
/* @}*/
|
||||
|
||||
/*----------------macro definitions for reading log configuration from the config module */
|
||||
#define CONFIG_STRING_LOG_PREFIX "log_config"
|
||||
|
||||
#define LOG_CONFIG_STRING_GLOBAL_LOG_LEVEL "global_log_level"
|
||||
#define LOG_CONFIG_STRING_GLOBAL_LOG_VERBOSITY "global_log_verbosity"
|
||||
#define LOG_CONFIG_STRING_GLOBAL_LOG_ONLINE "global_log_online"
|
||||
#define LOG_CONFIG_STRING_GLOBAL_LOG_INFILE "global_log_infile"
|
||||
|
||||
#define LOG_CONFIG_LEVEL_FORMAT "%s_log_level"
|
||||
#define LOG_CONFIG_VERBOSITY_FORMAT "%s_log_verbosity"
|
||||
#define LOG_CONFIG_LOGFILE_FORMAT "%s_log_infile"
|
||||
/*--------------------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
/* LOG globalconfiguration parameters */
|
||||
/* optname helpstr paramflags XXXptr defXXXval type numelt */
|
||||
/*--------------------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
#define LOG_GLOBALPARAMS_DESC { \
|
||||
{LOG_CONFIG_STRING_GLOBAL_LOG_LEVEL, NULL, 0, strptr:(char **)&gloglevel, defstrval:log_level_names[2].name, TYPE_STRING, sizeof(gloglevel)}, \
|
||||
{LOG_CONFIG_STRING_GLOBAL_LOG_VERBOSITY,NULL, 0, strptr:(char **)&glogverbo, defstrval:log_verbosity_names[2].name, TYPE_STRING, sizeof(glogverbo)}, \
|
||||
{LOG_CONFIG_STRING_GLOBAL_LOG_ONLINE, NULL, 0, iptr:&(g_log->onlinelog), defintval:1, TYPE_INT, 0, }, \
|
||||
{LOG_CONFIG_STRING_GLOBAL_LOG_INFILE, NULL, 0, iptr:&(g_log->filelog), defintval:0, TYPE_INT, 0, }, \
|
||||
}
|
||||
/*----------------------------------------------------------------------------------*/
|
||||
/** @defgroup _debugging debugging macros
|
||||
* @ingroup _macro
|
||||
* @brief Macro used to call logIt function with different message levels
|
||||
* @{*/
|
||||
|
||||
// debugging macros
|
||||
#ifdef USER_MODE
|
||||
# if T_TRACER
|
||||
# include "T.h"
|
||||
# define LOG_I(c, x...) T(T_LEGACY_ ## c ## _INFO, T_PRINTF(x))
|
||||
# define LOG_W(c, x...) T(T_LEGACY_ ## c ## _WARNING, T_PRINTF(x))
|
||||
# define LOG_E(c, x...) T(T_LEGACY_ ## c ## _ERROR, T_PRINTF(x))
|
||||
# define LOG_D(c, x...) T(T_LEGACY_ ## c ## _DEBUG, T_PRINTF(x))
|
||||
# define LOG_T(c, x...) T(T_LEGACY_ ## c ## _TRACE, T_PRINTF(x))
|
||||
# define LOG_G(c, x...) /* */
|
||||
# define LOG_A(c, x...) /* */
|
||||
# define LOG_C(c, x...) /* */
|
||||
# define LOG_N(c, x...) /* */
|
||||
# define LOG_F(c, x...) /* */
|
||||
# else /* T_TRACER */
|
||||
# if DISABLE_LOG_X
|
||||
# define LOG_I(c, x...) /* */
|
||||
# define LOG_W(c, x...) /* */
|
||||
# define LOG_E(c, x...) /* */
|
||||
# define LOG_D(c, x...) /* */
|
||||
# define LOG_T(c, x...) /* */
|
||||
# define LOG_G(c, x...) /* */
|
||||
# define LOG_A(c, x...) /* */
|
||||
# define LOG_C(c, x...) /* */
|
||||
# define LOG_N(c, x...) /* */
|
||||
# define LOG_F(c, x...) /* */
|
||||
# else /*DISABLE_LOG_X*/
|
||||
# define LOG_G(c, x...) logIt(c, LOG_EMERG, x)
|
||||
# define LOG_A(c, x...) logIt(c, LOG_ALERT, x)
|
||||
# define LOG_C(c, x...) logIt(c, LOG_CRIT, x)
|
||||
# define LOG_E(c, x...) logIt(c, LOG_ERR, x)
|
||||
# define LOG_W(c, x...) logIt(c, LOG_WARNING, x)
|
||||
# define LOG_N(c, x...) logIt(c, LOG_NOTICE, x)
|
||||
# define LOG_I(c, x...) logIt(c, LOG_INFO, x)
|
||||
# define LOG_D(c, x...) logIt(c, LOG_DEBUG, x)
|
||||
# define LOG_F(c, x...) logIt(c, LOG_FILE, x) // log to a file, useful for the MSC chart generation
|
||||
# define LOG_T(c, x...) logIt(c, LOG_TRACE, x)
|
||||
# endif /*DISABLE_LOG_X*/
|
||||
# endif /* T_TRACER */
|
||||
#else /* USER_MODE */
|
||||
# define LOG_G(c, x...) printk(x)
|
||||
# define LOG_A(c, x...) printk(x)
|
||||
# define LOG_C(c, x...) printk(x)
|
||||
# define LOG_E(c, x...) printk(x)
|
||||
# define LOG_W(c, x...) printk(x)
|
||||
# define LOG_N(c, x...) printk(x)
|
||||
# define LOG_I(c, x...) printk(x)
|
||||
# define LOG_D(c, x...) printk(x)
|
||||
# define LOG_T(c, x...) printk(x)
|
||||
#endif
|
||||
/* @}*/
|
||||
|
||||
|
||||
/** @defgroup _useful_functions useful functions in LOG
|
||||
* @ingroup _macro
|
||||
* @brief Macro of some useful functions defined by LOG
|
||||
* @{*/
|
||||
#define LOG_ENTER(c) do {LOG_T(c, "Entering\n");}while(0) /*!< \brief Macro to log a message with severity DEBUG when entering a function */
|
||||
#define LOG_EXIT(c) do {LOG_T(c,"Exiting\n"); return;}while(0) /*!< \brief Macro to log a message with severity TRACE when exiting a function */
|
||||
#define LOG_RETURN(c,x) do {uint32_t __rv;__rv=(unsigned int)(x);LOG_T(c,"Returning %08x\n", __rv);return((typeof(x))__rv);}while(0) /*!< \brief Macro to log a function exit, including integer value, then to return a value to the calling function */
|
||||
/* @}*/
|
||||
|
||||
static __inline__ uint64_t rdtsc(void) {
|
||||
uint64_t a, d;
|
||||
__asm__ volatile ("rdtsc" : "=a" (a), "=d" (d));
|
||||
return (d<<32) | a;
|
||||
}
|
||||
|
||||
#define DEBUG_REALTIME 1
|
||||
#if DEBUG_REALTIME
|
||||
|
||||
extern double cpuf;
|
||||
|
||||
static inline uint64_t checkTCPU(int timeout, char * file, int line) {
|
||||
static uint64_t __thread lastCPUTime=0;
|
||||
static uint64_t __thread last=0;
|
||||
uint64_t cur=rdtsc();
|
||||
struct timespec CPUt;
|
||||
clock_gettime(CLOCK_THREAD_CPUTIME_ID, &CPUt);
|
||||
uint64_t CPUTime=CPUt.tv_sec*1000*1000+CPUt.tv_nsec/1000;
|
||||
double microCycles=(double)(cpuf*1000);
|
||||
int duration=(int)((cur-last)/microCycles);
|
||||
if ( last!=0 && duration > timeout ) {
|
||||
//struct timespec ts;
|
||||
//clock_gettime(CLOCK_MONOTONIC, &ts);
|
||||
printf("%s:%d lte-ue delay %d (exceed %d), CPU for this period: %lld\n", file, line,
|
||||
duration, timeout, (long long)CPUTime-lastCPUTime );
|
||||
}
|
||||
last=cur;
|
||||
lastCPUTime=CPUTime;
|
||||
return cur;
|
||||
}
|
||||
|
||||
static inline unsigned long long checkT(int timeout, char * file, int line) {
|
||||
static unsigned long long __thread last=0;
|
||||
unsigned long long cur=rdtsc();
|
||||
int microCycles=(int)(cpuf*1000);
|
||||
int duration=(int)((cur-last)/microCycles);
|
||||
if ( last!=0 && duration > timeout )
|
||||
printf("%s:%d lte-ue delay %d (exceed %d)\n", file, line,
|
||||
duration, timeout);
|
||||
last=cur;
|
||||
return cur;
|
||||
}
|
||||
|
||||
typedef struct m {
|
||||
uint64_t iterations;
|
||||
uint64_t sum;
|
||||
uint64_t maxArray[11];
|
||||
} Meas;
|
||||
|
||||
static inline void printMeas(char * txt, Meas *M, int period) {
|
||||
if (M->iterations%period == 0 ) {
|
||||
char txt2[512];
|
||||
sprintf(txt2,"%s avg=%" PRIu64 " iterations=%" PRIu64 " max=%"
|
||||
PRIu64 ":%" PRIu64 ":%" PRIu64 ":%" PRIu64 ":%" PRIu64 ":%" PRIu64 ":%" PRIu64 ":%" PRIu64 ":%" PRIu64 ":%" PRIu64 "\n",
|
||||
txt,
|
||||
M->sum/M->iterations,
|
||||
M->iterations,
|
||||
M->maxArray[1],M->maxArray[2], M->maxArray[3],M->maxArray[4], M->maxArray[5],
|
||||
M->maxArray[6],M->maxArray[7], M->maxArray[8],M->maxArray[9],M->maxArray[10]);
|
||||
#if DISABLE_LOG_X
|
||||
printf("%s",txt2);
|
||||
#else
|
||||
LOG_W(PHY, "%s",txt2);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
static inline int cmpint(const void* a, const void* b) {
|
||||
uint64_t* aa=(uint64_t*)a;
|
||||
uint64_t* bb=(uint64_t*)b;
|
||||
return (int)(*aa-*bb);
|
||||
}
|
||||
|
||||
static inline void updateTimes(uint64_t start, Meas *M, int period, char * txt) {
|
||||
if (start!=0) {
|
||||
uint64_t end=rdtsc();
|
||||
long long diff=(end-start)/(cpuf*1000);
|
||||
M->maxArray[0]=diff;
|
||||
M->sum+=diff;
|
||||
M->iterations++;
|
||||
qsort(M->maxArray, 11, sizeof(uint64_t), cmpint);
|
||||
printMeas(txt,M,period);
|
||||
}
|
||||
}
|
||||
|
||||
#define check(a) do { checkT(a,__FILE__,__LINE__); } while (0)
|
||||
#define checkcpu(a) do { checkTCPU(a,__FILE__,__LINE__); } while (0)
|
||||
#define initRefTimes(a) static __thread Meas a= {0}
|
||||
#define pickTime(a) uint64_t a=rdtsc()
|
||||
#define readTime(a) a
|
||||
#define initStaticTime(a) static __thread uint64_t a={0}
|
||||
#define pickStaticTime(a) do { a=rdtsc(); } while (0)
|
||||
|
||||
#else
|
||||
#define check(a) do {} while (0)
|
||||
#define checkcpu(a) do {} while (0)
|
||||
#define initRefTimes(a) do {} while (0)
|
||||
#define initStaticTime(a) do {} while (0)
|
||||
#define pickTime(a) do {} while (0)
|
||||
#define readTime(a) 0
|
||||
#define pickStaticTime(a) do {} while (0)
|
||||
#define updateTimes(a,b,c,d) do {} while (0)
|
||||
#define printMeas(a,b,c) do {} while (0)
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
#include"log.h"
|
||||
|
||||
extern log_t *g_log;
|
||||
|
||||
#if !defined(LOG_NO_THREAD)
|
||||
extern LOG_params log_list[2000];
|
||||
extern pthread_mutex_t log_lock;
|
||||
extern pthread_cond_t log_notify;
|
||||
extern int log_shutdown;
|
||||
#endif
|
||||
|
||||
extern mapping log_level_names[];
|
||||
extern mapping log_verbosity_names[];
|
||||
@@ -1,34 +0,0 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
/*! \file log_if.h
|
||||
* \brief log interface
|
||||
* \author Navid Nikaein
|
||||
* \date 2009 - 2014
|
||||
* \version 0.3
|
||||
* \warning This component can be runned only in user-space
|
||||
* @ingroup routing
|
||||
*/
|
||||
|
||||
// LTS: kept this file for compatibility
|
||||
// this file was probably a trial to separate internal functions and external ones
|
||||
// but it has never been finished, most source code include directly log.h (not log_if.h)
|
||||
#include "log.h"
|
||||
@@ -1,822 +0,0 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
/*! \file vcd_signal_dumper.c
|
||||
* \brief Dump functions calls and variables to VCD file. Use GTKWave to display this file.
|
||||
* \author S. Roux
|
||||
* \maintainer: navid nikaein
|
||||
* \date 2012 - 2104
|
||||
* \version 0.1
|
||||
* \company Eurecom
|
||||
* \email: navid.nikaein@eurecom.fr
|
||||
* \note
|
||||
* \warning
|
||||
*/
|
||||
|
||||
#include <pthread.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <error.h>
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "assertions.h"
|
||||
#include "signals.h"
|
||||
|
||||
#include "vcd_signal_dumper.h"
|
||||
|
||||
#if defined(ENABLE_RTAI_CLOCK)
|
||||
#include "rtai_lxrt.h"
|
||||
#endif
|
||||
|
||||
#define VCDSIGNALDUMPER_VERSION_MAJOR 0
|
||||
#define VCDSIGNALDUMPER_VERSION_MINOR 1
|
||||
|
||||
// Global variable. If the VCD option is set at execution time, output VCD trace. Otherwise this module has no effect.
|
||||
int ouput_vcd = 0;
|
||||
|
||||
struct vcd_module_s {
|
||||
const char *name;
|
||||
int number_of_signals;
|
||||
const char **signals_names;
|
||||
vcd_signal_type signal_type;
|
||||
int signal_size;
|
||||
} vcd_module_s;
|
||||
|
||||
const char* eurecomVariablesNames[] = {
|
||||
"frame_number_TX0_eNB",
|
||||
"frame_number_TX1_eNB",
|
||||
"frame_number_RX0_eNB",
|
||||
"frame_number_RX1_eNB",
|
||||
"subframe_number_TX0_eNB",
|
||||
"subframe_number_TX1_eNB",
|
||||
"subframe_number_RX0_eNB",
|
||||
"subframe_number_RX1_eNB",
|
||||
"frame_number_TX0_RU",
|
||||
"frame_number_TX1_RU",
|
||||
"frame_number_RX0_RU",
|
||||
"frame_number_RX1_RU",
|
||||
"subframe_number_TX0_RU",
|
||||
"subframe_number_TX1_RU",
|
||||
"subframe_number_RX0_RU",
|
||||
"subframe_number_RX1_RU",
|
||||
"runtime_TX_eNB",
|
||||
"runtime_RX_eNB",
|
||||
"frame_number_TX0_UE",
|
||||
"frame_number_TX1_UE",
|
||||
"frame_number_RX0_UE",
|
||||
"frame_number_RX1_UE",
|
||||
"subframe_TX0_UE",
|
||||
"subframe_TX1_UE",
|
||||
"subframe_RX0_UE",
|
||||
"subframe_RX1_UE",
|
||||
"missed_slot_enb",
|
||||
"daq_mbox",
|
||||
"rx_offset_mbox",
|
||||
"ue_rx_offset",
|
||||
"diff2",
|
||||
"hw_subframe",
|
||||
"hw_frame",
|
||||
"hw_subframe_rx",
|
||||
"hw_frame_rx",
|
||||
"txcnt",
|
||||
"rxcnt",
|
||||
"trx_ts",
|
||||
"trx_tst",
|
||||
"trx_ts_ue",
|
||||
"trx_tst_ue",
|
||||
"trx_write_flags",
|
||||
"tx_ts",
|
||||
"rx_ts",
|
||||
"hw_cnt_rx",
|
||||
"lhw_cnt_rx",
|
||||
"hw_cnt_tx",
|
||||
"lhw_cnt_tx",
|
||||
"pck_rx",
|
||||
"pck_tx",
|
||||
"rx_seq_num",
|
||||
"rx_seq_num_prv",
|
||||
"tx_seq_num",
|
||||
"cnt",
|
||||
"dummy_dump",
|
||||
"itti_send_msg",
|
||||
"itti_poll_msg",
|
||||
"itti_recv_msg",
|
||||
"itti_alloc_msg",
|
||||
"mp_alloc",
|
||||
"mp_free",
|
||||
"ue_inst_cnt_rx",
|
||||
"ue_inst_cnt_tx",
|
||||
"dci_info",
|
||||
"ue0_BSR",
|
||||
"ue0_BO",
|
||||
"ue0_scheduled",
|
||||
"ue0_timing_advance",
|
||||
"ue0_SR_ENERGY",
|
||||
"ue0_SR_THRES",
|
||||
"ue0_rssi0",
|
||||
"ue0_rssi1",
|
||||
"ue0_rssi2",
|
||||
"ue0_rssi3",
|
||||
"ue0_rssi4",
|
||||
"ue0_rssi5",
|
||||
"ue0_rssi6",
|
||||
"ue0_rssi7",
|
||||
"ue0_res0",
|
||||
"ue0_res1",
|
||||
"ue0_res2",
|
||||
"ue0_res3",
|
||||
"ue0_res4",
|
||||
"ue0_res5",
|
||||
"ue0_res6",
|
||||
"ue0_res7",
|
||||
"ue0_MCS0",
|
||||
"ue0_MCS1",
|
||||
"ue0_MCS2",
|
||||
"ue0_MCS3",
|
||||
"ue0_MCS4",
|
||||
"ue0_MCS5",
|
||||
"ue0_MCS6",
|
||||
"ue0_MCS7",
|
||||
"ue0_RB0",
|
||||
"ue0_RB1",
|
||||
"ue0_RB2",
|
||||
"ue0_RB3",
|
||||
"ue0_RB4",
|
||||
"ue0_RB5",
|
||||
"ue0_RB6",
|
||||
"ue0_RB7",
|
||||
"ue0_ROUND0",
|
||||
"ue0_ROUND1",
|
||||
"ue0_ROUND2",
|
||||
"ue0_ROUND3",
|
||||
"ue0_ROUND4",
|
||||
"ue0_ROUND5",
|
||||
"ue0_ROUND6",
|
||||
"ue0_ROUND7",
|
||||
"ue0_SFN0",
|
||||
"ue0_SFN1",
|
||||
"ue0_SFN2",
|
||||
"ue0_SFN3",
|
||||
"ue0_SFN4",
|
||||
"ue0_SFN5",
|
||||
"ue0_SFN6",
|
||||
"ue0_SFN7",
|
||||
"send_if4_symbol",
|
||||
"recv_if4_symbol",
|
||||
"send_if5_pkt_id",
|
||||
"recv_if5_pkt_id",
|
||||
"ue_pdcp_flush_size",
|
||||
"ue_pdcp_flush_err",
|
||||
"ue0_trx_read_ns",
|
||||
"ue0_trx_write_ns",
|
||||
"ue0_trx_read_ns_missing",
|
||||
"ue0_trx_write_ns_missing",
|
||||
};
|
||||
|
||||
const char* eurecomFunctionsNames[] = {
|
||||
/* softmodem signals */
|
||||
"rt_sleep",
|
||||
"trx_read",
|
||||
"trx_write",
|
||||
"trx_read_ue",
|
||||
"trx_write_ue",
|
||||
"trx_read_if",
|
||||
"trx_write_if",
|
||||
"eNB_thread_rxtx0",
|
||||
"eNB_thread_rxtx1",
|
||||
"ue_thread_synch",
|
||||
"ue_thread_rxtx0",
|
||||
"ue_thread_rxtx1",
|
||||
"trx_read_sf9",
|
||||
"trx_write_sf9",
|
||||
"ue_signal_cond_rxtx0",
|
||||
"ue_signal_cond_rxtx1",
|
||||
"ue_wait_cond_rxtx0",
|
||||
"ue_wait_cond_rxtx1",
|
||||
"ue_lock_mutex_rxtx_for_cond_wait0",
|
||||
"ue_lock_mutex_rxtx_for_cond_wait1",
|
||||
"ue_lock_mutex_rxtx_for_cnt_decrement0",
|
||||
"ue_lock_mutex_rxtx_for_cnt_decrement1",
|
||||
"ue_lock_mutex_rxtx_for_cnt_increment0",
|
||||
"ue_lock_mutex_rxtx_for_cnt_increment1",
|
||||
|
||||
/* RRH signals */
|
||||
"eNB_tx",
|
||||
"eNB_rx",
|
||||
"eNB_trx",
|
||||
"eNB_tm",
|
||||
"eNB_rx_sleep",
|
||||
"eNB_tx_sleep",
|
||||
"eNB_proc_sleep",
|
||||
"trx_read_rf",
|
||||
"trx_write_rf",
|
||||
|
||||
/* PHY signals */
|
||||
"ue_synch",
|
||||
"ue_slot_fep",
|
||||
"ue_rrc_measurements",
|
||||
"ue_gain_control",
|
||||
"ue_adjust_synch",
|
||||
"lte_ue_measurement_procedures",
|
||||
"lte_ue_pdcch_procedures",
|
||||
"lte_ue_pbch_procedures",
|
||||
"phy_procedures_eNb_tx0",
|
||||
"phy_procedures_eNb_tx1",
|
||||
"phy_procedures_ru_feprx0",
|
||||
"phy_procedures_ru_feprx1",
|
||||
"phy_procedures_ru_feptx_ofdm0",
|
||||
"phy_procedures_ru_feptx_ofdm1",
|
||||
"phy_procedures_ru_feptx_prec0",
|
||||
"phy_procedures_ru_feptx_prec1",
|
||||
"phy_procedures_eNb_rx_uespec0",
|
||||
"phy_procedures_eNb_rx_uespec1",
|
||||
"phy_procedures_ue_tx",
|
||||
"phy_procedures_ue_rx",
|
||||
"phy_procedures_ue_tx_ulsch_uespec",
|
||||
"phy_procedures_ue_tx_pucch",
|
||||
"phy_procedures_ue_tx_ulsch_common",
|
||||
"phy_procedures_ue_tx_prach",
|
||||
"phy_procedures_ue_tx_ulsch_rar",
|
||||
"phy_procedures_eNB_lte",
|
||||
"phy_procedures_UE_lte",
|
||||
"pdsch_thread",
|
||||
"dlsch_thread0",
|
||||
"dlsch_thread1",
|
||||
"dlsch_thread2",
|
||||
"dlsch_thread3",
|
||||
"dlsch_thread4",
|
||||
"dlsch_thread5",
|
||||
"dlsch_thread6",
|
||||
"dlsch_thread7",
|
||||
"dlsch_decoding0",
|
||||
"dlsch_decoding1",
|
||||
"dlsch_decoding2",
|
||||
"dlsch_decoding3",
|
||||
"dlsch_decoding4",
|
||||
"dlsch_decoding5",
|
||||
"dlsch_decoding6",
|
||||
"dlsch_decoding7",
|
||||
"rx_pdcch",
|
||||
"dci_decoding",
|
||||
"rx_phich",
|
||||
"pdsch_procedures",
|
||||
"pdsch_procedures_si",
|
||||
"pdsch_procedures_p",
|
||||
"pdsch_procedures_ra",
|
||||
"phy_ue_config_sib2",
|
||||
"macxface_phy_config_sib1_eNB",
|
||||
"macxface_phy_config_sib2_eNB",
|
||||
"macxface_phy_config_dedicated_eNB",
|
||||
"phy_ue_compute_prach",
|
||||
"phy_enb_ulsch_msg3",
|
||||
"phy_enb_ulsch_decoding0",
|
||||
"phy_enb_ulsch_decoding1",
|
||||
"phy_enb_ulsch_decoding2",
|
||||
"phy_enb_ulsch_decoding3",
|
||||
"phy_enb_ulsch_decoding4",
|
||||
"phy_enb_ulsch_decoding5",
|
||||
"phy_enb_ulsch_decoding6",
|
||||
"phy_enb_ulsch_decoding7",
|
||||
"phy_enb_sfgen",
|
||||
"phy_enb_prach_rx",
|
||||
"phy_ru_prach_rx",
|
||||
"phy_enb_pdcch_tx",
|
||||
"phy_enb_rs_tx",
|
||||
"phy_ue_generate_prach",
|
||||
"phy_ue_ulsch_modulation",
|
||||
"phy_ue_ulsch_encoding",
|
||||
#if 1 // add for debugging losing PDSCH immediately before and after reporting CQI
|
||||
"phy_ue_ulsch_encoding_fill_cqi",
|
||||
#endif
|
||||
"phy_ue_ulsch_scrambling",
|
||||
"phy_eNB_dlsch_modulation",
|
||||
"phy_eNB_dlsch_encoding",
|
||||
"phy_eNB_dlsch_encoding_w",
|
||||
"phy_eNB_dlsch_scrambling",
|
||||
"phy_eNB_beam_precoding",
|
||||
"phy_eNB_ofdm_mod_l",
|
||||
|
||||
/* MAC signals */
|
||||
"macxface_macphy_init",
|
||||
"macxface_macphy_exit",
|
||||
"macxface_eNB_dlsch_ulsch_scheduler",
|
||||
"macxface_fill_rar",
|
||||
"macxface_terminate_ra_proc",
|
||||
"macxface_initiate_ra_proc",
|
||||
"macxface_cancel_ra_proc",
|
||||
"macxface_get_dci_sdu",
|
||||
"macxface_get_dlsch_sdu",
|
||||
"macxface_rx_sdu",
|
||||
"macxface_mrbch_phy_sync_failure",
|
||||
"macxface_SR_indication",
|
||||
"mac_dlsch_preprocessor",
|
||||
"mac_schedule_dlsch",
|
||||
"mac_fill_dlsch_dci",
|
||||
|
||||
"macxface_out_of_sync_ind",
|
||||
"macxface_ue_decode_si",
|
||||
"macxface_ue_decode_pcch",
|
||||
"macxface_ue_decode_ccch",
|
||||
"macxface_ue_decode_bcch",
|
||||
"macxface_ue_send_sdu",
|
||||
"macxface_ue_get_sdu",
|
||||
"macxface_ue_get_rach",
|
||||
"macxface_ue_process_rar",
|
||||
"macxface_ue_scheduler",
|
||||
"macxface_ue_get_sr",
|
||||
|
||||
"ue_send_mch_sdu",
|
||||
|
||||
/*RLC signals */
|
||||
"rlc_data_req",
|
||||
// "rlc_data_ind", // this calls "pdcp_data_ind",
|
||||
"mac_rlc_status_ind",
|
||||
"mac_rlc_data_req",
|
||||
"mac_rlc_data_ind",
|
||||
"rlc_um_try_reassembly",
|
||||
"rlc_um_check_timer_dar_time_out",
|
||||
"rlc_um_receive_process_dar",
|
||||
|
||||
/* PDCP signals */
|
||||
"pdcp_run",
|
||||
"pdcp_data_req",
|
||||
"pdcp_data_ind",
|
||||
"pdcp_apply_security",
|
||||
"pdcp_validate_security",
|
||||
"pdcp_fifo_read",
|
||||
"pdcp_fifo_read_buffer",
|
||||
"pdcp_fifo_flush",
|
||||
"pdcp_fifo_flush_buffer",
|
||||
/* RRC signals */
|
||||
"rrc_rx_tx",
|
||||
"rrc_mac_config_req",
|
||||
"rrc_ue_decode_sib1",
|
||||
"rrc_ue_decode_si",
|
||||
/* GTPV1U signals */
|
||||
"gtpv1u_enb_task",
|
||||
"gtpv1u_process_udp_req",
|
||||
"gtpv1u_process_tunnel_data_req",
|
||||
/* UDP signals */
|
||||
"udp_enb_task",
|
||||
/* MISC signals */
|
||||
"emu_transport",
|
||||
"log_record",
|
||||
"itti_enqueue_message",
|
||||
"itti_dump_enqueue_message",
|
||||
"itti_dump_enqueue_message_malloc",
|
||||
"itti_relay_thread",
|
||||
"test",
|
||||
|
||||
/* IF4/IF5 signals */
|
||||
"send_if4",
|
||||
"recv_if4",
|
||||
"send_if5",
|
||||
"recv_if5",
|
||||
|
||||
"compress_if",
|
||||
"decompress_if",
|
||||
};
|
||||
|
||||
struct vcd_module_s vcd_modules[] = {
|
||||
{ "variables", VCD_SIGNAL_DUMPER_VARIABLES_END, eurecomVariablesNames, VCD_WIRE, 64 },
|
||||
{ "functions", VCD_SIGNAL_DUMPER_FUNCTIONS_END, eurecomFunctionsNames, VCD_WIRE, 1 },
|
||||
// { "ue_procedures_functions", VCD_SIGNAL_DUMPER_UE_PROCEDURES_FUNCTIONS_END, eurecomUEFunctionsNames, VCD_WIRE, 1 },
|
||||
};
|
||||
|
||||
FILE *vcd_fd = NULL;
|
||||
static inline unsigned long long int vcd_get_time(void);
|
||||
|
||||
#if defined(ENABLE_USE_CPU_EXECUTION_TIME)
|
||||
struct timespec g_time_start;
|
||||
#elif defined(ENABLE_RTAI_CLOCK)
|
||||
RTIME start;
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(ENABLE_VCD_FIFO)
|
||||
|
||||
# define VCD_POLL_DELAY (500) // Poll delay in micro-seconds
|
||||
# define VCD_MAX_WAIT_DELAY (200 * 1000) // Maximum data ready wait delay in micro-seconds
|
||||
# define VCD_FIFO_NB_ELEMENTS (1 << 24) // Must be a power of 2
|
||||
# define VCD_FIFO_MASK (VCD_FIFO_NB_ELEMENTS - 1)
|
||||
|
||||
typedef struct vcd_queue_user_data_s {
|
||||
uint32_t log_id;
|
||||
vcd_signal_dumper_modules module;
|
||||
union data_u {
|
||||
struct function_s {
|
||||
vcd_signal_dump_functions function_name;
|
||||
vcd_signal_dump_in_out in_out;
|
||||
} function;
|
||||
struct variable_s {
|
||||
vcd_signal_dump_variables variable_name;
|
||||
unsigned long value;
|
||||
} variable;
|
||||
} data;
|
||||
|
||||
long long unsigned int time;
|
||||
} vcd_queue_user_data_t;
|
||||
|
||||
typedef struct vcd_fifo_s {
|
||||
vcd_queue_user_data_t user_data[VCD_FIFO_NB_ELEMENTS];
|
||||
|
||||
volatile uint32_t write_index;
|
||||
volatile uint32_t read_index;
|
||||
} vcd_fifo_t;
|
||||
|
||||
vcd_fifo_t vcd_fifo;
|
||||
|
||||
pthread_t vcd_dumper_thread;
|
||||
#endif
|
||||
|
||||
#define BYTE_SIZE 8
|
||||
#define NIBBLE_SIZE 4
|
||||
static void uint64_to_binary(uint64_t value, char *binary)
|
||||
{
|
||||
static const char * const nibbles_start[] = {
|
||||
"", "1", "10", "11",
|
||||
"100", "101", "110", "111",
|
||||
"1000", "1001", "1010", "1011",
|
||||
"1100", "1101", "1110", "1111",
|
||||
};
|
||||
static const char * const nibbles[] = {
|
||||
"0000", "0001", "0010", "0011",
|
||||
"0100", "0101", "0110", "0111",
|
||||
"1000", "1001", "1010", "1011",
|
||||
"1100", "1101", "1110", "1111",
|
||||
};
|
||||
int nibble;
|
||||
int nibble_value;
|
||||
int nibble_size;
|
||||
int zero = 1;
|
||||
|
||||
for (nibble = 0; nibble < (sizeof (uint64_t) * (BYTE_SIZE / NIBBLE_SIZE)); nibble++) {
|
||||
nibble_value = value >> ((sizeof (uint64_t) * BYTE_SIZE) - NIBBLE_SIZE);
|
||||
|
||||
if (zero) {
|
||||
if (nibble_value > 0) {
|
||||
zero = 0;
|
||||
nibble_size = strlen(nibbles_start[nibble_value]);
|
||||
memcpy (binary, nibbles_start[nibble_value], nibble_size);
|
||||
binary += nibble_size;
|
||||
}
|
||||
} else {
|
||||
memcpy (binary, nibbles[nibble_value], NIBBLE_SIZE);
|
||||
binary += NIBBLE_SIZE;
|
||||
}
|
||||
|
||||
value <<= NIBBLE_SIZE;
|
||||
}
|
||||
|
||||
/* Add a '0' if the value was null */
|
||||
if (zero) {
|
||||
binary[0] = '0';
|
||||
binary ++;
|
||||
}
|
||||
|
||||
/* Add a null value at the end of the string */
|
||||
binary[0] = '\0';
|
||||
}
|
||||
|
||||
#if defined(ENABLE_VCD_FIFO)
|
||||
inline static uint32_t vcd_get_write_index(void)
|
||||
{
|
||||
uint32_t write_index;
|
||||
uint32_t read_index;
|
||||
|
||||
/* Get current write index and increment it (atomic operation) */
|
||||
write_index = __sync_fetch_and_add(&vcd_fifo.write_index, 1);
|
||||
/* Wrap index */
|
||||
write_index &= VCD_FIFO_MASK;
|
||||
|
||||
/* Check FIFO overflow (increase VCD_FIFO_NB_ELEMENTS if this assert is triggered) */
|
||||
DevCheck((read_index = vcd_fifo.read_index, ((write_index + 1) & VCD_FIFO_MASK) != read_index), write_index, read_index, VCD_FIFO_NB_ELEMENTS);
|
||||
|
||||
return write_index;
|
||||
}
|
||||
|
||||
void *vcd_dumper_thread_rt(void *args)
|
||||
{
|
||||
vcd_queue_user_data_t *data;
|
||||
char binary_string[(sizeof (uint64_t) * BYTE_SIZE) + 1];
|
||||
struct sched_param sched_param;
|
||||
uint32_t data_ready_wait;
|
||||
|
||||
# if defined(ENABLE_ITTI)
|
||||
signal_mask();
|
||||
# endif
|
||||
|
||||
sched_param.sched_priority = sched_get_priority_min(SCHED_FIFO) + 1;
|
||||
sched_setscheduler(0, SCHED_FIFO, &sched_param);
|
||||
|
||||
while(1) {
|
||||
if (vcd_fifo.read_index == (vcd_fifo.write_index & VCD_FIFO_MASK)) {
|
||||
/* No element -> sleep a while */
|
||||
usleep(VCD_POLL_DELAY);
|
||||
} else {
|
||||
data = &vcd_fifo.user_data[vcd_fifo.read_index];
|
||||
data_ready_wait = 0;
|
||||
|
||||
while (data->module == VCD_SIGNAL_DUMPER_MODULE_FREE) {
|
||||
/* Check wait delay (increase VCD_MAX_WAIT_DELAY if this assert is triggered and that no thread is locked) */
|
||||
DevCheck(data_ready_wait < VCD_MAX_WAIT_DELAY, data_ready_wait, VCD_MAX_WAIT_DELAY, 0);
|
||||
|
||||
/* data is not yet ready, wait for it to be completed */
|
||||
data_ready_wait += VCD_POLL_DELAY;
|
||||
usleep(VCD_POLL_DELAY);
|
||||
}
|
||||
|
||||
switch (data->module) {
|
||||
case VCD_SIGNAL_DUMPER_MODULE_VARIABLES:
|
||||
if (vcd_fd != NULL) {
|
||||
int variable_name;
|
||||
variable_name = (int)data->data.variable.variable_name;
|
||||
fprintf(vcd_fd, "#%llu\n", data->time);
|
||||
/* Set variable to value */
|
||||
uint64_to_binary(data->data.variable.value, binary_string);
|
||||
fprintf(vcd_fd, "b%s %s_w\n", binary_string,
|
||||
eurecomVariablesNames[variable_name]);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case VCD_SIGNAL_DUMPER_MODULE_FUNCTIONS:
|
||||
if (vcd_fd != NULL) {
|
||||
int function_name;
|
||||
|
||||
function_name = (int)data->data.function.function_name;
|
||||
fprintf(vcd_fd, "#%llu\n", data->time);
|
||||
|
||||
/* Check if we are entering or leaving the function ( 0 = leaving, 1 = entering) */
|
||||
if (data->data.function.in_out == VCD_FUNCTION_IN)
|
||||
/* Set event to 1 */
|
||||
fprintf(vcd_fd, "1%s_w\n", eurecomFunctionsNames[function_name]);
|
||||
else
|
||||
fprintf(vcd_fd, "0%s_w\n", eurecomFunctionsNames[function_name]);
|
||||
|
||||
fflush(vcd_fd);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
DevParam(data->module, 0, 0);
|
||||
break;
|
||||
}
|
||||
|
||||
data->module = VCD_SIGNAL_DUMPER_MODULE_FREE;
|
||||
vcd_fifo.read_index = (vcd_fifo.read_index + 1) & VCD_FIFO_MASK;
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
void vcd_signal_dumper_init(char *filename)
|
||||
{
|
||||
if (ouput_vcd) {
|
||||
// char filename[] = "/tmp/openair_vcd_dump.vcd";
|
||||
|
||||
if ((vcd_fd = fopen(filename, "w+")) == NULL) {
|
||||
perror("vcd_signal_dumper_init: cannot open file");
|
||||
return;
|
||||
}
|
||||
|
||||
#if defined(ENABLE_USE_CPU_EXECUTION_TIME)
|
||||
clock_gettime(CLOCK_MONOTONIC, &g_time_start);
|
||||
#elif defined(ENABLE_RTAI_CLOCK)
|
||||
start=rt_get_time_ns();
|
||||
#endif
|
||||
|
||||
vcd_signal_dumper_create_header();
|
||||
|
||||
#if defined(ENABLE_VCD_FIFO)
|
||||
vcd_fifo.write_index = 0;
|
||||
vcd_fifo.read_index = 0;
|
||||
|
||||
fprintf(stderr, "[VCD] Creating dumper thread\n");
|
||||
|
||||
if (pthread_create(&vcd_dumper_thread, NULL, vcd_dumper_thread_rt, NULL) < 0) {
|
||||
fprintf(stderr, "vcd_signal_dumper_init: Failed to create thread: %s\n",
|
||||
strerror(errno));
|
||||
ouput_vcd = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
void vcd_signal_dumper_close(void)
|
||||
{
|
||||
if (ouput_vcd) {
|
||||
#if defined(ENABLE_VCD_FIFO)
|
||||
|
||||
#else
|
||||
|
||||
if (vcd_fd != NULL) {
|
||||
fclose(vcd_fd);
|
||||
vcd_fd = NULL;
|
||||
}
|
||||
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
static inline void vcd_signal_dumper_print_time_since_start(void)
|
||||
{
|
||||
if (vcd_fd != NULL) {
|
||||
#if defined(ENABLE_USE_CPU_EXECUTION_TIME)
|
||||
struct timespec time;
|
||||
long long unsigned int nanosecondsSinceStart;
|
||||
long long unsigned int secondsSinceStart;
|
||||
|
||||
clock_gettime(CLOCK_MONOTONIC, &time);
|
||||
|
||||
/* Get current execution time in nanoseconds */
|
||||
nanosecondsSinceStart = (long long unsigned int)((time.tv_nsec - g_time_start.tv_nsec));
|
||||
secondsSinceStart = (long long unsigned int)time.tv_sec - (long long unsigned int)g_time_start.tv_sec;
|
||||
/* Write time in nanoseconds */
|
||||
fprintf(vcd_fd, "#%llu\n", nanosecondsSinceStart + (secondsSinceStart * 1000000000UL));
|
||||
#elif defined(ENABLE_RTAI_CLOCK)
|
||||
/* Write time in nanoseconds */
|
||||
fprintf(vcd_fd, "#%llu\n",rt_get_time_ns()-start);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
static inline unsigned long long int vcd_get_time(void)
|
||||
{
|
||||
#if defined(ENABLE_USE_CPU_EXECUTION_TIME)
|
||||
struct timespec time;
|
||||
|
||||
clock_gettime(CLOCK_MONOTONIC, &time);
|
||||
|
||||
return (long long unsigned int)((time.tv_nsec - g_time_start.tv_nsec)) +
|
||||
((long long unsigned int)time.tv_sec - (long long unsigned int)g_time_start.tv_sec) * 1000000000UL;
|
||||
#elif defined(ENABLE_RTAI_CLOCK)
|
||||
return rt_get_time_ns() - start;
|
||||
#endif
|
||||
}
|
||||
|
||||
void vcd_signal_dumper_create_header(void)
|
||||
{
|
||||
if (ouput_vcd) {
|
||||
struct tm *pDate;
|
||||
time_t intps;
|
||||
|
||||
intps = time(NULL);
|
||||
pDate = localtime(&intps);
|
||||
|
||||
if (vcd_fd != NULL) {
|
||||
int i, j;
|
||||
fprintf(vcd_fd, "$date\n\t%s$end\n", asctime(pDate));
|
||||
// Display version
|
||||
fprintf(vcd_fd, "$version\n\tVCD plugin ver%d.%d\n$end\n", VCDSIGNALDUMPER_VERSION_MAJOR, VCDSIGNALDUMPER_VERSION_MINOR);
|
||||
// Init timescale, here = 1ns
|
||||
fprintf(vcd_fd, "$timescale 1 ns $end\n");
|
||||
|
||||
/* Initialize each module definition */
|
||||
for(i = 0; i < sizeof(vcd_modules) / sizeof(struct vcd_module_s); i++) {
|
||||
struct vcd_module_s *module;
|
||||
module = &vcd_modules[i];
|
||||
fprintf(vcd_fd, "$scope module %s $end\n", module->name);
|
||||
|
||||
/* Declare each signal as defined in array */
|
||||
for (j = 0; j < module->number_of_signals; j++) {
|
||||
const char *signal_name;
|
||||
signal_name = module->signals_names[j];
|
||||
|
||||
if (VCD_WIRE == module->signal_type) {
|
||||
fprintf(vcd_fd, "$var wire %d %s_w %s $end\n", module->signal_size, signal_name, signal_name);
|
||||
} else if (VCD_REAL == module->signal_type) {
|
||||
fprintf(vcd_fd, "$var real %d %s_r %s $end\n", module->signal_size, signal_name, signal_name);
|
||||
} else {
|
||||
// Handle error here
|
||||
}
|
||||
}
|
||||
|
||||
fprintf(vcd_fd, "$upscope $end\n");
|
||||
}
|
||||
|
||||
/* Init variables and functions to 0 */
|
||||
fprintf(vcd_fd, "$dumpvars\n");
|
||||
|
||||
for(i = 0; i < sizeof(vcd_modules) / sizeof(struct vcd_module_s); i++) {
|
||||
struct vcd_module_s *module;
|
||||
module = &vcd_modules[i];
|
||||
|
||||
/* Declare each signal as defined in array */
|
||||
for (j = 0; j < module->number_of_signals; j++) {
|
||||
const char *signal_name;
|
||||
signal_name = module->signals_names[j];
|
||||
|
||||
if (VCD_WIRE == module->signal_type) {
|
||||
if (module->signal_size > 1) {
|
||||
fprintf(vcd_fd, "b0 %s_w $end\n", signal_name);
|
||||
} else {
|
||||
fprintf(vcd_fd, "0%s_w $end\n", signal_name);
|
||||
}
|
||||
} else if (VCD_REAL == module->signal_type) {
|
||||
fprintf(vcd_fd, "r0 %s_r $end\n", signal_name);
|
||||
} else {
|
||||
// Handle error here
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fprintf(vcd_fd, "$end\n");
|
||||
fprintf(vcd_fd, "$enddefinitions $end\n\n");
|
||||
//fflush(vcd_fd);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void vcd_signal_dumper_dump_variable_by_name(vcd_signal_dump_variables variable_name,
|
||||
unsigned long value)
|
||||
{
|
||||
DevCheck((0 <= variable_name) && (variable_name < VCD_SIGNAL_DUMPER_VARIABLES_END),
|
||||
variable_name, VCD_SIGNAL_DUMPER_VARIABLES_END, 0);
|
||||
|
||||
if (ouput_vcd) {
|
||||
#if defined(ENABLE_VCD_FIFO)
|
||||
uint32_t write_index = vcd_get_write_index();
|
||||
|
||||
vcd_fifo.user_data[write_index].time = vcd_get_time();
|
||||
vcd_fifo.user_data[write_index].data.variable.variable_name = variable_name;
|
||||
vcd_fifo.user_data[write_index].data.variable.value = value;
|
||||
vcd_fifo.user_data[write_index].module = VCD_SIGNAL_DUMPER_MODULE_VARIABLES; // Set when all other fields are set to validate the user_data
|
||||
#else
|
||||
char binary_string[(sizeof (uint64_t) * BYTE_SIZE) + 1];
|
||||
|
||||
if (vcd_fd != NULL) {
|
||||
vcd_signal_dumper_print_time_since_start();
|
||||
|
||||
/* Set variable to value */
|
||||
uint64_to_binary(value, binary_string);
|
||||
fprintf(vcd_fd, "b%s %s_w\n", binary_string, eurecomVariablesNames[variable_name]);
|
||||
//fflush(vcd_fd);
|
||||
}
|
||||
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
void vcd_signal_dumper_dump_function_by_name(vcd_signal_dump_functions function_name,
|
||||
vcd_signal_dump_in_out in_out)
|
||||
{
|
||||
DevCheck((0 <= function_name) && (function_name < VCD_SIGNAL_DUMPER_FUNCTIONS_END),
|
||||
function_name, VCD_SIGNAL_DUMPER_FUNCTIONS_END, 0);
|
||||
|
||||
if (ouput_vcd) {
|
||||
#if defined(ENABLE_VCD_FIFO)
|
||||
uint32_t write_index = vcd_get_write_index();
|
||||
|
||||
vcd_fifo.user_data[write_index].time = vcd_get_time();
|
||||
vcd_fifo.user_data[write_index].data.function.function_name = function_name;
|
||||
vcd_fifo.user_data[write_index].data.function.in_out = in_out;
|
||||
vcd_fifo.user_data[write_index].module = VCD_SIGNAL_DUMPER_MODULE_FUNCTIONS; // Set when all other fields are set to validate the user_data
|
||||
#else
|
||||
|
||||
if (vcd_fd != NULL) {
|
||||
vcd_signal_dumper_print_time_since_start();
|
||||
|
||||
/* Check if we are entering or leaving the function ( 0 = leaving, 1 = entering) */
|
||||
if (in_out == VCD_FUNCTION_IN)
|
||||
/* Set event to 1 */
|
||||
fprintf(vcd_fd, "1%s_w\n", eurecomFunctionsNames[function_name]);
|
||||
else
|
||||
fprintf(vcd_fd, "0%s_w\n", eurecomFunctionsNames[function_name]);
|
||||
|
||||
//fflush(vcd_fd);
|
||||
}
|
||||
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,462 +0,0 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
/*! \file vcd_signal_dumper.h
|
||||
* \brief Output functions call to VCD file which is readable by gtkwave.
|
||||
* \author ROUX Sebastien
|
||||
* \author S. Roux
|
||||
* \maintainer: navid nikaein
|
||||
* \date 2012 - 2104
|
||||
* \version 0.1
|
||||
* \company Eurecom
|
||||
* \email: navid.nikaein@eurecom.fr
|
||||
* \note
|
||||
* \warning
|
||||
*/
|
||||
|
||||
#ifndef VCD_SIGNAL_DUMPER_H_
|
||||
#define VCD_SIGNAL_DUMPER_H_
|
||||
|
||||
//#define ENABLE_USE_CPU_EXECUTION_TIME
|
||||
|
||||
/* WARNING: if you edit the enums below, update also string definitions in vcd_signal_dumper.c */
|
||||
typedef enum {
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_TX0_ENB = 0,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_TX1_ENB,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_RX0_ENB,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_RX1_ENB,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_TX0_ENB,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_TX1_ENB,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_RX0_ENB,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_RX1_ENB,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_TX0_RU,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_TX1_RU,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_RX0_RU,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_RX1_RU,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_TX0_RU,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_TX1_RU,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_RX0_RU,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_RX1_RU,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_RUNTIME_TX_ENB,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_RUNTIME_RX_ENB,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_TX0_UE,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_TX1_UE,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_RX0_UE,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_RX1_UE,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_TX0_UE,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_TX1_UE,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_RX0_UE,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_RX1_UE,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_MISSED_SLOTS_ENB,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_DAQ_MBOX,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_UE_OFFSET_MBOX,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_UE_RX_OFFSET,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_DIFF,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_HW_SUBFRAME,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_HW_FRAME,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_HW_SUBFRAME_RX,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_HW_FRAME_RX,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_TXCNT,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_RXCNT,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_TRX_TS,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_TRX_TST,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_TRX_TS_UE,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_TRX_TST_UE,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_TRX_WRITE_FLAGS,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_TX_TS,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_RX_TS,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_RX_HWCNT,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_RX_LHWCNT,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_TX_HWCNT,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_TX_LHWCNT,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_RX_PCK,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_TX_PCK,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_RX_SEQ_NUM,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_RX_SEQ_NUM_PRV,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_TX_SEQ_NUM,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_CNT,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_DUMMY_DUMP,
|
||||
VCD_SIGNAL_DUMPER_VARIABLE_ITTI_SEND_MSG,
|
||||
VCD_SIGNAL_DUMPER_VARIABLE_ITTI_POLL_MSG,
|
||||
VCD_SIGNAL_DUMPER_VARIABLE_ITTI_RECV_MSG,
|
||||
VCD_SIGNAL_DUMPER_VARIABLE_ITTI_ALLOC_MSG,
|
||||
VCD_SIGNAL_DUMPER_VARIABLE_MP_ALLOC,
|
||||
VCD_SIGNAL_DUMPER_VARIABLE_MP_FREE,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_UE_INST_CNT_RX,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_UE_INST_CNT_TX,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_DCI_INFO,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_UE0_BSR,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_UE0_BO,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_UE0_SCHEDULED,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_UE0_TIMING_ADVANCE,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_UE0_SR_ENERGY,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_UE0_SR_THRES,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_UE0_RSSI0,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_UE0_RSSI1,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_UE0_RSSI2,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_UE0_RSSI3,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_UE0_RSSI4,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_UE0_RSSI5,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_UE0_RSSI6,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_UE0_RSSI7,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_UE0_RES0,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_UE0_RES1,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_UE0_RES2,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_UE0_RES3,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_UE0_RES4,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_UE0_RES5,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_UE0_RES6,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_UE0_RES7,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_UE0_MCS0,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_UE0_MCS1,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_UE0_MCS2,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_UE0_MCS3,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_UE0_MCS4,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_UE0_MCS5,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_UE0_MCS6,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_UE0_MCS7,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_UE0_RB0,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_UE0_RB1,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_UE0_RB2,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_UE0_RB3,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_UE0_RB4,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_UE0_RB5,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_UE0_RB6,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_UE0_RB7,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_UE0_ROUND0,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_UE0_ROUND1,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_UE0_ROUND2,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_UE0_ROUND3,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_UE0_ROUND4,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_UE0_ROUND5,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_UE0_ROUND6,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_UE0_ROUND7,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_UE0_SFN0,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_UE0_SFN1,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_UE0_SFN2,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_UE0_SFN3,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_UE0_SFN4,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_UE0_SFN5,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_UE0_SFN6,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_UE0_SFN7,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_SEND_IF4_SYMBOL,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_RECV_IF4_SYMBOL,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_SEND_IF5_PKT_ID,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_RECV_IF5_PKT_ID,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_UE_PDCP_FLUSH_SIZE,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_UE_PDCP_FLUSH_ERR,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_UE0_TRX_READ_NS,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_UE0_TRX_WRITE_NS,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_UE0_TRX_READ_NS_MISSING,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_UE0_TRX_WRITE_NS_MISSING,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_END
|
||||
} vcd_signal_dump_variables;
|
||||
|
||||
typedef enum {
|
||||
/* softmodem signals */
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_RT_SLEEP=0,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_READ,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_READ_UE,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE_UE,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_READ_IF,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE_IF,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_PROC_RXTX0,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_PROC_RXTX1,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_THREAD_SYNCH,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_THREAD_RXTX0,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_THREAD_RXTX1,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_READ_SF9,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE_SF9,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SIGNAL_COND_RXTX0,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SIGNAL_COND_RXTX1,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_WAIT_COND_RXTX0,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_WAIT_COND_RXTX1,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_LOCK_MUTEX_RXTX_FOR_COND_WAIT0,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_LOCK_MUTEX_RXTX_FOR_COND_WAIT1,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_LOCK_MUTEX_RXTX_FOR_CNT_DECREMENT0,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_LOCK_MUTEX_RXTX_FOR_CNT_DECREMENT1,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_LOCK_MUTEX_RXTX_FOR_CNT_INCREMENT0,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_LOCK_MUTEX_RXTX_FOR_CNT_INCREMENT1,
|
||||
|
||||
/* RRH signals */
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_TX,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_RX,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_TRX,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_TM,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_RX_SLEEP,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_TX_SLEEP,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_PROC_SLEEP,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_READ_RF,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE_RF,
|
||||
|
||||
/* PHY signals */
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SYNCH,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SLOT_FEP,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_RRC_MEASUREMENTS,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_GAIN_CONTROL,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_ADJUST_SYNCH,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_MEASUREMENT_PROCEDURES,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_PDCCH_PROCEDURES,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_PBCH_PROCEDURES,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_TX,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_TX1,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPRX,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPRX1,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPTX_OFDM,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPTX_OFDM1,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPTX_PREC,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPTX_PREC1,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_RX_UESPEC,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_RX_UESPEC1,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_TX,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_RX,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_TX_ULSCH_UESPEC,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_TX_PUCCH,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_TX_ULSCH_COMMON,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_TX_PRACH,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_TX_ULSCH_RAR,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_LTE,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_LTE,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_THREAD,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_THREAD0,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_THREAD1,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_THREAD2,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_THREAD3,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_THREAD4,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_THREAD5,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_THREAD6,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_THREAD7,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_DECODING0,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_DECODING1,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_DECODING2,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_DECODING3,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_DECODING4,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_DECODING5,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_DECODING6,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_DECODING7,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_RX_PDCCH,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_DCI_DECODING,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_RX_PHICH,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC_SI,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC_P,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC_RA,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_UE_CONFIG_SIB2,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_CONFIG_SIB1_ENB,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_CONFIG_SIB2_ENB,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_CONFIG_DEDICATED_ENB,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_UE_COMPUTE_PRACH,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_ULSCH_MSG3,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_ULSCH_DECODING0,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_ULSCH_DECODING1,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_ULSCH_DECODING2,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_ULSCH_DECODING3,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_ULSCH_DECODING4,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_ULSCH_DECODING5,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_ULSCH_DECODING6,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_ULSCH_DECODING7,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_SFGEN,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_PRACH_RX,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_RU_PRACH_RX,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_PDCCH_TX,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_RS_TX,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_GENERATE_PRACH,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_ULSCH_MODULATION,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_ULSCH_ENCODING,
|
||||
#if 1 // add for debugging losing PDSCH immediately before and after reporting CQI
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_ULSCH_ENCODING_FILL_CQI,
|
||||
#endif
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_ULSCH_SCRAMBLING,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_MODULATION,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_ENCODING,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_ENCODING_W,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_SCRAMBLING,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_BEAM_PRECODING,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_OFDM_MODULATION,
|
||||
|
||||
/* MAC signals */
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_MACPHY_INIT,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_MACPHY_EXIT,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_ULSCH_SCHEDULER,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_FILL_RAR,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_TERMINATE_RA_PROC,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_INITIATE_RA_PROC,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_CANCEL_RA_PROC,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_GET_DCI_SDU,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_GET_DLSCH_SDU,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_RX_SDU,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_MRBCH_PHY_SYNC_FAILURE,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_SR_INDICATION,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_PREPROCESSOR,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_SCHEDULE_DLSCH, // schedule_ue_spec
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_FILL_DLSCH_DCI,
|
||||
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_OUT_OF_SYNC_IND,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_DECODE_SI,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_DECODE_PCCH,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_DECODE_CCCH,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_DECODE_BCCH,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SEND_SDU,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_GET_SDU,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_GET_RACH,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_PROCESS_RAR,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SCHEDULER,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_GET_SR,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SEND_MCH_SDU,
|
||||
|
||||
/* RLC signals */
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_RLC_DATA_REQ,
|
||||
// VCD_SIGNAL_DUMPER_FUNCTIONS_RLC_DATA_IND,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_MAC_RLC_STATUS_IND,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_MAC_RLC_DATA_REQ,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_MAC_RLC_DATA_IND,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_RLC_UM_TRY_REASSEMBLY,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_RLC_UM_CHECK_TIMER_DAR_TIME_OUT,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_RLC_UM_RECEIVE_PROCESS_DAR,
|
||||
|
||||
/* PDCP signals */
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_RUN,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_DATA_REQ,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_DATA_IND,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_APPLY_SECURITY,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_VALIDATE_SECURITY,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_FIFO_READ,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_FIFO_READ_BUFFER,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_FIFO_FLUSH,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_FIFO_FLUSH_BUFFER,
|
||||
|
||||
/* RRC signals */
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_RRC_RX_TX,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_RRC_MAC_CONFIG,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_RRC_UE_DECODE_SIB1,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_RRC_UE_DECODE_SI,
|
||||
|
||||
/* GTPV1U signals */
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_GTPV1U_ENB_TASK,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_GTPV1U_PROCESS_UDP_REQ,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_GTPV1U_PROCESS_TUNNEL_DATA_REQ,
|
||||
|
||||
/* UDP signals */
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_UDP_ENB_TASK,
|
||||
|
||||
/* MISC signals */
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_EMU_TRANSPORT,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_LOG_RECORD,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_ITTI_ENQUEUE_MESSAGE,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_ITTI_DUMP_ENQUEUE_MESSAGE,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_ITTI_DUMP_ENQUEUE_MESSAGE_MALLOC,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_ITTI_RELAY_THREAD,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_TEST,
|
||||
|
||||
/* IF4/IF5 signals */
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_SEND_IF4,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_RECV_IF4,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_SEND_IF5,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_RECV_IF5,
|
||||
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_COMPR_IF,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_DECOMPR_IF,
|
||||
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_END
|
||||
} vcd_signal_dump_functions;
|
||||
|
||||
typedef enum {
|
||||
VCD_SIGNAL_DUMPER_MODULE_FREE = 0,
|
||||
|
||||
VCD_SIGNAL_DUMPER_MODULE_VARIABLES,
|
||||
VCD_SIGNAL_DUMPER_MODULE_FUNCTIONS,
|
||||
// VCD_SIGNAL_DUMPER_MODULE_UE_PROCEDURES_FUNCTIONS,
|
||||
} vcd_signal_dumper_modules;
|
||||
|
||||
typedef enum {
|
||||
VCD_FUNCTION_OUT,
|
||||
VCD_FUNCTION_IN,
|
||||
VCD_FUNCTION_LAST,
|
||||
} vcd_signal_dump_in_out;
|
||||
|
||||
typedef enum {
|
||||
VCD_REAL, // REAL = variable
|
||||
VCD_WIRE, // WIRE = Function
|
||||
} vcd_signal_type;
|
||||
|
||||
/*!
|
||||
* \brief Init function for the vcd dumper.
|
||||
* @param None
|
||||
*/
|
||||
void vcd_signal_dumper_init(char* filename);
|
||||
/*!
|
||||
* \brief Close file descriptor.
|
||||
* @param None
|
||||
*/
|
||||
void vcd_signal_dumper_close(void);
|
||||
/*!
|
||||
* \brief Create header for VCD file.
|
||||
* @param None
|
||||
*/
|
||||
void vcd_signal_dumper_create_header(void);
|
||||
/*!
|
||||
* \brief Dump state of a variable
|
||||
* @param Name of the variable to dump (see the corresponding enum)
|
||||
* @param Value of the variable to dump (type: unsigned long)
|
||||
*/
|
||||
void vcd_signal_dumper_dump_variable_by_name(vcd_signal_dump_variables variable_name,
|
||||
unsigned long value);
|
||||
/*!
|
||||
* \brief Dump function usage
|
||||
* @param Name Function name to dump (see the corresponding enum)
|
||||
* @param State: either VCD_FUNCTION_START or VCD_FUNCTION_END
|
||||
*/
|
||||
void vcd_signal_dumper_dump_function_by_name(vcd_signal_dump_functions function_name,
|
||||
vcd_signal_dump_in_out function_in_out);
|
||||
|
||||
extern int ouput_vcd;
|
||||
|
||||
#if T_TRACER
|
||||
|
||||
#include "T.h"
|
||||
|
||||
#define VCD_SIGNAL_DUMPER_INIT(x) /* nothing */
|
||||
#define VCD_SIGNAL_DUMPER_CLOSE() /* nothing */
|
||||
#define VCD_SIGNAL_DUMPER_CREATE_HEADER() /* nothing */
|
||||
#define VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(var, val) T_VCD_VARIABLE(var, val)
|
||||
#define VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(var, val) T_VCD_FUNCTION(var, val)
|
||||
|
||||
#else /* T_TRACER */
|
||||
|
||||
#if defined(ENABLE_VCD)
|
||||
#define VCD_SIGNAL_DUMPER_INIT(aRgUmEnT) vcd_signal_dumper_init(aRgUmEnT)
|
||||
#define VCD_SIGNAL_DUMPER_CLOSE() vcd_signal_dumper_close()
|
||||
#define VCD_SIGNAL_DUMPER_CREATE_HEADER() vcd_signal_dumper_create_header()
|
||||
#define VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(vAr1,vAr2) vcd_signal_dumper_dump_variable_by_name(vAr1,vAr2)
|
||||
#define VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(vAr1,vAr2) vcd_signal_dumper_dump_function_by_name(vAr1,vAr2)
|
||||
#else
|
||||
#define VCD_SIGNAL_DUMPER_INIT(aRgUmEnT)
|
||||
#define VCD_SIGNAL_DUMPER_CLOSE()
|
||||
#define VCD_SIGNAL_DUMPER_CREATE_HEADER()
|
||||
#define VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(vAr1,vAr2)
|
||||
#define VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(vAr1,vAr2)
|
||||
#endif
|
||||
|
||||
#endif /* T_TRACER */
|
||||
|
||||
#endif /* !defined (VCD_SIGNAL_DUMPER_H_) */
|
||||
|
||||
@@ -29,11 +29,7 @@
|
||||
#include "rtos_header.h"
|
||||
#include "platform_types.h"
|
||||
|
||||
#ifdef USER_MODE
|
||||
# include <sys/time.h>
|
||||
#else
|
||||
#include <rtai_sched.h>
|
||||
#endif
|
||||
#include <sys/time.h>
|
||||
|
||||
|
||||
/* Random generators */
|
||||
@@ -47,7 +43,6 @@ static int seed;
|
||||
void
|
||||
init_uniform (void)
|
||||
{
|
||||
#ifdef USER_MODE
|
||||
struct timeval tv;
|
||||
struct timezone tz;
|
||||
|
||||
@@ -61,9 +56,6 @@ init_uniform (void)
|
||||
#warning TO DO seed = rgId
|
||||
//seed += rgId;
|
||||
#endif
|
||||
#else
|
||||
seed = rt_get_time_ns();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -29,21 +29,12 @@
|
||||
* @ingroup util
|
||||
*/
|
||||
|
||||
#ifndef RTAI_ENABLED
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
#include <math.h>
|
||||
#include "oml.h"
|
||||
#else
|
||||
#include <asm/io.h>
|
||||
#include <asm/rtai.h>
|
||||
#include <rtai.h>
|
||||
#include <rtai_sched.h>
|
||||
#define time(x) (unsigned int)(rt_get_time_ns())
|
||||
#endif
|
||||
|
||||
|
||||
unsigned int s0[MAX_NUM_COMPS], s1[MAX_NUM_COMPS], s2[MAX_NUM_COMPS], b[MAX_NUM_COMPS], r[MAX_NUM_COMPS];
|
||||
|
||||
|
||||
@@ -33,8 +33,8 @@
|
||||
#include "mem_block.h"
|
||||
#include "mem_pool.h"
|
||||
#include "list.h"
|
||||
#include "LAYER2/MAC/extern.h"
|
||||
|
||||
#include "LAYER2/MAC/mac_extern.h"
|
||||
#include "assertions.h"
|
||||
/* all function calls are protected by a mutex
|
||||
* to ensure that many threads calling them at
|
||||
* the same time don't mess up.
|
||||
@@ -54,13 +54,14 @@ static pthread_mutex_t mtex = PTHREAD_MUTEX_INITIALIZER;
|
||||
//#define DEBUG_MEM_MNGT_ALLOC_SIZE
|
||||
//#define DEBUG_MEM_MNGT_ALLOC
|
||||
//-----------------------------------------------------------------------------
|
||||
#if defined(USER_MODE) && defined(DEBUG_MEM_MNGT_ALLOC)
|
||||
#if defined(DEBUG_MEM_MNGT_ALLOC)
|
||||
uint32_t counters[14] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
|
||||
#endif
|
||||
//-----------------------------------------------------------------------------
|
||||
/*
|
||||
* initialize all ures
|
||||
*/
|
||||
extern mem_pool *memBlockVar;
|
||||
void *
|
||||
pool_buffer_init (void)
|
||||
{
|
||||
@@ -68,6 +69,7 @@ pool_buffer_init (void)
|
||||
|
||||
uint32_t index, mb_index, pool_index;
|
||||
mem_pool *memory = (mem_pool *) &mem_block_var;
|
||||
memBlockVar=malloc(sizeof(mem_pool));
|
||||
int pool_sizes[14] = { MEM_MNGT_MB0_NB_BLOCKS, MEM_MNGT_MB1_NB_BLOCKS,
|
||||
MEM_MNGT_MB2_NB_BLOCKS, MEM_MNGT_MB3_NB_BLOCKS,
|
||||
MEM_MNGT_MB4_NB_BLOCKS, MEM_MNGT_MB5_NB_BLOCKS,
|
||||
@@ -269,17 +271,15 @@ get_free_mem_block (uint32_t sizeP, const char* caller)
|
||||
|
||||
#ifdef DEBUG_MEM_MNGT_ALLOC
|
||||
LOG_E (RLC,"[MEM_MNGT][ERROR][MINOR] memory pool %d is empty trying next pool alloc count = %d\n", pool_selected, counters[pool_selected]);
|
||||
#ifdef USER_MODE
|
||||
// display_mem_load ();
|
||||
// check_mem_area ((void *)&mem_block_var);
|
||||
#endif
|
||||
#endif
|
||||
} while (pool_selected++ < 12);
|
||||
|
||||
LOG_E(PHY, "[MEM_MNGT][ERROR][FATAL] failed allocating MEM_BLOCK size %d byes (pool_selected=%d size=%d)\n", sizeP, pool_selected, size);
|
||||
display_mem_load();
|
||||
AssertFatal(1==0,"get_free_mem_block failed");
|
||||
|
||||
// display_mem_load();
|
||||
// AssertFatal(1==0,"get_free_mem_block failed");
|
||||
LOG_E(MAC,"[MEM_MNGT][ERROR][FATAL] get_free_mem_block failed!!!\n");
|
||||
#ifdef MEMBLOCK_BIG_LOCK
|
||||
if (pthread_mutex_unlock(&mtex)) abort();
|
||||
#endif
|
||||
|
||||
@@ -31,51 +31,36 @@
|
||||
#ifndef __MEM_BLOCK_H__
|
||||
# define __MEM_BLOCK_H__
|
||||
|
||||
#ifdef USER_MODE
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#ifdef MEM_BLOCK_C
|
||||
# define public_mem_block(x) x
|
||||
# define private_mem_block(x) x
|
||||
#else
|
||||
# define public_mem_block(x) extern x
|
||||
# define private_mem_block(x)
|
||||
#endif
|
||||
#include "openair2/COMMON/platform_constants.h"
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
typedef struct mem_block_t {
|
||||
struct mem_block_t *next;
|
||||
struct mem_block_t *previous;
|
||||
size_t size;
|
||||
unsigned char pool_id;
|
||||
unsigned char *data;
|
||||
} mem_block_t;
|
||||
#include "UTIL/LISTS/list.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
public_mem_block(void *pool_buffer_init (void);)
|
||||
public_mem_block(void *pool_buffer_clean (void *arg);)
|
||||
public_mem_block(void free_mem_block (mem_block_t * leP, const char* caller);)
|
||||
public_mem_block(mem_block_t* get_free_mem_block (uint32_t sizeP, const char* caller);)
|
||||
public_mem_block(mem_block_t *get_free_copy_mem_block (void);)
|
||||
public_mem_block(mem_block_t *get_free_copy_mem_block_up (void);)
|
||||
public_mem_block(mem_block_t *copy_mem_block (mem_block_t * leP, mem_block_t * destP);)
|
||||
public_mem_block(void display_mem_load (void);)
|
||||
void *pool_buffer_init (void);
|
||||
void *pool_buffer_clean (void *arg);
|
||||
void free_mem_block (mem_block_t * leP, const char* caller);
|
||||
mem_block_t* get_free_mem_block (uint32_t sizeP, const char* caller);
|
||||
mem_block_t *get_free_copy_mem_block (void);
|
||||
mem_block_t *get_free_copy_mem_block_up (void);
|
||||
mem_block_t *copy_mem_block (mem_block_t * leP, mem_block_t * destP);
|
||||
void display_mem_load (void);
|
||||
|
||||
public_mem_block(void check_mem_area (void);)
|
||||
# ifdef USER_MODE
|
||||
private_mem_block(void check_free_mem_block (mem_block_t * leP);)
|
||||
# endif
|
||||
#ifdef USER_MODE
|
||||
//# define MEM_SCALE MAX_MOBILES_PER_ENB*NB_RB_MAX
|
||||
void check_mem_area (void);
|
||||
void check_free_mem_block (mem_block_t * leP);
|
||||
# define MEM_SCALE MAX_MOBILES_PER_ENB
|
||||
#else
|
||||
# ifdef NODE_RG
|
||||
# define MEM_SCALE 2
|
||||
# else
|
||||
# define MEM_SCALE 1
|
||||
# endif
|
||||
#endif
|
||||
// definition of the size of the allocated memory area
|
||||
# define MEM_MNGT_MB0_BLOCK_SIZE 64
|
||||
// 64
|
||||
@@ -152,9 +137,26 @@ private_mem_block(void check_free_mem_block (mem_block_t * leP);)
|
||||
# define MEM_MNGT_NB_ELEMENTS MEM_MNGT_MB0_NB_BLOCKS + MEM_MNGT_MB1_NB_BLOCKS + MEM_MNGT_MB2_NB_BLOCKS + MEM_MNGT_MB3_NB_BLOCKS + MEM_MNGT_MB4_NB_BLOCKS + MEM_MNGT_MB5_NB_BLOCKS + MEM_MNGT_MB6_NB_BLOCKS + MEM_MNGT_MB7_NB_BLOCKS + MEM_MNGT_MB8_NB_BLOCKS + MEM_MNGT_MB9_NB_BLOCKS + MEM_MNGT_MB10_NB_BLOCKS + MEM_MNGT_MB11_NB_BLOCKS + MEM_MNGT_MB12_NB_BLOCKS + MEM_MNGT_MBCOPY_NB_BLOCKS
|
||||
# define MEM_MNGT_POOL_ID_COPY 13
|
||||
|
||||
#define LIST_NAME_MAX_CHAR 32
|
||||
|
||||
|
||||
private_mem_block(typedef struct {
|
||||
typedef struct {
|
||||
struct mem_block_t *head;
|
||||
struct mem_block_t *tail;
|
||||
int nb_elements;
|
||||
char name[LIST_NAME_MAX_CHAR];
|
||||
} list2_t;
|
||||
//-----------------------------------------------------------------------------
|
||||
typedef struct {
|
||||
struct mem_block_t *head;
|
||||
struct mem_block_t *tail;
|
||||
int nb_elements;
|
||||
char name[LIST_NAME_MAX_CHAR];
|
||||
} list_t;
|
||||
|
||||
|
||||
|
||||
typedef struct {
|
||||
//-----------------------------------------------------------
|
||||
// basic memory management
|
||||
//-----------------------------------------------------------
|
||||
@@ -174,9 +176,12 @@ private_mem_block(typedef struct {
|
||||
mem_block_t mem_blocks[MEM_MNGT_NB_ELEMENTS];
|
||||
list_t mem_lists[14];
|
||||
|
||||
} mem_pool;)
|
||||
|
||||
private_mem_block(mem_pool mem_block_var;)
|
||||
} mem_pool;
|
||||
|
||||
mem_pool *memBlockVar;
|
||||
#define mem_block_var (*memBlockVar)
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -49,9 +49,7 @@
|
||||
//
|
||||
#endif
|
||||
//-----------------------------------------------------------------------------
|
||||
#ifdef USER_MODE
|
||||
uint32_t counters[11] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||
#endif
|
||||
//-----------------------------------------------------------------------------
|
||||
/*
|
||||
* initialize all ures
|
||||
@@ -227,10 +225,8 @@ get_free_mem_block (uint16_t sizeP, __func__)
|
||||
|
||||
#ifdef DEBUG_MEM_MNGT_ALLOC
|
||||
msg ("[MEM_MNGT][ERROR][MINOR] memory pool %d is empty trying next pool alloc count = %d\n", pool_selected, counters[pool_selected]);
|
||||
# ifdef USER_MODE
|
||||
display_mem_load ();
|
||||
check_mem_area (mem);
|
||||
# endif
|
||||
#endif
|
||||
} while (pool_selected++ < 9);
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
#ifndef __OCG_H__
|
||||
#define __OCG_H__
|
||||
|
||||
#include "PHY/defs.h"
|
||||
#include "PHY/defs_common.h"
|
||||
#include "PHY/impl_defs_top.h"
|
||||
#include "platform_types.h"
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ OPENAIR2_TOP = ../../../openair2
|
||||
OPENAIR3_TOP = ../../../openair3
|
||||
OPENAIR3 = $(OPENAIR3_DIR)
|
||||
|
||||
CFLAGS += -DPHYSIM -DNODE_RG -DUSER_MODE -DPC_TARGET -DPC_DSP -DNB_ANTENNAS_RX=2 -DNB_ANTENNAS_TXRX=2 -DNB_ANTENNAS_TX=2 -DMAX_MODULES=1 -I/usr/include/X11 #-Wno-packed-bitfield-compat
|
||||
CFLAGS += -DPHYSIM -DNODE_RG -DNB_ANTENNAS_RX=2 -DNB_ANTENNAS_TX=2 -DMAX_MODULES=1 -I/usr/include/X11 #-Wno-packed-bitfield-compat
|
||||
|
||||
|
||||
CFLAGS += -m32 -DOPENAIR_LTE -DOPENAIR2 #-DOFDMA_ULSCH -DIFFT_FPGA -DIFFT_FPGA_UE
|
||||
@@ -22,8 +22,6 @@ ifdef PDCP_USE_NETLINK
|
||||
CFLAGS += -DPDCP_USE_NETLINK -DLINUX -DDEBUG_CONTROL
|
||||
endif
|
||||
|
||||
CFLAGS += -DPHY_ABSTRACTION
|
||||
|
||||
#ifdef OCG
|
||||
CFLAGS += -I/usr/include/libxml2 -lxml2
|
||||
#endif
|
||||
|
||||
@@ -60,7 +60,7 @@ OPENAIR2_TOP = ../../../openair2
|
||||
OPENAIR3_TOP = ../../../openair3
|
||||
OPENAIR3 = $(OPENAIR3_DIR)
|
||||
|
||||
CFLAGS += -DPHYSIM -DNODE_RG -DUSER_MODE -DPC_TARGET -DPC_DSP -DNB_ANTENNAS_RX=2 -DNB_ANTENNAS_TXRX=2 -DNB_ANTENNAS_TX=2 -DMAX_MODULES=1 -I/usr/include/X11 #-Wno-packed-bitfield-compat
|
||||
CFLAGS += -DPHYSIM -DNODE_RG -DNB_ANTENNAS_RX=2 -DNB_ANTENNAS_TX=2 -DMAX_MODULES=1 -I/usr/include/X11 #-Wno-packed-bitfield-compat
|
||||
|
||||
|
||||
CFLAGS += -DOPENAIR_LTE -DOPENAIR2 #-DOFDMA_ULSCH -DIFFT_FPGA -DIFFT_FPGA_UE
|
||||
@@ -75,8 +75,6 @@ ifdef PDCP_USE_NETLINK
|
||||
CFLAGS += -DPDCP_USE_NETLINK -DLINUX -DDEBUG_CONTROL
|
||||
endif
|
||||
|
||||
CFLAGS += -DPHY_ABSTRACTION
|
||||
|
||||
include $(OPENAIR1_DIR)/PHY/Makefile.inc
|
||||
include $(OPENAIR1_DIR)/SCHED/Makefile.inc
|
||||
include $(OPENAIR2_DIR)/LAYER2/Makefile.inc
|
||||
|
||||
@@ -62,7 +62,7 @@ OPENAIR2_TOP = ../../../openair2
|
||||
OPENAIR3_TOP = ../../../openair3
|
||||
OPENAIR3 = $(OPENAIR3_DIR)
|
||||
|
||||
CFLAGS += -DPHYSIM -DNODE_RG -DUSER_MODE -DPC_TARGET -DPC_DSP -DNB_ANTENNAS_RX=2 -DNB_ANTENNAS_TXRX=2 -DNB_ANTENNAS_TX=2 -DMAX_MODULES=1 -I/usr/include/X11 #-Wno-packed-bitfield-compat
|
||||
CFLAGS += -DPHYSIM -DNODE_RG -DNB_ANTENNAS_RX=2 -DNB_ANTENNAS_TX=2 -DMAX_MODULES=1 -I/usr/include/X11 #-Wno-packed-bitfield-compat
|
||||
|
||||
|
||||
CFLAGS += -DOPENAIR_LTE -DOPENAIR2 #-DOFDMA_ULSCH -DIFFT_FPGA -DIFFT_FPGA_UE
|
||||
@@ -77,8 +77,6 @@ ifdef PDCP_USE_NETLINK
|
||||
CFLAGS += -DPDCP_USE_NETLINK -DLINUX -DDEBUG_CONTROL
|
||||
endif
|
||||
|
||||
CFLAGS += -DPHY_ABSTRACTION
|
||||
|
||||
include $(OPENAIR1_DIR)/PHY/Makefile.inc
|
||||
include $(OPENAIR1_DIR)/SCHED/Makefile.inc
|
||||
include $(OPENAIR2_DIR)/LAYER2/Makefile.inc
|
||||
|
||||
@@ -8,7 +8,7 @@ OBJsumo = omg.c common.c sumo.c client_traci_OMG.c socket_traci_OMG.c storage_tr
|
||||
|
||||
OBJ = omg.c common.c static.c job.c rwp.c rwalk.c trace.c steadystaterwp.c sumo.c grid.c mobility_parser.c hashtable.c client_traci_OMG.c socket_traci_OMG.c storage_traci_OMG.c id_manager.c
|
||||
|
||||
CFLAGS += -DSTANDALONE -DUSER_MODE -g
|
||||
CFLAGS += -DSTANDALONE -g
|
||||
|
||||
.PHONY: help staticOMG rwpOMG clean
|
||||
|
||||
|
||||
@@ -121,7 +121,7 @@ init_mobility_generator (omg_global_param omg_param_list[])
|
||||
break;
|
||||
|
||||
default:
|
||||
LOG_N (OMG, "Unsupported generator\n");
|
||||
LOG_W (OMG, "Unsupported generator\n");
|
||||
}
|
||||
|
||||
|
||||
@@ -161,7 +161,7 @@ stop_mobility_generator (omg_global_param * omg_param_list)
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
LOG_N (OMG, "Unsupported generator\n");
|
||||
LOG_W (OMG, "Unsupported generator\n");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -211,8 +211,7 @@ update_node_vector (int mobility_type, double cur_time)
|
||||
break;
|
||||
|
||||
default:
|
||||
//printf("STATIC or Unsupported generator %d \n", omg_param_list.mobility_type);
|
||||
LOG_N (OMG, "STATIC or Unsupported generator\n");
|
||||
LOG_W (OMG, "STATIC or Unsupported generator\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,9 +1,13 @@
|
||||
2012 07 10 - Working version
|
||||
How to configure wireshark for dissecting LTE protocols:
|
||||
- start the wireshark as a sudoers
|
||||
- goto analyze->enabled prototols
|
||||
=> enable mac_lte_udp and rlc_lte_udp
|
||||
- goto edit/preferences and expand Protocols
|
||||
- select UDP and check "try heuristic sub-dissectors first"
|
||||
- select MAC-LTE, and check all the options (checkboxes), and set the "which layer info to show in info column" to "MAC info"
|
||||
- select RLC-LTE, and check all the options except the "May see RLC headers only", and set the "call PDCP dissector for DRB PDUs" to "12-bit SN". Optionally you may select the sequence analysis for RLC AM/UM.
|
||||
|
||||
How to use
|
||||
- start eNB or UE with option -W (or -P if you want to make a pcap file)
|
||||
- capture on local interface "lo"
|
||||
- filter out the ICMP/DNS/TCP messages (e.g. "!icmp && !dns && !tcp")
|
||||
|
||||
@@ -42,11 +42,4 @@ typedef struct MAC_Context_Info_t {
|
||||
unsigned int subframesSinceCaptureStart;
|
||||
} MAC_Context_Info_t;
|
||||
|
||||
pcap_hdr_t file_header = {
|
||||
0xa1b2c3d4, /* magic number */
|
||||
2, 4, /* version number is 2.4 */
|
||||
0, /* timezone */
|
||||
0, /* sigfigs - apparently all tools do this */
|
||||
65535, /* snaplen - this should be long enough */
|
||||
MAC_LTE_DLT /* Data Link Type (DLT). Set as unused value 147 for now */
|
||||
};
|
||||
|
||||
|
||||
+13
-3
@@ -48,13 +48,23 @@ This header file must be included */
|
||||
#endif
|
||||
#ifndef project_include
|
||||
#define project_include
|
||||
#include "UTIL/LOG/log_if.h"
|
||||
#include "common/utils/LOG/log_if.h"
|
||||
// #include "UTIL/LOG/log_extern.h"
|
||||
//#include "PHY/defs.h"
|
||||
//#include "PHY/extern.h"
|
||||
#include "PHY/impl_defs_lte.h"
|
||||
#endif
|
||||
|
||||
#define PACKET_MAC_LTE_DEFAULT_UDP_PORT (9999)
|
||||
|
||||
typedef uint8_t guint8;
|
||||
typedef uint16_t guint16;
|
||||
typedef uint32_t guint32;
|
||||
typedef guint8 gboolean;
|
||||
|
||||
#include "packet-mac-lte.h"
|
||||
#include "mac_pcap.h"
|
||||
|
||||
#ifdef OCP_FRAMEWORK
|
||||
#include <enums.h>
|
||||
#else
|
||||
@@ -74,7 +84,7 @@ typedef enum radio_type_e {
|
||||
|
||||
extern trace_mode_t opt_type;
|
||||
extern char in_ip[40];
|
||||
extern char in_path[100];
|
||||
extern char in_path[FILENAME_MAX];
|
||||
|
||||
/**
|
||||
* function def
|
||||
@@ -84,7 +94,7 @@ void trace_pdu(int direction, uint8_t *pdu_buffer, unsigned int pdu_buffer_size,
|
||||
int ueid, int rntiType, int rnti, uint16_t sysFrame, uint8_t subframe,
|
||||
int oob_event, int oob_event_value);
|
||||
|
||||
int init_opt(char *path, char *ip, char *port, radio_type_t radio_type_p);
|
||||
int init_opt(char *path, char *ip);
|
||||
|
||||
void terminate_opt(void);
|
||||
|
||||
|
||||
+266
-156
@@ -1,41 +1,36 @@
|
||||
/* packet-mac-lte.h
|
||||
*
|
||||
* Martin Mathieson
|
||||
* $Id: packet-mac-lte.h 42240 2012-04-25 20:02:12Z pascal $
|
||||
*
|
||||
* Wireshark - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@wireshark.org>
|
||||
* Copyright 1998 Gerald Combs
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0-or-later
|
||||
*
|
||||
* This header file may also be distributed under
|
||||
* the terms of the BSD Licence as follows:
|
||||
*
|
||||
* Copyright (C) 2009 Martin Mathieson. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
/*
|
||||
this is wireshark, commit: commit eda834b6e29c36e05a63a6056afa98390ff79357
|
||||
Date: Wed Aug 22 14:36:20 2018 +0200
|
||||
modified to be used in OpenAir to create the LTE MAC/RLC encapsulated in UDP as per Wireshark feature
|
||||
*/
|
||||
|
||||
#ifndef PACKET_MAC_LTE_H_
|
||||
#define PACKET_MAC_LTE_H_
|
||||
|
||||
#include "ws_symbol_export.h"
|
||||
|
||||
/** data structure to hold time values with nanosecond resolution*/
|
||||
typedef struct {
|
||||
time_t secs;
|
||||
int nsecs;
|
||||
} nstime_t;
|
||||
|
||||
|
||||
/* radioType */
|
||||
#define FDD_RADIO 1
|
||||
@@ -45,145 +40,190 @@
|
||||
#define DIRECTION_UPLINK 0
|
||||
#define DIRECTION_DOWNLINK 1
|
||||
|
||||
/* SR: no need to declare following part: */
|
||||
#if 0
|
||||
/* rntiType */
|
||||
#define NO_RNTI 0
|
||||
#define P_RNTI 1
|
||||
#define RA_RNTI 2
|
||||
#define C_RNTI 3
|
||||
#define SI_RNTI 4
|
||||
#define SPS_RNTI 5
|
||||
#define M_RNTI 6
|
||||
#endif
|
||||
#define WS_NO_RNTI 0
|
||||
#define WS_P_RNTI 1
|
||||
#define WS_RA_RNTI 2
|
||||
#define WS_C_RNTI 3
|
||||
#define WS_SI_RNTI 4
|
||||
#define WS_SPS_RNTI 5
|
||||
#define WS_M_RNTI 6
|
||||
#define WS_SL_BCH_RNTI 7
|
||||
#define WS_SL_RNTI 8
|
||||
#define WS_SC_RNTI 9
|
||||
#define WS_G_RNTI 10
|
||||
|
||||
typedef enum mac_lte_oob_event {
|
||||
ltemac_send_preamble,
|
||||
ltemac_send_sr,
|
||||
ltemac_sr_failure
|
||||
ltemac_send_preamble,
|
||||
ltemac_send_sr,
|
||||
ltemac_sr_failure
|
||||
} mac_lte_oob_event;
|
||||
|
||||
typedef enum mac_lte_dl_retx {
|
||||
dl_retx_no,
|
||||
dl_retx_yes,
|
||||
dl_retx_unknown
|
||||
dl_retx_no,
|
||||
dl_retx_yes,
|
||||
dl_retx_unknown
|
||||
} mac_lte_dl_retx;
|
||||
|
||||
typedef enum mac_lte_crc_status {
|
||||
crc_fail = 0,
|
||||
crc_success = 1,
|
||||
crc_high_code_rate = 2,
|
||||
crc_pdsch_lost = 3,
|
||||
crc_duplicate_nonzero_rv = 4
|
||||
crc_fail = 0,
|
||||
crc_success = 1,
|
||||
crc_high_code_rate = 2,
|
||||
crc_pdsch_lost = 3,
|
||||
crc_duplicate_nonzero_rv = 4,
|
||||
crc_false_dci = 5
|
||||
} mac_lte_crc_status;
|
||||
|
||||
/* N.B. for SCellIndex-r13 extends to 31 */
|
||||
typedef enum mac_lte_carrier_id {
|
||||
carrier_id_primary,
|
||||
carrier_id_secondary_1,
|
||||
carrier_id_secondary_2,
|
||||
carrier_id_secondary_3,
|
||||
carrier_id_secondary_4,
|
||||
carrier_id_secondary_5,
|
||||
carrier_id_secondary_6,
|
||||
carrier_id_secondary_7
|
||||
} mac_lte_carrier_id;
|
||||
|
||||
typedef enum mac_lte_ce_mode {
|
||||
no_ce_mode = 0,
|
||||
ce_mode_a = 1,
|
||||
ce_mode_b = 2
|
||||
} mac_lte_ce_mode;
|
||||
|
||||
typedef enum mac_lte_nb_mode {
|
||||
no_nb_mode = 0,
|
||||
nb_mode = 1
|
||||
} mac_lte_nb_mode;
|
||||
|
||||
/* Context info attached to each LTE MAC frame */
|
||||
typedef struct mac_lte_info {
|
||||
/* Needed for decode */
|
||||
guint8 radioType;
|
||||
guint8 direction;
|
||||
guint8 rntiType;
|
||||
typedef struct mac_lte_info
|
||||
{
|
||||
/* Needed for decode */
|
||||
guint8 radioType;
|
||||
guint8 direction;
|
||||
guint8 rntiType;
|
||||
|
||||
/* Extra info to display */
|
||||
guint16 rnti;
|
||||
guint16 ueid;
|
||||
/* Extra info to display */
|
||||
guint16 rnti;
|
||||
guint16 ueid;
|
||||
|
||||
/* Timing info */
|
||||
guint16 sysframeNumber;
|
||||
guint16 subframeNumber;
|
||||
/* Timing info */
|
||||
guint16 sysframeNumber;
|
||||
guint16 subframeNumber;
|
||||
|
||||
/* Optional field. More interesting for TDD (FDD is always -4 subframeNumber) */
|
||||
gboolean subframeNumberOfGrantPresent;
|
||||
guint16 subframeNumberOfGrant;
|
||||
/* Optional field. More interesting for TDD (FDD is always -4 subframeNumber) */
|
||||
gboolean subframeNumberOfGrantPresent;
|
||||
guint16 subframeNumberOfGrant;
|
||||
|
||||
/* Flag set only if doing PHY-level data test - i.e. there may not be a
|
||||
well-formed MAC PDU so just show as raw data */
|
||||
gboolean isPredefinedData;
|
||||
/* Flag set only if doing PHY-level data test - i.e. there may not be a
|
||||
well-formed MAC PDU so just show as raw data */
|
||||
gboolean isPredefinedData;
|
||||
|
||||
/* Length of DL PDU or UL grant size in bytes */
|
||||
guint16 length;
|
||||
/* Length of DL PDU or UL grant size in bytes */
|
||||
guint16 length;
|
||||
|
||||
/* UL only. 0=newTx, 1=first-retx, etc */
|
||||
guint8 reTxCount;
|
||||
guint8 isPHICHNACK; /* FALSE=PDCCH retx grant, TRUE=PHICH NACK */
|
||||
/* 0=newTx, 1=first-retx, etc */
|
||||
guint8 reTxCount;
|
||||
guint8 isPHICHNACK; /* FALSE=PDCCH retx grant, TRUE=PHICH NACK */
|
||||
|
||||
/* UL only. Indicates if the R10 extendedBSR-Sizes parameter is set */
|
||||
gboolean isExtendedBSRSizes;
|
||||
/* UL only. Indicates if the R10 extendedBSR-Sizes parameter is set */
|
||||
gboolean isExtendedBSRSizes;
|
||||
|
||||
/* DL only. Status of CRC check */
|
||||
mac_lte_crc_status crcStatusValid;
|
||||
/* UL only. Indicates if the R10 simultaneousPUCCH-PUSCH parameter is set for PCell */
|
||||
gboolean isSimultPUCCHPUSCHPCell;
|
||||
|
||||
/* DL only. Is this known to be a retransmission? */
|
||||
mac_lte_dl_retx dl_retx;
|
||||
/* UL only. Indicates if the R10 extendedBSR-Sizes parameter is set for PSCell */
|
||||
gboolean isSimultPUCCHPUSCHPSCell;
|
||||
|
||||
/* More Physical layer info (see direction above for which side of union to use) */
|
||||
union {
|
||||
struct mac_lte_ul_phy_info {
|
||||
guint8 present; /* Remaining UL fields are present and should be displayed */
|
||||
guint8 modulation_type;
|
||||
guint8 tbs_index;
|
||||
guint8 resource_block_length;
|
||||
guint8 resource_block_start;
|
||||
guint8 harq_id;
|
||||
gboolean ndi;
|
||||
} ul_info;
|
||||
struct mac_lte_dl_phy_info {
|
||||
guint8 present; /* Remaining UL fields are present and should be displayed */
|
||||
guint8 dci_format;
|
||||
guint8 resource_allocation_type;
|
||||
guint8 aggregation_level;
|
||||
guint8 mcs_index;
|
||||
guint8 redundancy_version_index;
|
||||
guint8 resource_block_length;
|
||||
mac_lte_crc_status crc_status;
|
||||
guint8 harq_id;
|
||||
gboolean ndi;
|
||||
guint8 transport_block; /* 1..2 */
|
||||
} dl_info;
|
||||
} detailed_phy_info;
|
||||
/* Status of CRC check. For UE it is DL only. For eNodeB it is UL
|
||||
only. For an analyzer, it is present for both DL and UL. */
|
||||
gboolean crcStatusValid;
|
||||
mac_lte_crc_status crcStatus;
|
||||
|
||||
/* Relating to out-of-band events */
|
||||
/* N.B. dissector will only look to these fields if length is 0... */
|
||||
mac_lte_oob_event oob_event;
|
||||
guint8 rapid;
|
||||
guint8 rach_attempt_number;
|
||||
#define MAX_SRs 20
|
||||
guint16 number_of_srs;
|
||||
guint16 oob_ueid[MAX_SRs];
|
||||
guint16 oob_rnti[MAX_SRs];
|
||||
/* Carrier ID */
|
||||
mac_lte_carrier_id carrierId;
|
||||
|
||||
/* DL only. Is this known to be a retransmission? */
|
||||
mac_lte_dl_retx dl_retx;
|
||||
|
||||
/* DL only. CE mode to be used for RAR decoding */
|
||||
mac_lte_ce_mode ceMode;
|
||||
|
||||
/* DL and UL. NB-IoT mode of the UE */
|
||||
mac_lte_nb_mode nbMode;
|
||||
|
||||
/* UL only, for now used for CE mode A RAR decoding */
|
||||
guint8 nUlRb;
|
||||
|
||||
/* More Physical layer info (see direction above for which side of union to use) */
|
||||
union {
|
||||
struct mac_lte_ul_phy_info
|
||||
{
|
||||
guint8 present; /* Remaining UL fields are present and should be displayed */
|
||||
guint8 modulation_type;
|
||||
guint8 tbs_index;
|
||||
guint8 resource_block_length;
|
||||
guint8 resource_block_start;
|
||||
guint8 harq_id;
|
||||
gboolean ndi;
|
||||
} ul_info;
|
||||
struct mac_lte_dl_phy_info
|
||||
{
|
||||
guint8 present; /* Remaining DL fields are present and should be displayed */
|
||||
guint8 dci_format;
|
||||
guint8 resource_allocation_type;
|
||||
guint8 aggregation_level;
|
||||
guint8 mcs_index;
|
||||
guint8 redundancy_version_index;
|
||||
guint8 resource_block_length;
|
||||
guint8 harq_id;
|
||||
gboolean ndi;
|
||||
guint8 transport_block; /* 0..1 */
|
||||
} dl_info;
|
||||
} detailed_phy_info;
|
||||
|
||||
/* Relating to out-of-band events */
|
||||
/* N.B. dissector will only look to these fields if length is 0... */
|
||||
mac_lte_oob_event oob_event;
|
||||
guint8 rapid;
|
||||
guint8 rach_attempt_number;
|
||||
#define MAX_SRs 20
|
||||
guint16 number_of_srs;
|
||||
guint16 oob_ueid[MAX_SRs];
|
||||
guint16 oob_rnti[MAX_SRs];
|
||||
} mac_lte_info;
|
||||
|
||||
/* SR: no need to declare following part: */
|
||||
#if 0
|
||||
|
||||
typedef struct mac_lte_tap_info {
|
||||
/* Info from context */
|
||||
guint16 rnti;
|
||||
guint16 ueid;
|
||||
guint8 rntiType;
|
||||
guint8 isPredefinedData;
|
||||
guint8 crcStatusValid;
|
||||
mac_lte_crc_status crcStatus;
|
||||
guint8 direction;
|
||||
/* Info from context */
|
||||
guint16 rnti;
|
||||
guint16 ueid;
|
||||
guint8 rntiType;
|
||||
guint8 isPredefinedData;
|
||||
gboolean crcStatusValid;
|
||||
mac_lte_crc_status crcStatus;
|
||||
guint8 direction;
|
||||
|
||||
guint8 isPHYRetx;
|
||||
guint16 ueInTTI;
|
||||
guint8 isPHYRetx;
|
||||
guint16 ueInTTI;
|
||||
|
||||
nstime_t time;
|
||||
nstime_t mac_lte_time;
|
||||
|
||||
/* Number of bytes (which part is used depends upon context settings) */
|
||||
guint32 single_number_of_bytes;
|
||||
guint32 bytes_for_lcid[11];
|
||||
guint32 sdus_for_lcid[11];
|
||||
guint8 number_of_rars;
|
||||
/* Number of bytes (which part is used depends upon context settings) */
|
||||
guint32 single_number_of_bytes;
|
||||
guint32 bytes_for_lcid[11];
|
||||
guint32 sdus_for_lcid[11];
|
||||
guint8 number_of_rars;
|
||||
guint8 number_of_paging_ids;
|
||||
|
||||
/* Number of padding bytes includes padding subheaders and trailing padding */
|
||||
guint16 padding_bytes;
|
||||
guint16 raw_length;
|
||||
/* Number of padding bytes includes padding subheaders and trailing padding */
|
||||
guint16 padding_bytes;
|
||||
guint16 raw_length;
|
||||
} mac_lte_tap_info;
|
||||
#endif
|
||||
|
||||
/* Accessor function to check if a frame was considered to be ReTx */
|
||||
//int is_mac_lte_frame_retx(packet_info *pinfo, guint8 direction);
|
||||
|
||||
|
||||
/*****************************************************************/
|
||||
/* UDP framing format */
|
||||
@@ -193,12 +233,10 @@ typedef struct mac_lte_tap_info {
|
||||
/* and implemented by this dissector, using the definitions */
|
||||
/* below. A link to an example program showing you how to encode */
|
||||
/* these headers and send LTE MAC PDUs on a UDP socket is */
|
||||
/* provided at http://wiki.wireshark.org/MAC-LTE */
|
||||
/* provided at https://wiki.wireshark.org/MAC-LTE */
|
||||
/* */
|
||||
/* A heuristic dissecter (enabled by a preference) will */
|
||||
/* recognise a signature at the beginning of these frames . */
|
||||
/* Until someone is using this format, suggestions for changes */
|
||||
/* are welcome. */
|
||||
/* A heuristic dissector (enabled by a preference) will */
|
||||
/* recognise a signature at the beginning of these frames. */
|
||||
/*****************************************************************/
|
||||
|
||||
|
||||
@@ -217,7 +255,7 @@ typedef struct mac_lte_tap_info {
|
||||
to show you display/filter/plot/add-custom-columns on these fields, so should
|
||||
be added if available.
|
||||
The format is to have the tag, followed by the value (there is no length field,
|
||||
its implicit from the tag) */
|
||||
it's implicit from the tag) */
|
||||
|
||||
#define MAC_LTE_RNTI_TAG 0x02
|
||||
/* 2 bytes, network order */
|
||||
@@ -225,8 +263,8 @@ typedef struct mac_lte_tap_info {
|
||||
#define MAC_LTE_UEID_TAG 0x03
|
||||
/* 2 bytes, network order */
|
||||
|
||||
#define MAC_LTE_SUBFRAME_TAG 0x04
|
||||
/* 2 bytes, network order */
|
||||
#define MAC_LTE_FRAME_SUBFRAME_TAG 0x04
|
||||
/* 2 bytes, network order, SFN is stored in 12 MSB and SF in 4 LSB */
|
||||
|
||||
#define MAC_LTE_PREDEFINED_DATA_TAG 0x05
|
||||
/* 1 byte */
|
||||
@@ -240,29 +278,101 @@ typedef struct mac_lte_tap_info {
|
||||
#define MAC_LTE_EXT_BSR_SIZES_TAG 0x08
|
||||
/* 0 byte */
|
||||
|
||||
#define MAC_LTE_OOB_EVENT_TAG 0x09
|
||||
/* 3 byte */
|
||||
#define MAC_LTE_SEND_PREAMBLE_TAG 0x09
|
||||
/* 2 bytes, RAPID value (1 byte) followed by RACH attempt number (1 byte) */
|
||||
|
||||
#define MAC_LTE_CARRIER_ID_TAG 0x0A
|
||||
/* 1 byte */
|
||||
|
||||
#define MAC_LTE_PHY_TAG 0x0B
|
||||
/* variable length, length (1 byte) then depending on direction
|
||||
in UL: modulation type (1 byte), TBS index (1 byte), RB length (1 byte),
|
||||
RB start (1 byte), HARQ id (1 byte), NDI (1 byte)
|
||||
in DL: DCI format (1 byte), resource allocation type (1 byte), aggregation level (1 byte),
|
||||
MCS index (1 byte), redundancy version (1 byte), resource block length (1 byte),
|
||||
HARQ id (1 byte), NDI (1 byte), TB (1 byte), DL reTx (1 byte) */
|
||||
|
||||
#define MAC_LTE_SIMULT_PUCCH_PUSCH_PCELL_TAG 0x0C
|
||||
/* 0 byte */
|
||||
|
||||
#define MAC_LTE_SIMULT_PUCCH_PUSCH_PSCELL_TAG 0x0D
|
||||
/* 0 byte */
|
||||
|
||||
#define MAC_LTE_CE_MODE_TAG 0x0E
|
||||
/* 1 byte containing mac_lte_ce_mode enum value */
|
||||
|
||||
#define MAC_LTE_NB_MODE_TAG 0x0F
|
||||
/* 1 byte containing mac_lte_nb_mode enum value */
|
||||
|
||||
#define MAC_LTE_N_UL_RB_TAG 0x10
|
||||
/* 1 byte containing the number of UL resource blocks: 6, 15, 25, 50, 75 or 100 */
|
||||
|
||||
#define MAC_LTE_SR_TAG 0x11
|
||||
/* 2 bytes for the number of items, followed by that number of ueid, rnti (2 bytes each) */
|
||||
|
||||
|
||||
/* MAC PDU. Following this tag comes the actual MAC PDU (there is no length, the PDU
|
||||
continues until the end of the frame) */
|
||||
#define MAC_LTE_PAYLOAD_TAG 0x01
|
||||
|
||||
|
||||
/* Set details of an LCID -> drb channel mapping. To be called from
|
||||
configuration protocol (e.g. RRC) */
|
||||
/*void set_mac_lte_channel_mapping(guint16 ueid, guint8 lcid,
|
||||
guint8 srbid, guint8 drbid,
|
||||
guint8 rlcMode, guint8 um_sn_length,
|
||||
guint8 ul_priority);
|
||||
*/
|
||||
/* Functions to be called from outside this module (e.g. in a plugin, where mac_lte_info
|
||||
isn't available) to get/set per-packet data */
|
||||
//mac_lte_info *get_mac_lte_proto_data(packet_info *pinfo);
|
||||
//void set_mac_lte_proto_data(packet_info *pinfo, mac_lte_info *p_mac_lte_info);
|
||||
/* Type to store parameters for configuring LCID->RLC channel settings for DRB */
|
||||
/* Some are optional, and may not be seen (e.g. on reestablishment) */
|
||||
typedef struct drb_mapping_t
|
||||
{
|
||||
guint16 ueid; /* Mandatory */
|
||||
guint8 drbid; /* Mandatory */
|
||||
gboolean lcid_present;
|
||||
guint8 lcid; /* Part of LogicalChannelConfig - optional */
|
||||
gboolean rlcMode_present;
|
||||
guint8 rlcMode; /* Part of RLC config - optional */
|
||||
gboolean rlc_ul_ext_li_field; /* Part of RLC config - optional */
|
||||
gboolean rlc_dl_ext_li_field; /* Part of RLC config - optional */
|
||||
gboolean rlc_ul_ext_am_sn; /* Part of RLC config - optional */
|
||||
gboolean rlc_dl_ext_am_sn; /* Part of RLC config - optional */
|
||||
gboolean um_sn_length_present;
|
||||
guint8 um_sn_length; /* Part of RLC config - optional */
|
||||
gboolean ul_priority_present;
|
||||
guint8 ul_priority; /* Part of LogicalChannelConfig - optional */
|
||||
gboolean pdcp_sn_size_present;
|
||||
guint8 pdcp_sn_size; /* Part of pdcp-Config - optional */
|
||||
} drb_mapping_t;
|
||||
|
||||
/* Function to attempt to populate p_mac_lte_info using framing definition above */
|
||||
/*gboolean dissect_mac_lte_context_fields(struct mac_lte_info *p_mac_lte_info, tvbuff_t *tvb,
|
||||
gint *p_offset);
|
||||
*/
|
||||
|
||||
#endif /* PACKET_MAC_LTE_H_ */
|
||||
|
||||
/* Dedicated DRX config. Used to verify that a sensible config is given.
|
||||
Also, beginning to configure MAC with this config and (optionally) show
|
||||
DRX config and state (cycles/timers) attached to each UL/DL PDU! */
|
||||
typedef struct drx_config_t {
|
||||
gboolean configured;
|
||||
guint32 frameNum;
|
||||
guint32 previousFrameNum;
|
||||
|
||||
guint32 onDurationTimer;
|
||||
guint32 inactivityTimer;
|
||||
guint32 retransmissionTimer;
|
||||
guint32 longCycle;
|
||||
guint32 cycleOffset;
|
||||
/* Optional Short cycle */
|
||||
gboolean shortCycleConfigured;
|
||||
guint32 shortCycle;
|
||||
guint32 shortCycleTimer;
|
||||
} drx_config_t;
|
||||
|
||||
/* RRC can indicate whether simultaneous PUCCH/PUSCH is used */
|
||||
typedef enum {
|
||||
SIMULT_PUCCH_PUSCH_PCELL = 0,
|
||||
SIMULT_PUCCH_PUSCH_PSCELL
|
||||
} simult_pucch_pusch_cell_type;
|
||||
/*
|
||||
* Editor modelines - http://www.wireshark.org/tools/modelines.html
|
||||
*
|
||||
* Local variables:
|
||||
* c-basic-offset: 4
|
||||
* tab-width: 8
|
||||
* indent-tabs-mode: nil
|
||||
* End:
|
||||
*
|
||||
* vi: set shiftwidth=4 tabstop=8 expandtab:
|
||||
* :indentSize=4:tabSize=8:noTabs=true:
|
||||
*/
|
||||
|
||||
+35
-55
@@ -95,26 +95,22 @@ what about the implementation
|
||||
|
||||
int opt_enabled=0;
|
||||
|
||||
#define PACKET_MAC_LTE_DEFAULT_UDP_PORT (9999)
|
||||
|
||||
typedef uint8_t guint8;
|
||||
typedef uint16_t guint16;
|
||||
typedef uint32_t guint32;
|
||||
typedef guint8 gboolean;
|
||||
|
||||
#include "packet-mac-lte.h"
|
||||
#include "mac_pcap.h"
|
||||
|
||||
//static unsigned char g_PDUBuffer[1600];
|
||||
//static unsigned int g_PDUOffset;
|
||||
|
||||
|
||||
char in_ip[40];
|
||||
char in_path[100];
|
||||
char in_path[FILENAME_MAX];
|
||||
FILE *file_fd = NULL;
|
||||
pcap_hdr_t file_header = {
|
||||
0xa1b2c3d4, /* magic number */
|
||||
2, 4, /* version number is 2.4 */
|
||||
0, /* timezone */
|
||||
0, /* sigfigs - apparently all tools do this */
|
||||
65535, /* snaplen - this should be long enough */
|
||||
MAC_LTE_DLT /* Data Link Type (DLT). Set as unused value 147 for now */
|
||||
};
|
||||
|
||||
trace_mode_t opt_type = OPT_NONE;
|
||||
static radio_type_t radio_type;
|
||||
static unsigned int subframesSinceCaptureStart;
|
||||
|
||||
static int g_socksd = -1;/* UDP socket used for sending frames */
|
||||
@@ -237,22 +233,13 @@ static void SendFrame(guint8 radioType, guint8 direction, guint8 rntiType,
|
||||
guint8 oob_event, guint8 oob_event_value,
|
||||
uint8_t *pdu_buffer, unsigned int pdu_buffer_size)
|
||||
{
|
||||
#ifdef JUMBO_FRAME
|
||||
static unsigned char frameBuffer[9000];
|
||||
#else
|
||||
static unsigned char frameBuffer[1600];
|
||||
#endif
|
||||
static unsigned int frameOffset;
|
||||
unsigned char frameBuffer[9000];
|
||||
unsigned int frameOffset;
|
||||
|
||||
ssize_t bytesSent;
|
||||
frameOffset = 0;
|
||||
uint16_t tmp16;
|
||||
|
||||
/********************************************************************/
|
||||
/* Fixed start to each frame (allowing heuristic dissector to work) */
|
||||
/* Not NULL terminated */
|
||||
memset(frameBuffer+frameOffset, 0, sizeof(mac_lte_info)+pdu_buffer_size + 8);
|
||||
|
||||
memcpy(frameBuffer+frameOffset, MAC_LTE_START_STRING,
|
||||
strlen(MAC_LTE_START_STRING));
|
||||
frameOffset += strlen(MAC_LTE_START_STRING);
|
||||
@@ -279,7 +266,7 @@ static void SendFrame(guint8 radioType, guint8 direction, guint8 rntiType,
|
||||
frameOffset += 2;
|
||||
|
||||
/* Subframe number */
|
||||
frameBuffer[frameOffset++] = MAC_LTE_SUBFRAME_TAG;
|
||||
frameBuffer[frameOffset++] = MAC_LTE_FRAME_SUBFRAME_TAG;
|
||||
tmp16 = htons(sfnSf); // frame counter : this will give an expert info as wireshark expects SF and not F
|
||||
memcpy(frameBuffer+frameOffset, &tmp16, 2);
|
||||
frameOffset += 2;
|
||||
@@ -313,26 +300,29 @@ static void SendFrame(guint8 radioType, guint8 direction, guint8 rntiType,
|
||||
if (pdu_buffer_size==0) {
|
||||
switch (oob_event) {
|
||||
case ltemac_send_preamble :
|
||||
LOG_D(OPT,"oob ltemac_send_preamble event %02x."
|
||||
LOG_D(OPT,"ltemac_send_preamble event %02x."
|
||||
//"%02x."
|
||||
"%02x.%02x\n",
|
||||
MAC_LTE_OOB_EVENT_TAG,
|
||||
MAC_LTE_SEND_PREAMBLE_TAG,
|
||||
//ltemac_send_preamble,
|
||||
rnti,
|
||||
oob_event_value);
|
||||
//frameBuffer[frameOffset++]=0;
|
||||
//frameBuffer[frameOffset++]=0;
|
||||
//frameBuffer[frameOffset++]=0;
|
||||
frameBuffer[frameOffset++] = MAC_LTE_OOB_EVENT_TAG;
|
||||
frameBuffer[frameOffset++] = MAC_LTE_SEND_PREAMBLE_TAG;
|
||||
//frameBuffer[frameOffset++]=ltemac_send_preamble;
|
||||
frameBuffer[frameOffset++]=rnti; // is the preamble
|
||||
frameBuffer[frameOffset++]=oob_event_value;
|
||||
break;
|
||||
|
||||
case ltemac_send_sr:
|
||||
frameBuffer[frameOffset++]=ltemac_send_sr;
|
||||
frameBuffer[frameOffset++]=MAC_LTE_SR_TAG ;
|
||||
frameOffset+=2;
|
||||
frameBuffer[frameOffset++]=rnti;
|
||||
frameOffset++;
|
||||
frameBuffer[frameOffset++]=oob_event_value;
|
||||
frameOffset++;
|
||||
break;
|
||||
|
||||
case ltemac_sr_failure:
|
||||
@@ -394,7 +384,7 @@ static int MAC_LTE_PCAP_WritePDU(MAC_Context_Info_t *context,
|
||||
offset += 2;
|
||||
|
||||
/* Subframe number */
|
||||
context_header[offset++] = MAC_LTE_SUBFRAME_TAG;
|
||||
context_header[offset++] = MAC_LTE_FRAME_SUBFRAME_TAG;
|
||||
tmp16 = htons(context->subFrameNumber);
|
||||
memcpy(context_header+offset, &tmp16, 2);
|
||||
offset += 2;
|
||||
@@ -410,18 +400,8 @@ static int MAC_LTE_PCAP_WritePDU(MAC_Context_Info_t *context,
|
||||
/* PCAP Header */
|
||||
/* TODO: Timestamp might want to be relative to a more sensible
|
||||
base time... */
|
||||
#if defined(RTAI)
|
||||
{
|
||||
unsigned long long int current_ns;
|
||||
|
||||
current_ns = rt_get_time_ns();
|
||||
packet_header.ts_sec = current_ns / 1000000000UL;
|
||||
packet_header.ts_usec = current_ns % 1000;
|
||||
}
|
||||
#else
|
||||
packet_header.ts_sec = context->subframesSinceCaptureStart / 1000;
|
||||
packet_header.ts_usec = (context->subframesSinceCaptureStart % 1000) * 1000;
|
||||
#endif
|
||||
packet_header.incl_len = offset + length;
|
||||
packet_header.orig_len = offset + length;
|
||||
|
||||
@@ -433,21 +413,27 @@ static int MAC_LTE_PCAP_WritePDU(MAC_Context_Info_t *context,
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
#include <common/ran_context.h>
|
||||
extern RAN_CONTEXT_t RC;
|
||||
#include <openair1/PHY/phy_extern_ue.h>
|
||||
/* Remote serveraddress (where Wireshark is running) */
|
||||
void trace_pdu(int direction, uint8_t *pdu_buffer, unsigned int pdu_buffer_size,
|
||||
int ueid, int rntiType, int rnti, uint16_t sysFrameNumber, uint8_t subFrameNumber, int oob_event,
|
||||
int oob_event_value)
|
||||
{
|
||||
MAC_Context_Info_t pdu_context;
|
||||
|
||||
int radioType=FDD_RADIO;
|
||||
if (RC.eNB[0][0]!=NULL)
|
||||
radioType=RC.eNB[0][0]->frame_parms.frame_type== FDD ? FDD_RADIO:TDD_RADIO;
|
||||
if (PHY_vars_UE_g[0][0] != NULL)
|
||||
radioType=PHY_vars_UE_g[0][0]->frame_parms.frame_type== FDD ? FDD_RADIO:TDD_RADIO;
|
||||
switch (opt_type) {
|
||||
case OPT_WIRESHARK :
|
||||
if (g_socksd == -1) {
|
||||
return;
|
||||
}
|
||||
|
||||
SendFrame(radio_type,
|
||||
SendFrame( radioType,
|
||||
(direction == DIRECTION_DOWNLINK) ? DIRECTION_DOWNLINK : DIRECTION_UPLINK,
|
||||
rntiType, rnti, ueid, (sysFrameNumber<<4) + subFrameNumber,
|
||||
1, 0, 1, //guint8 isPredefinedData, guint8 retx, guint8 crcStatus
|
||||
@@ -460,7 +446,7 @@ void trace_pdu(int direction, uint8_t *pdu_buffer, unsigned int pdu_buffer_size,
|
||||
return;
|
||||
}
|
||||
|
||||
pdu_context.radioType = radio_type;
|
||||
pdu_context.radioType = radioType;
|
||||
pdu_context.direction = (direction == DIRECTION_DOWNLINK) ? DIRECTION_DOWNLINK
|
||||
: DIRECTION_UPLINK;
|
||||
pdu_context.rntiType = rntiType;
|
||||
@@ -480,7 +466,7 @@ void trace_pdu(int direction, uint8_t *pdu_buffer, unsigned int pdu_buffer_size,
|
||||
}
|
||||
}
|
||||
/*---------------------------------------------------*/
|
||||
int init_opt(char *path, char *ip, char *port, radio_type_t radio_type_p)
|
||||
int init_opt(char *path, char *ip)
|
||||
{
|
||||
uint16_t in_port;
|
||||
subframesSinceCaptureStart = 0;
|
||||
@@ -499,13 +485,7 @@ int init_opt(char *path, char *ip, char *port, radio_type_t radio_type_p)
|
||||
strcpy( in_ip, "127.0.0.1" );
|
||||
}
|
||||
|
||||
if (port != NULL) {
|
||||
in_port = atoi(port);
|
||||
} else {
|
||||
in_port = PACKET_MAC_LTE_DEFAULT_UDP_PORT;
|
||||
}
|
||||
|
||||
radio_type = radio_type_p;
|
||||
in_port = PACKET_MAC_LTE_DEFAULT_UDP_PORT;
|
||||
|
||||
// trace_mode
|
||||
switch (opt_type) {
|
||||
@@ -553,11 +533,11 @@ int init_opt(char *path, char *ip, char *port, radio_type_t radio_type_p)
|
||||
}
|
||||
|
||||
if ( opt_type == OPT_WIRESHARK )
|
||||
LOG_G(OPT,"mode Wireshark: ip %s port %d\n", in_ip, in_port);
|
||||
LOG_E(OPT,"mode Wireshark: ip %s port %d\n", in_ip, in_port);
|
||||
else if (opt_type == OPT_PCAP)
|
||||
LOG_G(OPT,"mode PCAB : path is %s \n",in_path);
|
||||
LOG_E(OPT,"mode PCAB : path is %s \n",in_path);
|
||||
else
|
||||
LOG_G(OPT,"Unsupported or unknown mode %d \n", opt_type);
|
||||
LOG_E(OPT,"Unsupported or unknown mode %d \n", opt_type);
|
||||
|
||||
// mac_info = (mac_info*)malloc16(sizeof(mac_lte_info));
|
||||
// memset(mac_info, 0, sizeof(mac_lte_info)+pdu_buffer_size + 8);
|
||||
|
||||
@@ -0,0 +1,138 @@
|
||||
/* ws_compiler_tests.h
|
||||
*
|
||||
* Wireshark - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@wireshark.org>
|
||||
* Copyright 1998 Gerald Combs
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0-or-later
|
||||
*/
|
||||
|
||||
#ifndef __WS_COMPILER_TESTS_H__
|
||||
#define __WS_COMPILER_TESTS_H__
|
||||
|
||||
/*
|
||||
* This was introduced by Clang:
|
||||
*
|
||||
* http://clang.llvm.org/docs/LanguageExtensions.html#has-attribute
|
||||
*
|
||||
* in some version (which version?); it has been picked up by GCC 5.0.
|
||||
*/
|
||||
#ifndef __has_attribute
|
||||
/*
|
||||
* It's a macro, so you can check whether it's defined to check
|
||||
* whether it's supported.
|
||||
*
|
||||
* If it's not, define it to always return 0, so that we move on to
|
||||
* the fallback checks.
|
||||
*/
|
||||
#define __has_attribute(x) 0
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Note that the C90 spec's "6.8.1 Conditional inclusion" and the
|
||||
* C99 spec's and C11 spec's "6.10.1 Conditional inclusion" say:
|
||||
*
|
||||
* Prior to evaluation, macro invocations in the list of preprocessing
|
||||
* tokens that will become the controlling constant expression are
|
||||
* replaced (except for those macro names modified by the defined unary
|
||||
* operator), just as in normal text. If the token "defined" is
|
||||
* generated as a result of this replacement process or use of the
|
||||
* "defined" unary operator does not match one of the two specified
|
||||
* forms prior to macro replacement, the behavior is undefined.
|
||||
*
|
||||
* so you shouldn't use defined() in a #define that's used in #if or
|
||||
* #elif. Some versions of Clang, for example, will warn about this.
|
||||
*
|
||||
* Instead, we check whether the pre-defined macros for particular
|
||||
* compilers are defined and, if not, define the "is this version XXX
|
||||
* or a later version of this compiler" macros as 0.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Check whether this is GCC major.minor or a later release, or some
|
||||
* compiler that claims to be "just like GCC" of that version or a
|
||||
* later release.
|
||||
*/
|
||||
|
||||
#if !defined(__GNUC__)
|
||||
#define WS_IS_AT_LEAST_GNUC_VERSION(major, minor) 0
|
||||
#else
|
||||
#define WS_IS_AT_LEAST_GNUC_VERSION(major, minor) \
|
||||
(__GNUC__ > (major) || \
|
||||
(__GNUC__ == (major) && __GNUC_MINOR__ >= (minor)))
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Check whether this is Clang major.minor or a later release.
|
||||
*/
|
||||
|
||||
#if !defined(__clang__)
|
||||
#define WS_IS_AT_LEAST_CLANG_VERSION(major, minor) 0
|
||||
#else
|
||||
#define WS_IS_AT_LEAST_CLANG_VERSION(major, minor) \
|
||||
(__clang_major__ > (major) || \
|
||||
(__clang_major__ == (major) && __clang_minor__ >= (minor)))
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Check whether this is Sun C/SunPro C/Oracle Studio major.minor
|
||||
* or a later release.
|
||||
*
|
||||
* The version number in __SUNPRO_C is encoded in hex BCD, with the
|
||||
* uppermost hex digit being the major version number, the next
|
||||
* one or two hex digits being the minor version number, and
|
||||
* the last digit being the patch version.
|
||||
*
|
||||
* It represents the *compiler* version, not the product version;
|
||||
* see
|
||||
*
|
||||
* https://sourceforge.net/p/predef/wiki/Compilers/
|
||||
*
|
||||
* for a partial mapping, which we assume continues for later
|
||||
* 12.x product releases.
|
||||
*/
|
||||
|
||||
#if !defined(__SUNPRO_C)
|
||||
#define WS_IS_AT_LEAST_SUNC_VERSION(major, minor) 0
|
||||
#else
|
||||
#define WS_SUNPRO_VERSION_TO_BCD(major, minor) \
|
||||
(((minor) >= 10) ? \
|
||||
(((major) << 12) | (((minor)/10) << 8) | (((minor)%10) << 4)) : \
|
||||
(((major) << 8) | ((minor) << 4)))
|
||||
#define WS_IS_AT_LEAST_SUNC_VERSION(major, minor) \
|
||||
(__SUNPRO_C >= WS_SUNPRO_VERSION_TO_BCD((major), (minor)))
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Check whether this is IBM XL C major.minor or a later release.
|
||||
*
|
||||
* The version number in __xlC__ has the major version in the
|
||||
* upper 8 bits and the minor version in the lower 8 bits.
|
||||
*/
|
||||
|
||||
#if !defined(__xlC__)
|
||||
#define WS_IS_AT_LEAST_XL_C_VERSION(major, minor) 0
|
||||
#else
|
||||
#define WS_IS_AT_LEAST_XL_C_VERSION(major, minor) \
|
||||
(__xlC__ >= (((major) << 8) | (minor)))
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Check whether this is HP aC++/HP C major.minor or a later release.
|
||||
*
|
||||
* The version number in __HP_aCC is encoded in zero-padded decimal BCD,
|
||||
* with the "A." stripped off, the uppermost two decimal digits being
|
||||
* the major version number, the next two decimal digits being the minor
|
||||
* version number, and the last two decimal digits being the patch version.
|
||||
* (Strip off the A., remove the . between the major and minor version
|
||||
* number, and add two digits of patch.)
|
||||
*/
|
||||
|
||||
#if !defined(__HP_aCC)
|
||||
#define WS_IS_AT_LEAST_HP_C_VERSION(major, minor) 0
|
||||
#else
|
||||
#define WS_IS_AT_LEAST_HP_C_VERSION(major, minor) \
|
||||
(__HP_aCC >= ((major)*10000 + (minor)*100))
|
||||
#endif
|
||||
|
||||
#endif /* __WS_COMPILER_TESTS_H__ */
|
||||
@@ -0,0 +1,202 @@
|
||||
/*
|
||||
* Cross platform defines for exporting symbols from shared libraries
|
||||
*
|
||||
* Wireshark - Network traffic analyzer
|
||||
* By Balint Reczey <balint@balintreczey.hu>
|
||||
* Copyright 2013 Balint Reczey
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0-or-later
|
||||
*/
|
||||
|
||||
#include "ws_compiler_tests.h"
|
||||
|
||||
/** Reset symbol export behavior.
|
||||
* If you {un}define WS_BUILD_DLL on the fly you'll have to define this
|
||||
* as well.
|
||||
*/
|
||||
#ifdef RESET_SYMBOL_EXPORT
|
||||
|
||||
#ifdef SYMBOL_EXPORT_H
|
||||
#undef SYMBOL_EXPORT_H
|
||||
#endif
|
||||
|
||||
#ifdef WS_DLL_PUBLIC
|
||||
#undef WS_DLL_PUBLIC
|
||||
#endif
|
||||
|
||||
#ifdef WS_DLL_PUBLIC_DEF
|
||||
#undef WS_DLL_PUBLIC_DEF
|
||||
#endif
|
||||
|
||||
#ifdef WS_DLL_LOCAL
|
||||
#undef WS_DLL_LOCAL
|
||||
#endif
|
||||
|
||||
#endif /* RESET_SYMBOL_EXPORT */
|
||||
|
||||
#ifndef SYMBOL_EXPORT_H
|
||||
#define SYMBOL_EXPORT_H
|
||||
|
||||
/*
|
||||
* NOTE: G_HAVE_GNUC_VISIBILITY is defined only if all of
|
||||
*
|
||||
* __attribute__ ((visibility ("hidden")))
|
||||
*
|
||||
* __attribute__ ((visibility ("internal")))
|
||||
*
|
||||
* __attribute__ ((visibility ("protected")))
|
||||
*
|
||||
* __attribute__ ((visibility ("default")))
|
||||
*
|
||||
* are supported, and at least some versions of GCC from Apple support
|
||||
* "default" and "hidden" but not "internal" or "protected", so it
|
||||
* shouldn't be used to determine whether "hidden" or "default" is
|
||||
* supported.
|
||||
*
|
||||
* This also means that we shouldn't use G_GNUC_INTERNAL instead of
|
||||
* WS_DLL_LOCAL, as GLib uses G_HAVE_GNUC_VISIBILITY to determine
|
||||
* whether to use __attribute__ ((visibility ("hidden"))) for
|
||||
* G_GNUC_INTERNAL, and that will not use it even with compilers
|
||||
* that support it.
|
||||
*/
|
||||
|
||||
/* Originally copied from GCC Wiki at http://gcc.gnu.org/wiki/Visibility */
|
||||
#if defined _WIN32 || defined __CYGWIN__
|
||||
/* Compiling for Windows, so we use the Windows DLL declarations. */
|
||||
#ifdef WS_BUILD_DLL
|
||||
/*
|
||||
* Building a DLL; for all definitions, we want dllexport, and
|
||||
* (presumably so source from DLL and source from a program using the
|
||||
* DLL can both include a header that declares APIs and exported data
|
||||
* for the DLL), for declarations, either dllexport or dllimport will
|
||||
* work (they mean the same thing for a declaration when building a DLL).
|
||||
*/
|
||||
#ifdef __GNUC__
|
||||
/* GCC */
|
||||
#define WS_DLL_PUBLIC_DEF __attribute__ ((dllexport))
|
||||
#else /* ! __GNUC__ */
|
||||
/*
|
||||
* Presumably MSVC.
|
||||
* Note: actually gcc seems to also support this syntax.
|
||||
*/
|
||||
#define WS_DLL_PUBLIC_DEF __declspec(dllexport)
|
||||
#endif /* __GNUC__ */
|
||||
#else /* WS_BUILD_DLL */
|
||||
/*
|
||||
* Building a program; we should only see declarations, not definitions,
|
||||
* with WS_DLL_PUBLIC, and they all represent APIs or data imported
|
||||
* from a DLL, so use dllimport.
|
||||
*
|
||||
* For functions, export shouldn't be necessary; for data, it might
|
||||
* be necessary, e.g. if what's declared is an array whose size is
|
||||
* not given in the declaration.
|
||||
*/
|
||||
#ifdef __GNUC__
|
||||
/* GCC */
|
||||
#define WS_DLL_PUBLIC_DEF __attribute__ ((dllimport))
|
||||
#elif ! (defined ENABLE_STATIC) /* ! __GNUC__ */
|
||||
/*
|
||||
* Presumably MSVC, and we're not building all-static.
|
||||
* Note: actually gcc seems to also support this syntax.
|
||||
*/
|
||||
#define WS_DLL_PUBLIC_DEF __declspec(dllimport)
|
||||
#else /* ! __GNUC__ && ENABLE_STATIC */
|
||||
/*
|
||||
* Presumably MSVC, and we're building all-static, so we're
|
||||
* not building any DLLs.
|
||||
*/
|
||||
#define WS_DLL_PUBLIC_DEF
|
||||
#endif /* __GNUC__ */
|
||||
#endif /* WS_BUILD_DLL */
|
||||
|
||||
/*
|
||||
* Symbols in a DLL are *not* exported unless they're specifically
|
||||
* flagged as exported, so, for a non-static but non-exported
|
||||
* symbol, we don't have to do anything.
|
||||
*/
|
||||
#define WS_DLL_LOCAL
|
||||
#else /* defined _WIN32 || defined __CYGWIN__ */
|
||||
/*
|
||||
* Compiling for UN*X, where the dllimport and dllexport stuff
|
||||
* is neither necessary nor supported; just specify the
|
||||
* visibility if we have a compiler that supports doing so.
|
||||
*/
|
||||
#if WS_IS_AT_LEAST_GNUC_VERSION(3,4) \
|
||||
|| WS_IS_AT_LEAST_XL_C_VERSION(12,0)
|
||||
/*
|
||||
* GCC 3.4 or later, or some compiler asserting compatibility with
|
||||
* GCC 3.4 or later, or XL C 13.0 or later, so we have
|
||||
* __attribute__((visibility()).
|
||||
*/
|
||||
|
||||
/*
|
||||
* Symbols exported from libraries.
|
||||
*/
|
||||
#define WS_DLL_PUBLIC_DEF __attribute__ ((visibility ("default")))
|
||||
|
||||
/*
|
||||
* Non-static symbols *not* exported from libraries.
|
||||
*/
|
||||
#define WS_DLL_LOCAL __attribute__ ((visibility ("hidden")))
|
||||
#elif WS_IS_AT_LEAST_SUNC_VERSION(5,5)
|
||||
/*
|
||||
* Sun C 5.5 or later, so we have __global and __hidden.
|
||||
* (Sun C 5.9 and later also have __attribute__((visibility()),
|
||||
* but there's no reason to prefer it with Sun C.)
|
||||
*/
|
||||
|
||||
/*
|
||||
* Symbols exported from libraries.
|
||||
*/
|
||||
#define WS_DLL_PUBLIC_DEF __global
|
||||
|
||||
/*
|
||||
* Non-static symbols *not* exported from libraries.
|
||||
*/
|
||||
#define WS_DLL_LOCAL __hidden
|
||||
#else
|
||||
/*
|
||||
* We have neither a way to make stuff not explicitly marked as
|
||||
* visible invisible outside a library nor a way to make stuff
|
||||
* explicitly marked as local invisible outside the library.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Symbols exported from libraries.
|
||||
*/
|
||||
#define WS_DLL_PUBLIC_DEF
|
||||
|
||||
/*
|
||||
* Non-static symbols *not* exported from libraries.
|
||||
*/
|
||||
#define WS_DLL_LOCAL
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
* You *must* use this for exported data *declarations*; if you use
|
||||
* WS_DLL_PUBLIC_DEF, some compilers, such as MSVC++, will complain
|
||||
* about array definitions with no size.
|
||||
*
|
||||
* You must *not* use this for exported data *definitions*, as that
|
||||
* will, for some compilers, cause warnings about items being initialized
|
||||
* and declared extern.
|
||||
*
|
||||
* Either can be used for exported *function* declarations and definitions.
|
||||
*/
|
||||
#define WS_DLL_PUBLIC WS_DLL_PUBLIC_DEF extern
|
||||
|
||||
#endif /* SYMBOL_EXPORT_H */
|
||||
|
||||
/*
|
||||
* Editor modelines - http://www.wireshark.org/tools/modelines.html
|
||||
*
|
||||
* Local Variables:
|
||||
* c-basic-offset: 2
|
||||
* tab-width: 8
|
||||
* indent-tabs-mode: nil
|
||||
* End:
|
||||
*
|
||||
* vi: set shiftwidth=2 tabstop=8 expandtab:
|
||||
* :indentSize=2:tabSize=8:noTabs=true:
|
||||
*/
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
#include "osa_defs.h"
|
||||
#include "osa_internal.h"
|
||||
#include "UTIL/LOG/log.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
|
||||
static inline
|
||||
void kdf(const uint8_t *s, const uint32_t s_length, const uint8_t *key,
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
#include <nettle/aes.h>
|
||||
#include <nettle/ctr.h>
|
||||
|
||||
#include "UTIL/LOG/log.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
|
||||
#include "assertions.h"
|
||||
#include "osa_defs.h"
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
#include <openssl/cmac.h>
|
||||
#include <openssl/evp.h>
|
||||
|
||||
#include "UTIL/LOG/log.h"
|
||||
#include "common/utils//LOG/log.h"
|
||||
|
||||
#include "osa_defs.h"
|
||||
#include "osa_snow3g.h"
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
#define LOG_T(c, x...) printf(x)
|
||||
typedef enum {MIN_NUM_COMPS=0, PHY, OMG, OCM, OTG, MAX_NUM_COMPS} comp_t;
|
||||
#else
|
||||
#include "../UTIL/LOG/log.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
+135
-135
@@ -33,7 +33,7 @@
|
||||
#ifndef __OTG_DEFS_H__
|
||||
# define __OTG_DEFS_H__
|
||||
|
||||
/* \brief To define the NUMBER_OF_eNB_MAX and NUMBER_OF_UE_MAX */
|
||||
/* \brief To define the NUMBER_OF_eNB_MAX and MAX_MOBILES_PER_ENB */
|
||||
#if STANDALONE==1
|
||||
#include "openairinterface5g_limits.h"
|
||||
#else
|
||||
@@ -313,13 +313,13 @@ typedef struct { /*this structure constitutes a whole bg-stream with multiple bg
|
||||
typedef struct {
|
||||
|
||||
int application_type[NUMBER_OF_eNB_MAX + NUMBER_OF_SERVICE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_SERVICE_MAX][MAX_NUM_APPLICATION]; /*!\brief It identify the application of the simulated traffic, could be cbr, m2m, gaming,etc*/
|
||||
int trans_proto[NUMBER_OF_eNB_MAX + NUMBER_OF_SERVICE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION];
|
||||
int ip_v[NUMBER_OF_eNB_MAX + NUMBER_OF_SERVICE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION];
|
||||
int trans_proto[NUMBER_OF_eNB_MAX + NUMBER_OF_SERVICE_MAX][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION];
|
||||
int ip_v[NUMBER_OF_eNB_MAX + NUMBER_OF_SERVICE_MAX][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION];
|
||||
|
||||
int flow_start[NUMBER_OF_eNB_MAX + NUMBER_OF_SERVICE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION]; /*!\brief Duration of traffic generation or use the emuulation time instead */
|
||||
int flow_duration[NUMBER_OF_eNB_MAX + NUMBER_OF_SERVICE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION]; /*!\brief Duration of traffic generation or use the emuulation time instead */
|
||||
int flow_start[NUMBER_OF_eNB_MAX + NUMBER_OF_SERVICE_MAX][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION]; /*!\brief Duration of traffic generation or use the emuulation time instead */
|
||||
int flow_duration[NUMBER_OF_eNB_MAX + NUMBER_OF_SERVICE_MAX][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION]; /*!\brief Duration of traffic generation or use the emuulation time instead */
|
||||
|
||||
int idt_dist[NUMBER_OF_eNB_MAX + NUMBER_OF_SERVICE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION]; /*!\brief Inter Departure Time distribution */
|
||||
int idt_dist[NUMBER_OF_eNB_MAX + NUMBER_OF_SERVICE_MAX][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION]; /*!\brief Inter Departure Time distribution */
|
||||
int idt_min[NUMBER_OF_eNB_MAX + NUMBER_OF_SERVICE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_SERVICE_MAX][MAX_NUM_APPLICATION]; /*!\brief Min Inter Departure Time, for uniform distrib */
|
||||
int idt_max[NUMBER_OF_eNB_MAX + NUMBER_OF_SERVICE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_SERVICE_MAX][MAX_NUM_APPLICATION]; /*!\brief idt, Max Inter Departure Time, for uniform distrib */
|
||||
|
||||
@@ -338,69 +338,69 @@ typedef struct {
|
||||
*/
|
||||
typedef struct {
|
||||
int max_nb_frames; /*!< \brief Max Number of frames*/
|
||||
int application_type[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION]; /*!\brief It identify the application of the simulated traffic, could be cbr, m2m, gaming,etc*/
|
||||
int application_type[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION]; /*!\brief It identify the application of the simulated traffic, could be cbr, m2m, gaming,etc*/
|
||||
/*!\header info */
|
||||
int trans_proto[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION]; /*!\brief Transport Protocol*/
|
||||
int ip_v[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION]; /*!\brief Ip version */
|
||||
int trans_proto[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION]; /*!\brief Transport Protocol*/
|
||||
int ip_v[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION]; /*!\brief Ip version */
|
||||
//int header_compression; /*!\brief Specify if header compression is used or not */
|
||||
int num_nodes; /*!\brief Number of used nodes in the simulation */
|
||||
int packet_gen_type; /*!\brief define how the payload is generated: fixed, predefined, random position, random see ALPHABET_GEN */
|
||||
unsigned int background[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION]; /*!\brief enable or disable background traffic */
|
||||
unsigned int aggregation_level[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION]; /* define packet aggregation level for the case of gateway*/
|
||||
unsigned int background[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION]; /*!\brief enable or disable background traffic */
|
||||
unsigned int aggregation_level[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION]; /* define packet aggregation level for the case of gateway*/
|
||||
// src id , dst id, and state // think to the case of several streams per node !!!!!
|
||||
int idt_dist[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION][MAX_NUM_TRAFFIC_STATE]; /*!\brief Inter Departure Time distribution */
|
||||
int idt_min[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION][MAX_NUM_TRAFFIC_STATE]; /*!\brief Min Inter Departure Time, for uniform distrib */
|
||||
int idt_max[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION][MAX_NUM_TRAFFIC_STATE]; /*!\brief idt, Max Inter Departure Time, for uniform distrib */
|
||||
int idt_dist[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION][MAX_NUM_TRAFFIC_STATE]; /*!\brief Inter Departure Time distribution */
|
||||
int idt_min[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION][MAX_NUM_TRAFFIC_STATE]; /*!\brief Min Inter Departure Time, for uniform distrib */
|
||||
int idt_max[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION][MAX_NUM_TRAFFIC_STATE]; /*!\brief idt, Max Inter Departure Time, for uniform distrib */
|
||||
|
||||
double idt_std_dev[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION][MAX_NUM_TRAFFIC_STATE]; /*!\brief idt, Standard Deviation, for guassian distrib */
|
||||
double idt_lambda[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION][MAX_NUM_TRAFFIC_STATE]; /*!\brief idt, lambda, for exponential/poisson distrib */
|
||||
double idt_scale[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION][MAX_NUM_TRAFFIC_STATE]; /*!\brief scale :parameter for Pareto, Gamma, Weibull and Cauchy distribution*/
|
||||
double idt_shape[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION][MAX_NUM_TRAFFIC_STATE]; /*!\brief shape :parameter for Pareto, Gamma, Weibull and Cauchy distribution*/
|
||||
double idt_std_dev[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION][MAX_NUM_TRAFFIC_STATE]; /*!\brief idt, Standard Deviation, for guassian distrib */
|
||||
double idt_lambda[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION][MAX_NUM_TRAFFIC_STATE]; /*!\brief idt, lambda, for exponential/poisson distrib */
|
||||
double idt_scale[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION][MAX_NUM_TRAFFIC_STATE]; /*!\brief scale :parameter for Pareto, Gamma, Weibull and Cauchy distribution*/
|
||||
double idt_shape[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION][MAX_NUM_TRAFFIC_STATE]; /*!\brief shape :parameter for Pareto, Gamma, Weibull and Cauchy distribution*/
|
||||
|
||||
int size_dist[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION][MAX_NUM_TRAFFIC_STATE]; /*!\brief Paylolad size distribution */
|
||||
int size_min[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION][MAX_NUM_TRAFFIC_STATE]; /*!\brief Min Payload size, for uniform distrib */
|
||||
int size_max[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION][MAX_NUM_TRAFFIC_STATE]; /*!\brief payload, Max Inter Departure Time, for uniform distrib */
|
||||
double size_std_dev[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION][MAX_NUM_TRAFFIC_STATE]; /*!\brief payload, Standard Deviation, for guassian distrib */
|
||||
double size_lambda[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION][MAX_NUM_TRAFFIC_STATE]; /*!\brief payload, lambda, for exponential/poisson distrib */
|
||||
int size_dist[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION][MAX_NUM_TRAFFIC_STATE]; /*!\brief Paylolad size distribution */
|
||||
int size_min[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION][MAX_NUM_TRAFFIC_STATE]; /*!\brief Min Payload size, for uniform distrib */
|
||||
int size_max[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION][MAX_NUM_TRAFFIC_STATE]; /*!\brief payload, Max Inter Departure Time, for uniform distrib */
|
||||
double size_std_dev[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION][MAX_NUM_TRAFFIC_STATE]; /*!\brief payload, Standard Deviation, for guassian distrib */
|
||||
double size_lambda[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION][MAX_NUM_TRAFFIC_STATE]; /*!\brief payload, lambda, for exponential/poisson distrib */
|
||||
|
||||
double size_scale[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION][MAX_NUM_TRAFFIC_STATE]; /*!\brief scale :parameter for Pareto, Gamma, Weibull and Cauchy distribution */
|
||||
double size_shape[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION][MAX_NUM_TRAFFIC_STATE]; /*!\brief shape :parameter for Pareto, Gamma, Weibull and Cauchy distribution*/
|
||||
double size_scale[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION][MAX_NUM_TRAFFIC_STATE]; /*!\brief scale :parameter for Pareto, Gamma, Weibull and Cauchy distribution */
|
||||
double size_shape[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION][MAX_NUM_TRAFFIC_STATE]; /*!\brief shape :parameter for Pareto, Gamma, Weibull and Cauchy distribution*/
|
||||
|
||||
// info for state-based traffic gen
|
||||
int num_state [NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; /*!\brief Number of states for source node*/
|
||||
// int state_dist[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_TRAFFIC_STATE]; /*!\brief States distribution */
|
||||
double state_prob[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_TRAFFIC_STATE]; /*!\brief State probablity: prob to move from one state to the other one */
|
||||
int num_state [NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB]; /*!\brief Number of states for source node*/
|
||||
// int state_dist[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_TRAFFIC_STATE]; /*!\brief States distribution */
|
||||
double state_prob[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_TRAFFIC_STATE]; /*!\brief State probablity: prob to move from one state to the other one */
|
||||
|
||||
// num stream for each src
|
||||
// int stream [NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; // this requires multi thread for parallel stream for a givcen src
|
||||
// int stream [NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB]; // this requires multi thread for parallel stream for a givcen src
|
||||
// emu info
|
||||
int flow_start_flag[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION]; /*!\brief flow start time flag for traffic generation or use the emuulation time instead */
|
||||
int flow_start[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION]; /*!\brief flow start time of traffic generation or use the emuulation time instead */
|
||||
int flow_duration[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION]; /*!\brief flow duration of traffic generation or use the emuulation time instead */
|
||||
int flow_start_flag[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION]; /*!\brief flow start time flag for traffic generation or use the emuulation time instead */
|
||||
int flow_start[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION]; /*!\brief flow start time of traffic generation or use the emuulation time instead */
|
||||
int flow_duration[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION]; /*!\brief flow duration of traffic generation or use the emuulation time instead */
|
||||
int seed; /*!\brief The seed used to generate the random positions*/
|
||||
|
||||
|
||||
int dst_port[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; /*!\brief Destination port number, for the socket mode*/
|
||||
char *dst_ip[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; /*!\brief Destination IP address, for the socket mode*/
|
||||
int dst_port[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB]; /*!\brief Destination port number, for the socket mode*/
|
||||
char *dst_ip[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB]; /*!\brief Destination IP address, for the socket mode*/
|
||||
|
||||
int trans_proto_background[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; /*!\brief define the transport protocol and IP version for background traffic*/
|
||||
int trans_proto_background[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB]; /*!\brief define the transport protocol and IP version for background traffic*/
|
||||
|
||||
|
||||
|
||||
double prob_off_pu[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION];
|
||||
double prob_off_ed[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION];
|
||||
double prob_off_pe[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION];
|
||||
double prob_pu_ed[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION];
|
||||
double prob_pu_pe[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION];
|
||||
double prob_ed_pe[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION];
|
||||
double prob_ed_pu[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION];
|
||||
unsigned int holding_time_off_ed[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION];
|
||||
unsigned int holding_time_off_pu[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION];
|
||||
unsigned int holding_time_off_pe[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION];
|
||||
unsigned int holding_time_pe_off[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION];
|
||||
unsigned int pu_size_pkts[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION];
|
||||
unsigned int ed_size_pkts[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION];
|
||||
unsigned int m2m[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION];
|
||||
double prob_off_pu[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION];
|
||||
double prob_off_ed[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION];
|
||||
double prob_off_pe[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION];
|
||||
double prob_pu_ed[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION];
|
||||
double prob_pu_pe[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION];
|
||||
double prob_ed_pe[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION];
|
||||
double prob_ed_pu[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION];
|
||||
unsigned int holding_time_off_ed[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION];
|
||||
unsigned int holding_time_off_pu[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION];
|
||||
unsigned int holding_time_off_pe[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION];
|
||||
unsigned int holding_time_pe_off[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION];
|
||||
unsigned int pu_size_pkts[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION];
|
||||
unsigned int ed_size_pkts[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION];
|
||||
unsigned int m2m[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION];
|
||||
|
||||
|
||||
unsigned int throughput_metric;
|
||||
@@ -409,7 +409,7 @@ typedef struct {
|
||||
unsigned int curve;
|
||||
unsigned int owd_radio_access;
|
||||
unsigned int background_stats;
|
||||
unsigned int application_idx[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX];
|
||||
unsigned int application_idx[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB];
|
||||
|
||||
|
||||
} otg_t;
|
||||
@@ -485,8 +485,8 @@ typedef struct {
|
||||
unsigned int rx_total_bytes_dl;
|
||||
|
||||
/*TARMA parameteres*/
|
||||
tarmaStream_t *mtarma_stream[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION];
|
||||
tarmaVideo_t *mtarma_video[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION];
|
||||
tarmaStream_t *mtarma_stream[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION];
|
||||
tarmaVideo_t *mtarma_video[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION];
|
||||
|
||||
} otg_multicast_info_t;
|
||||
|
||||
@@ -505,71 +505,71 @@ typedef struct {
|
||||
int ctime; /*!< \brief Simulation time in ms*/
|
||||
int ptime_background_ul; /*!< \brief time of last sent background UL data (time in ms)*/
|
||||
int ptime_background_dl; /*!< \brief time of last sent background DL data (time in ms)*/
|
||||
int ptime[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION]; /*!< \brief time of last sent data (time in ms)*/
|
||||
int seq_num[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_EMU_TRAFFIC]; /*!< \brief the sequence number of the sender */
|
||||
int seq_num_background[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; /*!< \brief the sequence number for background traffic of the sender */
|
||||
int seq_num_rx[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_EMU_TRAFFIC]; /*!< \brief the sequence number of the receiver */
|
||||
int seq_num_rx_background[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; /*!< \brief the sequence number for background traffic of the receiver */
|
||||
int ptime[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION]; /*!< \brief time of last sent data (time in ms)*/
|
||||
int seq_num[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_EMU_TRAFFIC]; /*!< \brief the sequence number of the sender */
|
||||
int seq_num_background[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB]; /*!< \brief the sequence number for background traffic of the sender */
|
||||
int seq_num_rx[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_EMU_TRAFFIC]; /*!< \brief the sequence number of the receiver */
|
||||
int seq_num_rx_background[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB]; /*!< \brief the sequence number for background traffic of the receiver */
|
||||
|
||||
|
||||
int idt_background[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; /*!< \brief Inter Departure Time for background traffic in ms*/
|
||||
int size_background[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; /*!< \brief payload size for background traffic*/
|
||||
int idt[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION]; /*!< \brief Inter Departure Time in ms*/
|
||||
int header_type[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; /*!< \brief Define the type of header: Transport layer + IP version*/
|
||||
int idt_background[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB]; /*!< \brief Inter Departure Time for background traffic in ms*/
|
||||
int size_background[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB]; /*!< \brief payload size for background traffic*/
|
||||
int idt[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION]; /*!< \brief Inter Departure Time in ms*/
|
||||
int header_type[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB]; /*!< \brief Define the type of header: Transport layer + IP version*/
|
||||
|
||||
/*!< \brief Statics part: vars updated at each iteration of otg_tx */
|
||||
int tx_num_pkt[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_EMU_TRAFFIC]; /*!< \brief Number of data packet in the tx*/
|
||||
int tx_num_bytes[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_EMU_TRAFFIC]; /*!< \brief Number of bytes in the tx*/ // get the size and calculate the avg throughput
|
||||
int tx_num_pkt[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_EMU_TRAFFIC]; /*!< \brief Number of data packet in the tx*/
|
||||
int tx_num_bytes[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_EMU_TRAFFIC]; /*!< \brief Number of bytes in the tx*/ // get the size and calculate the avg throughput
|
||||
// vars updated at each iteration of otg_rx
|
||||
int rx_num_pkt[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_EMU_TRAFFIC]; /*!< \brief Number of data packet in the rx */
|
||||
int rx_num_bytes[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_EMU_TRAFFIC]; /*!< \brief Number of bytes in the rx */
|
||||
float rx_pkt_owd[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; /*!< \brief One way delay: rx_ctime - tx_ctime, */
|
||||
float rx_owd_min[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_EMU_TRAFFIC]; /*!< \brief One way delay min*/
|
||||
float rx_owd_max[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_EMU_TRAFFIC]; /*!< \brief One way delay max*/
|
||||
float rx_pkt_owd_e2e[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; /*!< \brief One way delay: rx_ctime - tx_ctime, */
|
||||
float rx_owd_min_e2e[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_EMU_TRAFFIC]; /*!< \brief One way delay min*/
|
||||
float rx_owd_max_e2e[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_EMU_TRAFFIC]; /*!< \brief One way delay max*/
|
||||
float rx_pkt_owd_history[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][2]; /*!< \brief One way delay histoy used for jitter calculation: rx_ctime - tx_ctime, [2] to keep the owd for the current and previous pkt */
|
||||
float rx_pkt_owd_history_e2e[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][2]; /*!< \brief One way delay histoy used for jitter calculation: rx_ctime - tx_ctime, [2] to keep the owd for the current and previous pkt */
|
||||
float rx_pkt_jitter[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; /*!< \brief One way delay: rx_ctime - tx_ctime */
|
||||
float rx_jitter_min[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_EMU_TRAFFIC]; /*!< \brief One way delay min*/
|
||||
float rx_jitter_max[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_EMU_TRAFFIC]; /*!< \brief One way delay max*/
|
||||
float rx_jitter_avg[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_EMU_TRAFFIC]; /*!< \brief One way delay max*/
|
||||
float rx_pkt_jitter_e2e[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; /*!< \brief One way delay: rx_ctime - tx_ctime */
|
||||
float rx_jitter_min_e2e[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_EMU_TRAFFIC]; /*!< \brief One way delay min*/
|
||||
float rx_jitter_max_e2e[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_EMU_TRAFFIC]; /*!< \brief One way delay max*/
|
||||
float rx_jitter_avg_e2e[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_EMU_TRAFFIC]; /*!< \brief One way delay max*/
|
||||
int rx_jitter_sample[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_EMU_TRAFFIC]; /*!< \brief One way delay max*/
|
||||
int nb_loss_pkts_ul[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_EMU_TRAFFIC]; /*!< \brief Number of data packets losses for UL*/
|
||||
int nb_loss_pkts_dl[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_EMU_TRAFFIC]; /*!< \brief Number of data packets losses for DL*/
|
||||
float owd_const[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION]; /*!< \brief One way delay constant*/
|
||||
int rx_num_pkt[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_EMU_TRAFFIC]; /*!< \brief Number of data packet in the rx */
|
||||
int rx_num_bytes[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_EMU_TRAFFIC]; /*!< \brief Number of bytes in the rx */
|
||||
float rx_pkt_owd[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB]; /*!< \brief One way delay: rx_ctime - tx_ctime, */
|
||||
float rx_owd_min[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_EMU_TRAFFIC]; /*!< \brief One way delay min*/
|
||||
float rx_owd_max[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_EMU_TRAFFIC]; /*!< \brief One way delay max*/
|
||||
float rx_pkt_owd_e2e[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB]; /*!< \brief One way delay: rx_ctime - tx_ctime, */
|
||||
float rx_owd_min_e2e[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_EMU_TRAFFIC]; /*!< \brief One way delay min*/
|
||||
float rx_owd_max_e2e[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_EMU_TRAFFIC]; /*!< \brief One way delay max*/
|
||||
float rx_pkt_owd_history[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][2]; /*!< \brief One way delay histoy used for jitter calculation: rx_ctime - tx_ctime, [2] to keep the owd for the current and previous pkt */
|
||||
float rx_pkt_owd_history_e2e[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][2]; /*!< \brief One way delay histoy used for jitter calculation: rx_ctime - tx_ctime, [2] to keep the owd for the current and previous pkt */
|
||||
float rx_pkt_jitter[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB]; /*!< \brief One way delay: rx_ctime - tx_ctime */
|
||||
float rx_jitter_min[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_EMU_TRAFFIC]; /*!< \brief One way delay min*/
|
||||
float rx_jitter_max[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_EMU_TRAFFIC]; /*!< \brief One way delay max*/
|
||||
float rx_jitter_avg[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_EMU_TRAFFIC]; /*!< \brief One way delay max*/
|
||||
float rx_pkt_jitter_e2e[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB]; /*!< \brief One way delay: rx_ctime - tx_ctime */
|
||||
float rx_jitter_min_e2e[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_EMU_TRAFFIC]; /*!< \brief One way delay min*/
|
||||
float rx_jitter_max_e2e[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_EMU_TRAFFIC]; /*!< \brief One way delay max*/
|
||||
float rx_jitter_avg_e2e[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_EMU_TRAFFIC]; /*!< \brief One way delay max*/
|
||||
int rx_jitter_sample[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_EMU_TRAFFIC]; /*!< \brief One way delay max*/
|
||||
int nb_loss_pkts_ul[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_EMU_TRAFFIC]; /*!< \brief Number of data packets losses for UL*/
|
||||
int nb_loss_pkts_dl[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_EMU_TRAFFIC]; /*!< \brief Number of data packets losses for DL*/
|
||||
float owd_const[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION]; /*!< \brief One way delay constant*/
|
||||
/*!< \brief KPI part: calculate the KPIs, total */
|
||||
double tx_throughput[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_EMU_TRAFFIC]; /*!< \brief Tx throughput: (size of transmitted data)/ctime*/
|
||||
double rx_goodput[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_EMU_TRAFFIC]; /*!< \brief Rx goodput: (size of received data)/ctime*/
|
||||
float rx_loss_rate[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_EMU_TRAFFIC]; /*!< \brief Rx Loss Rate: ratio, unit: bytes*/
|
||||
//int rx_latency[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; /*!< \brief Rx Latency */
|
||||
double tx_throughput[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_EMU_TRAFFIC]; /*!< \brief Tx throughput: (size of transmitted data)/ctime*/
|
||||
double rx_goodput[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_EMU_TRAFFIC]; /*!< \brief Rx goodput: (size of received data)/ctime*/
|
||||
float rx_loss_rate[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_EMU_TRAFFIC]; /*!< \brief Rx Loss Rate: ratio, unit: bytes*/
|
||||
//int rx_latency[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB]; /*!< \brief Rx Latency */
|
||||
|
||||
/*!< \brief Background traffic part: SATS + KPIs */
|
||||
int tx_num_pkt_background[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; /*!< \brief Number of background data packet in the rx */
|
||||
int tx_num_bytes_background[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; /*!< \brief Number of background bytes in the rx */
|
||||
int rx_num_pkt_background[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; /*!< \brief Number of background data packet in the tx */
|
||||
int rx_num_bytes_background[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; /*!< \brief Number of background bytes in the tx */
|
||||
int nb_loss_pkts_background_ul[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; /*!< \brief Number of background packets losses for UL*/
|
||||
int nb_loss_pkts_background_dl[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; /*!< \brief Number of background packets losses for DL*/
|
||||
double tx_throughput_background[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; /*!< \brief Tx throughput: (size of transmitted data)/ctime*/
|
||||
double rx_goodput_background[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; /*!< \brief Rx goodput: (size of received data)/ctime*/
|
||||
float rx_loss_rate_background[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; /*!< \brief Rx Loss Rate: ratio, unit: bytes*/
|
||||
int tx_num_pkt_background[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB]; /*!< \brief Number of background data packet in the rx */
|
||||
int tx_num_bytes_background[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB]; /*!< \brief Number of background bytes in the rx */
|
||||
int rx_num_pkt_background[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB]; /*!< \brief Number of background data packet in the tx */
|
||||
int rx_num_bytes_background[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB]; /*!< \brief Number of background bytes in the tx */
|
||||
int nb_loss_pkts_background_ul[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB]; /*!< \brief Number of background packets losses for UL*/
|
||||
int nb_loss_pkts_background_dl[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB]; /*!< \brief Number of background packets losses for DL*/
|
||||
double tx_throughput_background[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB]; /*!< \brief Tx throughput: (size of transmitted data)/ctime*/
|
||||
double rx_goodput_background[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB]; /*!< \brief Rx goodput: (size of received data)/ctime*/
|
||||
float rx_loss_rate_background[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB]; /*!< \brief Rx Loss Rate: ratio, unit: bytes*/
|
||||
|
||||
float radio_access_delay[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX];
|
||||
int nb_loss_pkts_otg[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX];
|
||||
unsigned int aggregation_level[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX];
|
||||
float radio_access_delay[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB];
|
||||
int nb_loss_pkts_otg[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB];
|
||||
unsigned int aggregation_level[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB];
|
||||
|
||||
unsigned int state[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION]; /*!< \brief current state of src node */
|
||||
float state_transition_prob[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION];
|
||||
unsigned int start_holding_time_off[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION];
|
||||
unsigned int c_holding_time_off[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION];
|
||||
unsigned int c_holding_time_pe_off[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION];
|
||||
unsigned int start_holding_time_pe_off[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION];
|
||||
unsigned int state[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION]; /*!< \brief current state of src node */
|
||||
float state_transition_prob[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION];
|
||||
unsigned int start_holding_time_off[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION];
|
||||
unsigned int c_holding_time_off[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION];
|
||||
unsigned int c_holding_time_pe_off[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION];
|
||||
unsigned int start_holding_time_pe_off[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION];
|
||||
unsigned int tx_total_bytes_dl;
|
||||
unsigned int tx_total_bytes_ul;
|
||||
unsigned int rx_total_bytes_dl;
|
||||
@@ -582,32 +582,32 @@ typedef struct {
|
||||
float average_jitter_ul_e2e;
|
||||
|
||||
/* VOIP tarffic parameters*/
|
||||
float voip_transition_prob[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION];
|
||||
unsigned int voip_state[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION];
|
||||
unsigned int start_voip_silence[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION];
|
||||
unsigned int c_holding_time_silence[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION];
|
||||
unsigned int start_voip_talk[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION];
|
||||
unsigned int c_holding_time_talk[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION];
|
||||
unsigned int silence_time[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION];
|
||||
unsigned int simple_talk_time[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION];
|
||||
float voip_transition_prob[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION];
|
||||
unsigned int voip_state[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION];
|
||||
unsigned int start_voip_silence[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION];
|
||||
unsigned int c_holding_time_silence[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION];
|
||||
unsigned int start_voip_talk[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION];
|
||||
unsigned int c_holding_time_talk[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION];
|
||||
unsigned int silence_time[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION];
|
||||
unsigned int simple_talk_time[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION];
|
||||
|
||||
/*TARMA parameteres*/
|
||||
tarmaStream_t *tarma_stream[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION];
|
||||
tarmaVideo_t *tarma_video[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION];
|
||||
tarmaStream_t *tarma_stream[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION];
|
||||
tarmaVideo_t *tarma_video[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION];
|
||||
/*BACKGROUND_USERS parameters*/
|
||||
backgroundStream_t *background_stream[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION];
|
||||
backgroundStream_t *background_stream[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION];
|
||||
|
||||
unsigned int header_size_app[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION];
|
||||
unsigned int header_size[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX];
|
||||
unsigned int m2m_aggregation[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX];
|
||||
unsigned int flow_id[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX];
|
||||
unsigned int traffic_type[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX];
|
||||
unsigned int traffic_type_background[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX];
|
||||
unsigned int header_size_app[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION];
|
||||
unsigned int header_size[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB];
|
||||
unsigned int m2m_aggregation[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB];
|
||||
unsigned int flow_id[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB];
|
||||
unsigned int traffic_type[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB];
|
||||
unsigned int traffic_type_background[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB];
|
||||
// unsigned int traffic_type_multicast[NUMBER_OF_eNB_MAX + NUMBER_OF_SERVICE_MAX_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_SERVICE_MAX];
|
||||
unsigned int hdr_size[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX];
|
||||
unsigned int header_type_app[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION]; ;
|
||||
unsigned int hdr_size[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB];
|
||||
unsigned int header_type_app[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION]; ;
|
||||
unsigned int gen_pkts;
|
||||
unsigned int header_size_background[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX];
|
||||
unsigned int header_size_background[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB];
|
||||
} otg_info_t;
|
||||
|
||||
|
||||
@@ -640,14 +640,14 @@ typedef struct {
|
||||
int init_forms;
|
||||
int is_data_plot_ul;
|
||||
int is_data_plot_dl;
|
||||
float data_owd_ul[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_SAMPLES];
|
||||
float data_throughput_ul[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_SAMPLES];
|
||||
float data_ctime_ul[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_SAMPLES];
|
||||
int idx_ul[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX];
|
||||
float data_owd_dl[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_SAMPLES];
|
||||
float data_throughput_dl[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_SAMPLES];
|
||||
float data_ctime_dl[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_SAMPLES];
|
||||
int idx_dl[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX];
|
||||
float data_owd_ul[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_SAMPLES];
|
||||
float data_throughput_ul[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_SAMPLES];
|
||||
float data_ctime_ul[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_SAMPLES];
|
||||
int idx_ul[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB];
|
||||
float data_owd_dl[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_SAMPLES];
|
||||
float data_throughput_dl[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_SAMPLES];
|
||||
float data_ctime_dl[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_SAMPLES];
|
||||
int idx_dl[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB];
|
||||
} otg_forms_info_t;
|
||||
|
||||
|
||||
|
||||
@@ -185,7 +185,7 @@ int otg_rx_pkt(const int dst_instanceP, const int ctime, const char * const buff
|
||||
otg_info->radio_access_delay[src_instance][dst_instance]=(float) (ctime- otg_hdr_rx->time);
|
||||
otg_multicast_info->radio_access_delay[src_instance][dst_instance]=(float) (ctime- otg_hdr_rx->time);
|
||||
} else {
|
||||
LOG_N(OTG,"received packet has tx time %d greater than the current time %d\n",otg_hdr_rx->time,ctime );
|
||||
LOG_I(OTG,"received packet has tx time %d greater than the current time %d\n",otg_hdr_rx->time,ctime );
|
||||
otg_info->radio_access_delay[src_instance][dst_instance] = 0;
|
||||
otg_multicast_info->radio_access_delay[src_instance][dst_instance]=0;
|
||||
}
|
||||
|
||||
@@ -94,6 +94,7 @@ umts_add_timer_list_up (list2_t * atimer_listP, void (*procP) (void *, void *),
|
||||
uint8_t inserted = 0;
|
||||
|
||||
mb = get_free_mem_block (sizeof (struct timer_unit), __func__);
|
||||
if(mb==NULL) return NULL;
|
||||
((struct timer_unit *) (mb->data))->proc = procP;
|
||||
((struct timer_unit *) (mb->data))->protocol = protocolP;
|
||||
((struct timer_unit *) (mb->data))->timer_id = timer_idP;
|
||||
|
||||
@@ -28,14 +28,5 @@
|
||||
***************************************************************************/
|
||||
#ifndef __PRINT_H__
|
||||
# define __PRINT_H__
|
||||
# ifdef USER_MODE
|
||||
# define msg printf
|
||||
# else
|
||||
# ifdef FIFO_PRINTF
|
||||
# include "fifo_printf_proto_extern.h"
|
||||
# define msg fifo_printf
|
||||
# else
|
||||
# define msg fifo_printf_null
|
||||
# endif
|
||||
# endif
|
||||
# define msg printf
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user