#include <stdio.h>#include <stdarg.h>#include <stdlib.h>#include <sys/time.h>#include <unistd.h>Include dependency graph for tools.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.
Defines | |
| #define | DEBUG_NEVER 11 |
| #define | DEBUG_LOTS_DETAILS 10 |
| #define | DEBUG_MORE_DETAILS 8 |
| #define | DEBUG_DETAILS 6 |
| #define | DEBUG_SOME_DETAILS 4 |
| #define | DEBUG_NO_DETAILS 3 |
| #define | DEBUG_IMPORTANT 2 |
| #define | DEBUG_ALWAYS 1 |
| #define | DEBUG_DEFAULT 1 |
Functions | |
| void | SetSeed (struct timeval *tv) |
| void | GetTime (struct timeval *tv) |
| int | GetRand () |
| void | DiffPrint (int msg_debug_level, const char *fmt,...) |
Variables | |
| int | global_debug_level |
|
|
|
|
|
|
Definition at line 51 of file tools.hh. Referenced by GradientFilter::gradientTimeout(), DiffusionCoreAgent::recvMessage(), DiffusionCoreAgent::sendMessage(), and GradientFilter::subscriptionTimeout(). |
|
|
|
|
|
|
|
|
|
|
|
Definition at line 52 of file tools.hh. Referenced by DiffusionCoreAgent::processControlMessage(), and DiffusionCoreAgent::timeToStop(). |
|
||||||||||||||||
|
|
Definition at line 59 of file tools.cc. References Random::random(). Referenced by GeoRoutingFilter::broadcastHeuristicValue(), DiffusionCoreAgent::DiffusionCoreAgent(), DiffusionRouting::DiffusionRouting(), GradientFilter::forwardExploratoryData(), GradientFilter::forwardPushExploratoryData(), GeoRoutingFilter::GeoRoutingFilter(), GradientFilter::GradientFilter(), DiffusionRouting::interestTimeout(), GeoRoutingFilter::preProcessFilter(), GradientFilter::processNewMessage(), EventQueue::randDelay(), GeoRoutingFilter::sendNeighborRequest(), and GradientFilter::sendPositiveReinforcement().
00060 {
00061 #ifdef NS_DIFFUSION
00062 return (Random::random());
00063 #else
00064 return (rand());
00065 #endif // NS_DIFFUSION
00066 }
|
Here is the call graph for this function:

|
Here is the call graph for this function:

|
|
Definition at line 49 of file tools.cc. Referenced by DiffusionCoreAgent::DiffusionCoreAgent(), DiffusionRouting::DiffusionRouting(), GeoRoutingFilter::GeoRoutingFilter(), GradientFilter::GradientFilter(), and TimerManager::TimerManager().
00050 {
00051 #ifdef NS_DIFFUSION
00052 // Don't need to do anything since NS's RNG is seeded using
00053 // otcl proc ns-random <seed>
00054 #else
00055 srand(tv->tv_usec);
00056 #endif // NS_DIFFUSION
00057 }
|
|
|
Definition at line 64 of file tools.hh. Referenced by DiffPrint(), DiffusionCoreAgent::DiffusionCoreAgent(), DiffApp::parseCommandLine(), and DiffusionCoreAgent::timeToStop(). |
1.3.3