dtnsim::TrAgent Class Reference

#include <TrAgent.h>

Inheritance diagram for dtnsim::TrAgent:

dtnsim::SimEventHandler oasys::Logger List of all members.

Detailed Description

Definition at line 51 of file TrAgent.h.

Public Member Functions

virtual ~TrAgent ()
void process (SimEvent *e)

Static Public Member Functions

static TrAgentinit (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

Nodenode_
 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


Constructor & Destructor Documentation

virtual dtnsim::TrAgent::~TrAgent (  )  [inline, virtual]

Definition at line 57 of file TrAgent.h.

dtnsim::TrAgent::TrAgent ( Node node,
const EndpointID src,
const EndpointID dst 
) [private]

Definition at line 50 of file TrAgent.cc.

Referenced by init().


Member Function Documentation

TrAgent * dtnsim::TrAgent::init ( Node node,
double  start_time,
const EndpointID src,
const EndpointID dst,
int  argc,
const char **  argv 
) [static]

Definition at line 58 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 96 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 117 of file TrAgent.cc.

References dtn::EndpointID::assign(), oasys::Builder::builder(), dtn::Bundle::bundleid_, dtn::EndpointID::c_str(), dtn::Bundle::custodian_, dtn::Bundle::dest_, dst_, dtn::EVENTSRC_APP, dtn::BundlePayload::init(), log_info, dtnsim::Node::name(), dtnsim::Node::next_bundleid(), node_, dtn::Bundle::payload_, dtnsim::Simulator::post(), dtn::Bundle::replyto_, dtn::BundlePayload::set_length(), size_, dtn::Bundle::source_, src_, and dtnsim::Simulator::time().

Referenced by process().


Member Data Documentation

Node* dtnsim::TrAgent::node_ [private]

node where the traffic is injected

Definition at line 66 of file TrAgent.h.

Referenced by send_bundle().

EndpointID dtnsim::TrAgent::src_ [private]

source eid

Definition at line 67 of file TrAgent.h.

Referenced by send_bundle().

EndpointID dtnsim::TrAgent::dst_ [private]

destination eid

Definition at line 68 of file TrAgent.h.

Referenced by send_bundle().

int dtnsim::TrAgent::size_ [private]

size of each message

Definition at line 69 of file TrAgent.h.

Referenced by init(), and send_bundle().

int dtnsim::TrAgent::reps_ [private]

total number of reps/batches

Definition at line 70 of file TrAgent.h.

Referenced by init(), and process().

int dtnsim::TrAgent::batch_ [private]

no of messages in each batch

Definition at line 71 of file TrAgent.h.

Referenced by init(), and process().

double dtnsim::TrAgent::interval_ [private]

time gap between two batches

Definition at line 72 of file TrAgent.h.

Referenced by init(), and process().


The documentation for this class was generated from the following files:
Generated on Fri Dec 22 14:48:05 2006 for DTN Reference Implementation by  doxygen 1.5.1