RTP Trace System  1.0
Coral::TraceClient Class Reference

Trace Client. More...

#include <traceclient.h>

List of all members.

Public Member Functions

 TraceClient (const char *receiverName)
 ~TraceClient ()
bool play (const char *server, const char *mediaName, const card32 sessionDescriptor=0)
void change (const char *mediaName)
void stop ()
card64 getPosition ()
card64 getMaxPosition () const
MediaInfo getMediaInfo () const
card8 getErrorCode () const
const char * getEncoding () const
card64 getMinWantedBandwidth () const
card64 getMaxWantedBandwidth () const
double getMaxTransferDelay () const
double getWantedUtilization () const
int8 getStreamPriority () const
int8 getSessionPriority () const
Range< card64getBandwidth () const
double getFrameRate () const
double getUtilization () const
card32 getFlags () const
cardinal getLayers () const
card8 getIPVersion () const
bool playing () const
String getServerAddressString (InternetAddress::PrintFormat format=InternetAddress::PF_Address) const
String getOurAddressString (InternetAddress::PrintFormat format=InternetAddress::PF_Address) const
card64 getBytesReceived (const cardinal layer=0) const
card64 getPacketsReceived (const cardinal layer=0) const
InternetFlow getInternetFlow (const cardinal layer=0) const
card32 getFlowLabel (const cardinal layer=0) const
card8 getTrafficClass (const cardinal layer=0) const
card32 getServerSSRC (const cardinal layer=0) const
card32 getOurSSRC () const
card64 getPacketsLost (const cardinal layer=0) const
double getFractionLost (const cardinal layer=0) const
double getJitter (const cardinal layer=0) const
const char * getEncodingName (const cardinal index)
void setPosition (const card64 position)
void setPause (const bool on)
void setWantedUtilization (const double utilization)
void setFlags (const card32 priority)
void setMinWantedBandwidth (const card64 bandwidth)
void setMaxWantedBandwidth (const card64 bandwidth)
void setMaxTransferDelay (const double delay)
void setStreamPriority (const int8 priority)
void setSessionPriority (const int8 priority)
void setEncoding (const cardinal index)

Private Member Functions

void sendCommand (const bool updateRestartPosition=true)

Private Attributes

RTPReceiverReceiver
RTCPSenderSender
Socket SenderSocket
Socket ReceiverSocket
InternetFlow Flow
InternetAddress ServerAddress
InternetAddress OurAddress
card32 OurSSRC
InternetAddress ReceiverAddress
multimap< const cardinal,
TraceDecoderInterface * > 
DecoderSet
TraceDecoderRepository Decoders
TraceClientAppPacket Status
card64 OldPosition
card64 ChangeTimeStamp
bool IsPlaying

Static Private Attributes

static const card64 RestartPositionUpdateDelay = 5000000

Detailed Description

Trace Client.

This class is a trace client.

Author:
Thomas Dreibholz
Version:
1.0

Constructor & Destructor Documentation

Coral::TraceClient::TraceClient ( const char *  receiverName)

Constructor for a new trace client.

Parameters:
receiverNameString with the receiver name or NULL for default.

Member Function Documentation

void Coral::TraceClient::change ( const char *  mediaName)

Change media of an established connection.

Parameters:
mediaNameNew media name (e.g. ../TraceFiles/Test2.list)
See also:
play

Get bandwidth range of last transmission.

Returns:
Bandwidth range.
card64 Coral::TraceClient::getBytesReceived ( const cardinal  layer = 0) const [inline]

Get number of bytes received.

Parameters:
layerLayer number or (cardinal)-1 for sum of all layers.
Returns:
Number of bytes received
const char* Coral::TraceClient::getEncoding ( ) const [inline]

Get encoding name.

Returns:
Encoding name.
const char * Coral::TraceClient::getEncodingName ( const cardinal  index)

Get encoding name for a given index of the client's decoder repository.

Parameters:
indexRepository index.
Returns:
Encoding name or NULL, if index is too high.

Get error code.

Returns:
Error code.

Get flags of last transmission.

Returns:
Flags.
card32 Coral::TraceClient::getFlowLabel ( const cardinal  layer = 0) const [inline]

Get flow label of last received packet in given layer.

Parameters:
layerLayer number.
Returns:
Flow label.
See also:
getLayers
double Coral::TraceClient::getFractionLost ( const cardinal  layer = 0) const

Get fraction of packets lost for given layer.

Parameters:
layerLayer number.
Returns:
Fraction of packets lost.
See also:
getLayers
double Coral::TraceClient::getFrameRate ( ) const [inline]

Get frame rate of last transmission.

Returns:
Frame rate.
InternetFlow Coral::TraceClient::getInternetFlow ( const cardinal  layer = 0) const [inline]

