0
votes

I am new to omnet++ and inet. I want to inherit a compound module like Adhoc Host and then write logic for it. Unfortunately, there is no C++ file with Compound modules.

The behaviour I want to write is what should a host do when it reaches which particular point in the space. For example, host A should send a message to host B only if they are within a certain distance of each other.

1

1 Answers

0
votes

This is an application behavior so you should write your own application that behaves according to this specification. You can either modify a current application (like UDPBasicApp) or write your own and then install that application in the module. There is no need to derive anything from the AdhocHost as it is possible to exchange certain behaviors (i.e. what application is running in the host) with just modifying parameters in the .ini files:

*.myadhochost.udpApp.typename = "MyUDPApp"