ns3::TimeStepPrecision Namespace Reference

Enumerations

enum  precision_t {
  S = 0, MS = 3, US = 6, NS = 9,
  PS = 12, FS = 15
}

Functions

void Set (precision_t precision)
precision_t Get (void)

Variables

static const uint64_t MS_FACTOR = (uint64_t)pow(10,3)
static const uint64_t US_FACTOR = (uint64_t)pow(10,6)
static const uint64_t NS_FACTOR = (uint64_t)pow(10,9)
static const uint64_t PS_FACTOR = (uint64_t)pow(10,12)
static const uint64_t FS_FACTOR = (uint64_t)pow(10,15)
static uint64_t g_tsPrecFactor = NS_FACTOR
static GlobalValue g_precisionDefaultValue ("TimeStepPrecision","The time unit of the internal 64 bit integer time.", EnumValue(NS), MakeEnumChecker(NS,"NS", S,"S", MS,"MS", US,"US", PS,"PS", FS,"FS"))

Enumeration Type Documentation

Enumerator:
S 
MS 
US 
NS 
PS 
FS 

Definition at line 36 of file nstime.h.


Function Documentation

precision_t ns3::TimeStepPrecision::Get ( void   ) 
Returns:
the currently-used time precision.

Definition at line 54 of file time.cc.

References g_precisionDefaultValue, ns3::EnumValue::Get(), and ns3::GlobalValue::GetValue().

Referenced by ns3::NodeList::Add(), ns3::Ipv4AddressGenerator::AddAllocated(), ns3::TypeId::AddAttribute(), ns3::TypeId::AddTraceSource(), ns3::NodeList::Begin(), ns3::GlobalRouteManager::BuildGlobalRoutingDatabase(), ns3::TimeTests::CheckPrecision(), ns3::TimeTests::CheckTime(), ns3::TimeTests::CheckTimeSec(), ns3::GlobalRouteManager::DeleteGlobalRoutes(), ns3::TypeId::DoAddConstructor(), ns3::NodeList::End(), ns3::TcpSocketImpl::ForwardUp(), ns3::Ipv4AddressGenerator::GetAddress(), ns3::TypeId::GetAttributeAccessor(), ns3::TypeId::GetAttributeChecker(), ns3::TypeId::GetAttributeFlags(), ns3::TypeId::GetAttributeHelp(), ns3::TypeId::GetAttributeInitialValue(), ns3::TypeId::GetAttributeN(), ns3::TypeId::GetAttributeName(), ns3::TypeId::GetConstructor(), ns3::AttributeList::GetGlobal(), ns3::TypeId::GetGroupName(), ns3::TypeId::GetName(), ns3::Ipv4AddressGenerator::GetNetwork(), ns3::NodeList::GetNNodes(), ns3::NodeList::GetNode(), ns3::TypeId::GetParent(), ns3::TypeId::GetRegisteredN(), ns3::TypeId::GetTraceSourceAccessor(), ns3::TypeId::GetTraceSourceHelp(), ns3::TypeId::GetTraceSourceN(), ns3::TypeId::GetTraceSourceName(), ns3::TypeId::HasConstructor(), ns3::TypeId::HasParent(), ns3::TypeId::HideFromDocumentation(), ns3::Ipv4AddressGenerator::Init(), ns3::Ipv4AddressGenerator::InitAddress(), ns3::GlobalRouteManager::InitializeRoutes(), ns3::Ns2MobilityHelper::Install(), ns3::TypeId::LookupByName(), ns3::TypeId::LookupByNameFailSafe(), ns3::TypeId::MustHideFromDocumentation(), ns3::Synchronizer::NanosecondToTimeStep(), ns3::Ipv4AddressGenerator::NextAddress(), ns3::Ipv4AddressGenerator::NextNetwork(), ns3::operator<<(), ns3::TcpSocketImpl::ProcessEvent(), ns3::Ipv4AddressGenerator::Reset(), ns3::TimeTests::RunTests(), ns3::GlobalRouteManager::SelectRouterNodes(), ns3::TypeId::SetGroupName(), ns3::TypeId::SetParent(), ns3::Ipv4AddressGenerator::TestMode(), ns3::Synchronizer::TimeStepToNanosecond(), and ns3::TypeId::TypeId().

void ns3::TimeStepPrecision::Set ( precision_t  precision  ) 
Parameters:
precision the new precision to use

This should be invoked before any Time object is created. i.e., it should be invoked at the very start of every simulation. The unit specified by this method is used as the unit of the internal simulation time which is stored as a 64 bit integer.

Definition at line 62 of file time.cc.

References g_precisionDefaultValue, g_tsPrecFactor, and ns3::GlobalValue::SetValue().


Variable Documentation

const uint64_t ns3::TimeStepPrecision::FS_FACTOR = (uint64_t)pow(10,15) [static]

Definition at line 39 of file time.cc.

Referenced by ns3::FemtoSeconds(), and ns3::TimeUnit< 1 >::GetFemtoSeconds().

GlobalValue ns3::TimeStepPrecision::g_precisionDefaultValue("TimeStepPrecision","The time unit of the internal 64 bit integer time.", EnumValue(NS), MakeEnumChecker(NS,"NS",S,"S",MS,"MS",US,"US",PS,"PS",FS,"FS")) [static]

Referenced by Get(), and Set().

const uint64_t ns3::TimeStepPrecision::MS_FACTOR = (uint64_t)pow(10,3) [static]

Definition at line 35 of file time.cc.

Referenced by ns3::TimeUnit< 1 >::GetMilliSeconds(), and ns3::MilliSeconds().

const uint64_t ns3::TimeStepPrecision::NS_FACTOR = (uint64_t)pow(10,9) [static]

Definition at line 37 of file time.cc.

Referenced by ns3::TimeUnit< 1 >::GetNanoSeconds(), and ns3::NanoSeconds().

const uint64_t ns3::TimeStepPrecision::PS_FACTOR = (uint64_t)pow(10,12) [static]

Definition at line 38 of file time.cc.

Referenced by ns3::TimeUnit< 1 >::GetPicoSeconds(), and ns3::PicoSeconds().

const uint64_t ns3::TimeStepPrecision::US_FACTOR = (uint64_t)pow(10,6) [static]

Definition at line 36 of file time.cc.

Referenced by ns3::TimeUnit< 1 >::GetMicroSeconds(), and ns3::MicroSeconds().

Generated on Thu Dec 3 14:12:23 2009 for NS-3 by  doxygen 1.6.3