#include <math.h>
#include "tools.hh"
Include dependency graph for tools.cc:

Go to the source code of this file.
Functions | |
| void | DiffPrint (int msg_debug_level, const char *fmt,...) |
| void | DiffPrintWithTime (int msg_debug_level, const char *fmt,...) |
| int | GetRand () |
| void | GetTime (struct timeval *tv) |
| void | SetSeed (struct timeval *tv) |
Variables | |
| int | global_debug_level = DEBUG_DEFAULT |
|
||||||||||||||||
|
||||||||||||||||
|
|
Definition at line 84 of file tools.cc. References Random::random(). Referenced by GeoRoutingFilter::broadcastHeuristicValue(), DiffusionCoreAgent::DiffusionCoreAgent(), DiffusionRouting::DiffusionRouting(), GeoRoutingFilter::GeoRoutingFilter(), GradientFilter::GradientFilter(), DiffusionRouting::interestTimeout(), OnePhasePullFilter::OnePhasePullFilter(), GeoRoutingFilter::preProcessFilter(), GradientFilter::processNewMessage(), OnePhasePullFilter::processNewMessage(), EventQueue::randDelay(), GeoRoutingFilter::sendNeighborRequest(), GradientFilter::sendPositiveReinforcement(), DiffusionRouting::sendRmst(), and DiffusionRouting::subscribe(). 00085 { 00086 #ifdef NS_DIFFUSION 00087 return (Random::random()); 00088 #else 00089 return (rand()); 00090 #endif // NS_DIFFUSION 00091 }
Here is the call graph for this function: ![]() |
|
|
|
Definition at line 74 of file tools.cc. Referenced by DiffusionCoreAgent::DiffusionCoreAgent(), DiffusionRouting::DiffusionRouting(), GeoRoutingFilter::GeoRoutingFilter(), GradientFilter::GradientFilter(), OnePhasePullFilter::OnePhasePullFilter(), and TimerManager::TimerManager(). 00075 { 00076 #ifdef NS_DIFFUSION 00077 // Don't need to do anything since NS's RNG is seeded using 00078 // otcl proc ns-random <seed> 00079 #else 00080 srand(tv->tv_usec); 00081 #endif // NS_DIFFUSION 00082 }
|
|
|
Definition at line 53 of file tools.cc. Referenced by DiffPrint(), DiffPrintWithTime(), DiffusionCoreAgent::DiffusionCoreAgent(), GearSenderApp::parseCommandLine(), GearReceiverApp::parseCommandLine(), and DiffApp::parseCommandLine(). |
1.4.6