Ets_Obj_Client_State_Get()
Note: Requires OPNET Development Kit
Abstract
Returns the pointer to client's memory that was set onto an ETS object.
Syntax
Ets_Obj_Client_State_Get (obj_hndl, client_ID)
| Argument | Type | Description |
|---|---|---|
obj_hndl |
EtsT_Obj_Handle |
Handle to object with state pointer of interest. |
client_ID |
EtsT_Client_State_ID |
An object can have many different client state types. This identifies your client state type. |
Return Type
void *
State that you installed on this object via Ets_Obj_Client_State_Set(), or NULL.
Header
ets_pstate.h
Details
This function will return the client state pointer installed on the indicated object. This function will remove, or uninstall state pointer because the object no longer considers itself the owner of that state. The function Ets_Obj_Client_State_Access(), in contrast, will leave the state on the object and the object will continue to retain ownership of that state.
This function is useful when you want to obtain the state installed on an object and you want to remove that state from the object.
This function follows a pattern similar to the pattern used for getting and setting structure fields in a simulation packet. Calling Ets_Obj_Client_State_Set() sets the client state into the object. At that point the object acts as the owner of that memory. If the object is deleted, it will deallocate the client state. Calling Ets_Obj_Client_State_Get() removes the client state from the object.
NULL will be returned if no client state is installed on the object.