<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://forum.eggheads.org/app.php/feed/topic/19440" />

	<title>egghelp/eggheads community</title>
	<subtitle>Discussion of eggdrop bots, shell accounts and tcl scripts.</subtitle>
	<link href="https://forum.eggheads.org/index.php" />
	<updated>2013-06-09T20:04:11-04:00</updated>

	<author><name><![CDATA[egghelp/eggheads community]]></name></author>
	<id>https://forum.eggheads.org/app.php/feed/topic/19440</id>

		<entry>
		<author><name><![CDATA[Madalin]]></name></author>
		<updated>2013-06-09T20:04:11-04:00</updated>

		<published>2013-06-09T20:04:11-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101649#p101649</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101649#p101649"/>
		<title type="html"><![CDATA[802.11p sample script not working]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101649#p101649"><![CDATA[
Well its obvious $val(comRange) is getting a null result so you have to have a number there (if im not mistaken)<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6396">Madalin</a> — Sun Jun 09, 2013 8:04 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[andrewhajj]]></name></author>
		<updated>2013-06-09T17:09:31-04:00</updated>

		<published>2013-06-09T17:09:31-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101646#p101646</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101646#p101646"/>
		<title type="html"><![CDATA[802.11p sample script not working]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101646#p101646"><![CDATA[
thank u <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br>sorry if i posted in the wrong place<br><br>dear speechles<br><br>i did as u advised, now i m getting:<br>syntax error in expression "4 * 3.1415926535897931 * ": premature end of expression<br>    while executing<br>"expr 4 * $PI * $val(comRange)"<br>    invoked from within<br>"expr $lambda / [expr 4 * $PI * $val(comRange)]"<br>    invoked from within<br>"set M       [expr $lambda / [expr 4 * $PI * $val(comRange)]]"<br>    (file "singleBroadcast2.tcl" line 19)<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12243">andrewhajj</a> — Sun Jun 09, 2013 5:09 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[speechles]]></name></author>
		<updated>2013-06-09T17:07:56-04:00</updated>

		<published>2013-06-09T17:07:56-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101645#p101645</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101645#p101645"/>
		<title type="html"><![CDATA[802.11p sample script not working]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101645#p101645"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>set payload [expr - $val(payload)]set modulationIndex [expr $val(modIndex)] </code></pre></div>Did you mean?<div class="codebox"><p>Code: </p><pre><code>set payload $val(payload)set modulationIndex $val(modIndex)</code></pre></div>Because the - that starts that first [expr] is your problem. You can't subtract from thin-air.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8138">speechles</a> — Sun Jun 09, 2013 5:07 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[heartbroken]]></name></author>
		<updated>2013-06-09T16:56:34-04:00</updated>

		<published>2013-06-09T16:56:34-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101644#p101644</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101644#p101644"/>
		<title type="html"><![CDATA[802.11p sample script not working]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101644#p101644"><![CDATA[
well you can find some help for about this kinda code @ Freenode's #tcl channel ...this is not a place for that sorry...<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11703">heartbroken</a> — Sun Jun 09, 2013 4:56 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[andrewhajj]]></name></author>
		<updated>2013-06-09T16:52:43-04:00</updated>

		<published>2013-06-09T16:52:43-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101643#p101643</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101643#p101643"/>
		<title type="html"><![CDATA[802.11p sample script not working]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101643#p101643"><![CDATA[
yes it is not an eggdrop :S<br>cant u help ?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12243">andrewhajj</a> — Sun Jun 09, 2013 4:52 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[heartbroken]]></name></author>
		<updated>2013-06-09T16:54:42-04:00</updated>

		<published>2013-06-09T16:48:05-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101642#p101642</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101642#p101642"/>
		<title type="html"><![CDATA[802.11p sample script not working]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101642#p101642"><![CDATA[
this is looks like "pure tcl" not for an eggdrop ... eggdrop tcl lil bit different than pure tcl.... probably this one  Cisco IOS tcl scripting or something like that.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11703">heartbroken</a> — Sun Jun 09, 2013 4:48 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[andrewhajj]]></name></author>
		<updated>2013-06-09T16:32:18-04:00</updated>

		<published>2013-06-09T16:32:18-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101641#p101641</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101641#p101641"/>
		<title type="html"><![CDATA[802.11p sample script not working]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101641#p101641"><![CDATA[
Hello, I have been working the whole day to test the following script for 802.11p on ns2 but it failed. do u think it s related to ns2 since many test failed or an error in the tcl script.<br><br>here is the script and error i got<br>please i need ur help<div class="codebox"><p>Code: </p><pre><code>set val(modIndex)  [lindex $argv 0]set val(ncars) [lindex $argv 1]set val(payload) [lindex $argv 2]set val(comRange) [lindex $argv 3] ;#"intended" Communication Rangeset val(vseed)     [lindex $argv 4]set payload [expr - $val(payload)]set modulationIndex [expr $val(modIndex)]# In 802.11p#modIndex = 0 (BPSK and 1/2 coding rate): 3Mbps#modIndex = 1 (QPSK and 1/2 coding rate): 6Mbps#modIndex = 2 (QAM16 and 1/2 coding rate): 12Mbps#modIndex = 3 (QAM 64 and 2/3 coding rate): 24Mbps#=====================================================================#Calculate the needed Transmission power corresponding to the intended Communication Rangeset lambda    [expr 3e+8/5.9e+9];# lambda = c / fset PI     3.1415926535897931set M       [expr $lambda / [expr 4 * $PI * $val(comRange)]];set Pr2Pt    [expr [expr 5.118 * 5.118 * $M * $M ] / 1];set Pt    [expr 3.162e-12 / $Pr2Pt]set PtmW    [expr $Pt * 1000]puts "mod Index is $val(modIndex)"puts "# of cars is $val(ncars)"puts "TCL Payload Size is: $val(payload) bytes"puts "comRange is: $val(comRange) meters"puts "Used Transmission Power is: $PtmW mW"# =====================================================================set val(chan)       Channel/WirelessChannelset val(prop)       Propagation/Nakagamiset val(netif)      Phy/WirelessPhyExtset val(mac)        Mac/802_11Extset val(ifq)        Queue/DSRC ;#DropTail/PriQueueset val(ll)         LLset val(ant)        Antenna/OmniAntennaset val(x)          1100   ;# X dimension of the topographyset val(y)          20   ;# Y dimension of the topographyset val(ifqlen)     20          ;# max packet in ifqset val(nn)         $val(ncars) ;# how many nodes are simulatedset val(rtg)        DumbAgentset val(stop)       5        ;# simulation time in seconds# 802.11p Paramters#**************************************************set val(sc)802.11p.tclsource $val(sc)        ;# load 802.11p configuration file# =====================================================================# Main Program# ======================================================================## Initialize Global Variables#global defaultRNG$defaultRNG seed $val(vseed)set ns_[new Simulator]set topo[new Topography]set tracefd[open tracefile.txt w]$ns_ trace-all $tracefd#$ns_ use-newtrace$topo load_flatgrid $val(x) $val(y)set god_ [create-god $val(nn)]$god_ offset chan [new $val(chan)]$ns_ node-config -adhocRouting $val(rtg) \                 -llType $val(ll) \                 -macType $val(mac) \                 -ifqType $val(ifq) \                 -ifqLen $val(ifqlen) \                 -antType $val(ant) \                 -propType $val(prop) \                 -phyType $val(netif) \                 -channel $chan \ -topoInstance $topo \ -agentTrace ON \                 -routerTrace OFF \                 -macTrace ON \                 -phyTrace ONset lane4;#number of lanes in the scenario#set channel_ [new RandomVariable/Normal]#$channel_ set max_ 6#$channel_ set min_ 0for {set counter 0} {$counter &lt; $lane} {incr counter} {for {set i 0} {$i &lt; [expr $val(ncars) / $lane] } {incr i} {    set index [expr $i + [expr $counter * [expr $val(ncars) / $lane]]]    set ID_($index) $index    set vehicle_($index) [$ns_ node]    $vehicle_($index) set id_  $ID_($index)    $vehicle_($index) set address_ $ID_($index)    $vehicle_($index) set X_ [expr $i * 10]    $vehicle_($index) set Y_ [expr $counter * 5 ]    $vehicle_($index) set Z_ 0    $vehicle_($index) nodeid $ID_($index)    set agent_($index) [new Agent/DSRCApp]    $ns_ attach-agent $vehicle_($index)  $agent_($index)    $agent_($index) set modulationScheme_ $val(modIndex)    $agent_($index) set interval_ 0.1    $agent_($index) set packetSize_ $val(payload)    $ns_ at $val(stop).0 "$vehicle_($index) reset";    #puts "$index [expr $i * 5] [expr $counter * 5 ]";}}#set repetition1; #How many time each packet is repeated#for {set i 0} {$i &lt; $repetition} {incr i} {#for {set j 0} {$j &lt; [expr $val(ncars)] } {incr j} {#set rand [expr rand() * 0.05]#$ns_ at $rand "$agent_($j) send"#$ns_ at 0.02 "$agent_($j) send"#}#}# When sending a packet, you need to specify the packetType (0 = safety, 1 = service)# If it is a Service Type packet, you need to specify the channel number (0 to 5)# If it is a Safety Type packet, you have to set the channel number to -99.    for {set i 0} {$i &lt; $val(ncars)} {incr i} {set txtime_ [new RandomVariable/Uniform]$txtime_ set max_ 0.1$txtime_ set min_ 0$agent_($i) set channel_ -99$agent_($i) set type_dsrc_ 0$ns_ at [$txtime_ value] "$agent_($i) send"}$ns_ at $val(stop).0002 "puts \"NS EXITING...\" ; $ns_ halt"$ns_ at $val(stop).0003 "$ns_ flush-trace"puts "Starting Simulation..."$ns_ run</code></pre></div>error:<blockquote class="uncited"><div>syntax error in expression "- ": premature end of expression<br>    while executing<br>"expr - $val(payload)"<br>    invoked from within<br>"set payload [expr - $val(payload)]"<br>    (file "singleBroadcast.tcl" line 7)</div></blockquote><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12243">andrewhajj</a> — Sun Jun 09, 2013 4:32 pm</p><hr />
]]></content>
	</entry>
	</feed>