Get InternetFlow of last received packet in given layer.

Parameters:
layerLayer number.
Returns:
InternetFlow.
See also:
getLayers

Get IP version.

Returns:
IP Version.
double Coral::TraceClient::getJitter ( const cardinal  layer = 0) const

Get jitter for given layer.

Parameters:
layerLayer number.
Returns:
Jitter.
See also:
getLayers

Get number of layers of last transmission.

Get maximum media position.

Returns:
Maximum position in nanoseconds.
double Coral::TraceClient::getMaxTransferDelay ( ) const [inline]

Get maximum transfer delay.

Returns:
Maximum transfer delay.

Get maximum wanted bandwidth.

Returns:
Maximum wanted bandwidth.

Get minimum wanted bandwidth.

Returns:
Minimum wanted bandwidth.

Get client address string.

Parameters:
formatPrint format.
Returns:
Client address.
See also:
InternetAddress::PrintFormat

Get client SSRC.

Returns:
Client SSRC.

Get number of packets lost for given layer.

Parameters:
layerLayer number.
Returns:
Number of packets lost.
See also:
getLayers
card64 Coral::TraceClient::getPacketsReceived ( const cardinal  layer = 0) const [inline]

Get number of packets received in given layer.

Parameters:
layerLayer number or (cardinal)-1 for sum of all layers.
Returns:
Number of packets received
See also:
getLayers

Get current media position. This will automatically the RestartPosition value in the next TraceClientAppPacket. The server will restart from the current position, if the server is restarted.

Returns:
Position in nanoseconds.

Get server address string.

Parameters:
formatPrint format.
Returns:
Server address.
See also:
InternetAddress::PrintFormat

Get server SSRC for given layer.

Parameters:
layerLayer number.
Returns:
Server SSRC.
See also:
getLayers

Get session priority.

Returns:
Session priority;

Get stream priority.

Returns:
Stream priority;
card8 Coral::TraceClient::getTrafficClass ( const cardinal  layer = 0) const [inline]

Get traffic class of last received packet in given layer.

Parameters:
layerLayer number.
Returns:
Traffic class.
See also:
getLayers
double Coral::TraceClient::getUtilization ( ) const [inline]

Get utilization of last transmission.

Returns:
Utilization.
double Coral::TraceClient::getWantedUtilization ( ) const [inline]

Get wanted utilization.

Returns:
Wanted utilization.
bool Coral::TraceClient::play ( const char *  server,
const char *  mediaName,
const card32  sessionDescriptor = 0 
)

Start playing given media from given server.

Parameters:
serverServer address (e.g. gaffel:7500).
mediaNameMedia name (e.g. ../TraceFiles/Test1.list)
sessionDescriptorSession descriptor.
Returns:
true, if play request has been sent to server.
bool Coral::TraceClient::playing ( ) const [inline]

Check, if trace client is playing.

Returns:
true, if client is playing; false otherwise.
void Coral::TraceClient::sendCommand ( const bool  updateRestartPosition = true) [private]

Set encoding by index in client's decoder repository.

Parameters:
indexIndex in decoder repository.
void Coral::TraceClient::setFlags ( const card32  priority) [inline]

Set flags.

Parameters:
flagsFlags.
void Coral::TraceClient::setMaxTransferDelay ( const double  delay) [inline]

Set maximum transfer delay.

Parameters:
delayMaximum transfer delay in microseconds.
void Coral::TraceClient::setMaxWantedBandwidth ( const card64  bandwidth) [inline]

Set maximum wanted bandwidth.

Parameters:
bandwidthMaximum wanted bandwidth.
void Coral::TraceClient::setMinWantedBandwidth ( const card64  bandwidth) [inline]

Set minimum wanted bandwidth.

Parameters:
bandwidthMinimum wanted bandwidth.
void Coral::TraceClient::setPause ( const bool  on)

Set pause.

Parameters:
ontrue for pause on; false for pause off.
void Coral::TraceClient::setPosition ( const card64  position) [inline]

Set media position.

Parameters:
positionNew media position in nanoseconds.
void Coral::TraceClient::setSessionPriority ( const int8  priority) [inline]

Set session priority.

Parameters:
prioritySession priority.
void Coral::TraceClient::setStreamPriority ( const int8  priority) [inline]

Set stream priority.

Parameters:
priorityStream priority.
void Coral::TraceClient::setWantedUtilization ( const double  utilization) [inline]

Set wanted utilization.

Parameters:
utilizationWanted utilization.

Stop playing.


Member Data Documentation

const card64 Coral::TraceClient::RestartPositionUpdateDelay = 5000000 [static, private]

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines