my message class is looks like this ..
Код: Выделить всё
message Custom { string src; float xPos; float yPos; bool target; } In sendpacket() ..i have code like this ..
Код: Выделить всё
const char* sourceModuleName = getParentModule()->getFullName(); // Get the current position of the node IMobility* mobilityModule = check_and_cast(getParentModule()->getSubmodule("mobility")); Coord currentPosition = mobilityModule->getCurrentPosition(); EV_INFO
Источник: [url]https://stackoverflow.com/questions/77977840/sending-packet-in-omnetpp-as-custom-class-message-object[/url]
Мобильная версия