op_ici_id_str_get()
Abstract
Gets a string representation of an ICI ID.
Syntax
op_ici_id_str_get (iciptr, buffer)
| 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).] |
buffer |
char * |
pointer to area to be filled with the string representation of the ICI ID (must be large enough to hold the string). |
Return Type
void
No return value.
Example
char ici_id_str[20];
/* Get the ICI associated with the current interrupt */
iciptr = op_intrpt_ici ();
/* Get the ICI ID as a string */
op_ici_id_str_get (iciptr, ici_id_str);
Details
If the simulation uses module-based ID generation, the string returned in buffer consists of the ID of the module in which the ICI was created and the creation index in that module. Otherwise, it is simply the global ICI creation index.
Purpose
Provides a way to obtain a well-formed string representation of an ICI ID, regardless of whether ID generation is module-based or global.
Errors
- None.
Reference
- Use the KP op_ici_id() to obtain an ICI ID