To solve this problem in the file aodv_uu_omnet.h, replace
static bool iswrite;
static int totalSend;
static int totalRreqSend;
static int totalRreqRec;
static int totalRrepSend;
static int totalRrepRec;
static int totalRrepAckSend;
static int totalRrepAckRec;
static int totalRerrSend;
static int totalRerrRec;
for
#ifdef AODV_GLOBAL_STATISTISTIC
static bool iswrite;
static int totalSend;
static int totalRreqSend;
static int totalRreqRec;
static int totalRrepSend;
static int totalRrepRec;
static int totalRrepAckSend;
static int totalRrepAckRec;
static int totalRerrSend;
static int totalRerrRec;
#else
bool iswrite;
int totalSend;
int totalRreqSend;
int totalRreqRec;
int totalRrepSend;
int totalRrepRec;
int totalRrepAckSend;
int totalRrepAckRec;
int totalRerrSend;
int totalRerrRec;
#endif
In the file aodv_uu_omnet.cc
replace
bool AODVUU::iswrite = false;
int AODVUU::totalSend=0;
int AODVUU::totalRreqSend=0;
int AODVUU::totalRreqRec=0;
int AODVUU::totalRrepSend=0;
int AODVUU::totalRrepRec=0;
int AODVUU::totalRrepAckSend=0;
int AODVUU::totalRrepAckRec=0;
int AODVUU::totalRerrSend=0;
int AODVUU::totalRerrRec=0;
for
#ifdef AODV_GLOBAL_STATISTISTIC
bool AODVUU::iswrite = false;
int AODVUU::totalSend=0;
int AODVUU::totalRreqSend=0;
int AODVUU::totalRreqRec=0;
int AODVUU::totalRrepSend=0;
int AODVUU::totalRrepRec=0;
int AODVUU::totalRrepAckSend=0;
int AODVUU::totalRrepAckRec=0;
int AODVUU::totalRerrSend=0;
int AODVUU::totalRerrRec=0;
#endif
In the file file aodv_uu_omnet.cc method initialize
add
#ifndef AODV_GLOBAL_STATISTISTIC
iswrite = false;
totalSend=0;
totalRreqSend=0;
totalRreqRec=0;
totalRrepSend=0;
totalRrepRec=0;
totalRrepAckSend=0;
totalRrepAckRec=0;
totalRerrSend=0;
totalRerrRec=0;
#endif
Now you can activate or deactivate the global statistics