Commit addc8b02 authored by Leigh B. Stoller's avatar Leigh B. Stoller
Browse files

Some small additions to support events after Chris' queue changes.

Queue events have a new parameter in the arg list for link events:

	ARGS="PIPE=pipe0 THRESH=8"

This is kinda hacky right now; I do not have time to get all the stuff
just right. The convention is that pipe0 is the first pipe in the list
(left to right) and pipe1 is the other. We can worry about cleanup
later.
parent 52c13c80
......@@ -83,6 +83,21 @@ Queue instproc get_link {} {
return $mylink
}
# Hacky. Need to create an association bewteen the queue direction
# and a dummynet pipe. This should happen later on, but I do not
# have time right now to make all the changes. Instead, convert
# "to" to "pipe0" and "from" to "pipe1".
Queue instproc get_pipe {} {
$self instvar direction
if {$direction == "to"} {
set pipe "pipe0"
} else {
set pipe "pipe1"
}
return $pipe
}
Link instproc init {s nodes bw d type} {
$self next $s $nodes $bw $d $type
......
......@@ -396,6 +396,7 @@ Simulator instproc at {time eventstring} {
}
"Queue" {
set otype LINK
set pipe [$obj get_pipe]
set obj [$obj get_link]
switch -- $cmd {
"set" {
......@@ -439,6 +440,7 @@ Simulator instproc at {time eventstring} {
return
}
}
set args "PIPE=$pipe $args"
set vnode {}
set vname $obj
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment