I get this error when I make
Castalia-3.2 with CTP https://code.google.com/p/ctp-castalia/
. I have omnetpp-4.6.
Command - omnetpp
is working fine. I am able to run sample examples like dyna.
Castalia-3.2 is also working fine when CTP is not integrated.
When I integrate CTP, Castalia - make
gives the error(mentioned at last).
I followed the Readme.txt provided with CTP protocol.
1) Copy CtpTest in CASTALIA_HOME/Simulations
2) Copy ctpTestingApplication CASTALIA_HOME/src/node/application/
3) Copy ctpNoe in CASTALIA_HOME/src/node/communication/routing/
4) Copy cc2420Mac in CASTALIA_HOME/src/node/communication/mac/
5) make clean
6) ./makemake
7) make
Can you please tell me what am I doing wrong ?
In file included from src/node/communication/mac/cc2420Mac/CC2420Mac.h:108:0,
from src/node/communication/mac/cc2420Mac/CC2420Mac.cc:104:
src/node/communication/mac/cc2420Mac/TosEnvironment.h:11:17: error: conflicting declaration ‘typedef uint8_t error_t’
typedef uint8_t error_t;
^
In file included from /usr/include/c++/4.8/cerrno:41:0,
from /usr/include/c++/4.8/ext/string_conversions.h:44,
from /usr/include/c++/4.8/bits/basic_string.h:2815,
from /usr/include/c++/4.8/string:52,
from /usr/include/c++/4.8/stdexcept:39,
from /usr/include/c++/4.8/array:38,
from /usr/include/c++/4.8/tuple:39,
from /usr/include/c++/4.8/bits/stl_map.h:63,
from /usr/include/c++/4.8/map:61,
from src/node/communication/mac/VirtualMac.h:19,
from src/node/communication/mac/cc2420Mac/CC2420Mac.h:106,
from src/node/communication/mac/cc2420Mac/CC2420Mac.cc:104:
/usr/include/errno.h:68:13: error: ‘error_t’ has a previous declaration as ‘typedef int error_t’
typedef int error_t;
^
In file included from /usr/include/asm-generic/errno.h:4:0,
from /usr/include/x86_64-linux-gnu/asm/errno.h:1,
from /usr/include/linux/errno.h:1,
from /usr/include/x86_64-linux-gnu/bits/errno.h:24,
from /usr/include/errno.h:35,
from /usr/include/c++/4.8/cerrno:41,
from /usr/include/c++/4.8/ext/string_conversions.h:44,
from /usr/include/c++/4.8/bits/basic_string.h:2815,
from /usr/include/c++/4.8/string:52,
from /usr/include/c++/4.8/stdexcept:39,
from /usr/include/c++/4.8/array:38,
from /usr/include/c++/4.8/tuple:39,
from /usr/include/c++/4.8/bits/stl_map.h:63,
from /usr/include/c++/4.8/map:61,
from src/node/communication/mac/VirtualMac.h:19,
from src/node/communication/mac/cc2420Mac/CC2420Mac.h:106,
from src/node/communication/mac/cc2420Mac/CC2420Mac.cc:104:
src/node/communication/mac/cc2420Mac/TosEnvironment.h:23:5: error: expected identifier before numeric constant
EBUSY = 3,
^
src/node/communication/mac/cc2420Mac/TosEnvironment.h:23:5: error: expected ‘}’ before numeric constant
src/node/communication/mac/cc2420Mac/TosEnvironment.h:23:5: error: expected unqualified-id before numeric constant
In file included from src/node/communication/mac/cc2420Mac/CC2420Mac.h:108:0,
from src/node/communication/mac/cc2420Mac/CC2420Mac.cc:104:
src/node/communication/mac/cc2420Mac/TosEnvironment.h:28:1: error: expected declaration before ‘}’ token
};
^
The issue tracker on the website has some issues which have been solved already, related to make
.
One of the fixes suggests the following:
- in
CtpTestingApplication.cc
andCtpTestingApplication.h
- replace
ApplicationGenericDataPacket
withApplicationPacket
inCtpTestingApplication.cc
- comment out the whole
update_packets_received()
methoddelete
declareOutput("My Stats", SN) ;
from theupdate_ddr_perSN()
method and putdeclareOutput("My Stats") ;
at thestartup()
methodin
mac/cc2420Mac/CC2420Mac.cc
- replace instances of
getRoutingInteractionControl()
withgetNetMacInfoExchange()
- replace
getMacInteractionControl()
withgetMacRadioInfoExchange()
- swap RSSI with LQI in the right hand side of the assignments (little bug in the original code)
Optional, depends on platform (I had to do it for my Mac OSX)
in
mac/cc2420Mac/TosEnvironment.h
AND inrouting/ctpNoe/components/TosEnvironment.h:79
line 79 replace0x100000000
with0xffffffff
in
routing/ctpNoe/components/CtpForwardingEngine.cc
- replace line 1080
netPkt->getNetMacInfoExchange().source = selfAddress.c_str() ;
// ok with
netPkt->setSource(selfAddress.c_str()) ;
// okreplace instances of
getRoutingInteractionControl()
withgetNetMacInfoExchange()
(lines 213, 1053, 1081)in
routing/ctpNoe/components/CtpRoutingEngine.cc
ANDrouting/ctpNoe/components/DualBuffer.cc
ANDrouting/ctpNoe/components/LinkEstimator.cc
- replace instances of
getRoutingInteractionControl()
withgetNetMacInfoExchange()
PS: maybe the problems are introduced due to using OMNET 4.6. A lower version (4.2) might work better with Castalia