# ****************************************************************************
# *  Copyright: National ICT Australia,  2007 - 2010                         *
# *  Developed at the ATP lab, Networked Systems research theme              *
# *  Author(s): Athanassios Boulis, Yuriy Tselishchev                        *
# *  This file is distributed under the terms in the attached LICENSE file.  *
# *  If you do not find this file, copies can be found by writing to:        *
# *                                                                          *
# *      NICTA, Locked Bag 9013, Alexandria, NSW 1435, Australia             *
# *      Attention:  License Inquiry.                                        *
# *                                                                          *
# ***************************************************************************/

[General]

# ==============================================
# Always include the main Castalia.ini file
# ==============================================

include ../Parameters/Castalia.ini

#sim-time-limit = 500s

#network = SN

seed-0-mt = 1799

output-scalar-file = Coverage.sca
output-vector-file = omnetpp.vec

cmdenv-express-mode = true
cmdenv-status-frequency = 10s

# this way, it is compatible with omnet++ v3 and plove tools available with omnet++v3
###
**.vector-record-eventnumbers = false

SN.field_x = 75		# meters
SN.field_y = 75		# meters

#include ../Parameters/PhysicalProcess/node0_asssignedValue40.ini

include ../Parameters/WirelessChannel/Ideal.ini
SN.node[*].Communication.Radio.RadioParametersFile = "../Parameters/Radio/CC2420.txt"
SN.node[*].Communication.Radio.mode = "IDEAL"

# NO MAC
###
SN.node[*].Communication.MACProtocolName = "BypassMAC"

# NO ROUTING
###
SN.node[*].Communication.RoutingProtocolName = "BypassRouting"

SN.node[*].Communication.Radio.TxOutputPower = "0dBm"
# 0-> No interference
# 1-> Simple interference
# 2-> Additive interefence
# 3-> Advanced interference (not implemented)
# be carefull, with interferences, packet losses can occur and there is no retransmission mechanism right now
SN.node[*].Communication.Radio.collisionModel = 0
#SN.node[*].Communication.Radio.txPowerLevelUsed = 2

# to let the other modules start first
###
SN.node[*].startupOffset = 1.0

# global setting for the application
###

SN.node[*].Application.collectTraceInfo = true

# parameters for the videoSensorNode application
###

# the generic parameters from virtual application
###
SN.node[*].ApplicationName = "VideoSensorNode"

# check the default values for the application parameters in VideoSensorNode.ned

[Config VideoBaseConfig]
SN.numNodes = 30
SN.deployment = "uniform"

[Config CSMA]
SN.node[*].Communication.MACProtocolName = "TunableMAC"
SN.node[*].Communication.MAC.dutyCycle = 1.0
SN.node[*].Communication.MAC.randomTxOffset = 0
SN.node[*].Communication.MAC.backoffType = 2 

# can be run with the 5-node configuration
[Config MPRoutingTest]
SN.node[*].Communication.RoutingProtocolName = "MultipathRingsRouting"
SN.node[*].Communication.Routing.collectTraceInfo = true
SN.node[*].Communication.Routing.netSetupTimeout = 1000 # in msec
#SN.node[*].Communication.Routing.neighbor_RSSIThreshold = -89.3 # in dBm
SN.node[3].Application.isSink = true
# node 4 will send its id to the sink, it is used to test the routing layer
SN.node[4].Application.idReportToSink = true
# node 1 will send its id to the sink, it is used to test the routing layer
SN.node[1].Application.idReportToSink = true

# typically needs at least the 20-nodes configuration
[Config AODVRoutingTest]
SN.node[*].Communication.RoutingProtocolName = "AodvRouting"
SN.node[*].Communication.Routing.collectTraceInfo = true

SN.node[14].Application.idReportToSink = true
SN.node[10].Application.idReportToSink = true
SN.node[1].Application.idReportToSink = true
SN.node[14].Application.nextRecipient = "6"
SN.node[10].Application.nextRecipient = "6"
SN.node[1].Application.nextRecipient = "11"

# typically needs at least the 20-nodes configuration
[Config GPSRRoutingTest]
SN.node[*].Communication.RoutingProtocolName = "GpsrRouting"
SN.node[*].Communication.Routing.collectTraceInfo = false
SN.node[*].Communication.Routing.helloInterval = 60000 # in msec
SN.node[*].Communication.Routing.netSetupTimeout = 1000 # in msec

SN.node[14].Application.idReportToSink = true
SN.node[10].Application.idReportToSink = true
SN.node[1].Application.idReportToSink = true

SN.node[14].Application.nextRecipient = "6"
SN.node[10].Application.nextRecipient = "6"
SN.node[1].Application.nextRecipient = "11"

[Config TunableMac]
SN.node[*].Communication.MACProtocolName = "TunableMAC"
SN.node[*].Communication.MAC.dutyCycle = 1.0
SN.node[*].Communication.MAC.randomTxOffset = 0
SN.node[*].Communication.MAC.backoffType = 2 

[Config Debug]
SN.node[*].Communication.Routing.collectTraceInfo = true
SN.node[*].Communication.MAC.collectTraceInfo = true
SN.node[*].Communication.Radio.collectTraceInfo = false

# typically needs at least a 30-nodes configuration provided by the VideoBaseConfig config section
[Config WithMobileNodes]
#explicitly set node[18] with a rotatable camera
SN.node[18].Application.isCamRotatable = true
SN.node[18].Application.maxBatteryLevel = 500

#explicitly set node[25] as mobile robot (with a rotatable camera)
SN.node[25].Application.isMobile = true
SN.node[25].Application.isCamRotatable = true
SN.node[25].Application.maxBatteryLevel = 2000

#explicitly set some other node as mobile robot
SN.node[9].Application.isMobile = true
SN.node[9].Application.maxBatteryLevel = 2000

SN.node[4].Application.isMobile = true
SN.node[4].Application.maxBatteryLevel = 2000

SN.node[21].Application.isMobile = true
SN.node[21].Application.maxBatteryLevel = 2000

SN.node[17].Application.isMobile = true
SN.node[17].Application.maxBatteryLevel = 2000

SN.node[5].Application.isMobile = true
SN.node[5].Application.maxBatteryLevel = 2000

[Config _5NodeTest]
SN.numNodes = 5

#explicitly set node[4] as mobile robot
SN.node[4].Application.isMobile = true
SN.node[4].Application.maxBatteryLevel = 2000

SN.node[0].xCoor = 50
SN.node[0].yCoor = 50
SN.node[0].zCoor = 0

SN.node[1].xCoor = 56
SN.node[1].yCoor = 5
SN.node[1].zCoor = 0

SN.node[2].xCoor = 25
SN.node[2].yCoor = 39
SN.node[2].zCoor = 0

SN.node[3].xCoor = 26
SN.node[3].yCoor = 35
SN.node[3].zCoor = 0

SN.node[4].xCoor = 14
SN.node[4].yCoor = 69
SN.node[4].zCoor = 0

[Config _20NodeTest]
SN.numNodes = 20

# set node position, use generate_pos to generate a specific location file
# usage : "generate_pos 20 75 75" gives 20 nodes in a 75mx75m field
###
include node_locations-20-75-75.ini

#explicitly set node[4] as mobile robot
SN.node[4].Application.isMobile = true
SN.node[4].Application.maxBatteryLevel = 2000

