A trace based streamer. More...
#include <udp-trace-client.h>
Classes | |
struct | TraceEntry |
Public Member Functions | |
UdpTraceClient () | |
creates a traceBasedStreamer application | |
UdpTraceClient (Ipv4Address ip, uint16_t port, char *traceFile) | |
creates a traceBasedStreamer application | |
void | SetRemote (Ipv4Address ip, uint16_t port) |
set the destination IP address and port | |
void | SetTraceFile (std::string filename) |
set the trace file to be used by the application | |
uint16_t | GetMaxPacketSize (void) |
void | SetMaxPacketSize (uint16_t maxPacketSize) |
Static Public Member Functions | |
static TypeId | GetTypeId (void) |
This method returns the TypeId associated to ns3::UdpTraceClient. | |
Protected Member Functions | |
virtual void | DoDispose (void) |
A trace based streamer.
sends udp packets based on a trace file of an MPEG4 stream trace files could be downloaded form : http://www.tkn.tu-berlin.de/research/trace/ltvt.html (the 2 first lines of the file should be removed) A valid trace file is a file with 4 columns: -1- the first one represents the frame index -2- the second one indicates the type of the frame: I, P or B -3- the third one indicates the time on which the frame was generated by the encoder -4- the fourth one indicates the frame size in byte if no valid MPEG4 trace file is provided to the application the trace from g_defaultEntries array will be loaded.
ns3::UdpTraceClient::UdpTraceClient | ( | Ipv4Address | ip, | |
uint16_t | port, | |||
char * | traceFile | |||
) |
creates a traceBasedStreamer application
dataSize | ip the destination ip address to which the stream will be sent | |
port | the destination udp port to which the stream will be sent | |
traceFile | a path to an MPEG4 trace file formatted as follows: FrameNo Frametype Time[ms] Length [byte] FrameNo Frametype Time[ms] Length [byte] ... |
virtual void ns3::UdpTraceClient::DoDispose | ( | void | ) | [protected, virtual] |
This method is called by Object::Dispose or by the object's destructor, whichever comes first.
Subclasses are expected to implement their real destruction code in an overriden version of this method and chain up to their parent's implementation once they are done. i.e., for simplicity, the destructor of every subclass should be empty and its content should be moved to the associated DoDispose method.
It is safe to call GetObject from within this method.
Reimplemented from ns3::Application.
uint16_t ns3::UdpTraceClient::GetMaxPacketSize | ( | void | ) |
static TypeId ns3::UdpTraceClient::GetTypeId | ( | void | ) | [static] |
This method returns the TypeId associated to ns3::UdpTraceClient.
This object is accessible through the following paths with Config::Set and Config::Connect:
Attributes defined for this type:
Attributes defined in parent class ns3::Application:
No TraceSources defined for this type.
Reimplemented from ns3::Application.
void ns3::UdpTraceClient::SetMaxPacketSize | ( | uint16_t | maxPacketSize | ) |
maxPacketSize | The maximum packet size |
void ns3::UdpTraceClient::SetRemote | ( | Ipv4Address | ip, | |
uint16_t | port | |||
) |
set the destination IP address and port
ip | the destination ip address to which the stream will be sent | |
port | the destination udp port to which the stream will be sent |
void ns3::UdpTraceClient::SetTraceFile | ( | std::string | filename | ) |
set the trace file to be used by the application
traceFile | a path to an MPEG4 trace file formatted as follows: Frame No Frametype Time[ms] Length [byte] Frame No Frametype Time[ms] Length [byte] ... |