Ets_Nt_Import_Port_Attribute_Add()
注意: 需要 OPNET Development Kit
摘要
为节点上的端口添加一个属性。
语法
Ets_Nt_Import_Port_Attribute_Add (port_ptr, name, value)
| 参数 | 类型 | 说明 |
|---|---|---|
port_ptr |
EtsT_Nt_Import_Port* |
待处理的端口。 |
name |
const char* |
要添加的属性名称(参见详情)。 |
value |
const char* |
属性值。 |
返回类型
EtsT_Nt_Import_Attribute*
新添加的端口属性。
头文件
ets_nt_obj_import.h
详情
端口本身并没有属性。应当提供引用该端口的节点属性的名称。例如,假设有一个名为 my_interface 的接口,要设置节点属性
IP Routing Parameters [0].Interface Information [n].Status
其中 n 指该接口对应的行号。此时应将 name 传入为
IP Routing Parameters [0].Interface Information [my_interface].Status
在导入过程中,接口名称会被替换为对应的行号,并将该属性放置到正确的对象上。
如果 port_ptr 为 NIL 或 name 未指定(NIL 指针或空字符串),此函数会产生一个可恢复错误。