RTPSource Class Reference

#include <rtp.h>

List of all members.

Public Member Functions

 RTPSource (u_int32_t srcid)
u_int32_t srcid ()
int np ()
int snp ()
int ehsr ()
int nbytes ()
int cum_pkts_lost ()
double LSR ()
double SRT ()
bool is_sender ()
int ps ()
double rate ()
double transit ()
double jitter ()
void np (int n)
void snp (int n)
void ehsr (int n)
void nbytes (int n)
void cum_pkts_lost (int n)
void LSR (double n)
void SRT (double n)
void is_sender (bool n)
void ps (int n)
void rate (double n)
void transit (double n)
void jitter (double n)

Public Attributes

RTPSourcenext

Protected Attributes

u_int32_t srcid_
int np_
int snp_
int ehsr_
int nbytes_
int cum_pkts_lost_
double LSR_
double SRT_
bool is_sender_
int ps_
double rate_
double transit_
double jitter_


Detailed Description

this class holds the fields of the sources. A source may only send RTP packets but it can be also a receiver that is active, which means it sends and receives RTP packets. For the meaning of the fields of this class read RFC 3550. Some fields here are only for implementation cotrol and debugging

Definition at line 140 of file rtp.h.


Constructor & Destructor Documentation

RTPSource::RTPSource ( u_int32_t  srcid  ) 

constructor

Constructor of the RTPSource class

Parameters:
srcid the source id of the newly created RTPSource

Definition at line 803 of file session-rtp.cc.

References srcid_.

00804         : next(0),np_(0), snp_(0), ehsr_(-1), nbytes_(0),cum_pkts_lost_(0),LSR_(0),SRT_(0),is_sender_(false),ps_(0),rate_(0),transit_(0),jitter_(0)
00805 {
00806         bind("srcid_", (int*)&srcid_);
00807         srcid_ = srcid;
00808 }


Member Function Documentation

u_int32_t RTPSource::srcid (  )  [inline]

int RTPSource::np (  )  [inline]

returns the number of packets sent np_ since last report

Definition at line 150 of file rtp.h.

References np_.

Referenced by RTPSession::build_report(), RTPSession::localsrc_update(), and RTPSession::recv().

00150 { return (np_); }

int RTPSource::snp (  )  [inline]

returns the total number of packets sent snp_ since last report

Definition at line 152 of file rtp.h.

References snp_.

00152 { return (snp_); }

int RTPSource::ehsr (  )  [inline]

returns the last highest extended number

Definition at line 154 of file rtp.h.

References ehsr_.

Referenced by RTPSession::recv().

00154 { return (ehsr_); }

int RTPSource::nbytes (  )  [inline]

returns the total number of bytes sent

Definition at line 156 of file rtp.h.

References nbytes_.

Referenced by RTPSession::build_report(), RTPSession::localsrc_update_nbytes(), and RTPSession::recv().

00156 { return (nbytes_); }

int RTPSource::cum_pkts_lost (  )  [inline]

returns the total number of packets lost

Definition at line 158 of file rtp.h.

References cum_pkts_lost_.

Referenced by RTPSession::recv().

00158 { return (cum_pkts_lost_);  }

double RTPSource::LSR (  )  [inline]

returns the time of the Last Sender report

Definition at line 160 of file rtp.h.

References LSR_.

Referenced by RTPSession::recv_ctrl().

00160 { return (LSR_);  }

double RTPSource::SRT (  )  [inline]

returns the sender report time

Definition at line 162 of file rtp.h.

References SRT_.

Referenced by RTPSession::recv_ctrl().

00162 { return (SRT_);  }

bool RTPSource::is_sender (  )  [inline]

returns true if this source is a sender, false otherwise

Definition at line 164 of file rtp.h.

References is_sender_.

Referenced by RTPSession::localsrc_update(), and RTPSession::recv_ctrl().

00164 { return (is_sender_);  }

int RTPSource::ps (  )  [inline]

returns the size of the RTP Packet

Definition at line 166 of file rtp.h.

References ps_.

Referenced by RTPSession::recv().

00166 { return (ps_);  }

double RTPSource::rate (  )  [inline]

retuns the sending rate in bytes/sec

Definition at line 168 of file rtp.h.

References rate_.

00168 { return (rate_);  }

double RTPSource::transit (  )  [inline]

returns the difference between the RTP packet sending and receiving times

Definition at line 170 of file rtp.h.

References transit_.

Referenced by RTPSession::recv().

