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>

  • 相关阅读:
    角色扮演游戏引擎的设计原理
    游戏服务器架构
    小谈网络游戏同步
    What is the single most influential book every programmer should read?
    Research Scientists and Engineers
    关于为什么不推荐使用用户定义表类型的说明
    程序员必须遵守的编程原则
    CacheStrategy缓存
    正能量
    MEF 和 MAF
  • 原文地址:https://www.cnblogs.com/CUCmehp/p/1551473.html
Copyright © 2011-2022 走看看