Ovis_Entity_From_Objid_Get()
Abstract
Retrieves the Ovis entity using the object ID of a site.
Syntax
Ovis_Entity_From_Objid_Get (des_objid, options)
| Argument | Type | Description |
|---|---|---|
des_objid |
Objid |
Object ID |
options |
int |
Specifies options (see Details) |
Return Type
OvisT_Entity *
Returns the entity, or OVISC_NIL.
Header
ovis_entity.h
Details
This function uses the ID of the simulated object to retrieve the associated Ovis entity.
If options is OVISC_ENTITY_FROM_SITE_ONLY, this function uses the site's object handle to retrieve the Ovis entity associated with the site. The function returns OVISC_NIL if no entity exists for that site.
If options is OVISC_ENTITY_FROM_SITE_OR_PARENTS, this function will also look at parent subnets to see if any has an associated entity. The search stops at the first ancestor with an entity.
Example
OvisT_Entity * ent_ptr;
/* Look for entity associated with node containing that process model */
ent_ptr = Ovis_Entity_From_Objid_Get (op_topo_parent (op_id_self ()),
OVISC_ENTITY_FROM_SITE_ONLY);
Errors
- Object ID (
<id>) is out-of-range. - Object ID (
<id>) refers to a restricted object. - Object
<hname>is not a fixed or mobile node or subnet.
Reference
- Use the function
Ovis_Entity_From_Objid_Create()to create an entity based on a provided object ID.