00170 { return (transit_);  }

double RTPSource::jitter (  )  [inline]

returns the delay jitter

Definition at line 172 of file rtp.h.

References jitter_.

Referenced by RTPSession::recv().

00172 { return (jitter_);  }

void RTPSource::np ( int  n  )  [inline]

the number of packets sent np_ since last report

Definition at line 176 of file rtp.h.

References np_.

00176 { np_ += n; }

void RTPSource::snp ( int  n  )  [inline]

the total number of packets sent snp_ since last report

Definition at line 178 of file rtp.h.

References snp_.

00178 { snp_ = n; }

void RTPSource::ehsr ( int  n  )  [inline]

the last highest extended number

Definition at line 180 of file rtp.h.

References ehsr_.

00180 { ehsr_ = n; }

void RTPSource::nbytes ( int  n  )  [inline]

the total number of bytes sent

Definition at line 182 of file rtp.h.

References nbytes_.

00182 { nbytes_+= n; }

void RTPSource::cum_pkts_lost ( int  n  )  [inline]

the total number of packets lost

Definition at line 184 of file rtp.h.

References cum_pkts_lost_.

00184 { cum_pkts_lost_ += n; }

void RTPSource::LSR ( double  n  )  [inline]

the time of the Last Sender report

Definition at line 186 of file rtp.h.

References LSR_.

00186 { LSR_= n; }

void RTPSource::SRT ( double  n  )  [inline]

the sender report time

Definition at line 188 of file rtp.h.

References SRT_.

00188 { SRT_= n; }

void RTPSource::is_sender ( bool  n  )  [inline]

true if this source is a sender, false otherwise

Definition at line 190 of file rtp.h.

References is_sender_.

00190 { is_sender_= n; }

void RTPSource::ps ( int  n  )  [inline]

the size of the RTP Packet

Definition at line 192 of file rtp.h.

References ps_.

00192 { ps_= n; }

void RTPSource::rate ( double  n  )  [inline]

the sending rate in bytes/sec

Definition at line 194 of file rtp.h.

References rate_.

00194 { rate_= n; }

void RTPSource::transit ( double  n  )  [inline]

the difference between the RTP packet sending and receiving times

Definition at line 196 of file rtp.h.

References transit_.

00196 { transit_= n; }

void RTPSource::jitter ( double  n  )  [inline]

the delay jitter

Definition at line 198 of file rtp.h.

References jitter_.

00198 { jitter_= n; }


Member Data Documentation

u_int32_t RTPSource::srcid_ [protected]

the srcid_ of the RTPSource

Definition at line 201 of file rtp.h.

Referenced by RTPSource(), and srcid().

int RTPSource::np_ [protected]

the number of packets sent np_ since last report

Definition at line 203 of file rtp.h.

Referenced by np().

int RTPSource::snp_ [protected]

the total number of packets sent snp_ since last report

Definition at line 205 of file rtp.h.

Referenced by snp().

int RTPSource::ehsr_ [protected]

the last highest extended number

Definition at line 207 of file rtp.h.

Referenced by ehsr().

int RTPSource::nbytes_ [protected]

the total number of bytes sent

Definition at line 209 of file rtp.h.

Referenced by nbytes().

int RTPSource::cum_pkts_lost_ [protected]

the total number of packets lost

Definition at line 211 of file rtp.h.

Referenced by cum_pkts_lost().

double RTPSource::LSR_ [protected]

the time of the Last Sender report

Definition at line 213 of file rtp.h.

Referenced by LSR().

double RTPSource::SRT_ [protected]

the sender report time

Definition at line 215 of file rtp.h.

Referenced by SRT().

bool RTPSource::is_sender_ [protected]

true if this source is a sender, false otherwise

Definition at line 217 of file rtp.h.

Referenced by is_sender().

int RTPSource::ps_ [protected]

the size of the RTP Packet

Definition at line 219 of file rtp.h.

Referenced by ps().

double RTPSource::rate_ [protected]

the size of the RTP Packet

Definition at line 221 of file rtp.h.

Referenced by rate().

double RTPSource::transit_ [protected]

the difference between the RTP packet sending and receiving times

Definition at line 223 of file rtp.h.

Referenced by transit().

double RTPSource::jitter_ [protected]

the delay jitter

Definition at line 225 of file rtp.h.

Referenced by jitter().


The documentation for this class was generated from the following files:

Generated on Mon Jun 2 11:25:26 2008 for ASMP by  doxygen 1.5.5