Ets_Ma_Block_Write()

Note: Requires OPNET Development Kit

Abstract

Writes a list of name/value pairs to a block in a model assistant file.

Syntax

Ets_Ma_Block_Write (filename, block_name, name_value_lptr)
Argument Type Description
filename const char* Name of the model assistant file
block_name const char* Name of the block in the assistant file
name_value_lptr PrgT_List* Pointer to a list of name/value pairs; each pair should be of type PrgT_File_Parse_Name_Value_Pair*.
options int Write options. Enter one of the following values:
• ETSC_MA_FILE_WRITE_APPEND—If file exists, append the new block to the end of the file
• ETSC_MA_FILE_WRITE_OVERWRITE—If file exists, overwrite original block contents in the file with the new block

Return Type

EtsT_Compcode

ets_api_ma.h

Details

This function copies the contents of the name/value list to a block within an assistant file.

  • If <filename> already exists, this function overwrites the original block contents or appends the new block to the end of the file (depending on the <options> argument).
  • If <filename> does not exist, this function creates a new model assistant file; this file contains the specified block and a header block that specifies the version number of the model assistant. (If <filename> does not include an ".ma" extension, this function appends it automatically.)

The resulting block appears in this format:

start_<block_name>
    <name_string_1>:    <value_string_1>
    <name_string_2>:    <value_string_2>
    ...
end_<block_name>

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