Ets_Ma_Files_Apply()

Note: Requires OPNET Development Kit

Abstract

Given a list of model assistant files and a block name, applies a handler to all blocks with the specified name.

Syntax

Ets_Ma_Files_Apply (file_lptr, block_name, handler, state_ptr)
Argument Type Description
file_lptr PrgT_List* List of model assistant data files
block_name const char* Block name of the data to process
handler EtsT_Ma_Block_Handler Handler function to process the specified data
state_ptr void* Pointer to an object or list. The function passes this pointer to the block handler.

Return Type

EtsT_Compcode

ets_api_ma.h

Details

This function provides a mechanism for applying a handler to a block of data.This function is called to apply model assistant file blocks to the current network. It can be used in the following ways:

  • If both block_name and handler are supplied, this function iterates through file_list and applies handler to all blocks of type block_name.
  • If block_name is supplied but handler is NULL, this function iterates through file_list and applies the default core handler to all blocks of type block_name. If no default handler is defined for block_name, this function does nothing.
  • If handler is supplied but block_name is NULL, this function returns an error reporting that this is an invalid input.
  • If both handler and block_name are NULL, this function applies default handlers for all blocks named in the model assistant configuration file (see Package Overview for more information about this file). If the configuration file does not specify a handler for a block, the import engine skips that block.

The state pointer gets passed to the handler, as described in EtsT_Ma_Block_Handler. If the handler needs to reference an external object, you can use this argument to pass a pointer to that object.

You can specify one of the standard block handlers for the handler argument. If you call one of these handlers, pass NIL for the state_ptr argument. To see the declarations for these handlers, look in the file <reldir>/sys/include/ets_api.h.

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