Отправка пакета в omnetpp как объект сообщения пользовательского классаC++

Программы на C++. Форум разработчиков
Гость
Отправка пакета в omnetpp как объект сообщения пользовательского класса

Сообщение Гость »


my message class is looks like this ..

Код: Выделить всё

message Custom {     string src;          float xPos;     float yPos;     bool target; } 
i have extended the UdpBasicApp to send the this custom message class..

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]

Вернуться в «C++»