Ets_Nt_Import_Port_Attribute_Add()
Note: Requires OPNET Development Kit
Abstract
Adds an attribute to a port on a node.
Syntax
Ets_Nt_Import_Port_Attribute_Add (port_ptr, name, value)
| Argument | Type | Description |
|---|---|---|
port_ptr |
EtsT_Nt_Import_Port* |
Port of interest. |
name |
const char* |
Name of the attribute to add (see Details). |
value |
const char* |
Value of the attribute. |
Return Type
EtsT_Nt_Import_Attribute*
The newly added port attribute.
Header
ets_nt_obj_import.h
Details
Ports do not have attributes per se. Instead, you should provide the name of the node attribute that refers to this port. For example, suppose you have an interface named my_interface and you want to set the node attribute
IP Routing Parameters [0].Interface Information [n].Status
where n refers to the row for this interface. You would pass name as
IP Routing Parameters [0].Interface Information [my_interface].Status
During the import process, the interface name is replaced with the corresponding row number and place the attribute on the correct object.
This function generates a recoverable error if port_ptr is NIL or name is unspecified (NIL pointer or empty string).