omnet++ Simulation of VANETs using OMNeT++ and Artery Adding my own ITS-G5 Service: Where should I start?


Example

To start with creating your own service, take a look at the base class of each service, which is called ItsG5Service. Also you can look at the CamService and the DenmService as they are already implemented services. All application related files and classes can be found in the artery/application subfolder.

The initialization of a service is done by the ItsG5Middleware. Before adding your service, provide a proper C++ class and a .ned file belonging to your class. Your service class must be derived from ItsG5Service. Than, put your service in examples/yourExample/services.xml. As a starting point, you can copy CamService entry (examples/artery/services.xml) and change the port number.

The ItsG5Middleware also invokes the services each simulation step by calling ItsG5Service::trigger(). This means, if you want to do something periodically with your service, override this method and put your code in there.