00001 00042 #include "config.h" 00043 #include "object.h" 00044 #include "agent.h" 00045 #include "timer-handler.h" 00046 #include <list> 00047 #include "rtp.h" 00048 00049 class RTPSession; 00050 class SimStream ; 00051 00052 class SimStream : public TclObject { 00053 public: 00054 SimStream(); 00055 ~SimStream(); 00056 SimStream* next; 00057 RTPSession* sessions_; 00058 /* connection with TCL commands */ 00059 int command(int argc, const char*const* argv); 00060 int get_streamid() {return streamid_;} 00061 void setLevel ( int theValue ) {level_ = theValue;} 00062 int getLevel() {return level_;} 00063 void setRcv_rate ( double theValue ) {rcv_rate_ = theValue;} 00064 double getRcv_rate() { return rcv_rate_;} 00065 void setInst_rx_rate( double theValue ); 00066 double getInst_rx_rate() { return inst_rx_rate_;} 00067 void setAvg_rx ( double theValue ) {avg_rx_ = theValue; } 00068 double getAvg_rx() {return avg_rx_;} 00069 void setAvg_tx ( double theValue, int level); 00070 void setLow_tx(double theValue) {low_tx_ = theValue;} 00071 void setMedium_tx(double theValue) {medium_tx_ = theValue;} 00072 void setHigh_tx(double theValue) {high_tx_=theValue;} 00073 double getLow_tx() {return low_tx_;} 00074 double getMedium_tx() { return medium_tx_;} 00075 double getHigh_tx() {return high_tx_;} 00076 void compare(); 00077 00078 00079 00080 00081 00082 protected: 00083 void enter(RTPSession*); 00085 int streamid_; 00087 int isSender; 00089 int isReceiver; 00091 int level_; 00093 double rcv_rate_; 00095 double inst_rx_rate_; 00097 list<double> rx_lst; 00099 double avg_rx_; 00101 double low_tx_; 00103 double medium_tx_; 00105 double high_tx_; 00106 void go_up(int level); 00107 void go_down(int level); 00109 double low_threshold_; 00111 double medium_threshold_; 00113 double high_threshold_; 00114 }; 00115 00116 00117 00118