Hi Matthias: Thank you very much for your reply. I have doubts on my code because I have not found any error in my code. Then I delette all my ns2 installation. I was using ns-2.29. Now I downloaded ns2-2.31 and installed it. All run ok and my code is not present. The one modification that I do is: #include <wpan/p802_15_4mac.h> in aodv.h file. And I obtain the following errors: g++ -c -Wall -DTCP_DELAY_BIND_ALL -DNO_TK -DTCLCL_CLASSINSTVAR -DNDEBUG -DLINUX_TCP_HEADER -DUSE_SHM -DHAVE_LIBTCLCL -DHAVE_TCLCL_H -DHAVE_LIBOTCL1_13 -DHAVE_OTCL_H -DHAVE_LIBTK8_4 -DHAVE_TK_H -DHAVE_LIBTCL8_4 -DHAVE_TCL_H -DHAVE_CONFIG_H -DNS_DIFFUSION -DSMAC_NO_SYNC -DCPP_NAMESPACE=std -DUSE_SINGLE_ADDRESS_SPACE -Drng_test -I. -I/home/nargothrond/juanma/ns-allinone-2.31/tclcl-1.19 -I/home/nargothrond/juanma/ns-allinone-2.31/otcl-1.13 -I/home/nargothrond/juanma/ns-allinone-2.31/include -I/home/nargothrond/juanma/ns-allinone-2.31/include -I/usr/include/pcap -I./tcp -I./sctp -I./common -I./link -I./queue -I./adc -I./apps -I./mac -I./mobile -I./trace -I./routing -I./tools -I./classifier -I./mcast -I./diffusion3/lib/main -I./diffusion3/lib -I./diffusion3/lib/nr -I./diffusion3/ns -I./diffusion3/filter_core -I./asim/ -I./qs -I./diffserv -I./satellite -I./wpan -o aodv/aodv_logs.o aodv/aodv_logs.cc In file included from wpan/p802_15_4phy.h:58, from wpan/p802_15_4mac.h:57, from aodv/aodv.h:45, from aodv/aodv_logs.cc:31: mac/wireless-phy.h:130: error: syntax error before 'r' mac/wireless-phy.h:130: error: missing ';' before right brace mac/wireless-phy.h: In member function `bool& WirelessPhy::Is_node_on()': mac/wireless-phy.h:97: error: `node_on_' undeclared (first use this function) mac/wireless-phy.h:97: error: (Each undeclared identifier is reported only once for each function it appears in.) mac/wireless-phy.h: In member function `bool WirelessPhy::Is_sleeping()': mac/wireless-phy.h:98: error: `status_' undeclared (first use this function) mac/wireless-phy.h: At global scope: mac/wireless-phy.h:131: error: `bool node_on_' used prior to declaration mac/wireless-phy.h:132: error: no matching function for call to `Sleep_Timer:: Sleep_Timer()' mac/wireless-phy.h:56: error: candidates are: Sleep_Timer::Sleep_Timer(const Sleep_Timer&) mac/wireless-phy.h:58: error: Sleep_Timer::Sleep_Timer(WirelessPhy*) mac/wireless-phy.h:133: error: `int status_' used prior to declaration mac/wireless-phy.h:135: error: syntax error before `private' mac/wireless-phy.h: In function `EnergyModel* em()': mac/wireless-phy.h:143: error: `node' undeclared (first use this function) mac/wireless-phy.h: At global scope: mac/wireless-phy.h:145: error: `friend' can only be specified inside a class mac/wireless-phy.h:147: error: syntax error before `}' token make: *** [aodv/aodv_logs.o] Error 1
Please help me. I need to access to Aodv agent from the 802_15_4mac level. Thank you very much. >From: "Matthias Kuhnert" <[EMAIL PROTECTED]> >To: "juan manuel gomez garcia" <[EMAIL PROTECTED]> >Subject: Re: [ns] include file error >Date: Thu, 12 Apr 2007 17:04:57 +0200 > >Which ns2 version are you using? >There are some bugfixes contained in the most recent release. >But what is somehow strange is the message >about zaodv. >Is that some code written by yourself, or from one of the >older original versions of Zheng's code that contained some >changes of the aodv routing to make it look more like zigbee routing? >Apart from that, it looks just like a missing ";" at some part of your >code. > > >Greets, > Matthias > > > hi ns-users: > > > > It is very simple: Before doing anything, everything works well. > > Later I only do: #include <wpan/p802_15_4mac.h> in aodv.h file. And >when > > I > > do make clean, make, I obtain the errors: > > > > In file included from wpan/p802_15_4phy.h:58, > > from wpan/p802_15_4mac.h:57, > > from zaodv/zigbee.cc:9: > > mac/wireless-phy.h:129: error: syntax error before 'r' > > mac/wireless-phy.h:129: error: missing ';' before right brace > > mac/wireless-phy.h: In member function `bool& >WirelessPhy::Is_node_on()': > > mac/wireless-phy.h:97: error: `node_on_' undeclared (first use this > > function) > > mac/wireless-phy.h:97: error: (Each undeclared identifier is reported >only > > once > > for each function it appears in.) > > mac/wireless-phy.h: In member function `bool >WirelessPhy::Is_sleeping()': > > mac/wireless-phy.h:98: error: `status_' undeclared (first use this > > function) > > mac/wireless-phy.h: At global scope: > > mac/wireless-phy.h:130: error: `bool node_on_' used prior to declaration > > mac/wireless-phy.h:131: error: no matching function for call to > > `Sleep_Timer:: > > Sleep_Timer()' > > mac/wireless-phy.h:56: error: candidates are: > > Sleep_Timer::Sleep_Timer(const > > Sleep_Timer&) > > mac/wireless-phy.h:58: error: > > Sleep_Timer::Sleep_Timer(WirelessPhy*) > > mac/wireless-phy.h:132: error: `int status_' used prior to declaration > > mac/wireless-phy.h:134: error: syntax error before `private' > > mac/wireless-phy.h: In function `EnergyModel* em()': > > mac/wireless-phy.h:142: error: `node' undeclared (first use this >function) > > mac/wireless-phy.h: At global scope: > > mac/wireless-phy.h:144: error: `friend' can only be specified inside a > > class > > mac/wireless-phy.h:146: error: syntax error before `}' token > > make: *** [aodv/aodv.o] Error 1 > > > > Why??. I have not modified anything anymore. Please, help me. > > Thank you. _________________________________________________________________ Descarga gratis la Barra de Herramientas de MSN http://www.msn.es/usuario/busqueda/barra?XAPID=2031&DI=1055&SU=http%3A//www.hotmail.com&HL=LINKTAG1OPENINGTEXT_MSNBH