Skip to content
  • Leigh B. Stoller's avatar
    Add the long desired halt/swap event directives. You can now put this · 5116cd33
    Leigh B. Stoller authored
    in your NS file:
    
    	$ns at 2000.0 "$ns halt"
    or
    	$ns at 2000.0 "$ns swapout"
    
    The first causes the experiment to terminate, the later causes it to
    swap out. I know some wiseass is going to ask for a swapin event!
    You can also send these events from tevc:
    
    	tevc -e testbed/stopme now ns halt
    or
    	tevc -e testbed/stopme now ns swapout
    
    Does it need to be said that this is insecure? That we could get swap
    wars going on as people try to get nodes for their experiments by
    swapping out someone else? Well, if that happens we will apply the big
    hammer and squash their nuts.
    
    Details: I added an SIMULATOR "agent", and HALT/SWAPOUT event types in
    the usual places. In the event scheduler, SIMULATOR events are treated
    specially (not actually sent anywhere), but handled internally. Very
    convenient, cause the scheduler runs as the person who swapped the
    experiment in, and so I just run either swapexp or endexp, right from
    the scheduler. At some point we...
    5116cd33