op_ici_attr_set_int64()
Abstract
Assigns the value of a 64-bit integer attribute in the specified ICI.
Syntax
op_ici_attr_set_int64 (iciptr, attr_name, value)
| 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 |
OpT_Int64 |
new value to assign to the specified attribute |
Return Type
Compcode
OPC_COMPCODE_SUCCESS if the attribute value was successfully obtained; OPC_COMPCODE_FAILURE otherwise.
Example
OpT_Int64 dest_addr = 215;
/* Set this information in the interface control */
/* information to be sent to the MAC layer. */
if (op_ici_attr_set_int64 (intf_mac_req_iciptr, "dest_addr", dest_addr) == OPC_COMPCODE_FAILURE)
fddi_gen_error ("Unable to set destination address in ICI", 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 iciptr. Note that the value assigned by this KP will overwrite any value previously assigned to the attribute. In addition, the new value assigned to the attribute will be accessible to any other process which maintains a pointer to the ICI.
Purpose
Provides a mechanism for a process to set the contents of an ICI for communication to another process. This capability forms the “transmit” side of ICI-based communications between processes. Attributes can be set in a freshly created ICI (as in the case of a per-packet communication of parameters) or in an ICI that has already been sent to one or more target processes (as in the case of a persistent shared memory arrangement). Because the modified ICI might still be pointed to by its originating process, op_ici_attr_set_int64() can be used to set results that the originating process can then obtain via op_ici_attr_get_int64(). This type of two-way communication implemented with an ICI is typically implemented with the ICI accompanying a forced interrupt so that the originating process can obtain results immediately.
Errors
- Program Abort: Segmentation violation. (due to an invalid ICI pointer, malformed ICI data structure, or incorrectly declared
valueargument). - Program Abort: KP requires process context.
- Recoverable Error: Attribute name (
<attr_name>) is unrecognized in ICI with format (<format_name>).
Reference
- Use the KPs op_ici_attr_get_dbl(), op_ici_attr_get_int32(), op_ici_attr_get_int64(), and op_ici_attr_get_ptr() to perform the inverse operation and access the value of an ICI attribute
- Use the KP op_ici_attr_set_dbl() to set the value of a double attribute in a specified ICI
- Use the KP op_ici_attr_set_int32() to set the value of a 32-bit integer attribute in a specified ICI
- Use the KP op_ici_attr_set_ptr() to set the value of a pointer attribute in a specified ICI
- Use the KP op_ici_create() to obtain a newly created ICI
- Use the KP op_ici_install() to install an ICI for association with outgoing interrupts
- Use the KP op_ici_attr_exists() to determine if an attribute is present in an ICI’s format