Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help importing artery as a project in OMNeT++ #167

Closed
mkmohitkmr opened this issue Mar 6, 2021 · 5 comments
Closed

Help importing artery as a project in OMNeT++ #167

mkmohitkmr opened this issue Mar 6, 2021 · 5 comments

Comments

@mkmohitkmr
Copy link

I am new to artery and want to use it to implement a scenario to send DENMs from a car in an accident. I am not able to import artery as a project in the OMNeT++ IDE, please help me with that.
Also, I couldn't find a documentation on artery which could give me an idea about the modules which could work in the required implementation. I would be really obliged if someone could give me a basic understanding of that.

Thanks in advance!

@riebl
Copy link
Owner

riebl commented Mar 8, 2021

CMake can generate an Eclipse CDT project for you, that can be imported in the Eclipse-based OMNeT++ IDE as an existing project. It is recommended to move the build directory out of your working copy: I assume that artery-source is the cloned git repository and artery-ide is your build directory. Both are sibling directories.
While you are in the artery-ide directory, tell CMake to use the Eclipse generator explicitly: cmake ../artery-source -G "Eclipse CDT4 - Unix Makefiles"
Then, import the artery-ide directory as an existing project into your workspace. Of course, you can use different directory names.

That said, I have not used the OMNeT++ IDE for years because its Eclipse base just feels too slow and cumbersome. Instead, I prefer to handle Artery just as any other C++ project. In fact, any IDE with decent support for CMake projects can be employed.

@MadeInPierre
Copy link

Hi @riebl,
I am also interested in using an IDE with Artery for the development of new scenarios. Unfortunately, I am still learning C++ and do not see how to use CMake nicely.

Would you have recommendations on how to integrate Artery's CMake project with any IDE ? I wish in particular to use auto-complete in VSCode (on Ubuntu). Building, running and editing simulations is doing fine, but it'd be nice to have auto-complete including for Artery and OMNeT++ related includes.
Thank you.

@riebl
Copy link
Owner

riebl commented Mar 9, 2021

I can confirm that you can use VSCode for development related to Artery. You should install a few extensions (beyond C++) to make VSCode aware of CMake. At the moment, I have installed twxs.cmake and ms-vscode.cmake-tools, which work fine. The extension schrej.omnetpp-ned adds syntax highlighting for OMNeT++ NED files.

@MadeInPierre
Copy link

Thank you for you reply. I have indeed installed the same extensions which help with syntax highlighting and reference navigation. The extensions have however found themselves without any manual configuration, but there is still missing the auto-completion suggestions. Some #includes are also not recognized. Would you know how to enable this feature?

I currently open the root Artery folder as the root folder in VSCode. I suppose some CMake related config entries in .vscode/settings.json would need to be added, but I am not sure what to add to enable autocomplete for Artery, OMNeT++ and all dependencies' classes all at once (just like what's enabled in OMNET++ Eclipse IDE for INET and OMNeT).
Thanks for your help!

@riebl
Copy link
Owner

riebl commented Mar 10, 2021

I think I have no special VSCode settings, except maybe cmake.configureOnOpen is set to true. This option simply triggers CMake: Configure when a CMake workspace is opened. The include directories are found as soon as the CMake configuration is completed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants