opnet之变量类型
2016-12-14 18:45
477 查看
Objid(对象id)和int(用户id)
对象id的变量类型是Objid用户id的变量类型是int
Objid是系统分配的对象识别号,全局唯一,整数。
user id是节点模型(对象的一种)的一个属性,由用户设置,不唯一。
对象分为两种:
抽象对象:复合属性
具体对象:模块、收信机、发信机、节点、子网
lmz:
尽管对象id是一个整数,但是又不仅仅是一个整数。
可以想象,opnet内部肯定维持了一张表(或者称为数据结构),表中的id就是对象id,每一个对象id对应着很多对象的属性。IMA核心函数提供了操作这张表的接口。我们可以获取或者修改对象的属性。
Evhandle
我们对事件的操作需要一个表示事件的符号,这个符号就是事件句柄。可以对事件进行删除等操作。
Prohandle
字面意思是进程句柄。可以想象提供了一个操作进程的符号。
Stathandle
统计量句柄。一声明、二注册、三写入
声明全局/局部统计量
注册统计量为统计量句柄
将SV/TV的值写入统计量句柄
shared*
/*Allocate, initialise, and install memory to be shared by the child process model*/ sharedptr = op_prg_mem_alloc(sizeof(shared)); sharedptr->partxsrcid = -1; sharedptr->chitxsrcid = -1; op_pro_modmem_install(sharedptr);
根进程创建子进程后,分配父子进程共享的内存空间。
lmz:
什么叫做句柄?
进程句柄、事件句柄、统计量句柄。
他们不是进程、事件、统计量。
只是提供了操作进程、事件、统计量的一个符号。
相应的核心函数通过这些符号来操作进程、事件、统计量。
Handle (computing)
In computer programming, a handle is an abstract reference to a resource. Handles are used when application software references blocks of memory or objects managed by another system, such as a database or an operating system. A resource handle can be an opaque identifier, in which case it is often an integer number (often an array index in an array or “table” that is used to manage that type of resource), or it can be a pointer that allows access to further information.
Common resource handles are file descriptors, network sockets, database connections, process identifiers (PIDs), and job IDs. Process IDs and job IDs are explicitly visible integers, while file descriptors and sockets (which are often implemented as a form of file descriptor) are represented as integers, but are typically considered opaque. In traditional implementations, file descriptors are indices into a (per-process) file descriptor table, thence a (system-wide) file table.
tags:opnet
相关文章推荐
- Java变量类型间的相互转换
- C#变量类型(1):引用类型和值类型
- 为什么在存储过程中局部变量不能申明text,ntext,image类型的,高手帮我解决一下啊?(急)
- java各变量类型间的相互转换
- 两个string类型的变量str1和str2,str1==str2,而 (object)str1!=(object)str2 的原因
- 在JavaScript中也玩变量类型强行转换
- C语言变量类型和占用字节数以及值的范围小结
- C# 3.0语言新特性(语言规范):1 具有隐式类型的局部变量
- perl 子程序传递参数不同类型变量 设置
- C#变量类型(1):指针
- 关于DTS中全局变量数据类型date
- C语言学习总结 一 关于变量类型
- 值类型局部变量必须先初始化才能使用,值类型成员变量可以不初始化。
- 在oracle的PL程序块中执行一个varchar2类型变量中的sql 语句
- 着色器和效果——1.3 变量类型
- 变量 声明变量 声明变量类型分类
- Java变量类型间的相互转换
- java中short类型变量
- C#的表达式,类型和变量
- Java变量类型间的相互转换