OPNET的节点域
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
OPNET学习心得(3): OPNET的节点域
节点域(Node Domain) (不全,有待进一步补充)
(参考Main Menu->Modeling Concept->Node Domain)
1.模块定义(Module Definitions)
modules表示通信节点中产生、消耗、处理数据的部分。
有以下几种类型:processors, queues, generators, receivers, transmitters。
1.1处理器模块(Processor Modules)
1.2队列模块(Queue Modules)
Queue和Processor之间最主要的区别是:Queue还有一个附加资源,称之为子队列(subqueue)。
subqueue大大地方便了缓存和管理数据包的收集。
之后详述。
subqueue作为queue的一个object,以queue的attribute中compound attribute的形式体现。
1.3发送模块(Transmitter Modules)
有三种发送模块:point-to-point, bus, radio。
transmitter从一个或者多个输入流中收集packet,然后把它们转发到相应通信链路上的channel中去。
在某个给定的输入流收到的数据被发送到同一个标号的channel上去。
每个channel都有自己的数据率。
如果packet到的时候,相应的channel正在处理之前的packet,那么该packet将被自动放到一个buffer中排队等待,这个buffer是无尽的。
Channels是transmitter的下属object。
同样,也是作为一个compound attribute。
transmitter也有一些统计功能,可以通过statistics wire和statistics probe获取。
1.4接收模块(Receiver Modules)
也有三种接收模块,跟发送模块对应。
其功能也和transmitter类似,但是方向上显然不同。
2.连接定义(Connection Definitions)
Connection表示一个node下各个module之间的通信路径和关联关系。
有三种类型的connection: packet stream, statistic wires, logical associations。
2.1包流(packet streams)
Packet streams用来负责把一个数据包从源module发送到destination module去。
stream方式传送有三种方法来通知destination module包到达:scheduled, forced, quiet。
scheduled是按调度原则产生interrupt;forced是立即发生;quiet是不产生任何interrupt。
generator和receivers的output stream通过流的intrpt method属性来决定采用什么方法。
packet stream支持在packet从源module进入stream到从stream进入目的module这段时间内的延迟仿真。
缺省值是0。
2.2统计线(statistic wires)
统计线传输关于源module的状态信息。
每个module都有一组本地输出统计(local output statistics),他们的值会在仿真过程中适时地更新。
他们作为了statistic wires的信息源。
像Queue和Processor这样的module他们有一些由进程模型定义的统计数据,这些数据通过op_stat_write()来更新。
还有一些module他们的statistics是有Simulation Kernel在适当的时候自动的更新的。
每根statistics wire只能传输一个output statistics这个通过statistics wire的src stat属性确定。
Processor和queue modules也有一组输入统计(input statistics),作为statistics wire的目的端。
进程模型通过调用op_stat_local_read()来访问当前的输入统计值。
要注意,output statistics可以作为多个statistics wire的源,同样input statistics也可以作为多个statistics wire的目的。
当statistics变化的时候,目的module将被一个statistic interrupt通知。
interrupt发生的条件由statistic wire的属性控制,这个属性是statistic trggers。
在node model中,statistic wire一般有两种使用方法。
第一种,用来动态监控其他部分的状态。
第二种,用来发送信号通知别人自己的状态变换,称之为旗语(semaphores)。
2.3逻辑关联(Logical Associations)
Logical associations是一种特殊的连接,并不在模块间传输任何数据,它用来指明两个模块间的关系。
目前,他们只能支持特定类型的transmitter和receiver,比如:point-to-point, bus。
所以logical association也被称之为logical transceiver associations。
每对transceiver只能代表节点和一个link相连。
3.节点模型接口(Node Model Interface)
跟Process model非常类似。
3.1节点模型属性(Node Model Attributes)
3.2节点属性接口和衍生节点模型(Node Attribute Interfaces and Derived Node Models)
3.4统计提升(Statistic Promotion)
4.队列建模(Modeling Queues)
队列有一些预定义的基模型,分为两类:动态队列(active queues)和被动队列(passive queues),具体的模型详见参考文献。
4.1子队列抽象和包编号(Abstract Subqueue and Packet Indices) 4.2实现优先级队列(Implementing Priority Queues)
4.3实现有限队列(Implementing Finite Queues)
5.分层协议建模(Modeling Layered Protocols)
6.共享资源建模(Modeling Shared Resources)。