%description: Check that $MODULE_NAME etc parameters are properly recognised in the path expression: xmldoc("filename.xml", "pathexpr") $MODULE_FULLPATH, $MODULE_FULLNAME, $MODULE_NAME, $MODULE_INDEX, $MODULE_ID $PARENTMODULE_FULLPATH, ... $GRANDPARENTMODULE_FULLPATH,... %file: test.xml %global: #ifdef _MSC_VER #pragma warning(disable:4786) #endif %file: test.ned module Dummy { } simple Simple { parameters: xml by_module_fullpath; xml by_module_fullname; xml by_module_name; xml by_module_index; xml by_module_id; xml by_parentmodule_fullpath; xml by_parentmodule_fullname; xml by_parentmodule_name; xml by_parentmodule_index; xml by_parentmodule_id; xml by_grandparentmodule_fullpath; xml by_grandparentmodule_fullname; xml by_grandparentmodule_name; xml by_grandparentmodule_index; xml by_grandparentmodule_id; } module Subnet { submodules: dum1: Dummy; dum2[2]: Dummy; simp[1]: Simple; dum3: Dummy; } network Net { submodules: subnet[1]: Subnet; } %file: test.cc #include #include using namespace omnetpp; namespace @TESTNAME@ { class Simple : public cSimpleModule { public: Simple() : cSimpleModule(16384) { } virtual void activity() override; }; Define_Module(Simple); void Simple::activity() { for (int i=0; igetTagName() << " id='"<< node->getAttribute("id") << "'>" << endl; } } }; //namespace %inifile: test.ini [General] network = Net cmdenv-express-mode = false **.by_module_fullpath = xmldoc("test.xml","//foo[@att=$MODULE_FULLPATH]") **.by_module_fullname = xmldoc("test.xml","//foo[@att=$MODULE_FULLNAME]") **.by_module_name = xmldoc("test.xml","//foo[@att=$MODULE_NAME]") **.by_module_index = xmldoc("test.xml","//foo[@att=$MODULE_INDEX]") **.by_module_id = xmldoc("test.xml","//foo[@att=$MODULE_ID]") **.by_parentmodule_fullpath = xmldoc("test.xml","//pfoo[@att=$PARENTMODULE_FULLPATH]") **.by_parentmodule_fullname = xmldoc("test.xml","//pfoo[@att=$PARENTMODULE_FULLNAME]") **.by_parentmodule_name = xmldoc("test.xml","//pfoo[@att=$PARENTMODULE_NAME]") **.by_parentmodule_index = xmldoc("test.xml","//pfoo[@att=$PARENTMODULE_INDEX]") **.by_parentmodule_id = xmldoc("test.xml","//pfoo[@att=$PARENTMODULE_ID]") **.by_grandparentmodule_fullpath = xmldoc("test.xml","//gpfoo[@att=$GRANDPARENTMODULE_FULLPATH]") **.by_grandparentmodule_fullname = xmldoc("test.xml","//gpfoo[@att=$GRANDPARENTMODULE_FULLNAME]") **.by_grandparentmodule_name = xmldoc("test.xml","//gpfoo[@att=$GRANDPARENTMODULE_NAME]") **.by_grandparentmodule_index = xmldoc("test.xml","//gpfoo[@att=$GRANDPARENTMODULE_INDEX]") **.by_grandparentmodule_id = xmldoc("test.xml","//gpfoo[@att=$GRANDPARENTMODULE_ID]") %contains-regex: stdout by_module_fullpath: by_module_fullname: by_module_name: by_module_index: by_module_id: by_parentmodule_fullpath: by_parentmodule_fullname: by_parentmodule_name: by_parentmodule_index: by_parentmodule_id: by_grandparentmodule_fullpath: by_grandparentmodule_fullname: by_grandparentmodule_name: by_grandparentmodule_index: by_grandparentmodule_id: