Software Configuration Files


Introduction

Software configuration serve several purposes:

The software configuration file is basically a xml script, and is loaded when start the "emuRun". Therefore, users can not modify the configuration without terminatation of the "emuRun".

Node Attributes

Each device attached to the emulator must have a corresponding node definition. The controller code represents these nodes internally using an EmuNode object. Each node has a name and color (for GUI display) associated with it, and a list of NICs. A node may also have a wired IP address associated with it, which is specified in "/usr/tmp/<userID>.swapin". If this address is defined, the node must be running a Node Daemon when the emulator starts.

Each NIC has a set of antennas. Each antenna has a type, and an amplification gain. Two antenna types are supported: "isotropic" and "yagi". The amplification gain is not the antenna gain, but a separate gain that would be physically realized by having an amplifier attached to the antenna; it is normally set to 0. Here is an example of the node definition:

    <NodeDef>
        <node name="nodew1" color="darkRed">
            <nic>
                <antenna>
                    <type>isotropic </type>
                    <txAmpGain>0</txAmpGain>
                </antenna>
            </nic>
        </node>
        ...
    </NodeDef>

Emulator Events

The software configuration file must specify a list of events that occurs at some point during initialization. Events including adding nodes to the world, excute user command, start predefined route. Here is an example:

    <EventDef>
        <EventGroup time="0.1" concurrent="true">
            <Add>
                <node>emu-5</node>
                <pos>-100 -100 0</pos>
            </Add>
            <Add>
                <node>emu-6</node>
                <pos>-50 -100 0</pos>
            </Add>
        </EventGroup>
        <EventGroup time="9999999.0" concurrent="false">
            <EventThreadExit/>
        </EventGroup>
    </EventDef>
More details can be found in the Event Scripts page.

GUI Attributes

GUI Attributes define the background image to use in the GUI as well as the scale and location of the origin on the background image. More details can be found in GUI page.

    <VisDef>
        <map>
            <name>Blank400x400.jpg</name>
        </map>
    </VisDef>

User Code

Users that desire complete control over emulator operation may write programs that are loaded immediately after the emulator software is initialized. Here is an example:

Example:

    <UserClassDef>
        <class>
            <name>emuExample.ManualChannels</name>
            <args>nodew1 nodew2 -95.0 -60.0 1.0</args>
            <url>http://localhost/</url>
        </class>
    </UserClassDef>		

More details can be found in User Code page.

Signal Propagation Environment

Channel Definitions

A channel definition defines a particular channel model, and has a unique name that is used by channel instantiations to specify which channel definition will be used.

The channel definition name default is reserved. Creating a channel definition with this name provides a default channel definition that will be used on all channels unless otherwise specified.

All channel models are currently "path-based". This means that a single channel is comprised of one or more paths between the transmitter and the receiver. If the channel from one tx to one rx has more than one paths, it is called a multipath channel. Mulipath channel is support within a limited set of nodes. Check the Current System Configuration page for more details. All supported channel models can be found on the Channel Model page.

More details on defining a multipath channel can be found on the Multipath page.

Each path contains the following elements:

Channel Instantiations

Channels are instantiated either explicitly or implicitly. Channels can be explicitly defined either by specifying which definition will be used, or by simply providing a definition as part of the instantiation. If no explicit instantiation is provided between a given <src,dest>, the default channel definition will be used.

The following sample DSPConfigDef demonstrates the use of a default channel definition, a specific channel definition, and an inline channel definition as well.

    <DSPConfigDef type="PathBased">
        <maxMFBits>7</maxMFBits>  [1] 
        <maxShift>10</maxShift>   [1] 
        <ipAddress>10.0.0.1</ipAddress>  [1] 

        <ChannelDef>	 [2] 
            <name>default</name>  
            <comment>This channel will be used by any that are not explicitly defined.</comment>
            <Channel>
                <ChannelModel type="PathBased">
                    <Path>
                        <LossModel type="LogDistance">
                            <d0>1</d0>
                            <p1d0>40.0</p1d0>
                            <n>3.0</n>
                        </LossModel>
                        <FadingModel type="Ricean">
                            <k>3.0</k>
                            <minSpeed>1.0</minSpeed>
                        </FadingModel>
                        <DelayModel type="Fixed">
                            <delay>0</delay>
                        </DelayModel>
                        <ExtraLoss>0</ExtraLoss>
                    </Path>
                </ChannelModel>
            </Channel>
        </ChannelDef>	

        <ChannelDef>	 [3] 
            <name>MyChannelDef</name>
            <Channel>
                <ChannelModel type="PathBased">
                    <Path>
                        <LossModel type="LogDistance">
                            <d0>1</d0>
                            <p1d0>40.0</p1d0>
                            <n>4.5</n>
                        </LossModel>
                        <FadingModel type="Null">
                        </FadingModel>
                        <DelayModel type="Fixed">
                            <delay>0</delay>
                        </DelayModel>
                        <ExtraLoss>0</ExtraLoss>
                    </Path>
                </ChannelModel>
            </Channel>
        </ChannelDef>	
		
        <Channel src="nodew1" dest="nodew2"> 	 [4] 
            <comment>note that src and dest are user-defined node names. must match the name in the NS script </comment>
            <ChannelModel type="PathBased">
                <Path>
                    <LossModel type="Manual">
                        <loss>70</loss>
                    </LossModel>
                    <FadingModel type="Null">
                    </FadingModel>
                    <DelayModel type="Fixed">
                        <delay>0</delay>
                    </DelayModel>
                    <ExtraLoss>0</ExtraLoss>
                </Path>
            </ChannelModel>
        </Channel>
		
        <Channel src="nodew2" dest="nodew1">	 [5] 
	    <comment>note that src and dest are user defined node names. </comment>
            <ChannelModel def="MyChannelDef">
            </ChannelModel>
        </Channel>		
		
    </DSPConfigDef>

Missing Default Channel Model Definition

You may wonder what will happen if the default channel model is not specified in the scripts. Actually the emulator will use a "default" default channel model, which is pre-defined by the system:
For a channel with one single path, this is the default channel model definition: Default Channel Model
For a multi-path channel, here is the default channel model definition: Default Multipath Channel Model (with 3 paths)