OMNET++(1)总体介绍

来源:互联网 发布:淘宝里的企业店铺好吗 编辑:程序博客网 时间:2024/05/22 21:24

摘自Omnet++ user manual:

OMNET++是一种面向对象的离散时间网络模拟框架,其包涵通用的体系结构,能够被应用于:

²  有线和无线通信网络模拟

²  协议模拟

²  排队网络模拟

²  多处理器和其它分布式硬件系统模拟

²  硬件体系结构验证

²  复杂软件系统性能评价

²  一般来说,离散事件系统的模拟和仿真都适用,并且适用于消息通信实体的模拟。

OMNeT++本身不是一个任何实体的模拟器,而是一个为写模拟器提供基础平台和工具。一个OMNeT++模型包括一些通过消息传递通信的模型。分为简单模型和复合模型。

OMNeT++提供一些高效的工具为用户于描述真实系统的结构:


Ø  层次嵌套模型

Ø  模型是模型类型的实例

Ø  模型用消息在信道上通信

Ø  灵活的模型参数

Ø  拓扑描述语言

 

OMNeT++模型常常被作为网络。模型嵌套深度不受限制,允许用户反应真实系统的逻辑结构。模型结构被OMNeT++的NED语言描述。

对于报文传输模拟,连接支持以下参数:数据率,传输延迟,比特错误率和报文错误率以及可以disabled。

一个OMNeT++模型包括以下部分:

Ø  NED语言拓扑描述(.ned)

Ø  消息定义(.msg)

Ø  简单模型源(.h和.cc)

模拟系统提供:模拟核和用户结构组件。

OMNeT++运行:

(1)       使用opp_msgc程序将.msg文件翻译成C++代码。

(2)       所有的C++源文件被编译和与模拟核和用户接口库链接形成模拟执行文件或者共享库。

(3)       当仿真开始时,NED文件被动态加载。

(4)       当程序开始时,首先读NED文件,其中包括了模型的拓扑结构,然后读配置文件(通常是omnetpp.ini)。

(5)       程序的输出写在结果文件中:output vector files,output scalar files和可能的用户自定义文件。输出文件时行结构的,能够被matlab,GNU R, Perl和Python等使用。

 

   OMNeT++提供高效的工具为用户区描述真实系统结构。

(1)       嵌套层次模型

(2)       模型是模型类的实例

(3)       模型通过信道用信息交流

(4)       灵活的模型参数

(5)       拓扑描述语言

 

   Message: Modeules communicate byexchanging messages. Messages can contain arbitrarily complex data structures.Simple modules can send messages either directly to their destination or alonga predefined path, through gates and connections.

   Gate: Gates are the input and outputinterfaces of modules; messages are sent out through output gates and arrivethrough input gates.

   Connection: Each connection(also calledlink) is created within a single level of the module hierarchy: within acompound module, one can connect the corresponding gates of two submodules, ora gate of one submodule and a gate of the compound module. Connections supportthe following parameters: data rate, propagation delay, bit error rate andpacket error rate, and may be disabled.

   Parameters: Modules can haveparameters. Parameters can be assigned in either the NED files or theconfiguration file omnetpp.ini. Parameters can be used to customize simplemodule behavior, and to parameterize the model topology. Parameters can takestring, numeric or Boolean values, or can contain XML data trees.

 

文件结构: