#include <uwApplication_module.h>
Definition at line 86 of file uwApplication_module.h.
◆ uwApplicationModule()
uwApplicationModule::uwApplicationModule |
( |
| ) |
|
◆ ~uwApplicationModule()
uwApplicationModule::~uwApplicationModule |
( |
| ) |
|
|
virtual |
◆ acceptTCP()
void uwApplicationModule::acceptTCP |
( |
| ) |
|
|
protectedvirtual |
◆ command()
int uwApplicationModule::command |
( |
int |
argc, |
|
|
const char *const * |
argv |
|
) |
| |
|
overridevirtual |
TCL command interpreter.
It implements the following OTCL methods:
- Parameters
-
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). |
- Returns
- TCL_OK or TCL_ERROR whether the command has been dispatched successfully or not.
Definition at line 145 of file uwApplication_module.cpp.
◆ getEpoch()
std::string uwApplicationModule::getEpoch |
( |
| ) |
const |
|
inline |
Calculate the epoch of the event.
Used in sea-trial mode.
- Returns
- the epoch of the system.
Definition at line 239 of file uwApplication_module.h.
◆ GetFTT()
double uwApplicationModule::GetFTT |
( |
| ) |
const |
|
virtual |
◆ GetFTTstd()
double uwApplicationModule::GetFTTstd |
( |
| ) |
const |
|
virtual |
Return the standard deviation of the Forward Trip Time calculated.
- Returns
- the standard deviation of the Forward Trip Time calculated
Definition at line 511 of file uwApplication_module.cpp.
◆ GetPER()
double uwApplicationModule::GetPER |
( |
| ) |
const |
|
virtual |
Rerturn the Packet Error Rate calculated.
- Returns
- the Packet Error Rate calculated
Definition at line 524 of file uwApplication_module.cpp.
◆ getPeriod()
virtual double uwApplicationModule::getPeriod |
( |
| ) |
const |
|
inlinevirtual |
◆ getPktLost()
virtual int uwApplicationModule::getPktLost |
( |
| ) |
const |
|
inlinevirtual |
◆ getPktRecv()
virtual int uwApplicationModule::getPktRecv |
( |
| ) |
const |
|
inlinevirtual |
return the number of DATA packet correctly received by the server
- Returns
- pkts_recv
Definition at line 185 of file uwApplication_module.h.
◆ getPktSent()
virtual int uwApplicationModule::getPktSent |
( |
| ) |
const |
|
inlinevirtual |
◆ getPktsInvalidRx()
virtual int uwApplicationModule::getPktsInvalidRx |
( |
| ) |
const |
|
inlinevirtual |
return the number of DATA packets received with error by the server
- Returns
- pkts_invalid
Definition at line 207 of file uwApplication_module.h.
◆ getPktsOOSequence()
virtual int uwApplicationModule::getPktsOOSequence |
( |
| ) |
const |
|
inlinevirtual |
return the number of DATA packets received out of order by the server
- Returns
- pkts_ooseq
Definition at line 196 of file uwApplication_module.h.
◆ getPktsPushQueue()
virtual int uwApplicationModule::getPktsPushQueue |
( |
| ) |
const |
|
inlinevirtual |
Return the number of DATA packets sorted in the server queue.
- Returns
- pkts_push_queue
Definition at line 218 of file uwApplication_module.h.
◆ GetRTT()
double uwApplicationModule::GetRTT |
( |
| ) |
const |
|
virtual |
◆ GetRTTstd()
double uwApplicationModule::GetRTTstd |
( |
| ) |
const |
|
virtual |
Return the standard deviation of the Round Trip Time calculated.
- Returns
- the standard deviation of the Round Trip Time calculated
Definition at line 485 of file uwApplication_module.cpp.
◆ GetTHR()
double uwApplicationModule::GetTHR |
( |
| ) |
const |
|
virtual |
◆ getTimeBeforeNextPkt()
double uwApplicationModule::getTimeBeforeNextPkt |
( |
| ) |
|
|
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 (only without socket).
- Returns
- generation period for DATA packets
Definition at line 466 of file uwApplication_module.cpp.
◆ incrPktInvalid()
virtual void uwApplicationModule::incrPktInvalid |
( |
| ) |
|
|
inlineprotectedvirtual |
◆ incrPktLost()
virtual void uwApplicationModule::incrPktLost |
( |
int |
npkts | ) |
|
|
inlineprotectedvirtual |
◆ incrPktOoseq()
virtual void uwApplicationModule::incrPktOoseq |
( |
| ) |
|
|
inlineprotectedvirtual |
Increase the number of DATA packets received out of order by the server.
Definition at line 408 of file uwApplication_module.h.
◆ incrPktRecv()
virtual void uwApplicationModule::incrPktRecv |
( |
| ) |
|
|
inlineprotectedvirtual |
◆ incrPktSent()
virtual void uwApplicationModule::incrPktSent |
( |
| ) |
|
|
inlineprotectedvirtual |
Increase the sequence number and so the number of packets sent by the server.
Definition at line 382 of file uwApplication_module.h.
◆ incrPktsPushQueue()
virtual void uwApplicationModule::incrPktsPushQueue |
( |
| ) |
|
|
inlineprotectedvirtual |
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 426 of file uwApplication_module.h.
◆ listenTCP()
bool uwApplicationModule::listenTCP |
( |
| ) |
|
|
protectedvirtual |
Method that binds the listening TCP socket.
- Returns
- true if the listening socket is bind and open.
Definition at line 43 of file uwApplication_TCP_socket.cpp.
◆ openConnectionUDP()
bool uwApplicationModule::openConnectionUDP |
( |
| ) |
|
|
protectedvirtual |
When socket communication is used, this method establish a connection between client and server.
This is required because a UDP protocol is used.
- Returns
- true if the socket is bind.
Definition at line 43 of file uwApplication_UDP_socket.cpp.
◆ printOnLog()
virtual void uwApplicationModule::printOnLog |
( |
Logger::LogLevel |
log_level, |
|
|
const std::string & |
module, |
|
|
const std::string & |
message |
|
) |
| const |
|
inlineoverridevirtual |
Method to send the log message to the logger.
If sea_trial enabled add epoch of the event to the message and use node_id passed via tcl.
- Parameters
-
log_level | LogLevel representing the amout of logs. |
module | String name of the plugin/module. |
message | String log message. |
Definition at line 261 of file uwApplication_module.h.
◆ readFromTCP()
void uwApplicationModule::readFromTCP |
( |
int |
clnSock | ) |
|
|
protectedvirtual |
Method that reads a TCP byte stream from external application and converts it to a Packet.
- Parameters
-
clnSock | int client file descriptor. |
Definition at line 130 of file uwApplication_TCP_socket.cpp.
◆ readFromUDP()
void uwApplicationModule::readFromUDP |
( |
| ) |
|
|
protectedvirtual |
◆ recv()
void uwApplicationModule::recv |
( |
Packet * |
p | ) |
|
|
overridevirtual |
Performs the reception of packets from upper and lower layers.
- Parameters
-
Packet* | Pointer to the packet will be received. |
Definition at line 246 of file uwApplication_module.cpp.
◆ stop()
void uwApplicationModule::stop |
( |
| ) |
|
|
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 440 of file uwApplication_module.cpp.
◆ transmit()
void uwApplicationModule::transmit |
( |
| ) |
|
|
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 352 of file uwApplication_module.cpp.
◆ updateFTT()
void uwApplicationModule::updateFTT |
( |
double |
ftt | ) |
|
|
protectedvirtual |
Returns the average Forward Trip Time.
- Returns
- the average Forward Trip Time Update the FTT after the reception of a new packet
- Parameters
-
FTT | of the current packet received |
Definition at line 543 of file uwApplication_module.cpp.
◆ updateRTT()
void uwApplicationModule::updateRTT |
( |
double |
rtt | ) |
|
|
protectedvirtual |
Update the RTT after the reception of a new packet.
- Parameters
-
RTT | of the current packet received |
Definition at line 497 of file uwApplication_module.cpp.
◆ updateThroughput()
void uwApplicationModule::updateThroughput |
( |
int |
bytes, |
|
|
double |
dt |
|
) |
| |
|
protectedvirtual |
Update the Throughput after the reception of a new packet.
- Parameters
-
Throughput | of the current packet received |
Definition at line 551 of file uwApplication_module.cpp.
◆ useDropOutOfOrder()
virtual bool uwApplicationModule::useDropOutOfOrder |
( |
| ) |
|
|
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.
- Returns
- true if enable drop out of order false otherwise.
Definition at line 372 of file uwApplication_module.h.
◆ usePoissonTraffic()
virtual bool uwApplicationModule::usePoissonTraffic |
( |
| ) |
|
|
inlineprotectedvirtual |
If the communication take place without sockets verify if the data generation period is constant or a poisson random process.
- Returns
- true if use a Poisson process false if use a constant period data generation
Definition at line 359 of file uwApplication_module.h.
◆ useTCP()
virtual bool uwApplicationModule::useTCP |
( |
| ) |
|
|
inlineprotectedvirtual |
Check if the socket protocol is TCP or UDP.
- Returns
- true if socket uses TCP protocol false if uses UDP.
Definition at line 346 of file uwApplication_module.h.
◆ withoutSocket()
virtual bool uwApplicationModule::withoutSocket |
( |
| ) |
|
|
inlineprotectedvirtual |
Check if the communication take place without socket.
- Returns
- true if communication without socket false otherwise.
Definition at line 335 of file uwApplication_module.h.
◆ uwSendTimerAppl
◆ chkTimerPeriod
◆ clnAddr
struct sockaddr_in uwApplicationModule::clnAddr |
|
protected |
◆ clnSockDescr
int uwApplicationModule::clnSockDescr |
|
protected |
◆ drop_out_of_order
int uwApplicationModule::drop_out_of_order |
|
protected |
◆ dst_addr
uint8_t uwApplicationModule::dst_addr |
|
protected |
◆ esn
uint32_t uwApplicationModule::esn |
|
protected |
◆ fttsamples
int uwApplicationModule::fttsamples |
|
protected |
◆ hrsn
int uwApplicationModule::hrsn |
|
protected |
◆ lrtime
double uwApplicationModule::lrtime |
|
protected |
◆ MAX_READ_LEN
uint uwApplicationModule::MAX_READ_LEN = 64 |
|
staticprotected |
◆ node_id
int uwApplicationModule::node_id |
|
protected |
◆ payloadsize
int uwApplicationModule::payloadsize |
|
protected |
◆ period
double uwApplicationModule::period |
|
protected |
◆ pkts_invalid
int uwApplicationModule::pkts_invalid |
|
protected |
◆ pkts_last_reset
int uwApplicationModule::pkts_last_reset |
|
protected |
Used for error checking after stats are reset.
Set to pkts_lost+pkts_recv each time resetStats is called.
Definition at line 495 of file uwApplication_module.h.
◆ pkts_lost
int uwApplicationModule::pkts_lost |
|
protected |
◆ pkts_ooseq
int uwApplicationModule::pkts_ooseq |
|
protected |
◆ pkts_push_queue
int uwApplicationModule::pkts_push_queue |
|
protected |
Counter of DATA packets received by server and not yet passed to the below levels of ISO/OSI stack protocol.
Definition at line 492 of file uwApplication_module.h.
◆ pkts_recv
int uwApplicationModule::pkts_recv |
|
protected |
◆ poisson_traffic
int uwApplicationModule::poisson_traffic |
|
protected |
Poisson process for generation of data packets 1 enabled 0 not enabled.
Definition at line 474 of file uwApplication_module.h.
◆ port_num
int uwApplicationModule::port_num |
|
protected |
◆ queuePckReadTCP
std::queue<Packet *> uwApplicationModule::queuePckReadTCP |
|
protected |
Atomic boolean variable that controls the socket rx looping thread.
Queue that store the DATA packets recevied from the client by the server using a TCP protocol.
Definition at line 521 of file uwApplication_module.h.
◆ queuePckReadUDP
std::queue<Packet *> uwApplicationModule::queuePckReadUDP |
|
protected |
Queue that store the DATA packets recevied from the client by the server using a UDP protocol.
Definition at line 524 of file uwApplication_module.h.
◆ receiving
std::atomic<bool> uwApplicationModule::receiving |
|
protected |
◆ rftt
int uwApplicationModule::rftt |
|
protected |
◆ rttsamples
int uwApplicationModule::rttsamples |
|
protected |
◆ sea_trial
int uwApplicationModule::sea_trial |
|
protected |
◆ servAddr
struct sockaddr_in uwApplicationModule::servAddr |
|
protected |
◆ servPort
int uwApplicationModule::servPort |
|
protected |
◆ servSockDescr
int uwApplicationModule::servSockDescr |
|
protected |
◆ sn_check
bool* uwApplicationModule::sn_check |
|
protected |
Flag set to true if the external application is connected via a TCP socket, false if UDP.
Used to keep track of the packets already received.
Definition at line 472 of file uwApplication_module.h.
◆ socket_active
bool uwApplicationModule::socket_active |
|
protected |
◆ socket_mutex
std::mutex uwApplicationModule::socket_mutex |
|
protected |
◆ socket_tcp
bool uwApplicationModule::socket_tcp |
|
protected |
◆ socket_thread
std::thread uwApplicationModule::socket_thread |
|
protected |
◆ sumbytes
double uwApplicationModule::sumbytes |
|
protected |
◆ sumdt
double uwApplicationModule::sumdt |
|
protected |
◆ sumftt
double uwApplicationModule::sumftt |
|
protected |
◆ sumftt2
double uwApplicationModule::sumftt2 |
|
protected |
◆ sumrtt
double uwApplicationModule::sumrtt |
|
protected |
◆ sumrtt2
double uwApplicationModule::sumrtt2 |
|
protected |
◆ txsn
int uwApplicationModule::txsn |
|
protected |
◆ uidcnt
int uwApplicationModule::uidcnt |
|
protected |
The documentation for this class was generated from the following files: