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

Adding a new DEN usecase - class not found #65

Closed
ruipatcheco opened this issue Mar 12, 2019 · 2 comments
Closed

Adding a new DEN usecase - class not found #65

ruipatcheco opened this issue Mar 12, 2019 · 2 comments

Comments

@ruipatcheco
Copy link

ruipatcheco commented Mar 12, 2019

Hello,

With the help of your work, I can build some simple scenarios of my own. Thanks so much!!

Much similarly to #60 (comment)

My scenario:
A truck controlled by Storyboard will stop and send a DEN message, and vehicles receiving this message will stop or avoid the choosing the road where the truck is.

My work:
I added my DEN use case (IcyRoadUseCase) under artery/src/artery/application/den/ and modified mt-its2017 scenario to use my usecase (the reason I modified is because I don't know how to create a new one, I tried this: #49 but I wasn't successful) .

The problem and relevant test:
Whenever I run the altered mt-its2017, i get the following error:

Class "artery::den::IcyRoad" not found -- perhaps its code was not linked in, or
the class wasn't registered with Register_Class(), or in the case of modules and channels,
with Define_Module()/Define_Channel() -- in module (artery::DenService) World.node[0].middleware.DEN (id=85),
at t=0.1s, event 2

From my understanding, the error is saying that the module is not defined, but it is:

2019-03-12-182759_1241x599_scrot

So it seems the Makefiles are not compiling my IcyRoadUseCase, because in src/artery/CMakeFiles/core.dir/application/den it only shows the other usecases.o

2019-03-12-182209_624x599_scrot

I am very grateful of the work you have done and am using it for my master's thesis. Thank you for your help :D

Additional information:

services.xml:
service type="artery.application.DenService" name="DEN">
listener port="2002" />

usecases.xml:
usecase type="artery.application.den.IcyRoad" />

@riebl
Copy link
Owner

riebl commented Mar 13, 2019

Hi @ruipatcheco ,

please add your new source files to src/artery/CMakeLists.txt so they are compiled and linked into the final binary. In your particular case this would be a line "application/den/IcyRoadUseCase.cc" added to the add_library(core ...) target.

@ruipatcheco
Copy link
Author

Thank you for the help, I've done exacly as you said and everything is working great!

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

2 participants