riebl / artery

OMNeT++ V2X simulation framework for ETSI ITS-G5
GNU General Public License v2.0
204 stars 132 forks source link

How can I build aretry in omnet? #11

Closed zzy199311 closed 6 years ago

zzy199311 commented 6 years ago

Thank you for the former question's answer.The question finally find is I use omnet++ ver5.2, but 5.1 is ok. Now I can run example successfully by cmake -- buid . As a noob ,I want to use omnet +sumo+artery+vanetza to simulate ITS-G5 routing algorithm,so I import artery-master as existing Project into omnet++,,and build project. Then I found artery build failed in omnet, but modules nested such as veins, inet ,veins-inet build successfully.So I failed to run example. I wonder if i need to build artery in omnet ,then create my module.If I need, what should I do to fix the error? errors like this: Description Resource Path Location Type 'NodeStatus': no such module type TestNode.ned /artery-master/extern/inet/tests/misc/lifecycle/lib line 21 NED Consistency Problem Description Resource Path Location Type declared package "" does not match expected package "extern.inet.tests.features" FeatureTest.ned /artery-master/extern/inet/tests/features line 1 NED Consistency Problem declared package "" does not match expected package "extern.inet.tests.misc.etherfixes" network-hub.ned /artery-master/extern/inet/tests/misc/etherfixes line 1 NED Consistency Problem declared package "" does not match expected package "extern.inet.tests.misc.etherfixes" network-switch.ned /artery-master/extern/inet/tests/misc/etherfixes line 1 NED Consistency Problem declared package "" does not match expected package "extern.inet.tests.misc.etherfixes" network-twohosts.ned /artery-master/extern/inet/tests/misc/etherfixes line 1 NED Consistency Problem declared package "" does not match expected package "extern.inet.tests.misc.lifecycle.lib" TestNode.ned /artery-master/extern/inet/tests/misc/lifecycle/lib line 1 NED Consistency Problem declared package "" does not match expected package "extern.inet.tests.misc.ns3.lib" Ns3Test.ned /artery-master/extern/inet/tests/misc/ns3/lib line 1 NED Consistency Problem declared package "" does not match expected package "extern.inet.tests.module.lib" ClientServer.ned /artery-master/extern/inet/tests/module/lib line 1 NED Consistency Problem declared package "" does not match expected package "extern.inet.tests.module.lib" EthTest.ned /artery-master/extern/inet/tests/module/lib line 1 NED Consistency Problem .... ————————————————————————————————————————————— however, I right click artery in omnet ,chose proporities, click OMNET++,click NED SOURCE Folders, and add following path: extern.inet extern.veins src scenarios

then apply and ok. Now Artery show no errors. But when I try to run omnetpp.ini, error occurs again Description Resource Path Location Type No such NED type: artery.envmod.World omnetpp.ini /artery-master/scenarios/artery line 64 Inifile Validation Problem Description Resource Path Location Type No such NED type: artery.inet.World omnetpp.ini /artery-master/scenarios/artery line 50 Inifile Validation Problem No such NED type: artery.veins.World omnetpp.ini /artery-master/scenarios/artery line 21 Inifile Validation Problem

What's more, when I choose *.ned, omnet will inform me: This NED file is not under a NED Source Folder, and will be opened in a standard text editor. [...] what should I do? Thank u. Have a nice day XD

riebl commented 6 years ago

In my opinion, following steps are the easiest way to import Artery as project into the OMNeT++ IDE:

  1. cmake /artery/root/dir -G 'Eclipse CDT4 - Unix Makefiles'
  2. Import -> Select root directory (select directory where you executed step 1) -> Finish
  3. Right-click on project -> Add OMNeT++ support

There is no .nedfolders file in Artery's root directory, mainly because I don't use the IDE at all. Feel free to add such a file and send a pull request. Please note that some features of the IDE such as its makefile generator are not used by Artery at all.

zzy199311 commented 6 years ago

I follow all 3 steps, then I build the project in omnet++, but there are still some errors: make[2]: [CMakeFiles/build_veins] Error 2 CMakeFiles/build_veins.dir/build.make:57: recipe for target 'CMakeFiles/build_veins' failed make[1]: [CMakeFiles/build_veins.dir/all] Error 2 make[2]: Leaving directory '/home/zzy/workspace/test/artery-master' CMakeFiles/Makefile2:99: recipe for target 'CMakeFiles/build_veins.dir/all' failed make[3]: No rule to make target 'inet'。stop。 CMakeFiles/build_inet.dir/build.make:57: recipe for target 'CMakeFiles/build_inet' failed make[2]: [CMakeFiles/build_inet] Error 2 make[1]: [CMakeFiles/build_inet.dir/all] Error 2 make[2]: Leaving directory '/home/zzy/workspace/test/artery-master' CMakeFiles/Makefile2:131: recipe for target 'CMakeFiles/build_inet.dir/all' failed make[2]: [src/artery/CMakeFiles/build_vanetza] Error 2 make[1]: [src/artery/CMakeFiles/build_vanetza.dir/all] Error 2 src/artery/CMakeFiles/build_vanetza.dir/build.make:57: recipe for target 'src/artery/CMakeFiles/build_vanetza' failed make[2]: Leaving directory '/home/zzy/workspace/test/artery-master' CMakeFiles/Makefile2:309: recipe for target 'src/artery/CMakeFiles/build_vanetza.dir/all' failed [ 65%] Built target storyboard make[1]: Leaving directory '/home/zzy/workspace/test/artery-master' Makefile:83: recipe for target 'all' failed make: [all] Error 2

It seems that there are something wrong when build inet vanetz,veins. In fact, when I excute step1, I have to build vanetza,inet,veins before I cmake aretry. What's more, If I want to simluate ITS-G5 with artery, what I can do is:

  1. import artery in omnet++, and build my rsu.ned or car.ned
  2. directly change the code in vanetza(I plan to replace the rsu and map file in example, build my simulation by modifying example) Is my idea right? I think it's inconvenient to communicate in such way, It will be ok to connect me by email: zzy199311@foxmail.com. Anyway, thank u!
riebl commented 6 years ago

Closing because of inactivity.