[英]How can I find the implement .cc file in Omnet++ INET's examples
I'm a fresh newer studying INET in Omnet now. 我现在是在Omnet学习INET的新手。 I try to find out how the INET's examples like tutorial wireless networks work, but there are only ned and ini file in that directory without cc file.
我试图找出INET的示例(如教程无线网络)如何工作,但是该目录中只有ned和ini文件,而没有cc文件。 So I am very confused how this network works.
所以我很困惑这个网络是如何工作的。 Anyone can tell me how can i find it ?
任何人都可以告诉我如何找到它?
There are no C++
files in INET
examples because the whole behaviour of every module, protocol, channel, packet etc. used by INET
has already been defined in C++
files in src
directory. 没有
C++
中的文件INET
因为每个模块,协议,信道的整个行为,包等通过使用实施例INET
已经在定义的C++
中的文件src
目录。 The compiled and ready to use code is present in file src\\libINET.dll
(or src/libINET.so
for Linux). 编译后的代码可以在文件
src\\libINET.dll
(对于Linux, src/libINET.so
)。
To get to know how a protocol was modelled look inside a module and look for simple modules. 要了解一个协议是如何建模的模块里面看看,寻找简单的模块。 (In
OMNeT++
the behaviour is defined only for simple modules.) (在
OMNeT++
,行为仅针对简单模块定义。)
For example: 例如:
examples\\wireless\\lan80211
there is Lan80211.ned
. examples\\wireless\\lan80211
存在Lan80211.ned
。 Open it in source (text) format. WirelessHost
. WirelessHost
。 WirelessHost
(Hint: select this word and press F3 or click this word holding Ctrl). WirelessHost
声明(提示:选择此单词,然后按F3或在按住Ctrl的同时单击此单词)。 One can see that WirelessHost
inherits from StandardHost
and from NodeBase
. WirelessHost
从StandardHost
和NodeBase
继承。 Moreover: numRadios=1
and mgmtType = "Ieee80211MgmtSTASimplified"
. numRadios=1
和mgmtType = "Ieee80211MgmtSTASimplified"
。 NodeBase.ned
one can see that it uses Ieee80211Nic
wlan module by default. NodeBase.ned
可以看到默认情况下它使用Ieee80211Nic
wlan模块。 The module Ieee80211Nic
is defined in src\\inet\\linklayer\\ieee80211\\Ieee80211Nic.ned
. Ieee80211Nic
模块在src\\inet\\linklayer\\ieee80211\\Ieee80211Nic.ned
。 Ieee80211Nic
one can see that it uses Ieee80211Mac
(between other things). Ieee80211Nic
内部查看,可以看到它使用了Ieee80211Mac
(介于其他东西之间)。 This is a simple module defined in \\src\\inet\\linklayer\\ieee80211\\mac\\Ieee80211Mac.ned
. \\src\\inet\\linklayer\\ieee80211\\mac\\Ieee80211Mac.ned
定义的简单模块。 And its behaviour is defined in \\src\\inet\\linklayer\\ieee80211\\mac\\Ieee80211Mac.cc
. \\src\\inet\\linklayer\\ieee80211\\mac\\Ieee80211Mac.cc
。 This way one can discover a simple module and its C++
code of every compound module. 这样,您可以发现一个简单的模块及其每个复合模块的
C++
代码。 However, take into account that to understand how the compound module works the connections between simple modules should be considered too. 但是,要考虑到要理解复合模块是如何工作的,也应该考虑简单模块之间的连接。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.