Package Overview
The ICI (Interface Control Information) package is a collection of Kernel Procedures concerned with the ICI simulation entity, which is an acronym for Interface Control Information. An ICI is a structured collection of data that is transferred between processes, as a form of inter-process communication. An ICI becomes associated with an interrupt if a process installs the ICI prior to taking the action that causes the interrupt. Layered protocol interfacing is the main application of ICIs, but they can also be used to associate information with sophisticated self interrupts or peer-to-peer remote interrupts.
ICIs are dynamic simulation entities, since they are created and destroyed as needed during the execution of a process. The KP op_ici_create() is used to create ICIs, based on a specified ICI format. An ICI format, which has been created using the ICI Format Editor, determines the list of attribute names and data types supported by the newly created ICI. After an ICI is created, op_ici_create() returns a pointer to the ICI, which is used to reference the ICI in most Ici package KPs.
When an existing ICI is no longer necessary, it can be destroyed using the KP op_ici_destroy(). Destruction entails the deallocation of the ICI’s memory resources. ICIs are usually destroyed by the process that receives them, because the receiving process is most aware of when they have fulfilled their function.
A newly created ICI has no information contained within it; this must be added on a per-attribute basis. The KPs op_ici_attr_set_dbl(), op_ici_attr_set_int32(), op_ici_attr_set_int64(), and op_ici_attr_set_ptr() are used to set the value of a single ICI attribute.
Multiple ICIs can be created by a process, assigned attribute values, and maintained by storing their pointers in state or temporary variables. However, only one ICI per process will be actively associated with outgoing interrupts. In order to install an ICI as the one that should be associated with interrupts, the KP op_ici_install() should be invoked with a pointer to the ICI. An ICI will stay installed until another ICI is installed using the same method.
When an ICI has been received by a process, a pointer to it can be obtained by the KP op_intrpt_ici(). The ICI’s attribute values can then be obtained via the KPs op_ici_attr_get_dbl(), op_ici_attr_get_int32(), op_ici_attr_get_int64(), and op_ici_attr_get_ptr(). Because some process models might have to accept ICIs of several different formats containing different attributes, it might be necessary to verify that an attribute is present with op_ici_attr_exists() prior to extracting values.
When a sophisticated process expects that interrupts will arrive that are associated with different types of ICIs, it can identify the format of a received ICI via the KPs op_ici_format() (to obtain the name) and op_ici_is_format() (to test the name).
While debugging process models, you can print the contents of an ICI with the KP op_ici_print(). With the KP op_ici_format_print_proc_set() you can print custom ICI structure fields. You can get the ID of an ICI in numeric or string format by using op_ici_id() or op_ici_id_str_get(), respectively.