EtsT_Ma_Block_Handler

Note: Requires OPNET Development Kit

Abstract

Handles actions when the user executes the Apply Model Assistant File operation.

Syntax

<block_handler_name> (block_handle, state_ptr)
Argument Type Description
block_handle PrgT_File_Parse_Block_Handle Handle to a block of data
state_ptr void* Pointer to an object or list. Ets_Ma_Files_Apply() passes this pointer to the block handler.

Return Type

EtsT_Compcode

EtsC_Compcode_Success if the block of data was imported into the network successfully, EtsC_Compcode_Failure otherwise.

ets_api_ma.h

Details

A block handler function defines the callbacks that are called when a model assistant file is read, and a block is found that matches the name specified in the Ets_Ma_Files_Apply() function. A block handler might apply the data directly, or it might call other helper functions to apply the data.

The <state_ptr> argument is passed from the caller of the Ets_Ma_Files_Apply() function. If the block handler needs to reference an external object, you can use this argument to pass a pointer to that object. Developers who write their own custom block handlers can make <state_ptr> reference anything they want. For example, you might want to pass a pointer to a hash table of network objects. The handler could use this table to match names in the model assistant files with objects in the network.

本站文档由 北京智网畅联科技有限公司 整理、翻译并提供 · 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