#include <mnt_pump.h>
Inheritance diagram for MntPump:
Public Member Functions | |
MntPump () | |
virtual void | start_pumping () |
virtual void | stop_pumping () |
virtual int | pump_some () |
virtual int | is_running () |
int | command (int argc, const char *const *argv) |
Public Attributes | |
MntPump::PumpTimer | pump_timer_ |
Classes | |
class | PumpTimer |
The method start_pumping and stop_pumping is called to start and stop the periodic timer respectively. Periodically, pump_some() is called. Method is_running() can be used to check if the pump is working.
To use a pump, typically a subclass is created, with pump_some() overwritten to generate proper data and send push() to components downstream. pump_some() should check if the pump is running, and schedule the next pump_some() to be called before exits. Further, a Tcl instproc called "on_stop_pumping" should be defined as a callback whenever stop_pumping is called. This Tcl procedure may clean up data/files at the Tcl-level.
|
Empty constructor |
|
Overwrites TclObject::command() to define additional mapping between C++ methods and Tcl methods. Reimplemented from MntComponent. |
|
Return 1 if the pump is running, otherwise returns 0. |
|
Do nothing here. Subclass should define this method. Reimplemented in MntRTPFileReader. |
|
Begin to pump. pump_some() will be called to push the first batch of data down stream. |
|
Stop pumping. Tcl procedure "on_stop_pumping" will be called. |
|
This inner class of MntPump is responsilble for scheduling the next call to pump_some(). Each MntPump has a instance of PumpTimer, called pump_timer_. Each pump_some() can schedule when to pump the next batch of data by calling the msched() method of Timer. Note: Timer is a class provided by the TclCL package. |