|
INET Framework for OMNeT++/OMNEST
|
#include <App_custum.h>
Public Member Functions | |
| custom () | |
| virtual bool | loadConfig (const cXMLElement &appConfig) |
| virtual int | getDefaultPort () |
| virtual double | getNextPacketTime () |
| virtual int | getPacketSize () |
| virtual int | anotherEncapsulationOverhead () |
Private Attributes | |
| double | pps |
| int | size |
| std::string | tDistr |
| std::string | sDistr |
Definition at line 26 of file App_custum.h.
| custom::custom | ( | ) | [inline] |
| int custom::anotherEncapsulationOverhead | ( | ) | [virtual] |
| int custom::getDefaultPort | ( | ) | [virtual] |
| double custom::getNextPacketTime | ( | ) | [virtual] |
Implements ITrafGenApplication.
Definition at line 86 of file App_custum.cc.
| int custom::getPacketSize | ( | ) | [virtual] |
Implements ITrafGenApplication.
Definition at line 107 of file App_custum.cc.
| bool custom::loadConfig | ( | const cXMLElement & | appConfig | ) | [virtual] |
Implements ITrafGenApplication.
Definition at line 32 of file App_custum.cc.
{
cXMLElement* element;
element = appConfig.getFirstChildWithTag("packets_per_second");
if(element != NULL)
pps = atof(element->getNodeValue());
element = appConfig.getFirstChildWithTag("packet_size");
if(element != NULL)
size = atoi(element->getNodeValue());
element = appConfig.getFirstChildWithTag("time_distribution");
if(element != NULL)
tDistr = element->getNodeValue();
element = appConfig.getFirstChildWithTag("size_distribution");
if(element != NULL)
sDistr = element->getNodeValue();
if(pps == 0.0 || size == 0)
return false; // chyba nacitania
return true;
}
double custom::pps [private] |
Definition at line 29 of file App_custum.h.
Referenced by getNextPacketTime(), and loadConfig().
std::string custom::sDistr [private] |
Definition at line 32 of file App_custum.h.
Referenced by loadConfig().
int custom::size [private] |
Definition at line 30 of file App_custum.h.
Referenced by getPacketSize(), and loadConfig().
std::string custom::tDistr [private] |
Definition at line 31 of file App_custum.h.
Referenced by getNextPacketTime(), getPacketSize(), and loadConfig().