Re: LEACH simulation in Jsim

144 views
Skip to first unread message

halefom tekle

unread,
Dec 17, 2013, 5:42:29 AM12/17/13
to j-sim...@googlegroups.com
I am not going to answer your problem, but i want to help me about j-sim with your knowledge you have so far. like j-sim editor, how i i have to write java programming.

On Thursday, December 13, 2012 1:50:48 AM UTC+3, abd rawdha wrote:
I am trying to run the leach simulation (file .tcl) however there is something wrong I have the following instructions
TCL0> create sink 0
classInfo: drcl.inet.sensorsim.LEACH.SinkAppLEACH
java.lang.ClassNotFoundException: drcl.inet.sensorsim.LEACH.SinkAppLEACH
Warning: no object was matched in (app).
Warning: no object was matched in (app).
Warning: no object was matched in (app).
classInfo: drcl.inet.sensorsim.LEACH.WirelessLEACHAgent
java.lang.ClassNotFoundException: drcl.inet.sensorsim.LEACH.WirelessLEACHAgent
Warning: no source port was matched in (app/down@).
Warning: no source port was matched in (wireless_agent/.toSensorApp@).
classInfo: drcl.inet.mac.CSMA.Mac_CSMA
java.lang.ClassNotFoundException: drcl.inet.mac.CSMA.Mac_CSMA
Line:108  Cmd:for {set i 0} {$i < [expr $sink_id + 1]} {incr i} {
puts "create sink $i"
set node($i) [mkdir drcl.comp.Component n$i]
cd n$i
mkdir drcl.inet.sensorsim.LEACH.SinkAppLEACH app
! app setNid $i
! app setSinkNid $sink_id
! app setCoherentThreshold 1000.0
mkdir drcl.inet.sensorsim.LEACH.WirelessLEACHAgent wireless_agent
connect app/down@ -to wireless_agent/up@
connect wireless_agent/.toSensorApp@ -to app/.fromWirelessAgent@
mkdir drcl.inet.mac.LL ll
mkdir drcl.inet.mac.ARP arp
mkdir drcl.inet.core.queue.FIFO queue
mkdir drcl.inet.mac.CSMA.Mac_CSMA mac
mkdir drcl.inet.mac.WirelessPhy wphy
! wphy setLEACHMode 1
connect wphy/.channelCheck@ -and mac/.wphyRadioMode@
mkdir drcl.inet.mac.FreeSpaceModel propagation
mkdir drcl.inet.mac.MobilityModel mobility
set PD [mkdir drcl.inet.core.PktDispatcher pktdispatcher]
set RT [mkdir drcl.inet.core.RT rt]
set ID [mkdir drcl.inet.core.Identity id]
! pktdispatcher setRouteBackEnabled 1
$PD bind $RT
$PD bind $ID
connect app/.setRoute@ -to rt/.service_rt@
connect wphy/.mobility@ -and mobility/.query@
connect wphy/.propagation@ -and propagation/.query@
connect mac/down@ -and wphy/up@
connect mac/up@ -and queue/output@
connect ll/.mac@ -and mac/.linklayer@
connect ll/down@ -and queue/up@
connect ll/.arp@ -and arp/.arp@
connect -c pktdispatcher/0@down -and ll/up@
set nid $i
! arp setAddresses $nid $nid
! ll setAddresses $nid $nid
! mac setNode_num_ $nid ;#set the MAc address
! mac setLEACHmode 1
! mac setMacAddress $nid ;#set MAC
! wphy setNid $nid
! mobility setNid $nid
! id setDefaultID $nid
! queue setMode "packet"
! queue setCapacity 40
! arp setBypassARP [ expr 2>1]
connect mobility/.report@ -and /LEACH/tracker/.node@
connect wphy/down@ -to /LEACH/channel/.node@
! /LEACH/channel attachPort $i [! wphy getPort .channel]
! mobility setTopologyParameters 200.0 200.0 0.0 0.0 0.0 0.0 10.0
10.0 0.0
connect -c wireless_agent/down@ -and pktdispatcher/1111@up
cd ..
}
no accessible method "setLEACHMode" in class drcl.inet.mac.WirelessPhy

what the solution please help me 
thanks 

chandru018

unread,
Jan 20, 2014, 4:14:09 AM1/20/14
to j-sim...@googlegroups.com
Can you send me LEACH simulation code?
Reply all
Reply to author
Forward
0 new messages