op_ima_sim_attr_get_int32()
Abstract
Obtains the value of an integer simulation attribute.
Syntax
op_ima_sim_attr_get_int32 (attr_name, value_ptr)
| Argument | Type | Description |
|---|---|---|
attr_name |
const char * |
name of the attribute-of-interest [This value must specify an attribute defined in the simulation environment, or a prompt will be issued for the attribute’s value.] |
value_ptr |
int * |
pointer to a variable to be filled with the specified attribute’s value |
Return Type
Compcode
OPC_COMPCODE_SUCCESS if the attribute value was successfully obtained; OPC_COMPCODE_FAILURE otherwise.
Example
/* If specified, obtain the values set for the maximum */
/* number of log entries on a per "category" basis. */
if (op_ima_sim_attr_exists (ATMC_CONF_LOG_LIMIT))
op_ima_sim_attr_get_int32 (ATMC_CONF_LOG_LIMIT, &atm_conf_log_limit);
Details
None.
Purpose
Provides a mechanism to obtain simulation attributes that have been assigned values at simulation runtime. This KP works identically to op_ima_sim_attr_get(), but applies only to simulation attributes of data type integer. Refer to op_ima_sim_attr_get() for full purpose and details.
Errors
- Same as op_ima_sim_attr_get().
Reference
- Use the KP op_ima_sim_attr_get_dbl() to obtain the value of a simulation attribute of type double
- Use the KP op_ima_sim_attr_get_str() to obtain the value of a simulation attribute of type string
- Use the KPs op_ima_obj_attr_get(), op_ima_obj_attr_get_dbl(), op_ima_obj_attr_get_int32(), op_ima_obj_attr_get_objid(), op_ima_obj_attr_get_str(), and op_ima_obj_attr_get_toggle() to obtain the value of an object attribute
- Use the KPs op_ima_obj_attr_set(), op_ima_obj_attr_set_dbl(), op_ima_obj_attr_set_int32(), op_ima_obj_attr_set_objid(), op_ima_obj_attr_set_str(), and op_ima_obj_attr_set_toggle() to assign a value to an object attribute
- Use the KP op_ima_obj_svar_get() to obtain the value of a process state variable
- Use the KP op_ima_obj_command() to issue a command to an object