126 EV <<
"Destination AEName is set to default which is AeErr. AeErr is for special testing purposes. Are you sure that it is right?" << endl;
137 myPath = this->getFullPath();
151 recTimes = par(
"recTimes").boolValue();
153 pduburst = par(
"pduburst").longValue();
170 if(par(
"printAtEnd").boolValue()){
171 EV <<
"At "<<this->
getApni()<<endl;
179 EV <<
"timestamps " <<
firstR <<
" -> "<<
lastR<<endl;
182 EV <<
"-----------------"<<endl;
183 for(std::map<double, int>::iterator it =
times.begin(); it!=
times.end(); it++) {
184 EV <<
" " << it->first <<
" " << it->second <<endl;
186 EV <<
"-----------------"<<endl;
188 EV <<
"-----------------"<<endl;
214 else if ( !strcmp(msg->getName(),
S_TIM_STOP) ) {
217 else if ( !strcmp(msg->getName(),
S_TIM_COM) ) {
219 int tburst = intuniform(1,
pduburst);
221 double msgWait = tburst*
rate;
222 for(
int i = 0; i < tburst; i++){
229 ping->setByteLength(msgSize);
238 scheduleAt(simTime()+msgWait, m);
242 EV << this->getFullPath() <<
" received unknown self-message " << msg->getName();
248 if ( msg->isSelfMessage() )
256 pong->setByteLength(msg->getByteLength());
282 simtime_t delay = simTime() - pong->
pingAt;
295 double dl =
dround(delay.dbl(), 3);
304 int exp_base10 = round(log10(a));
305 double man_base10 = a*pow(10.0,-exp_base10);
306 double factor = pow(10.0,-ndigits+1);
307 double truncated_man_base10 = man_base10 - fmod(man_base10,factor);
308 double rounded_remainder = fmod(man_base10,factor)/factor;
310 rounded_remainder = rounded_remainder > 0.5 ? 1.0*factor : 0.0;
312 return (truncated_man_base10 + rounded_remainder)*pow(10.0,exp_base10) ;
Class representing flow object with attributes from specs.
void setQosRequirements(const QoSReq &qosReqs)
Sets QoS parameters wanted by flow initiator.
const char * S_PAR_DSTAPNAME
std::map< double, int > times
const char * S_PAR_DSTAPINSTANCE
void prepareAllocateRequest()
virtual void processMReadR(CDAPMessage *msg)
CDAPConnectionState connectionState
Application Process Name class.
const APNamingInfo & getApni() const
std::string getQoSId() const
Getter of selected QoS-cube identifier.
const char * S_PAR_RATE_VAR
const char * S_VAL_MODULEPATH
APNamingInfo holds complete naming info for particular application process.
std::string dstApInstance
virtual void processMRead(CDAPMessage *msg)
void initQoSRequiremets()
void prepareDeallocateRequest()
void sendDeallocationRequest(Flow *flow)
std::string dstAeInstance
const ConnectionId & getConId() const
Gets read-only Flow's ConnectionId.
virtual PingMsgg * dup() const
const QoSReq & getQoSRequirements() const
double dround(double a, int ndigits)
void initSignalsAndListeners()
virtual void handleMessage(cMessage *msg)
virtual void initialize()
const char * S_PAR_SIZE_VAR
void sendData(Flow *flow, CDAPMessage *msg)
const char * S_PAR_DSTAENAME
virtual PongMsgg * dup() const
PongMsgg(simtime_t pingAt)
void sendAllocationRequest(Flow *flow)
void handleSelfMessage(cMessage *msg)
const char * S_PAR_DSTAEINSTANCE