This is automatically generated documentation. Edit after the "COMMENTS" heading; changes to the main body will be lost.
DriverManager -- Click element; a Script that manages driver stop events
Ports: any number of inputs, any number of outputs
Package: standard (core)
DriverManager is simply a Script element whose default TYPE is "
Click driver stop events suggest that the driver should stop processing.
Any element can register a driver stop event; for instance, trace processing
elements can stop the driver when they finish a trace file. You generally
request this functionality by supplying a 'STOP true' keyword argument.
Driver stop events normally stop the driver: the user-level driver calls
exit(0), or the kernel driver kills the relevant kernel threads. The
DriverManager element changes this behavior. When a driver stop event occurs,
the router steps through the DriverManager's script by calling its
handler. The driver exits only when the script ends or a
For example, the following DriverManager element ensures that an element,
k, has time to clean itself up before the driver is stopped. It waits for
the first driver stop event, then calls
cleanup handler, waits for a
tenth of a second, and stops the driver.
DriverManager(pause, write k.cleanup, wait 0.1s, stop);
Use this idiom when one of your elements must emit a last packet or two before the router configuration is destroyed.
Generated by 'click-elem2man' from '../elements/standard/drivermanager.hh' on 28/Feb/2010.