op_ici_attr_get_ptr()

Abstract

Obtains the value of a pointer attribute in the specified ICI.

Syntax

op_ici_attr_get_ptr (iciptr, attr_name, value_ptr)
Argument Type Description
iciptr Ici * pointer to the ICI-of-interest
[A pointer to an ICI can be obtained from two KPs: op_ici_create() returns a pointer to a newly allocated ICI (in an ICI-sending process), and op_intrpt_ici() returns a pointer to an ICI associated with an incoming interrupt (in an ICI-receiving process).]
attr_name const char * name of the attribute-of-interest
value_ptr void ** pointer to a variable to be filled in with the specified attribute’s value

Return Type

Compcode

OPC_COMPCODE_SUCCESS if the attribute value was successfully obtained; OPC_COMPCODE_FAILURE otherwise.

Example

/* Get the list Hard PVXs from the ICI. */
if (op_ici_attr_get_ptr (intrpt_iciptr, "Hard PVX Node Description",
		&hard_pvx_lptr) == OPC_COMPCODE_FAILURE)
	{
	ams_call_control_error
		("The Hard PVX List field in the ICI oms_atm_pvx_config has not been set",
		OPC_NIL, OPC_NIL);
	}

Details

The specified attribute name must be one of the attributes defined in the ICI format that is the basis of the ICI pointed to by the iciptr argument. Note that the value obtained by this KP is the current contents of the specified attribute in the ICI; it is not the contents of the attribute when the ICI was installed nor when the associated interrupt was scheduled.

Process models manipulate ICIs via their pointers and, unlike packets, there is no notion of ownership for an ICI. This means that several process models might concurrently have legitimate access to the same ICI data structure and interfere with each others’ use of the attributes. Another common problem occurs when the same ICI is used in association with multiple events. It is important to realize that while an ICI can be associated with multiple events, modifications to the ICI that are made in preparation for the later events might also affect the use of that ICI during earlier events, if these have not yet occurred at the time of the modification. For instance, if a process creates an ICI, assigns its attributes, installs it, sends out a packet, and then modifies an attribute of the ICI before the packet is received, the modified value will be the one provided when the process model receiving the packet accesses the ICI via this KP.

Purpose

Provides a mechanism for a process that has received an interrupt with an associated ICI to determine the values of the ICI’s pointer attributes. This capability forms the “receive” side of ICI-based communications between processes. Note also that, because a single ICI can be shared by multiple processes, it can be used for multi-way communication where a process that receives an interrupt obtains certain control information from the ICI, but also returns information by setting attributes in the same ICI. This is a particularly useful technique when used in combination with forced interrupts, since the return value can be accessed immediately by the originating process.

Errors

  • Program Abort: Segmentation violation (due to an invalid ICI pointer, malformed ICI data structure, or incorrectly declared value_ptr argument).
  • Recoverable Error: Attribute name (<attr_name>) is unrecognized in ICI with format (<format_name>).

Reference

本站文档由 北京智网畅联科技有限公司 整理、翻译并提供 · Documentation compiled and provided by Beijing ZNetLink Technology Co., Ltd.

交流群 · QQ Group:OPNET/智网妙算网络仿真交流群(群号 486383494)

原文档 © 2017 Riverbed Technology · 本站为公益翻译,由 AI 辅助完成,请仔细甄别

Original documentation © 2017 Riverbed Technology. Community translation, AI-assisted. Contact: jiazequn@znetlink.com