Ets_Client_State_Handlers_Register()

Note: Requires OPNET Development Kit

Abstract

Registers a client state type and informs the program of the functions to use for copying, deallocating, reading, and writing for client state.

Syntax

Ets_Client_State_Handlers_Register (client_state_type, state_copy_create_proc, state_destroy_proc, state_read_proc, state_write_proc)
Argument Type Description
client_state_type const char * Unique state registration string
state_copy_create_proc EtsT_Client_State_Copy_Create_Proc Handler invoked to copy the state, such as when an object is copied
state_destroy_proc EtsT_Client_State_Destroy_Proc Handler invoked when the state needs to be destroyed
state_read_proc EtsT_Client_State_Read_Proc Handler invoked when the state needs to be read from disk storage with the scenario
state_write_proc EtsT_Client_State_Write_Proc Handler invoked when the state needs to be written to disk with the scenario data

Return Type

EtsT_Client_State_ID

State represented by these handlers. An invalid value is returned if the registration failed.

ets_pstate.h

Details

To associate some additional information (client state) with objects, you must register a set of handlers that determine how that state is managed. The handlers are used to copy the state (when a scenario is duplicated), destroy the state (when a scenario is destroyed), and read/write the information to/from disk.

The state type can only have one set of associated handlers. Do not register twice with the same type (an error will be reported and an invalid state ID will be returned).

The handler prototypes are given in EtsT_Client_State_Copy_Create_Proc, EtsT_Client_State_Destroy_Proc, EtsT_Client_State_Read_Proc, and EtsT_Client_State_Write_Proc.

本站文档由 北京智网畅联科技有限公司 整理、翻译并提供 · Documentation compiled and provided by Beijing ZNetLink Technology Co., Ltd.

交流群 · QQ Group:OPNET/智网妙算网络仿真交流群(群号 486383494)

原文档 © 2017 Riverbed Technology · 本站为公益翻译,由 AI 辅助完成,请仔细甄别

Original documentation © 2017 Riverbed Technology. Community translation, AI-assisted. Contact: jiazequn@znetlink.com