Ets_Xml_Import()

Abstract

Imports network model information from an external XML file.

Syntax

Ets_Xml_Import (model_hndl, filename, postproc_func, client_data_ptr)
Argument Type Description
model_hndl EtsT_Model_Handle Specifies the network model that will be populated with new objects being imported via XML
filename const char * Full pathname of XML file being imported.
postproc_func EtsT_Xml_Import_Postproc_Func Post-processing callback function. This function is called after the import process is completed to allow further updates of the imported model objects.
client_data_ptr void * Client state pointer passed to each invocation of the postproc_func when the postproc_func is called by the simulation kernel during the import process.

Return Type

void

No return value.

ets_api_xml.h

Details

Ets_Xml_Import() allows the caller to populate a specified network model (determined by the model_hndl argument) with objects described through an XML file. The XML schema (DTD or Document Type Description file) ships in the <reldir>/sys/etc directory as network.dtd.

When this function is called, the Simulation Kernel reads the XML description of a network and creates objects that represent nodes, links, annotations, demands, and so on. The contents of the model identified by model_hndl are replaced by the objects described in the XML file—no objects that existed before the import are preserved.

The import process involves first creating a "skeleton" that creates raw node, link, demand, path, annotation, and subnet objects. After this skeleton is created, additional information can be attached to the objects in the model via the post-processing callback.

The post-processing callback function is called for each object that was created in the model. This function can perform whatever additional work is desired to flesh out the object. The prototype of the postproc function is given in EtsT_Xml_Import_Postproc_Func.

The default postprocessing function is Nt_Xmli_Postproc_Default(). It sets all attribute values on the object, as well as setting the subnet grid and bounds.

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