簡體   English   中英

Castalia OMNET ++中的CTP協議

[英]CTP protocol in Castalia OMNET++

使用CTP https://code.google.com/p/ctp-castalia/ make Castalia-3.2時出現此錯誤。 我有omnetpp-4.6。

命令omnetpp運行正常。 我能夠運行諸如dyna之類的示例示例。

如果未集成CTP,Castalia-3.2也可以正常工作。

當我集成CTP時,Castalia- make給出了錯誤(最后提到)。

我遵循了CTP協議隨附的Readme.txt。

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

你能告訴我我在做什么錯嗎?

  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

};
^

網站上的問題跟蹤器存在一些已經解決的與make相關的問題。

修復程序之一建議以下:

  • CtpTestingApplication.ccCtpTestingApplication.h
  • CtpTestingApplication.cc ApplicationPacket替換ApplicationGenericDataPacket
  • 注釋掉整個update_packets_received()方法
  • 刪除declareOutput("My Stats", SN) ; update_ddr_perSN()方法並放入declareOutput("My Stats") ; startup()方法中

  • mac/cc2420Mac/CC2420Mac.cc

  • 取代的實例getRoutingInteractionControl()getNetMacInfoExchange()
  • getMacInteractionControl()替換為getMacRadioInfoExchange()
  • 在分配的右側將RSSI與LQI交換(原始代碼中的小錯誤)

可選,取決於平台(我必須在Mac OSX上執行此操作)

  • mac/cc2420Mac/TosEnvironment.hrouting/ctpNoe/components/TosEnvironment.h:79行79將0x100000000替換為0xffffffff

  • routing/ctpNoe/components/CtpForwardingEngine.cc

  • 替換行1080 netPkt->getNetMacInfoExchange().source = selfAddress.c_str() ; //可以
    netPkt->setSource(selfAddress.c_str()) ; // 好
  • getRoutingInteractionControl()替換getRoutingInteractionControl()實例getRoutingInteractionControl() getNetMacInfoExchange()行)

  • routing/ctpNoe/components/CtpRoutingEngine.cc AND routing/ctpNoe/components/DualBuffer.cc AND routing/ctpNoe/components/LinkEstimator.cc

  • 取代的實例getRoutingInteractionControl()getNetMacInfoExchange()

PS:也許是由於使用OMNET 4.6引入了問題。 較低的版本(4.2)可能更適合Castalia

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM