zoukankan      html  css  js  c++  java
  • XML in NED of Omnet++(1)

    XML in NED of Omnet++

    The following example declares an xml parameter, and assigns an XML file to it:

    simple TrafGen {

        parameters:

            xml profile;

        gates:

            output out;

    }

    module Node {

        submodules:

            trafGen1 : TrafGen {

                profile = xmldoc("data.xml");

            }

            ...

    }

    It is also possible to assign an XML element within a file to the parameter:

    module Node {

        submodules:

            trafGen1 : TrafGen {

                profile = xmldoc("all.xml", "profile[@id='gen1']");

            }

            trafGen2 : TrafGen {

                profile = xmldoc("all.xml", "profile[@id='gen2']");

            }

    }

    <?xml>

    <profile id="gen1">

      <element>3</element>

      <element>5</element>

    </profile>

    <profile id="ge21">

      <element>9</element>

    </profile>

  • 相关阅读:
    struct2 学习总结
    c++ 容器(list学习总结)
    java 网络编程(五)----TCP进阶篇上传文本文件
    java 网络编程(四)----UDP进阶篇聊天小程序
    java 网络编程(三)---TCP的基础级示例
    java 网络编程(二)----UDP基础级的示例
    java 网络编程(一)---基础知识和概念了解
    GitHub和git和repo的使用
    android studio不能预览
    关于android studio2.3和android studio3.0
  • 原文地址:https://www.cnblogs.com/CUCmehp/p/1551473.html
Copyright © 2011-2022 走看看