op_id_check()
Abstract
Determines if an object ID is valid.
Syntax
op_id_check (objid)
| Argument | Type | Description |
|---|---|---|
objid |
Objid |
Object ID to be verified. |
Return Type
Boolean
OPC_TRUE if the object ID is valid; OPC_FALSE otherwise.
Example
if (op_id_check (mod_objid))
mod_root_prohndl = op_pro_root (mod_objid);
Details
An object ID is considered valid if it is greater than or equal to 0 and less than the total count of objects in the network.
Purpose
Provides a mechanism to verify the validity of an object ID before using it. Although this check is done automatically by most KPs and other APIs that take an object ID as an argument, it is not done when the super-optimized simulation kernel is being used. In such cases, you might want to use this KP to avoid anticipated problems. You can also use this KP with any kernel to avoid generating unwanted recoverable errors when a bad object ID is used.
Errors
- No errors are trapped.
Reference
- None