i want to send message between two wireless node using radio medium in INET framework,the message packet should generate by each node computing received info , where should i define the message code ?
Normally, you would define a cPacket [https://omnetpp.org/doc/omnetpp/api/classomnetpp_1_1cPacket.html] object right before you send it from the sender node and would receive it a the recipient node (the function which does the message parsing fills it out, so you need only initialise it and pass it by reference there).
There is no need to build the packet yourself and all you need to worry about is that the structure of the object matches the structure of the class. For this, you can include the Header file from the API in your code.
Other than this, I do not really understand what else you might be asking here. Could you elaborate your question a bit so that we can better understand what it is that you are having trouble with, regarding the INET fw API?