I want coding for wireless sensor network having cluster heads, nodes etc in ns2 ubuntu in tcl script
Posts: 8,059
Threads: 1
Joined: Mar 2014
sample code for creation of wireless nodes in ns2
Abstract
A wireless sensor network (WSN) consists of a large number of small sensor nodes that are deployed in the area in which a factor is to be monitored. In wireless sensor network, energy model is one of the optional attributes of a node. The energy model denotes the level of energy in a mobile node. The components required for designing energy model includes initialEnergy, txPower, rxPower, and idlePower. The “initialEnergy” represents the level of energy the node has at the initial stage of simulation. “txPower” and “rxPower” denotes the energy consumed for transmitting and receiving the packets. If the node is a sensor, the energy model should include a special component called “sensePower”. It denotes the energy consumed during the sensing operation. Apart from these components, it is important to specify the communication range (RXThresh_) and sensing range of a node (CSThresh_). The sample 18.tcl designs a WSN in which sensor nodes are configured with different communication and sensing range. Base Station is configured with highest communication range. Data Transmission is established between nodes using UDP agent and CBR traffic.