DESERT 3.5.1
|
#include <uwApplication_module.h>
Classes | |
class | uwSendTimerAppl |
Public Member Functions | |
uwApplicationModule () | |
virtual | ~uwApplicationModule () |
virtual int | command (int argc, const char *const *argv) |
virtual int | crLayCommand (ClMessage *m) |
virtual void | handleTCPclient (int clnSock) |
virtual void | incrPktsPushQueue () |
unsigned long int | getEpoch () |
Public Attributes | |
int | servSockDescr |
int | clnSockDescr |
struct sockaddr_in | servAddr |
struct sockaddr_in | clnAddr |
int | servPort |
std::queue< Packet * > | queuePckReadTCP |
std::queue< Packet * > | queuePckReadUDP |
std::ofstream | out_log |
bool | logging |
int | node_id |
int | exp_id |
Static Public Attributes | |
static uint | MAX_READ_LEN = 64 |
Protected Member Functions | |
virtual void | recv (Packet *) |
virtual void | statistics (Packet *p) |
virtual void | start_generation () |
virtual void | init_Packet () |
virtual int | openConnectionTCP () |
virtual void | init_Packet_TCP () |
virtual int | openConnectionUDP () |
virtual void | init_Packet_UDP () |
virtual void | stop () |
virtual bool | withoutSocket () |
virtual bool | useTCP () |
virtual bool | usePoissonTraffic () |
virtual bool | useDropOutOfOrder () |
virtual void | incrPktSent () |
virtual void | incrPktLost (const int &npkts) |
virtual void | incrPktRecv () |
virtual void | incrPktOoseq () |
virtual void | incrPktInvalid () |
virtual int | getPktSent () |
virtual int | getPktLost () |
virtual int | getPktRecv () |
virtual int | getPktsOOSequence () |
virtual int | getPktsInvalidRx () |
virtual int | getPktsPushQueue () |
virtual double | getPeriod () |
virtual int | getpayloadsize () |
virtual double | getTimeBeforeNextPkt () |
virtual double | GetRTT () const |
virtual double | GetRTTstd () const |
virtual void | updateRTT (const double &rtt) |
virtual double | GetFTT () const |
virtual double | GetFTTstd () const |
virtual double | GetPER () const |
virtual double | GetTHR () const |
virtual void | updateFTT (const double &ftt) |
virtual void | updateThroughput (const int &bytes, const double &dt) |
Protected Attributes | |
int | debug_ |
double | PERIOD |
int | poisson_traffic |
int | payloadsize |
int | port_num |
int | drop_out_of_order |
uint8_t | dst_addr |
uwSendTimerAppl | chkTimerPeriod |
bool | socket_active |
string | socket_protocol |
int | tcp_udp |
bool * | sn_check |
int | uidcnt |
int | txsn |
int | rftt |
int | pkts_lost |
int | pkts_recv |
int | pkts_ooseq |
int | pkts_invalid |
int | pkts_push_queue |
int | pkts_last_reset |
double | lrtime |
double | sumrtt |
double | sumrtt2 |
int | rttsamples |
double | sumftt |
double | sumftt2 |
int | fttsamples |
uint32_t | esn |
double | sumbytes |
double | sumdt |
int | hrsn |
Definition at line 91 of file uwApplication_module.h.
uwApplicationModule::uwApplicationModule | ( | ) |
Constructor of uwApplicationModule class.
Definition at line 70 of file uwApplication_module.cpp.
|
virtual |
Destructor of uwApplicationModule class.
Definition at line 133 of file uwApplication_module.cpp.
|
virtual |
TCL command interpreter.
It implements the following OTCL methods:
argc | Number of arguments in argv. |
argv | Array of strings which are the command parameters (Note that argv[0] is the name of the object). |
Definition at line 138 of file uwApplication_module.cpp.
|
virtual |
Cross-Layer messages interpreter.
ClMessage* | an instance of ClMessage that represent the message received |
Definition at line 227 of file uwApplication_module.cpp.
|
inline |
Calculate the epoch of the event.
Used in sea-trial mode
Definition at line 149 of file uwApplication_module.h.
|
protectedvirtual |
Returns the average Forward Trip Time.
Definition at line 600 of file uwApplication_module.cpp.
|
protectedvirtual |
Return the standard deviation of the Forward Trip Time calculated.
Definition at line 606 of file uwApplication_module.cpp.
|
inlineprotectedvirtual |
return the size of DATA packet payload
Definition at line 450 of file uwApplication_module.h.
|
protectedvirtual |
Rerturn the Packet Error Rate calculated.
Definition at line 621 of file uwApplication_module.cpp.
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
return the number of DATA packets lost by the server
Definition at line 390 of file uwApplication_module.h.
|
inlineprotectedvirtual |
return the number of DATA packet correctly received by the server
Definition at line 400 of file uwApplication_module.h.
|
inlineprotectedvirtual |
return the number of packets sent by the server
Definition at line 380 of file uwApplication_module.h.
|
inlineprotectedvirtual |
return the number of DATA packets received with error by the server
Definition at line 420 of file uwApplication_module.h.
|
inlineprotectedvirtual |
return the number of DATA packets received out of order by the server
Definition at line 410 of file uwApplication_module.h.
|
inlineprotectedvirtual |
return the number of DATA packets sotred in the server queue
Definition at line 430 of file uwApplication_module.h.
|
protectedvirtual |
Returns the average Round Trip Time.
Definition at line 575 of file uwApplication_module.cpp.
|
protectedvirtual |
Return the standard deviation of the Round Trip Time calculated.
Definition at line 581 of file uwApplication_module.cpp.
|
protectedvirtual |
Return the Throughput calculated [bps].
Definition at line 638 of file uwApplication_module.cpp.
|
protectedvirtual |
Compute the DATA generation rate, that can be constant and equal to the PERIOD established by the user, or can occur with a Poisson process.
Definition at line 537 of file uwApplication_module.cpp.
|
virtual |
Handle the communication between server and client.
clnSock | socket obtained after the accept function and use for the communication between server and client |
Definition at line 174 of file uwApplication_TCP_socket.cpp.
|
inlineprotectedvirtual |
Increse the number of DATA packets received with error by the server.
Definition at line 370 of file uwApplication_module.h.
|
inlineprotectedvirtual |
Increase the number of DATA packets lost by the server.
Definition at line 346 of file uwApplication_module.h.
|
inlineprotectedvirtual |
Increase the number of DATA packets received out of order by the server.
Definition at line 362 of file uwApplication_module.h.
|
inlineprotectedvirtual |
Increase the number of DATA packet correctly received by the server.
Definition at line 354 of file uwApplication_module.h.
|
inlineprotectedvirtual |
Increase the sequence number and so the number of packets sent by the server.
Definition at line 338 of file uwApplication_module.h.
|
inlinevirtual |
Increase the number of DATA packets stored in the Server queue.
This DATA packets will be sent to the below levels of ISO/OSI stack protocol.
Definition at line 139 of file uwApplication_module.h.
|
protectedvirtual |
Set all the field of the DATA packet that must be send down after the creation to the below level.
In this case the payload of DATA packet are generated in a random way.
Definition at line 424 of file uwApplication_module.cpp.
|
protectedvirtual |
Set all the field of DATA packet and take from the specific queue the payload of DATA packet that will be transmitted.
After that put down to the layer below
Definition at line 237 of file uwApplication_TCP_socket.cpp.
|
protectedvirtual |
Set all the field of DATA packet and take from the specific queue the payload of DATA packet that will be transmitted.
After that put down to the layer below
Definition at line 200 of file uwApplication_UDP_socket.cpp.
|
protectedvirtual |
When socket communication is used, this method establish a connection between client and server.
This is required because a TCP protocol is used.
Definition at line 50 of file uwApplication_TCP_socket.cpp.
|
protectedvirtual |
When socket communication is used, this method establish a connection between client and server.
This is required because a UDP protocol is used.
Definition at line 50 of file uwApplication_UDP_socket.cpp.
|
protectedvirtual |
Handle the transmission of DATA packets between CBR layer and the below level.
Definition at line 236 of file uwApplication_module.cpp.
|
protectedvirtual |
Start the process to generate DATA packets without sockets.
In this case the payload of DATA packets are filled with a randomly sequence or with a pattern sequence.
Definition at line 412 of file uwApplication_module.cpp.
|
protectedvirtual |
Comupte some statistics as the number of packets sent and receive between two layer, or control if the packet received is out of sequence.
Definition at line 271 of file uwApplication_module.cpp.
|
protectedvirtual |
Close the socket connection in the case the communication take place with socket, otherwise stop the execution of the process, so force the cancellation of period time generation.
Definition at line 523 of file uwApplication_module.cpp.
|
protectedvirtual |
Update the FTT after the reception of a new packet.
FTT | of the current packet received |
Definition at line 644 of file uwApplication_module.cpp.
|
protectedvirtual |
Update the RTT after the reception of a new packet.
RTT | of the current packet received |
Definition at line 592 of file uwApplication_module.cpp.
|
protectedvirtual |
Update the Throughput after the reception of a new packet.
Throughput | of the current packet received |
Definition at line 652 of file uwApplication_module.cpp.
|
inlineprotectedvirtual |
If the communication take place without sockets verify if the data packets received by the server is out of order or not.
In the first case discard the data packet
Definition at line 323 of file uwApplication_module.h.
|
inlineprotectedvirtual |
If the communication take place without sockets verify if the data generation period is constant or is choiche in according to a poisson process.
Definition at line 306 of file uwApplication_module.h.
|
inlineprotectedvirtual |
If the communication take place using sockets verify if the protocol used is TCP or UDP.
Definition at line 291 of file uwApplication_module.h.
|
inlineprotectedvirtual |
Verify if the communication take place with socket or the data payload is generated in a randomly way.
Definition at line 275 of file uwApplication_module.h.
|
protected |
Timer that schedule the period between two successive generation of DATA packets.
Definition at line 543 of file uwApplication_module.h.
struct sockaddr_in uwApplicationModule::clnAddr |
Client address.
Definition at line 160 of file uwApplication_module.h.
int uwApplicationModule::clnSockDescr |
*socket descriptor for client
Definition at line 158 of file uwApplication_module.h.
|
protected |
Used for debug purposes 1 debug activated 0 debug not activated.
Definition at line 523 of file uwApplication_module.h.
|
protected |
Enable or not the ordering of data packet received 1 enabled 0 not enabled.
Definition at line 535 of file uwApplication_module.h.
|
protected |
IP destination address.
Definition at line 539 of file uwApplication_module.h.
|
protected |
Expected serial number.
Definition at line 575 of file uwApplication_module.h.
int uwApplicationModule::exp_id |
Definition at line 174 of file uwApplication_module.h.
|
protected |
Number of FTT samples.
Definition at line 574 of file uwApplication_module.h.
|
protected |
Highest received sequence number.
Definition at line 578 of file uwApplication_module.h.
bool uwApplicationModule::logging |
Definition at line 172 of file uwApplication_module.h.
|
protected |
Time of last packet reception.
Definition at line 568 of file uwApplication_module.h.
|
static |
Maximum size (bytes) of a single read of the socket.
Definition at line 177 of file uwApplication_module.h.
int uwApplicationModule::node_id |
Definition at line 173 of file uwApplication_module.h.
std::ofstream uwApplicationModule::out_log |
Variable that handle the file in which the protocol write the statistics.
Definition at line 170 of file uwApplication_module.h.
|
protected |
Size of each data packet payaload generated.
Definition at line 532 of file uwApplication_module.h.
|
protected |
Interval time between two successive generation data packets.
Definition at line 525 of file uwApplication_module.h.
|
protected |
Counter of the packets received with errors by the server.
Definition at line 560 of file uwApplication_module.h.
|
protected |
Used for error checking after stats are reset.
Set to pkts_lost+pkts_recv each time resetStats is called.
Definition at line 565 of file uwApplication_module.h.
|
protected |
Counter of the packet lost during the transmission.
Definition at line 555 of file uwApplication_module.h.
|
protected |
Counter of the packets received out of order by the server.
Definition at line 558 of file uwApplication_module.h.
|
protected |
Counter of DATA packets received by server and not yet passed to the below levels of ISO/OSI stack protocol.
Definition at line 562 of file uwApplication_module.h.
|
protected |
Counter of the packets correctly received by the server.
Definition at line 556 of file uwApplication_module.h.
|
protected |
Enable or not the Poisson process for generation of data packets 1 enabled 0 not enabled.
Definition at line 529 of file uwApplication_module.h.
|
protected |
Number of the port in which the server provide the service.
Definition at line 533 of file uwApplication_module.h.
std::queue<Packet *> uwApplicationModule::queuePckReadTCP |
Queue that store the DATA packets recevied from the client by the server using a TCP protocol.
Definition at line 163 of file uwApplication_module.h.
std::queue<Packet *> uwApplicationModule::queuePckReadUDP |
Queue that store the DATA packets recevied from the client by the server using a UDP protocol.
Definition at line 167 of file uwApplication_module.h.
|
protected |
Forward trip time.
Definition at line 554 of file uwApplication_module.h.
|
protected |
Number of RTT samples.
Definition at line 571 of file uwApplication_module.h.
struct sockaddr_in uwApplicationModule::servAddr |
Server address.
Definition at line 159 of file uwApplication_module.h.
int uwApplicationModule::servPort |
Server port.
Definition at line 161 of file uwApplication_module.h.
int uwApplicationModule::servSockDescr |
socket descriptor for server
Definition at line 157 of file uwApplication_module.h.
|
protected |
Used to keep track of the packets already received.
Definition at line 550 of file uwApplication_module.h.
|
protected |
Definition at line 547 of file uwApplication_module.h.
|
protected |
Definition at line 548 of file uwApplication_module.h.
|
protected |
Sum of bytes received.
Definition at line 576 of file uwApplication_module.h.
|
protected |
Sum of the delays.
Definition at line 577 of file uwApplication_module.h.
|
protected |
Sum of FTT samples.
Definition at line 572 of file uwApplication_module.h.
|
protected |
Sum of (FTT^2).
Definition at line 573 of file uwApplication_module.h.
|
protected |
Sum of RTT samples.
Definition at line 569 of file uwApplication_module.h.
|
protected |
Sum of (RTT^2).
Definition at line 570 of file uwApplication_module.h.
|
protected |
Definition at line 549 of file uwApplication_module.h.
|
protected |
Transmission sequence number of DATA packet.
Definition at line 553 of file uwApplication_module.h.
|
protected |
Identifier counter that identify uniquely the DATA packet generated.
Definition at line 551 of file uwApplication_module.h.