#include <TrAgent.h>
Inheritance diagram for dtnsim::TrAgent:
Definition at line 30 of file TrAgent.h.
Public Member Functions | |
virtual | ~TrAgent () |
void | process (SimEvent *e) |
Static Public Member Functions | |
static TrAgent * | init (Node *node, double start_time, const EndpointID &src, const EndpointID &dst, int argc, const char **argv) |
Private Member Functions | |
TrAgent (Node *node, const EndpointID &src, const EndpointID &dst) | |
void | send_bundle () |
Private Attributes | |
Node * | node_ |
node where the traffic is injected | |
EndpointID | src_ |
source eid | |
EndpointID | dst_ |
destination eid | |
int | size_ |
size of each message | |
int | reps_ |
total number of reps/batches | |
int | batch_ |
no of messages in each batch | |
double | interval_ |
time gap between two batches |
dtnsim::TrAgent::TrAgent | ( | Node * | node, | |
const EndpointID & | src, | |||
const EndpointID & | dst | |||
) | [private] |
TrAgent * dtnsim::TrAgent::init | ( | Node * | node, | |
double | start_time, | |||
const EndpointID & | src, | |||
const EndpointID & | dst, | |||
int | argc, | |||
const char ** | argv | |||
) | [static] |
Definition at line 38 of file TrAgent.cc.
References oasys::OptParser::addopt(), batch_, interval_, oasys::LOG_ERR, oasys::Logger::logf(), oasys::OptParser::parse(), dtnsim::Simulator::post(), reps_, dtnsim::SIM_NEXT_SENDTIME, size_, src, and TrAgent().
Referenced by dtnsim::NodeCommand::exec().
void dtnsim::TrAgent::process | ( | SimEvent * | e | ) | [virtual] |
Implements dtnsim::SimEventHandler.
Definition at line 76 of file TrAgent.cc.
References batch_, interval_, log_debug, dtnsim::Simulator::post(), reps_, send_bundle(), dtnsim::SIM_NEXT_SENDTIME, dtnsim::Simulator::time(), dtnsim::SimEvent::type(), and dtnsim::SimEvent::type_str().
void dtnsim::TrAgent::send_bundle | ( | ) | [private] |
Definition at line 96 of file TrAgent.cc.
References dtn::Bundle::app_acked_rcpt_, dtn::EndpointID::assign(), dtn::Bundle::bundleid_, dtn::EndpointID::c_str(), dtn::Bundle::creation_ts_, dtn::Bundle::custodian_, dtn::Bundle::custody_rcpt_, dtn::Bundle::custody_requested_, dtn::Bundle::deletion_rcpt_, dtn::Bundle::delivery_rcpt_, dtn::Bundle::dest_, dtn::Bundle::do_not_fragment_, dst_, dtn::EVENTSRC_APP, dtn::Bundle::expiration_, dtn::Bundle::forward_rcpt_, dtn::Bundle::in_datastore_, dtn::Bundle::is_admin_, dtn::Bundle::is_fragment_, dtn::Bundle::local_custody_, log_debug, log_info, dtnsim::Node::name(), node_, dtn::Bundle::payload_, dtnsim::Simulator::post(), dtn::Bundle::priority_, dtn::Bundle::receive_rcpt_, dtn::Bundle::replyto_, dtn::BundleTimestamp::seconds_, dtn::BundleTimestamp::seqno_, dtn::BundlePayload::set_length(), dtn::Bundle::singleton_dest_, size_, dtn::Bundle::source_, src_, and dtnsim::Simulator::time().
Referenced by process().
Node* dtnsim::TrAgent::node_ [private] |
node where the traffic is injected
Definition at line 45 of file TrAgent.h.
Referenced by send_bundle().
EndpointID dtnsim::TrAgent::src_ [private] |
EndpointID dtnsim::TrAgent::dst_ [private] |
int dtnsim::TrAgent::size_ [private] |
size of each message
Definition at line 48 of file TrAgent.h.
Referenced by init(), and send_bundle().
int dtnsim::TrAgent::reps_ [private] |
int dtnsim::TrAgent::batch_ [private] |
double dtnsim::TrAgent::interval_ [private] |