NEmu

Network Emulator for Mobile Universes

Documentation - Mobilizer

NEmu is able to perform several topology evolutions through the time with the Mobilizer nemo.

The mobilizer is a sub-module which pre-computes physical movements of several virtual entities through the space and the time.This computation is performed with the help of a predefined mobility model.

Then, the mobilizer extracts the connectivity changes (join, unjoin, property modification like bandwidth) from the previous results.

Finally, the scheduler sends the connectivity events in real time to NEmu which performs the topology modifications.

This task can be performed on VAirWic devices.

MobNemu(name, nodes, clean, port)

This function creates a new mobility scenario called name which works with VAirWic devices indicated in the nodes list. port will be used to establish the TCP connection between NEmu and nemo. The clean option enables to delete all auto-generated links after the mobilizer death.

GenMobNemu(name, width, height, time, events, speed, accel, step, src, type)

This function performs the mobility simulation (random walk) of name and generates the intrinsic connectivity scenario. The mobility simulation is done in a limited surface (width and height) for a specific time in seconds. A specific number of events will occure (direction switch, speed or acceleration change) during the simulation. Nodes will have a maximum speed and acceleration accel. Finally, the temporal precision step will be used to perform connectivity changes. src is a mobility model type file if you want to skip the mobility simulation part by providing your own scenario. Possible types are nemo or ns2 file. This function will make a copy of the mobility scenario in {session directory}/mob/{name}.mob. Also, the generated connectivity scenario is saved in {session directory}/mob/{name}.cnn.

ImportMobNemu(name, src)

Imports a predefined real-time connectivity scenario from the file src.

ExportMobNemu(name, dest)

Exports the current real-time connectivity scenario. If dest is not defined, the export will be done on the standard outpout.

StartMobNemu(name)

Starts a mobility real-time scheduler.

StopMobNemu(name)

Stop a mobility real-time scheduler.

FreezeMobNemu(name)

Freezes a mobility real-time scheduler.

ResumeMobNemu(name)

Resumes a mobility real-time scheduler.

DelMobNemu(*names)

Deletes several mobility scenarios. These ones will be stopped if they are currently running (Default: deletes all).

Here is an example of use with 3 UAVs:

air ad-hoc
InitNemu()

VHost("a", nics=[VNic()])
VHost("b", nics=[VNic()])
VHost("c", nics=[VNic()])
 
VAirWic('awic')
VAirWic('bwic')
VAirWic('cwic')

SetAirMode('awic', 'adhoc')
SetAirMode('bwic', 'adhoc')
SetAirMode('cwic', 'adhoc')
		 
Link('a', 'awic')
Link('b', 'bwic')
Link('c', 'cwic')

MobNemu('mob', nodes=['awic', 'bwic', 'cwic'])

GenMobNemu('mob', width=1000, height=1000
                , time=20, events=100)

StartNemu()

StartMobNemu('mob')

 

Here is an other example of use with a manual ns2 mobility model:

InitNemu()

VHost("a", nics=[VNic()])
VHost("b", nics=[VNic()])
VHost("c", nics=[VNic()])
 
VAirWic('awic')
VAirWic('bwic')
VAirWic('cwic')

SetAirMode('awic', 'adhoc')
SetAirMode('bwic', 'adhoc')
SetAirMode('cwic', 'adhoc')
		 
Link('a', 'awic')
Link('b', 'bwic')
Link('c', 'cwic')

MobNemu('mob', nodes=['awic', 'bwic', 'cwic'])

GenMobNemu('mob', width=1000, height=1000
                , src="script.ns", type='ns2')

StartNemu()

StartMobNemu('mob')