riebl / artery

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

indicate() not triggering #125

Closed jweadick closed 4 years ago

jweadick commented 4 years ago

Hi @riebl , me again!

I am having some trouble with the indicate() function that I'm hoping you can help me with. I have edited the highway_police scenario quite a bit, the main point of which is that the PoliceClearLane.msg is is set up as packet PoliceClearLane { string vehicleId; double vehicleSpeed; double vehicleAngle; double vehiclePositionX; double vehiclePositionY; }; all of which runs smoothly with my modified PoliceService.h and .cc files. However, when I try to send this packet to my ClearLaneService service, the indicate() function is no longer triggering and I am very unsure as to why. I did introduce a second message that is only sent by the cars equipped with the ClearLaneService service and declared that in CMakeLists.txt by using generate_opp_message(MathCar.msg TARGET police DIRECTORY police_msgs) under the first generate_opp_message(...) and was thinking that this may be causing my ClearLaneService::indicate() function to only trigger when a MathCar cPacket is sent to it rather than a PoliceClearLane cPacket, but am unsure whether this is the issue or how to remedy it. If that wouldn't be an issue, I'm wondering if you have any ideas as to why ClearLaneService::indicate() is no longer triggering, and, if it's because I modified the PoliceClearLane cPacket, how I can set up ClearLaneMessage::indicate() to receive this packet properly. In PoliceService.cc, I send the packet as packetData and have my ClearLaneService::indicate() function set up as follows void ClearLaneService::indicate(const vanetza::btp::DataIndication& ind, omnetpp::cPacket* packetData). I then am supposed to receive that message with auto mathCarInfo = check_and_cast<const PoliceClearLane*>(packetData) which as of right now is not occurring as ClearLaneService::indicate() does not even get entered.

Let me know if you need more code or clarification to get a better context of my question!

Best,

Josh Weadick

jweadick commented 4 years ago

It appears the issue wasn't my message but rather the signal strength parameters INET requires for accepting a transmission! I'm going to do some more digging to try to figure out what those parameters are exactly as that'll determine the distance my cars can agree to communicate within but just wanted to let you know the issue has been resolved!