Respected all,
I intend to use AODV protocol to route simple data packets between a set of nodes in a custom network. To meet that requirement, I tried including INET in my omnet++ project references and additionally, copied the code files for Ping App (which is being used by AODV protocol) into my project space.
My initial aim was to:
1) Update the Ping Payload .msg file to hold floating point values in an array. This gave errors on building the omnet++ project. "PingPayload_m.hh" and "PingPayload_m.cc" self generated files do not make the corresponding get and set methods for the newly added properties. Note that I copied the code files related to PingApp into my project so that any code changes made in those files do not reflect in the INET project and are local to my omnet++ project
2) Next I tried encapsulating my float temperature values inside the unsigned char array provided by PingPayload. In the PingApp::sendPing() method inside the PingApp.cc file, I create an unsigned array that holds my temperature value as a char array. I then assign the first element of this array to the PingPayload packet using the following line of code: "msg->setData(0, darray[0])". The objective was to transport a number 3 as a "3" inside the char array of the ping payload. This throws the following error: "Array of size 0 indexed by 0". The sense it gives me is that the ping payload array defined by the PingPayload.msg is not initialized. How do I initialize it with some space so that it can hold on the value I send?
I am new to C++ and OMNET++.
* My objective is to send some custom data inside the ping payload packet used by the Ping App application in INET.
* My overall objective is to send my custom data in my separate omnet++ project through AODV protocol. Now this protocol in the INET sample examples uses ping packets. Hence I want to firstly see if I can keep my custom data inside the Ping App packet, and then hope for this packet to be transferred between my nodes (which shall be of the type AODVRouter) using the AODV protocol.
I am not very sure if the language used by me maintains the decorum of the group and I am sorry if it does not. Looking forward to any leads on the issues I have mentioned. Thanking you in advance.