remove realtime public API.
1.1 --- a/bindings/python/ns3_module_core.py Mon Oct 27 12:17:38 2008 +0100
1.2 +++ b/bindings/python/ns3_module_core.py Mon Oct 27 12:47:33 2008 +0100
1.3 @@ -199,6 +199,9 @@
1.4 def register_types_ns3_Config(module):
1.5 root_module = module.get_root()
1.6
1.7 + ## config.h: ns3::Config::MatchContainer [class]
1.8 + module.add_class('MatchContainer')
1.9 + module.add_container('std::vector< ns3::Ptr< ns3::Object > >', 'ns3::Ptr< ns3::Object >', container_type='vector')
1.10
1.11 def register_types_ns3_olsr(module):
1.12 root_module = module.get_root()
1.13 @@ -272,6 +275,7 @@
1.14 register_Ns3TypeIdValue_methods(root_module, root_module['ns3::TypeIdValue'])
1.15 register_Ns3UintegerValue_methods(root_module, root_module['ns3::UintegerValue'])
1.16 register_Ns3TracedValue__Unsigned_int_methods(root_module, root_module['ns3::TracedValue< unsigned int >'])
1.17 + register_Ns3ConfigMatchContainer_methods(root_module, root_module['ns3::Config::MatchContainer'])
1.18 return
1.19
1.20 def register_Ns3AttributeList_methods(root_module, cls):
1.21 @@ -736,6 +740,14 @@
1.22 cls.add_method('Join',
1.23 'void',
1.24 [])
1.25 + ## system-thread.h: void ns3::SystemThread::Shutdown() [member function]
1.26 + cls.add_method('Shutdown',
1.27 + 'void',
1.28 + [])
1.29 + ## system-thread.h: bool ns3::SystemThread::Break() [member function]
1.30 + cls.add_method('Break',
1.31 + 'bool',
1.32 + [])
1.33 return
1.34
1.35 def register_Ns3SystemWallClockMs_methods(root_module, cls):
1.36 @@ -1867,7 +1879,7 @@
1.37 cls.add_method('ConnectWithoutContext',
1.38 'void',
1.39 [param('ns3::CallbackBase const &', 'cb')])
1.40 - ## traced-value.h: void ns3::TracedValue<unsigned int>::Connect(ns3::CallbackBase const & cb, std::basic_string<char,std::char_traits<char>,std::allocator<char> > path) [member function]
1.41 + ## traced-value.h: void ns3::TracedValue<unsigned int>::Connect(ns3::CallbackBase const & cb, std::string path) [member function]
1.42 cls.add_method('Connect',
1.43 'void',
1.44 [param('ns3::CallbackBase const &', 'cb'), param('std::string', 'path')])
1.45 @@ -1875,7 +1887,7 @@
1.46 cls.add_method('DisconnectWithoutContext',
1.47 'void',
1.48 [param('ns3::CallbackBase const &', 'cb')])
1.49 - ## traced-value.h: void ns3::TracedValue<unsigned int>::Disconnect(ns3::CallbackBase const & cb, std::basic_string<char,std::char_traits<char>,std::allocator<char> > path) [member function]
1.50 + ## traced-value.h: void ns3::TracedValue<unsigned int>::Disconnect(ns3::CallbackBase const & cb, std::string path) [member function]
1.51 cls.add_method('Disconnect',
1.52 'void',
1.53 [param('ns3::CallbackBase const &', 'cb'), param('std::string', 'path')])
1.54 @@ -1890,6 +1902,65 @@
1.55 is_const=True)
1.56 return
1.57
1.58 +def register_Ns3ConfigMatchContainer_methods(root_module, cls):
1.59 + ## config.h: ns3::Config::MatchContainer::MatchContainer(ns3::Config::MatchContainer const & arg0) [copy constructor]
1.60 + cls.add_constructor([param('ns3::Config::MatchContainer const &', 'arg0')])
1.61 + ## config.h: ns3::Config::MatchContainer::MatchContainer() [constructor]
1.62 + cls.add_constructor([])
1.63 + ## config.h: ns3::Config::MatchContainer::MatchContainer(std::vector<ns3::Ptr<ns3::Object>, std::allocator<ns3::Ptr<ns3::Object> > > const & objects, std::vector<std::string, std::allocator<std::string> > const & contexts, std::string path) [constructor]
1.64 + cls.add_constructor([param('std::vector< ns3::Ptr< ns3::Object > > const &', 'objects'), param('std::vector< std::string > const &', 'contexts'), param('std::string', 'path')])
1.65 + ## config.h: __gnu_cxx::__normal_iterator<const ns3::Ptr<ns3::Object>*,std::vector<ns3::Ptr<ns3::Object>, std::allocator<ns3::Ptr<ns3::Object> > > > ns3::Config::MatchContainer::Begin() const [member function]
1.66 + cls.add_method('Begin',
1.67 + '__gnu_cxx::__normal_iterator< ns3::Ptr< ns3::Object > const, std::vector< ns3::Ptr< ns3::Object > > >',
1.68 + [],
1.69 + is_const=True)
1.70 + ## config.h: __gnu_cxx::__normal_iterator<const ns3::Ptr<ns3::Object>*,std::vector<ns3::Ptr<ns3::Object>, std::allocator<ns3::Ptr<ns3::Object> > > > ns3::Config::MatchContainer::End() const [member function]
1.71 + cls.add_method('End',
1.72 + '__gnu_cxx::__normal_iterator< ns3::Ptr< ns3::Object > const, std::vector< ns3::Ptr< ns3::Object > > >',
1.73 + [],
1.74 + is_const=True)
1.75 + ## config.h: uint32_t ns3::Config::MatchContainer::GetN() const [member function]
1.76 + cls.add_method('GetN',
1.77 + 'uint32_t',
1.78 + [],
1.79 + is_const=True)
1.80 + ## config.h: ns3::Ptr<ns3::Object> ns3::Config::MatchContainer::Get(uint32_t i) const [member function]
1.81 + cls.add_method('Get',
1.82 + 'ns3::Ptr< ns3::Object >',
1.83 + [param('uint32_t', 'i')],
1.84 + is_const=True)
1.85 + ## config.h: std::string ns3::Config::MatchContainer::GetMatchedPath(uint32_t i) const [member function]
1.86 + cls.add_method('GetMatchedPath',
1.87 + 'std::string',
1.88 + [param('uint32_t', 'i')],
1.89 + is_const=True)
1.90 + ## config.h: std::string ns3::Config::MatchContainer::GetPath() const [member function]
1.91 + cls.add_method('GetPath',
1.92 + 'std::string',
1.93 + [],
1.94 + is_const=True)
1.95 + ## config.h: void ns3::Config::MatchContainer::Set(std::string name, ns3::AttributeValue const & value) [member function]
1.96 + cls.add_method('Set',
1.97 + 'void',
1.98 + [param('std::string', 'name'), param('ns3::AttributeValue const &', 'value')])
1.99 + ## config.h: void ns3::Config::MatchContainer::Connect(std::string name, ns3::CallbackBase const & cb) [member function]
1.100 + cls.add_method('Connect',
1.101 + 'void',
1.102 + [param('std::string', 'name'), param('ns3::CallbackBase const &', 'cb')])
1.103 + ## config.h: void ns3::Config::MatchContainer::ConnectWithoutContext(std::string name, ns3::CallbackBase const & cb) [member function]
1.104 + cls.add_method('ConnectWithoutContext',
1.105 + 'void',
1.106 + [param('std::string', 'name'), param('ns3::CallbackBase const &', 'cb')])
1.107 + ## config.h: void ns3::Config::MatchContainer::Disconnect(std::string name, ns3::CallbackBase const & cb) [member function]
1.108 + cls.add_method('Disconnect',
1.109 + 'void',
1.110 + [param('std::string', 'name'), param('ns3::CallbackBase const &', 'cb')])
1.111 + ## config.h: void ns3::Config::MatchContainer::DisconnectWithoutContext(std::string name, ns3::CallbackBase const & cb) [member function]
1.112 + cls.add_method('DisconnectWithoutContext',
1.113 + 'void',
1.114 + [param('std::string', 'name'), param('ns3::CallbackBase const &', 'cb')])
1.115 + return
1.116 +
1.117 def register_functions(root_module):
1.118 module = root_module
1.119 ## boolean.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeBooleanChecker() [free function]
1.120 @@ -1910,7 +1981,7 @@
1.121 module.add_function('TypeNameGet',
1.122 'std::string',
1.123 [],
1.124 - template_parameters=['long'])
1.125 + template_parameters=['long long'])
1.126 ## type-name.h: extern std::string ns3::TypeNameGet() [free function]
1.127 module.add_function('TypeNameGet',
1.128 'std::string',
1.129 @@ -1930,7 +2001,7 @@
1.130 module.add_function('TypeNameGet',
1.131 'std::string',
1.132 [],
1.133 - template_parameters=['unsigned long'])
1.134 + template_parameters=['unsigned long long'])
1.135 ## type-name.h: extern std::string ns3::TypeNameGet() [free function]
1.136 module.add_function('TypeNameGet',
1.137 'std::string',
1.138 @@ -1946,22 +2017,14 @@
1.139 'std::string',
1.140 [],
1.141 template_parameters=['unsigned char'])
1.142 + ## log.h: extern void ns3::LogComponentDisable(char const * name, ns3::LogLevel level) [free function]
1.143 + module.add_function('LogComponentDisable',
1.144 + 'void',
1.145 + [param('char const *', 'name'), param('ns3::LogLevel', 'level')])
1.146 ## string.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeStringChecker() [free function]
1.147 module.add_function('MakeStringChecker',
1.148 'ns3::Ptr< ns3::AttributeChecker const >',
1.149 [])
1.150 - ## enum.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeEnumChecker(int v1, std::string n1, int v2=0, std::string n2="", int v3=0, std::string n3="", int v4=0, std::string n4="", int v5=0, std::string n5="", int v6=0, std::string n6="", int v7=0, std::string n7="", int v8=0, std::string n8="", int v9=0, std::string n9="", int v10=0, std::string n10="", int v11=0, std::string n11="", int v12=0, std::string n12="") [free function]
1.151 - module.add_function('MakeEnumChecker',
1.152 - 'ns3::Ptr< ns3::AttributeChecker const >',
1.153 - [param('int', 'v1'), param('std::string', 'n1'), param('int', 'v2', default_value='0'), param('std::string', 'n2', default_value='""'), param('int', 'v3', default_value='0'), param('std::string', 'n3', default_value='""'), param('int', 'v4', default_value='0'), param('std::string', 'n4', default_value='""'), param('int', 'v5', default_value='0'), param('std::string', 'n5', default_value='""'), param('int', 'v6', default_value='0'), param('std::string', 'n6', default_value='""'), param('int', 'v7', default_value='0'), param('std::string', 'n7', default_value='""'), param('int', 'v8', default_value='0'), param('std::string', 'n8', default_value='""'), param('int', 'v9', default_value='0'), param('std::string', 'n9', default_value='""'), param('int', 'v10', default_value='0'), param('std::string', 'n10', default_value='""'), param('int', 'v11', default_value='0'), param('std::string', 'n11', default_value='""'), param('int', 'v12', default_value='0'), param('std::string', 'n12', default_value='""')])
1.154 - ## log.h: extern void ns3::LogComponentEnableAll(ns3::LogLevel level) [free function]
1.155 - module.add_function('LogComponentEnableAll',
1.156 - 'void',
1.157 - [param('ns3::LogLevel', 'level')])
1.158 - ## type-id.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeTypeIdChecker() [free function]
1.159 - module.add_function('MakeTypeIdChecker',
1.160 - 'ns3::Ptr< ns3::AttributeChecker const >',
1.161 - [])
1.162 ## ptr.h: extern ns3::Ptr<ns3::PointerValue> ns3::Create() [free function]
1.163 module.add_function('Create',
1.164 'ns3::Ptr< ns3::PointerValue >',
1.165 @@ -1972,6 +2035,14 @@
1.166 'ns3::Ptr< ns3::ObjectVectorValue >',
1.167 [],
1.168 template_parameters=['ns3::ObjectVectorValue'])
1.169 + ## log.h: extern void ns3::LogComponentEnableAll(ns3::LogLevel level) [free function]
1.170 + module.add_function('LogComponentEnableAll',
1.171 + 'void',
1.172 + [param('ns3::LogLevel', 'level')])
1.173 + ## type-id.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeTypeIdChecker() [free function]
1.174 + module.add_function('MakeTypeIdChecker',
1.175 + 'ns3::Ptr< ns3::AttributeChecker const >',
1.176 + [])
1.177 ## object-factory.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeObjectFactoryChecker() [free function]
1.178 module.add_function('MakeObjectFactoryChecker',
1.179 'ns3::Ptr< ns3::AttributeChecker const >',
1.180 @@ -1992,14 +2063,14 @@
1.181 module.add_function('MakeRandomVariableChecker',
1.182 'ns3::Ptr< ns3::AttributeChecker const >',
1.183 [])
1.184 - ## log.h: extern void ns3::LogComponentDisable(char const * name, ns3::LogLevel level) [free function]
1.185 - module.add_function('LogComponentDisable',
1.186 - 'void',
1.187 - [param('char const *', 'name'), param('ns3::LogLevel', 'level')])
1.188 ## log.h: extern void ns3::LogComponentEnable(char const * name, ns3::LogLevel level) [free function]
1.189 module.add_function('LogComponentEnable',
1.190 'void',
1.191 [param('char const *', 'name'), param('ns3::LogLevel', 'level')])
1.192 + ## enum.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeEnumChecker(int v1, std::string n1, int v2=0, std::string n2="", int v3=0, std::string n3="", int v4=0, std::string n4="", int v5=0, std::string n5="", int v6=0, std::string n6="", int v7=0, std::string n7="", int v8=0, std::string n8="", int v9=0, std::string n9="", int v10=0, std::string n10="", int v11=0, std::string n11="", int v12=0, std::string n12="") [free function]
1.193 + module.add_function('MakeEnumChecker',
1.194 + 'ns3::Ptr< ns3::AttributeChecker const >',
1.195 + [param('int', 'v1'), param('std::string', 'n1'), param('int', 'v2', default_value='0'), param('std::string', 'n2', default_value='""'), param('int', 'v3', default_value='0'), param('std::string', 'n3', default_value='""'), param('int', 'v4', default_value='0'), param('std::string', 'n4', default_value='""'), param('int', 'v5', default_value='0'), param('std::string', 'n5', default_value='""'), param('int', 'v6', default_value='0'), param('std::string', 'n6', default_value='""'), param('int', 'v7', default_value='0'), param('std::string', 'n7', default_value='""'), param('int', 'v8', default_value='0'), param('std::string', 'n8', default_value='""'), param('int', 'v9', default_value='0'), param('std::string', 'n9', default_value='""'), param('int', 'v10', default_value='0'), param('std::string', 'n10', default_value='""'), param('int', 'v11', default_value='0'), param('std::string', 'n11', default_value='""'), param('int', 'v12', default_value='0'), param('std::string', 'n12', default_value='""')])
1.196 register_functions_ns3_internal(module.get_submodule('internal'), root_module)
1.197 register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
1.198 register_functions_ns3_Config(module.get_submodule('Config'), root_module)
1.199 @@ -2037,6 +2108,10 @@
1.200 module.add_function('SetDefault',
1.201 'void',
1.202 [param('std::string', 'name'), param('ns3::AttributeValue const &', 'value')])
1.203 + ## config.h: extern ns3::Config::MatchContainer ns3::Config::LookupMatches(std::string path) [free function]
1.204 + module.add_function('LookupMatches',
1.205 + 'ns3::Config::MatchContainer',
1.206 + [param('std::string', 'path')])
1.207 ## config.h: extern void ns3::Config::Connect(std::string path, ns3::CallbackBase const & cb) [free function]
1.208 module.add_function('Connect',
1.209 'void',
1.210 @@ -2057,6 +2132,10 @@
1.211 module.add_function('SetGlobalFailSafe',
1.212 'bool',
1.213 [param('std::string', 'name'), param('ns3::AttributeValue const &', 'value')])
1.214 + ## config.h: extern void ns3::Config::Disconnect(std::string path, ns3::CallbackBase const & cb) [free function]
1.215 + module.add_function('Disconnect',
1.216 + 'void',
1.217 + [param('std::string', 'path'), param('ns3::CallbackBase const &', 'cb')])
1.218 ## config.h: extern uint32_t ns3::Config::GetRootNamespaceObjectN() [free function]
1.219 module.add_function('GetRootNamespaceObjectN',
1.220 'uint32_t',
1.221 @@ -2073,10 +2152,6 @@
1.222 module.add_function('RegisterRootNamespaceObject',
1.223 'void',
1.224 [param('ns3::Ptr< ns3::Object >', 'obj')])
1.225 - ## config.h: extern void ns3::Config::Disconnect(std::string path, ns3::CallbackBase const & cb) [free function]
1.226 - module.add_function('Disconnect',
1.227 - 'void',
1.228 - [param('std::string', 'path'), param('ns3::CallbackBase const &', 'cb')])
1.229 return
1.230
1.231 def register_functions_ns3_olsr(module, root_module):
2.1 --- a/bindings/python/ns3_module_helper.py Mon Oct 27 12:17:38 2008 +0100
2.2 +++ b/bindings/python/ns3_module_helper.py Mon Oct 27 12:47:33 2008 +0100
2.3 @@ -237,6 +237,10 @@
2.4 cls.add_method('Install',
2.5 'ns3::NetDeviceContainer',
2.6 [param('ns3::NodeContainer const &', 'c'), param('ns3::Ptr< ns3::CsmaChannel >', 'channel')])
2.7 + ## csma-helper.h: void ns3::CsmaHelper::InstallStar(ns3::Ptr<ns3::Node> hub, ns3::NodeContainer spokes, ns3::NetDeviceContainer & hubDevices, ns3::NetDeviceContainer & spokeDevices) [member function]
2.8 + cls.add_method('InstallStar',
2.9 + 'void',
2.10 + [param('ns3::Ptr< ns3::Node >', 'hub'), param('ns3::NodeContainer', 'spokes'), param('ns3::NetDeviceContainer &', 'hubDevices'), param('ns3::NetDeviceContainer &', 'spokeDevices')])
2.11 return
2.12
2.13 def register_Ns3InternetStackHelper_methods(root_module, cls):
2.14 @@ -287,6 +291,10 @@
2.15 cls.add_constructor([param('ns3::Ipv4InterfaceContainer const &', 'arg0')])
2.16 ## ipv4-interface-container.h: ns3::Ipv4InterfaceContainer::Ipv4InterfaceContainer() [constructor]
2.17 cls.add_constructor([])
2.18 + ## ipv4-interface-container.h: void ns3::Ipv4InterfaceContainer::Add(ns3::Ipv4InterfaceContainer other) [member function]
2.19 + cls.add_method('Add',
2.20 + 'void',
2.21 + [param('ns3::Ipv4InterfaceContainer', 'other')])
2.22 ## ipv4-interface-container.h: uint32_t ns3::Ipv4InterfaceContainer::GetN() const [member function]
2.23 cls.add_method('GetN',
2.24 'uint32_t',
2.25 @@ -604,6 +612,10 @@
2.26 cls.add_method('Install',
2.27 'ns3::NetDeviceContainer',
2.28 [param('ns3::Ptr< ns3::Node >', 'a'), param('ns3::Ptr< ns3::Node >', 'b')])
2.29 + ## point-to-point-helper.h: void ns3::PointToPointHelper::InstallStar(ns3::Ptr<ns3::Node> hub, ns3::NodeContainer spokes, ns3::NetDeviceContainer & hubDevices, ns3::NetDeviceContainer & spokeDevices) [member function]
2.30 + cls.add_method('InstallStar',
2.31 + 'void',
2.32 + [param('ns3::Ptr< ns3::Node >', 'hub'), param('ns3::NodeContainer', 'spokes'), param('ns3::NetDeviceContainer &', 'hubDevices'), param('ns3::NetDeviceContainer &', 'spokeDevices')])
2.33 return
2.34
2.35 def register_Ns3StaticMulticastRouteHelper_methods(root_module, cls):
3.1 --- a/bindings/python/ns3_module_node.py Mon Oct 27 12:17:38 2008 +0100
3.2 +++ b/bindings/python/ns3_module_node.py Mon Oct 27 12:47:33 2008 +0100
3.3 @@ -2586,10 +2586,18 @@
3.4
3.5 def register_functions(root_module):
3.6 module = root_module
3.7 - ## mac48-address.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeMac48AddressChecker() [free function]
3.8 - module.add_function('MakeMac48AddressChecker',
3.9 - 'ns3::Ptr< ns3::AttributeChecker const >',
3.10 - [])
3.11 + ## address-utils.h: extern void ns3::ReadFrom(ns3::Buffer::Iterator & i, ns3::Mac48Address & ad) [free function]
3.12 + module.add_function('ReadFrom',
3.13 + 'void',
3.14 + [param('ns3::Buffer::Iterator &', 'i'), param('ns3::Mac48Address &', 'ad')])
3.15 + ## address-utils.h: extern void ns3::ReadFrom(ns3::Buffer::Iterator & i, ns3::Address & ad, uint32_t len) [free function]
3.16 + module.add_function('ReadFrom',
3.17 + 'void',
3.18 + [param('ns3::Buffer::Iterator &', 'i'), param('ns3::Address &', 'ad'), param('uint32_t', 'len')])
3.19 + ## address-utils.h: extern void ns3::ReadFrom(ns3::Buffer::Iterator & i, ns3::Ipv4Address & ad) [free function]
3.20 + module.add_function('ReadFrom',
3.21 + 'void',
3.22 + [param('ns3::Buffer::Iterator &', 'i'), param('ns3::Ipv4Address &', 'ad')])
3.23 ## ipv4-address.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeIpv4AddressChecker() [free function]
3.24 module.add_function('MakeIpv4AddressChecker',
3.25 'ns3::Ptr< ns3::AttributeChecker const >',
3.26 @@ -2614,18 +2622,10 @@
3.27 module.add_function('MakeIpv4MaskChecker',
3.28 'ns3::Ptr< ns3::AttributeChecker const >',
3.29 [])
3.30 - ## address-utils.h: extern void ns3::ReadFrom(ns3::Buffer::Iterator & i, ns3::Mac48Address & ad) [free function]
3.31 - module.add_function('ReadFrom',
3.32 - 'void',
3.33 - [param('ns3::Buffer::Iterator &', 'i'), param('ns3::Mac48Address &', 'ad')])
3.34 - ## address-utils.h: extern void ns3::ReadFrom(ns3::Buffer::Iterator & i, ns3::Address & ad, uint32_t len) [free function]
3.35 - module.add_function('ReadFrom',
3.36 - 'void',
3.37 - [param('ns3::Buffer::Iterator &', 'i'), param('ns3::Address &', 'ad'), param('uint32_t', 'len')])
3.38 - ## address-utils.h: extern void ns3::ReadFrom(ns3::Buffer::Iterator & i, ns3::Ipv4Address & ad) [free function]
3.39 - module.add_function('ReadFrom',
3.40 - 'void',
3.41 - [param('ns3::Buffer::Iterator &', 'i'), param('ns3::Ipv4Address &', 'ad')])
3.42 + ## mac48-address.h: extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeMac48AddressChecker() [free function]
3.43 + module.add_function('MakeMac48AddressChecker',
3.44 + 'ns3::Ptr< ns3::AttributeChecker const >',
3.45 + [])
3.46 register_functions_ns3_internal(module.get_submodule('internal'), root_module)
3.47 register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
3.48 register_functions_ns3_Config(module.get_submodule('Config'), root_module)
4.1 --- a/bindings/python/ns3_module_simulator.py Mon Oct 27 12:17:38 2008 +0100
4.2 +++ b/bindings/python/ns3_module_simulator.py Mon Oct 27 12:47:33 2008 +0100
4.3 @@ -27,8 +27,6 @@
4.4 module.add_enum('State', ['RUNNING', 'EXPIRED', 'SUSPENDED'], outer_class=root_module['ns3::Timer'])
4.5 ## timer-impl.h: ns3::TimerImpl [class]
4.6 module.add_class('TimerImpl', allow_subclassing=True)
4.7 - ## wallclock-simulator.h: ns3::WallclockSimulator [class]
4.8 - module.add_class('WallclockSimulator', is_singleton=True)
4.9 ## watchdog.h: ns3::Watchdog [class]
4.10 module.add_class('Watchdog')
4.11 ## scheduler.h: ns3::Scheduler [class]
4.12 @@ -113,7 +111,6 @@
4.13 register_Ns3TimeSquare_methods(root_module, root_module['ns3::TimeSquare'])
4.14 register_Ns3Timer_methods(root_module, root_module['ns3::Timer'])
4.15 register_Ns3TimerImpl_methods(root_module, root_module['ns3::TimerImpl'])
4.16 - register_Ns3WallclockSimulator_methods(root_module, root_module['ns3::WallclockSimulator'])
4.17 register_Ns3Watchdog_methods(root_module, root_module['ns3::Watchdog'])
4.18 register_Ns3Scheduler_methods(root_module, root_module['ns3::Scheduler'])
4.19 register_Ns3SchedulerEvent_methods(root_module, root_module['ns3::Scheduler::Event'])
4.20 @@ -264,6 +261,11 @@
4.21 'void',
4.22 [param('ns3::Ptr< ns3::SimulatorImpl >', 'impl')],
4.23 is_static=True)
4.24 + ## simulator.h: static ns3::Ptr<ns3::SimulatorImpl> ns3::Simulator::GetImplementation() [member function]
4.25 + cls.add_method('GetImplementation',
4.26 + 'ns3::Ptr< ns3::SimulatorImpl >',
4.27 + [],
4.28 + is_static=True)
4.29 ## simulator.h: static void ns3::Simulator::SetScheduler(ns3::Ptr<ns3::Scheduler> scheduler) [member function]
4.30 cls.add_method('SetScheduler',
4.31 'void',
4.32 @@ -665,21 +667,6 @@
4.33 is_pure_virtual=True, is_virtual=True)
4.34 return
4.35
4.36 -def register_Ns3WallclockSimulator_methods(root_module, cls):
4.37 - ## wallclock-simulator.h: ns3::WallclockSimulator::WallclockSimulator(ns3::WallclockSimulator const & arg0) [copy constructor]
4.38 - cls.add_constructor([param('ns3::WallclockSimulator const &', 'arg0')])
4.39 - ## wallclock-simulator.h: static void ns3::WallclockSimulator::Schedule(ns3::Time const & time, void (*)( ) * f) [member function]
4.40 - cls.add_method('Schedule',
4.41 - 'void',
4.42 - [param('ns3::Time const &', 'time'), param('void ( * ) ( ) *', 'f')],
4.43 - is_static=True)
4.44 - ## wallclock-simulator.h: static void ns3::WallclockSimulator::ScheduleNow(void (*)( ) * f) [member function]
4.45 - cls.add_method('ScheduleNow',
4.46 - 'void',
4.47 - [param('void ( * ) ( ) *', 'f')],
4.48 - is_static=True)
4.49 - return
4.50 -
4.51 def register_Ns3Watchdog_methods(root_module, cls):
4.52 ## watchdog.h: ns3::Watchdog::Watchdog(ns3::Watchdog const & arg0) [copy constructor]
4.53 cls.add_constructor([param('ns3::Watchdog const &', 'arg0')])
4.54 @@ -847,16 +834,6 @@
4.55 'ns3::Ptr< ns3::Scheduler >',
4.56 [],
4.57 is_pure_virtual=True, is_const=True, is_virtual=True)
4.58 - ## simulator-impl.h: void ns3::SimulatorImpl::ScheduleWallclock(ns3::Time const & time, ns3::EventImpl * event) [member function]
4.59 - cls.add_method('ScheduleWallclock',
4.60 - 'void',
4.61 - [param('ns3::Time const &', 'time'), param('ns3::EventImpl *', 'event')],
4.62 - is_pure_virtual=True, is_virtual=True)
4.63 - ## simulator-impl.h: void ns3::SimulatorImpl::ScheduleWallclockNow(ns3::EventImpl * event) [member function]
4.64 - cls.add_method('ScheduleWallclockNow',
4.65 - 'void',
4.66 - [param('ns3::EventImpl *', 'event')],
4.67 - is_pure_virtual=True, is_virtual=True)
4.68 return
4.69
4.70 def register_Ns3Synchronizer_methods(root_module, cls):
4.71 @@ -1194,16 +1171,6 @@
4.72 'ns3::Ptr< ns3::Scheduler >',
4.73 [],
4.74 is_const=True, is_virtual=True)
4.75 - ## default-simulator-impl.h: void ns3::DefaultSimulatorImpl::ScheduleWallclock(ns3::Time const & time, ns3::EventImpl * event) [member function]
4.76 - cls.add_method('ScheduleWallclock',
4.77 - 'void',
4.78 - [param('ns3::Time const &', 'time'), param('ns3::EventImpl *', 'event')],
4.79 - is_virtual=True)
4.80 - ## default-simulator-impl.h: void ns3::DefaultSimulatorImpl::ScheduleWallclockNow(ns3::EventImpl * event) [member function]
4.81 - cls.add_method('ScheduleWallclockNow',
4.82 - 'void',
4.83 - [param('ns3::EventImpl *', 'event')],
4.84 - is_virtual=True)
4.85 return
4.86
4.87 def register_Ns3HeapScheduler_methods(root_module, cls):
4.88 @@ -1402,16 +1369,14 @@
4.89 'ns3::Ptr< ns3::Scheduler >',
4.90 [],
4.91 is_const=True, is_virtual=True)
4.92 - ## realtime-simulator-impl.h: void ns3::RealtimeSimulatorImpl::ScheduleWallclock(ns3::Time const & time, ns3::EventImpl * event) [member function]
4.93 - cls.add_method('ScheduleWallclock',
4.94 + ## realtime-simulator-impl.h: void ns3::RealtimeSimulatorImpl::ScheduleRealtime(ns3::Time const & time, ns3::EventImpl * event) [member function]
4.95 + cls.add_method('ScheduleRealtime',
4.96 'void',
4.97 - [param('ns3::Time const &', 'time'), param('ns3::EventImpl *', 'event')],
4.98 - is_virtual=True)
4.99 - ## realtime-simulator-impl.h: void ns3::RealtimeSimulatorImpl::ScheduleWallclockNow(ns3::EventImpl * event) [member function]
4.100 - cls.add_method('ScheduleWallclockNow',
4.101 + [param('ns3::Time const &', 'time'), param('ns3::EventImpl *', 'event')])
4.102 + ## realtime-simulator-impl.h: void ns3::RealtimeSimulatorImpl::ScheduleRealtimeNow(ns3::EventImpl * event) [member function]
4.103 + cls.add_method('ScheduleRealtimeNow',
4.104 'void',
4.105 - [param('ns3::EventImpl *', 'event')],
4.106 - is_virtual=True)
4.107 + [param('ns3::EventImpl *', 'event')])
4.108 ## realtime-simulator-impl.h: ns3::Time ns3::RealtimeSimulatorImpl::RealtimeNow() const [member function]
4.109 cls.add_method('RealtimeNow',
4.110 'ns3::Time',
5.1 --- a/bindings/python/ns3modulegen_generated.py Mon Oct 27 12:17:38 2008 +0100
5.2 +++ b/bindings/python/ns3modulegen_generated.py Mon Oct 27 12:47:33 2008 +0100
5.3 @@ -274,6 +274,7 @@
5.4 def register_types_ns3_Config(module):
5.5 root_module = module.get_root()
5.6
5.7 + module.add_container('std::vector< std::string >', 'std::string', container_type='vector')
5.8
5.9 def register_types_ns3_olsr(module):
5.10 root_module = module.get_root()
6.1 --- a/samples/main-ns2-mob.cc Mon Oct 27 12:17:38 2008 +0100
6.2 +++ b/samples/main-ns2-mob.cc Mon Oct 27 12:47:33 2008 +0100
6.3 @@ -4,6 +4,7 @@
6.4 #include "ns3/helper-module.h"
6.5 #include "ns3/mobility-module.h"
6.6 #include <iostream>
6.7 +#include <fstream>
6.8
6.9 using namespace ns3;
6.10
7.1 --- a/samples/main-test-sync.cc Mon Oct 27 12:17:38 2008 +0100
7.2 +++ b/samples/main-test-sync.cc Mon Oct 27 12:47:33 2008 +0100
7.3 @@ -1,13 +1,14 @@
7.4 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
7.5
7.6 #include "ns3/simulator.h"
7.7 -#include "ns3/wallclock-simulator.h"
7.8 +#include "ns3/realtime-simulator-impl.h"
7.9 #include "ns3/nstime.h"
7.10 #include "ns3/log.h"
7.11 #include "ns3/system-thread.h"
7.12 #include "ns3/string.h"
7.13 #include "ns3/config.h"
7.14 #include "ns3/global-value.h"
7.15 +#include "ns3/ptr.h"
7.16
7.17 #include <unistd.h>
7.18 #include <sys/time.h>
7.19 @@ -18,7 +19,7 @@
7.20
7.21 bool gFirstRun = false;
7.22
7.23 - void
7.24 +void
7.25 inserted_function (void)
7.26 {
7.27 NS_ASSERT (gFirstRun);
7.28 @@ -26,7 +27,7 @@
7.29 Simulator::Now ().GetSeconds () << " s");
7.30 }
7.31
7.32 - void
7.33 +void
7.34 background_function (void)
7.35 {
7.36 NS_ASSERT (gFirstRun);
7.37 @@ -34,7 +35,7 @@
7.38 Simulator::Now ().GetSeconds () << " s");
7.39 }
7.40
7.41 - void
7.42 +void
7.43 first_function (void)
7.44 {
7.45 NS_LOG_UNCOND ("first_function() called at " <<
7.46 @@ -46,8 +47,6 @@
7.47 {
7.48 public:
7.49 FakeNetDevice ();
7.50 - void Doit1 (void);
7.51 - void Doit2 (void);
7.52 void Doit3 (void);
7.53 void Doit4 (void);
7.54 };
7.55 @@ -57,37 +56,7 @@
7.56 NS_LOG_FUNCTION_NOARGS ();
7.57 }
7.58
7.59 - void
7.60 -FakeNetDevice::Doit1 (void)
7.61 -{
7.62 - NS_LOG_FUNCTION_NOARGS ();
7.63 - sleep (1);
7.64 - for (uint32_t i = 0.001; i < 10000; ++i)
7.65 - {
7.66 - //
7.67 - // Exercise the relative now path
7.68 - //
7.69 - Simulator::ScheduleNow (&inserted_function);
7.70 - usleep (1000);
7.71 - }
7.72 -}
7.73 -
7.74 - void
7.75 -FakeNetDevice::Doit2 (void)
7.76 -{
7.77 - NS_LOG_FUNCTION_NOARGS ();
7.78 - sleep (1);
7.79 - for (uint32_t i = 0.001; i < 10000; ++i)
7.80 - {
7.81 - //
7.82 - // Exercise the relative schedule path
7.83 - //
7.84 - Simulator::Schedule (Seconds (0), &inserted_function);
7.85 - usleep (1000);
7.86 - }
7.87 -}
7.88 -
7.89 - void
7.90 +void
7.91 FakeNetDevice::Doit3 (void)
7.92 {
7.93 NS_LOG_FUNCTION_NOARGS ();
7.94 @@ -97,12 +66,12 @@
7.95 //
7.96 // Exercise the realtime relative now path
7.97 //
7.98 - WallclockSimulator::ScheduleNow (&inserted_function);
7.99 + DynamicCast<RealtimeSimulatorImpl> (Simulator::GetImplementation ())->ScheduleRealtimeNow (MakeEvent (&inserted_function));
7.100 usleep (1000);
7.101 }
7.102 }
7.103
7.104 - void
7.105 +void
7.106 FakeNetDevice::Doit4 (void)
7.107 {
7.108 NS_LOG_FUNCTION_NOARGS ();
7.109 @@ -112,12 +81,12 @@
7.110 //
7.111 // Exercise the realtime relative schedule path
7.112 //
7.113 - WallclockSimulator::Schedule (Seconds (0), &inserted_function);
7.114 + DynamicCast<RealtimeSimulatorImpl> (Simulator::GetImplementation ())->ScheduleRealtime (Seconds (0), MakeEvent (&inserted_function));
7.115 usleep (1000);
7.116 }
7.117 }
7.118
7.119 - void
7.120 +void
7.121 test (void)
7.122 {
7.123 GlobalValue::Bind ("SimulatorImplementationType",
7.124 @@ -128,7 +97,7 @@
7.125 //
7.126 // Make sure ScheduleNow works when the system isn't running
7.127 //
7.128 - WallclockSimulator::ScheduleNow(&first_function);
7.129 + DynamicCast<RealtimeSimulatorImpl> (Simulator::GetImplementation ())->ScheduleRealtimeNow(MakeEvent (&first_function));
7.130
7.131 //
7.132 // drive the progression of m_currentTs at a ten millisecond rate
7.133 @@ -138,14 +107,6 @@
7.134 Simulator::Schedule (Seconds (d), &background_function);
7.135 }
7.136
7.137 - Ptr<SystemThread> st1 = Create<SystemThread> (
7.138 - MakeCallback (&FakeNetDevice::Doit1, &fnd));
7.139 - st1->Start ();
7.140 -
7.141 - Ptr<SystemThread> st2 = Create<SystemThread> (
7.142 - MakeCallback (&FakeNetDevice::Doit2, &fnd));
7.143 - st2->Start ();
7.144 -
7.145 Ptr<SystemThread> st3 = Create<SystemThread> (
7.146 MakeCallback (&FakeNetDevice::Doit3, &fnd));
7.147 st3->Start ();
7.148 @@ -156,17 +117,15 @@
7.149
7.150 Simulator::Stop (Seconds (15.0));
7.151 Simulator::Run ();
7.152 - st1->Join ();
7.153 - st2->Join ();
7.154 st3->Join ();
7.155 st4->Join ();
7.156 Simulator::Destroy ();
7.157 }
7.158
7.159 - int
7.160 +int
7.161 main (int argc, char *argv[])
7.162 {
7.163 - for (;;)
7.164 + while (true)
7.165 {
7.166 test ();
7.167 }
8.1 --- a/src/simulator/default-simulator-impl.cc Mon Oct 27 12:17:38 2008 +0100
8.2 +++ b/src/simulator/default-simulator-impl.cc Mon Oct 27 12:47:33 2008 +0100
8.3 @@ -316,17 +316,6 @@
8.4 return TimeStep (0x7fffffffffffffffLL);
8.5 }
8.6
8.7 -void
8.8 -DefaultSimulatorImpl::ScheduleWallclock (Time const &time, EventImpl *event)
8.9 -{
8.10 - NS_FATAL_ERROR ("not implemented");
8.11 -}
8.12 -void
8.13 -DefaultSimulatorImpl::ScheduleWallclockNow (EventImpl *event)
8.14 -{
8.15 - NS_FATAL_ERROR ("not implemented");
8.16 -}
8.17 -
8.18 } // namespace ns3
8.19
8.20
9.1 --- a/src/simulator/default-simulator-impl.h Mon Oct 27 12:17:38 2008 +0100
9.2 +++ b/src/simulator/default-simulator-impl.h Mon Oct 27 12:47:33 2008 +0100
9.3 @@ -59,8 +59,6 @@
9.4 virtual Time GetMaximumSimulationTime (void) const;
9.5 virtual void SetScheduler (Ptr<Scheduler> scheduler);
9.6 virtual Ptr<Scheduler> GetScheduler (void) const;
9.7 - virtual void ScheduleWallclock (Time const &time, EventImpl *event);
9.8 - virtual void ScheduleWallclockNow (EventImpl *event);
9.9
9.10 private:
9.11 void ProcessOneEvent (void);
10.1 --- a/src/simulator/realtime-simulator-impl.cc Mon Oct 27 12:17:38 2008 +0100
10.2 +++ b/src/simulator/realtime-simulator-impl.cc Mon Oct 27 12:47:33 2008 +0100
10.3 @@ -632,7 +632,7 @@
10.4 // Schedule an event for a _relative_ time in the future.
10.5 //
10.6 void
10.7 -RealtimeSimulatorImpl::ScheduleWallclock (Time const &time, EventImpl *impl)
10.8 +RealtimeSimulatorImpl::ScheduleRealtime (Time const &time, EventImpl *impl)
10.9 {
10.10 NS_LOG_FUNCTION (time << impl);
10.11
10.12 @@ -641,7 +641,7 @@
10.13 CriticalSection cs (m_mutex);
10.14
10.15 uint64_t ts = m_synchronizer->GetCurrentRealtime () + time.GetTimeStep ();
10.16 - NS_ASSERT_MSG (ts >= m_currentTs, "RealtimeSimulatorImpl::ScheduleWallClock(): schedule for time < m_currentTs");
10.17 + NS_ASSERT_MSG (ts >= m_currentTs, "RealtimeSimulatorImpl::ScheduleRealtime(): schedule for time < m_currentTs");
10.18 Scheduler::Event ev;
10.19 ev.impl = impl;
10.20 ev.key.m_ts = ts;
10.21 @@ -655,7 +655,7 @@
10.22 }
10.23
10.24 void
10.25 -RealtimeSimulatorImpl::ScheduleWallclockNow (EventImpl *impl)
10.26 +RealtimeSimulatorImpl::ScheduleRealtimeNow (EventImpl *impl)
10.27 {
10.28 NS_LOG_FUNCTION_NOARGS ();
10.29 {
10.30 @@ -666,7 +666,7 @@
10.31 // realtime clock. If we're not, then m_currentTs is were we stopped.
10.32 //
10.33 uint64_t ts = m_running ? m_synchronizer->GetCurrentRealtime () : m_currentTs;
10.34 - NS_ASSERT_MSG (ts >= m_currentTs, "RealtimeSimulatorImpl::ScheduleWallclockNow(): schedule for time < m_currentTs");
10.35 + NS_ASSERT_MSG (ts >= m_currentTs, "RealtimeSimulatorImpl::ScheduleRealtimeNow(): schedule for time < m_currentTs");
10.36 Scheduler::Event ev;
10.37 ev.impl = impl;
10.38 ev.key.m_ts = ts;
11.1 --- a/src/simulator/realtime-simulator-impl.h Mon Oct 27 12:17:38 2008 +0100
11.2 +++ b/src/simulator/realtime-simulator-impl.h Mon Oct 27 12:47:33 2008 +0100
11.3 @@ -69,9 +69,9 @@
11.4 virtual Time GetMaximumSimulationTime (void) const;
11.5 virtual void SetScheduler (Ptr<Scheduler> scheduler);
11.6 virtual Ptr<Scheduler> GetScheduler (void) const;
11.7 - virtual void ScheduleWallclock (Time const &time, EventImpl *event);
11.8 - virtual void ScheduleWallclockNow (EventImpl *event);
11.9
11.10 + void ScheduleRealtime (Time const &time, EventImpl *event);
11.11 + void ScheduleRealtimeNow (EventImpl *event);
11.12 Time RealtimeNow (void) const;
11.13
11.14 void SetSynchronizationMode (RealtimeSimulatorImpl::SynchronizationMode mode);
12.1 --- a/src/simulator/simulator-impl.h Mon Oct 27 12:17:38 2008 +0100
12.2 +++ b/src/simulator/simulator-impl.h Mon Oct 27 12:47:33 2008 +0100
12.3 @@ -52,8 +52,6 @@
12.4 virtual Time GetMaximumSimulationTime (void) const = 0;
12.5 virtual void SetScheduler (Ptr<Scheduler> scheduler) = 0;
12.6 virtual Ptr<Scheduler> GetScheduler (void) const = 0;
12.7 - virtual void ScheduleWallclock (Time const &time, EventImpl *event) = 0;
12.8 - virtual void ScheduleWallclockNow (EventImpl *event) = 0;
12.9 };
12.10
12.11 } // namespace ns3
13.1 --- a/src/simulator/simulator.cc Mon Oct 27 12:17:38 2008 +0100
13.2 +++ b/src/simulator/simulator.cc Mon Oct 27 12:47:33 2008 +0100
13.3 @@ -19,7 +19,6 @@
13.4 */
13.5
13.6 #include "simulator.h"
13.7 -#include "wallclock-simulator.h"
13.8 #include "simulator-impl.h"
13.9 #include "default-simulator-impl.h"
13.10 #include "realtime-simulator-impl.h"
13.11 @@ -286,35 +285,12 @@
13.12 {
13.13 NS_FATAL_ERROR ("TODO");
13.14 }
13.15 -
13.16 -
13.17 -void
13.18 -WallclockSimulator::Schedule (Time const &time, EventImpl *ev)
13.19 +Ptr<SimulatorImpl>
13.20 +Simulator::GetImplementation (void)
13.21 {
13.22 - NS_LOG_FUNCTION (time << ev);
13.23 - return GetImpl ()->ScheduleWallclock (time, ev);
13.24 + return GetImpl ();
13.25 }
13.26
13.27 -void
13.28 -WallclockSimulator::ScheduleNow (EventImpl *ev)
13.29 -{
13.30 - NS_LOG_FUNCTION (ev);
13.31 - return GetImpl ()->ScheduleWallclockNow (ev);
13.32 -}
13.33 -
13.34 -void
13.35 -WallclockSimulator::Schedule (Time const &time, void (*f) (void))
13.36 -{
13.37 - NS_LOG_FUNCTION (time << f);
13.38 - return WallclockSimulator::Schedule (time, MakeEvent (f));
13.39 -}
13.40 -
13.41 -void
13.42 -WallclockSimulator::ScheduleNow (void (*f) (void))
13.43 -{
13.44 - NS_LOG_FUNCTION (f);
13.45 - return WallclockSimulator::ScheduleNow (MakeEvent (f));
13.46 -}
13.47
13.48
13.49 } // namespace ns3
14.1 --- a/src/simulator/simulator.h Mon Oct 27 12:17:38 2008 +0100
14.2 +++ b/src/simulator/simulator.h Mon Oct 27 12:47:33 2008 +0100
14.3 @@ -71,6 +71,8 @@
14.4 */
14.5 static void SetImplementation (Ptr<SimulatorImpl> impl);
14.6
14.7 + static Ptr<SimulatorImpl> GetImplementation (void);
14.8 +
14.9 /**
14.10 * \param scheduler a new event scheduler
14.11 *
15.1 --- a/src/simulator/wallclock-simulator.h Mon Oct 27 12:17:38 2008 +0100
15.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
15.3 @@ -1,475 +0,0 @@
15.4 -/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
15.5 -/*
15.6 - * Copyright (c) 2008 University of Washington
15.7 - *
15.8 - * This program is free software; you can redistribute it and/or modify
15.9 - * it under the terms of the GNU General Public License version 2 as
15.10 - * published by the Free Software Foundation;
15.11 - *
15.12 - * This program is distributed in the hope that it will be useful,
15.13 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
15.14 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15.15 - * GNU General Public License for more details.
15.16 - *
15.17 - * You should have received a copy of the GNU General Public License
15.18 - * along with this program; if not, write to the Free Software
15.19 - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
15.20 - */
15.21 -
15.22 -#ifndef WALLCLOCK_SIMULATOR_H
15.23 -#define WALLCLOCK_SIMULATOR_H
15.24 -
15.25 -#include "simulator.h"
15.26 -#include "make-event.h"
15.27 -
15.28 -namespace ns3 {
15.29 -
15.30 -/**
15.31 - * \ingroup simulator
15.32 - *
15.33 - * \brief Extension class to control the scheduling of real-time simulation
15.34 - * events. Intended to be used by threads driven by "external" system
15.35 - * events and will schedule events using the current real-time instead of
15.36 - * the current simulation time.
15.37 - */
15.38 -class WallclockSimulator
15.39 -{
15.40 -public:
15.41 - /**
15.42 - * Schedule an event to expire at the relative real-time "time"
15.43 - * is reached. This can be thought of as scheduling an event
15.44 - * for the current real-time plus the Time passed as a parameter
15.45 - *
15.46 - * When the event expires (when it becomes due to be run), the
15.47 - * input method will be invoked on the input object.
15.48 - *
15.49 - * @param time the relative expiration time of the event.
15.50 - * @param mem_ptr member method pointer to invoke
15.51 - * @param obj the object on which to invoke the member method
15.52 - * @returns an id for the scheduled event.
15.53 - */
15.54 - template <typename MEM, typename OBJ>
15.55 - static void Schedule (Time const &time, MEM mem_ptr, OBJ obj);
15.56 -
15.57 - /**
15.58 - * @param time the relative expiration time of the event.
15.59 - * @param mem_ptr member method pointer to invoke
15.60 - * @param obj the object on which to invoke the member method
15.61 - * @param a1 the first argument to pass to the invoked method
15.62 - * @returns an id for the scheduled event.
15.63 - */
15.64 - template <typename MEM, typename OBJ, typename T1>
15.65 - static void Schedule (Time const &time, MEM mem_ptr, OBJ obj, T1 a1);
15.66 -
15.67 - /**
15.68 - * @param time the relative expiration time of the event.
15.69 - * @param mem_ptr member method pointer to invoke
15.70 - * @param obj the object on which to invoke the member method
15.71 - * @param a1 the first argument to pass to the invoked method
15.72 - * @param a2 the second argument to pass to the invoked method
15.73 - * @returns an id for the scheduled event.
15.74 - */
15.75 - template <typename MEM, typename OBJ, typename T1, typename T2>
15.76 - static void Schedule (Time const &time, MEM mem_ptr, OBJ obj, T1 a1, T2 a2);
15.77 -
15.78 - /**
15.79 - * @param time the relative expiration time of the event.
15.80 - * @param mem_ptr member method pointer to invoke
15.81 - * @param obj the object on which to invoke the member method
15.82 - * @param a1 the first argument to pass to the invoked method
15.83 - * @param a2 the second argument to pass to the invoked method
15.84 - * @param a3 the third argument to pass to the invoked method
15.85 - * @returns an id for the scheduled event.
15.86 - */
15.87 - template <typename MEM, typename OBJ,
15.88 - typename T1, typename T2, typename T3>
15.89 - static void Schedule (Time const &time, MEM mem_ptr, OBJ obj, T1 a1, T2 a2, T3 a3);
15.90 -
15.91 - /**
15.92 - * @param time the relative expiration time of the event.
15.93 - * @param mem_ptr member method pointer to invoke
15.94 - * @param obj the object on which to invoke the member method
15.95 - * @param a1 the first argument to pass to the invoked method
15.96 - * @param a2 the second argument to pass to the invoked method
15.97 - * @param a3 the third argument to pass to the invoked method
15.98 - * @param a4 the fourth argument to pass to the invoked method
15.99 - * @returns an id for the scheduled event.
15.100 - */
15.101 - template <typename MEM, typename OBJ,
15.102 - typename T1, typename T2, typename T3, typename T4>
15.103 - static void Schedule (Time const &time, MEM mem_ptr, OBJ obj, T1 a1, T2 a2, T3 a3, T4 a4);
15.104 -
15.105 - /**
15.106 - * @param time the relative expiration time of the event.
15.107 - * @param mem_ptr member method pointer to invoke
15.108 - * @param obj the object on which to invoke the member method
15.109 - * @param a1 the first argument to pass to the invoked method
15.110 - * @param a2 the second argument to pass to the invoked method
15.111 - * @param a3 the third argument to pass to the invoked method
15.112 - * @param a4 the fourth argument to pass to the invoked method
15.113 - * @param a5 the fifth argument to pass to the invoked method
15.114 - * @returns an id for the scheduled event.
15.115 - */
15.116 - template <typename MEM, typename OBJ,
15.117 - typename T1, typename T2, typename T3, typename T4, typename T5>
15.118 - static void Schedule (Time const &time, MEM mem_ptr, OBJ obj,
15.119 - T1 a1, T2 a2, T3 a3, T4 a4, T5 a5);
15.120 - /**
15.121 - * @param time the relative expiration time of the event.
15.122 - * @param f the function to invoke
15.123 - * @returns an id for the scheduled event.
15.124 - */
15.125 - static void Schedule (Time const &time, void (*f) (void));
15.126 -
15.127 - /**
15.128 - * @param time the relative expiration time of the event.
15.129 - * @param f the function to invoke
15.130 - * @param a1 the first argument to pass to the function to invoke
15.131 - * @returns an id for the scheduled event.
15.132 - */
15.133 - template <typename U1, typename T1>
15.134 - static void Schedule (Time const &time, void (*f) (U1), T1 a1);
15.135 -
15.136 - /**
15.137 - * @param time the relative expiration time of the event.
15.138 - * @param f the function to invoke
15.139 - * @param a1 the first argument to pass to the function to invoke
15.140 - * @param a2 the second argument to pass to the function to invoke
15.141 - * @returns an id for the scheduled event.
15.142 - */
15.143 - template <typename U1, typename U2, typename T1, typename T2>
15.144 - static void Schedule (Time const &time, void (*f) (U1,U2), T1 a1, T2 a2);
15.145 -
15.146 - /**
15.147 - * @param time the relative expiration time of the event.
15.148 - * @param f the function to invoke
15.149 - * @param a1 the first argument to pass to the function to invoke
15.150 - * @param a2 the second argument to pass to the function to invoke
15.151 - * @param a3 the third argument to pass to the function to invoke
15.152 - * @returns an id for the scheduled event.
15.153 - */
15.154 - template <typename U1, typename U2, typename U3, typename T1, typename T2, typename T3>
15.155 - static void Schedule (Time const &time, void (*f) (U1,U2,U3), T1 a1, T2 a2, T3 a3);
15.156 -
15.157 - /**
15.158 - * @param time the relative expiration time of the event.
15.159 - * @param f the function to invoke
15.160 - * @param a1 the first argument to pass to the function to invoke
15.161 - * @param a2 the second argument to pass to the function to invoke
15.162 - * @param a3 the third argument to pass to the function to invoke
15.163 - * @param a4 the fourth argument to pass to the function to invoke
15.164 - * @returns an id for the scheduled event.
15.165 - */
15.166 - template <typename U1, typename U2, typename U3, typename U4,
15.167 - typename T1, typename T2, typename T3, typename T4>
15.168 - static void Schedule (Time const &time, void (*f) (U1,U2,U3,U4), T1 a1, T2 a2, T3 a3, T4 a4);
15.169 -
15.170 - /**
15.171 - * @param time the relative expiration time of the event.
15.172 - * @param f the function to invoke
15.173 - * @param a1 the first argument to pass to the function to invoke
15.174 - * @param a2 the second argument to pass to the function to invoke
15.175 - * @param a3 the third argument to pass to the function to invoke
15.176 - * @param a4 the fourth argument to pass to the function to invoke
15.177 - * @param a5 the fifth argument to pass to the function to invoke
15.178 - * @returns an id for the scheduled event.
15.179 - */
15.180 - template <typename U1, typename U2, typename U3, typename U4, typename U5,
15.181 - typename T1, typename T2, typename T3, typename T4, typename T5>
15.182 - static void Schedule (Time const &time, void (*f) (U1,U2,U3,U4,U5), T1 a1, T2 a2, T3 a3, T4 a4, T5 a5);
15.183 -
15.184 - /**
15.185 - * Schedule an event to expire Now. All events scheduled to
15.186 - * to expire "Now" are scheduled FIFO, after all normal events
15.187 - * have expired.
15.188 - *
15.189 - * @param mem_ptr member method pointer to invoke
15.190 - * @param obj the object on which to invoke the member method
15.191 - */
15.192 - template <typename MEM, typename OBJ>
15.193 - static void ScheduleNow (MEM mem_ptr, OBJ obj);
15.194 -
15.195 - /**
15.196 - * @param mem_ptr member method pointer to invoke
15.197 - * @param obj the object on which to invoke the member method
15.198 - * @param a1 the first argument to pass to the invoked method
15.199 - */
15.200 - template <typename MEM, typename OBJ,
15.201 - typename T1>
15.202 - static void ScheduleNow (MEM mem_ptr, OBJ obj, T1 a1);
15.203 -
15.204 - /**
15.205 - * @param mem_ptr member method pointer to invoke
15.206 - * @param obj the object on which to invoke the member method
15.207 - * @param a1 the first argument to pass to the invoked method
15.208 - * @param a2 the second argument to pass to the invoked method
15.209 - */
15.210 - template <typename MEM, typename OBJ,
15.211 - typename T1, typename T2>
15.212 - static void ScheduleNow (MEM mem_ptr, OBJ obj, T1 a1, T2 a2);
15.213 -
15.214 - /**
15.215 - * @param mem_ptr member method pointer to invoke
15.216 - * @param obj the object on which to invoke the member method
15.217 - * @param a1 the first argument to pass to the invoked method
15.218 - * @param a2 the second argument to pass to the invoked method
15.219 - * @param a3 the third argument to pass to the invoked method
15.220 - */
15.221 - template <typename MEM, typename OBJ,
15.222 - typename T1, typename T2, typename T3>
15.223 - static void ScheduleNow (MEM mem_ptr, OBJ obj, T1 a1, T2 a2, T3 a3);
15.224 -
15.225 - /**
15.226 - * @param mem_ptr member method pointer to invoke
15.227 - * @param obj the object on which to invoke the member method
15.228 - * @param a1 the first argument to pass to the invoked method
15.229 - * @param a2 the second argument to pass to the invoked method
15.230 - * @param a3 the third argument to pass to the invoked method
15.231 - * @param a4 the fourth argument to pass to the invoked method
15.232 - */
15.233 - template <typename MEM, typename OBJ,
15.234 - typename T1, typename T2, typename T3, typename T4>
15.235 - static void ScheduleNow (MEM mem_ptr, OBJ obj,
15.236 - T1 a1, T2 a2, T3 a3, T4 a4);
15.237 - /**
15.238 - * @param mem_ptr member method pointer to invoke
15.239 - * @param obj the object on which to invoke the member method
15.240 - * @param a1 the first argument to pass to the invoked method
15.241 - * @param a2 the second argument to pass to the invoked method
15.242 - * @param a3 the third argument to pass to the invoked method
15.243 - * @param a4 the fourth argument to pass to the invoked method
15.244 - * @param a5 the fifth argument to pass to the invoked method
15.245 - */
15.246 - template <typename MEM, typename OBJ,
15.247 - typename T1, typename T2, typename T3, typename T4, typename T5>
15.248 - static void ScheduleNow (MEM mem_ptr, OBJ obj,
15.249 - T1 a1, T2 a2, T3 a3, T4 a4, T5 a5);
15.250 - /**
15.251 - * @param f the function to invoke
15.252 - */
15.253 - static void ScheduleNow (void (*f) (void));
15.254 -
15.255 - /**
15.256 - * @param f the function to invoke
15.257 - * @param a1 the first argument to pass to the function to invoke
15.258 - */
15.259 - template <typename U1,
15.260 - typename T1>
15.261 - static void ScheduleNow (void (*f) (U1), T1 a1);
15.262 -
15.263 - /**
15.264 - * @param f the function to invoke
15.265 - * @param a1 the first argument to pass to the function to invoke
15.266 - * @param a2 the second argument to pass to the function to invoke
15.267 - */
15.268 - template <typename U1, typename U2,
15.269 - typename T1, typename T2>
15.270 - static void ScheduleNow (void (*f) (U1,U2), T1 a1, T2 a2);
15.271 -
15.272 - /**
15.273 - * @param f the function to invoke
15.274 - * @param a1 the first argument to pass to the function to invoke
15.275 - * @param a2 the second argument to pass to the function to invoke
15.276 - * @param a3 the third argument to pass to the function to invoke
15.277 - */
15.278 - template <typename U1, typename U2, typename U3,
15.279 - typename T1, typename T2, typename T3>
15.280 - static void ScheduleNow (void (*f) (U1,U2,U3), T1 a1, T2 a2, T3 a3);
15.281 -
15.282 - /**
15.283 - * @param f the function to invoke
15.284 - * @param a1 the first argument to pass to the function to invoke
15.285 - * @param a2 the second argument to pass to the function to invoke
15.286 - * @param a3 the third argument to pass to the function to invoke
15.287 - * @param a4 the fourth argument to pass to the function to invoke
15.288 - */
15.289 - template <typename U1, typename U2, typename U3, typename U4,
15.290 - typename T1, typename T2, typename T3, typename T4>
15.291 - static void ScheduleNow (void (*f) (U1,U2,U3,U4), T1 a1, T2 a2, T3 a3, T4 a4);
15.292 -
15.293 - /**
15.294 - * @param f the function to invoke
15.295 - * @param a1 the first argument to pass to the function to invoke
15.296 - * @param a2 the second argument to pass to the function to invoke
15.297 - * @param a3 the third argument to pass to the function to invoke
15.298 - * @param a4 the fourth argument to pass to the function to invoke
15.299 - * @param a5 the fifth argument to pass to the function to invoke
15.300 - */
15.301 - template <typename U1, typename U2, typename U3, typename U4, typename U5,
15.302 - typename T1, typename T2, typename T3, typename T4, typename T5>
15.303 - static void ScheduleNow (void (*f) (U1,U2,U3,U4,U5), T1 a1, T2 a2, T3 a3, T4 a4, T5 a5);
15.304 -
15.305 -private:
15.306 - WallclockSimulator ();
15.307 - ~WallclockSimulator ();
15.308 - static void Schedule (const Time &delay, EventImpl *impl);
15.309 - static void ScheduleNow (EventImpl *impl);
15.310 -};
15.311 -
15.312 -template <typename MEM, typename OBJ>
15.313 -void WallclockSimulator::Schedule (Time const &time, MEM mem_ptr, OBJ obj)
15.314 -{
15.315 - return Schedule (time, MakeEvent (mem_ptr, obj));
15.316 -}
15.317 -
15.318 -template <typename MEM, typename OBJ,
15.319 - typename T1>
15.320 -void WallclockSimulator::Schedule (Time const &time, MEM mem_ptr, OBJ obj, T1 a1)
15.321 -{
15.322 - return Schedule (time, MakeEvent (mem_ptr, obj, a1));
15.323 -}
15.324 -
15.325 -template <typename MEM, typename OBJ,
15.326 - typename T1, typename T2>
15.327 -void WallclockSimulator::Schedule (Time const &time, MEM mem_ptr, OBJ obj, T1 a1, T2 a2)
15.328 -{
15.329 - return Schedule (time, MakeEvent (mem_ptr, obj, a1, a2));
15.330 -}
15.331 -
15.332 -template <typename MEM, typename OBJ,
15.333 - typename T1, typename T2, typename T3>
15.334 -void WallclockSimulator::Schedule (Time const &time, MEM mem_ptr, OBJ obj, T1 a1, T2 a2, T3 a3)
15.335 -{
15.336 - return Schedule (time, MakeEvent (mem_ptr, obj, a1, a2, a3));
15.337 -}
15.338 -
15.339 -template <typename MEM, typename OBJ,
15.340 - typename T1, typename T2, typename T3, typename T4>
15.341 -void WallclockSimulator::Schedule (Time const &time, MEM mem_ptr, OBJ obj, T1 a1, T2 a2, T3 a3, T4 a4)
15.342 -{
15.343 - return Schedule (time, MakeEvent (mem_ptr, obj, a1, a2, a3, a4));
15.344 -}
15.345 -
15.346 -template <typename MEM, typename OBJ,
15.347 - typename T1, typename T2, typename T3, typename T4, typename T5>
15.348 -void WallclockSimulator::Schedule (Time const &time, MEM mem_ptr, OBJ obj,
15.349 - T1 a1, T2 a2, T3 a3, T4 a4, T5 a5)
15.350 -{
15.351 - return Schedule (time, MakeEvent (mem_ptr, obj, a1, a2, a3, a4, a5));
15.352 -}
15.353 -
15.354 -template <typename U1, typename T1>
15.355 -void WallclockSimulator::Schedule (Time const &time, void (*f) (U1), T1 a1)
15.356 -{
15.357 - return Schedule (time, MakeEvent (f, a1));
15.358 -}
15.359 -
15.360 -template <typename U1, typename U2,
15.361 - typename T1, typename T2>
15.362 -void WallclockSimulator::Schedule (Time const &time, void (*f) (U1,U2), T1 a1, T2 a2)
15.363 -{
15.364 - return Schedule (time, MakeEvent (f, a1, a2));
15.365 -}
15.366 -
15.367 -template <typename U1, typename U2, typename U3,
15.368 - typename T1, typename T2, typename T3>
15.369 -void WallclockSimulator::Schedule (Time const &time, void (*f) (U1,U2,U3), T1 a1, T2 a2, T3 a3)
15.370 -{
15.371 - return Schedule (time, MakeEvent (f, a1, a2, a3));
15.372 -}
15.373 -
15.374 -template <typename U1, typename U2, typename U3, typename U4,
15.375 - typename T1, typename T2, typename T3, typename T4>
15.376 -void WallclockSimulator::Schedule (Time const &time, void (*f) (U1,U2,U3,U4), T1 a1, T2 a2, T3 a3, T4 a4)
15.377 -{
15.378 - return Schedule (time, MakeEvent (f, a1, a2, a3, a4));
15.379 -}
15.380 -
15.381 -template <typename U1, typename U2, typename U3, typename U4, typename U5,
15.382 - typename T1, typename T2, typename T3, typename T4, typename T5>
15.383 -void WallclockSimulator::Schedule (Time const &time, void (*f) (U1,U2,U3,U4,U5), T1 a1, T2 a2, T3 a3, T4 a4, T5 a5)
15.384 -{
15.385 - return Schedule (time, MakeEvent (f, a1, a2, a3, a4, a5));
15.386 -}
15.387 -
15.388 -template <typename MEM, typename OBJ>
15.389 -void
15.390 -WallclockSimulator::ScheduleNow (MEM mem_ptr, OBJ obj)
15.391 -{
15.392 - return ScheduleNow (MakeEvent (mem_ptr, obj));
15.393 -}
15.394 -
15.395 -template <typename MEM, typename OBJ,
15.396 - typename T1>
15.397 -void
15.398 -WallclockSimulator::ScheduleNow (MEM mem_ptr, OBJ obj, T1 a1)
15.399 -{
15.400 - return ScheduleNow (MakeEvent (mem_ptr, obj, a1));
15.401 -}
15.402 -
15.403 -template <typename MEM, typename OBJ,
15.404 - typename T1, typename T2>
15.405 -void
15.406 -WallclockSimulator::ScheduleNow (MEM mem_ptr, OBJ obj, T1 a1, T2 a2)
15.407 -{
15.408 - return ScheduleNow (MakeEvent (mem_ptr, obj, a1, a2));
15.409 -}
15.410 -
15.411 -template <typename MEM, typename OBJ,
15.412 - typename T1, typename T2, typename T3>
15.413 -void
15.414 -WallclockSimulator::ScheduleNow (MEM mem_ptr, OBJ obj, T1 a1, T2 a2, T3 a3)
15.415 -{
15.416 - return ScheduleNow (MakeEvent (mem_ptr, obj, a1, a2, a3));
15.417 -}
15.418 -
15.419 -template <typename MEM, typename OBJ,
15.420 - typename T1, typename T2, typename T3, typename T4>
15.421 -void
15.422 -WallclockSimulator::ScheduleNow (MEM mem_ptr, OBJ obj, T1 a1, T2 a2, T3 a3, T4 a4)
15.423 -{
15.424 - return ScheduleNow (MakeEvent (mem_ptr, obj, a1, a2, a3, a4));
15.425 -}
15.426 -
15.427 -template <typename MEM, typename OBJ,
15.428 - typename T1, typename T2, typename T3, typename T4, typename T5>
15.429 -void
15.430 -WallclockSimulator::ScheduleNow (MEM mem_ptr, OBJ obj,
15.431 - T1 a1, T2 a2, T3 a3, T4 a4, T5 a5)
15.432 -{
15.433 - return ScheduleNow (MakeEvent (mem_ptr, obj, a1, a2, a3, a4, a5));
15.434 -}
15.435 -
15.436 -template <typename U1,
15.437 - typename T1>
15.438 -void
15.439 -WallclockSimulator::ScheduleNow (void (*f) (U1), T1 a1)
15.440 -{
15.441 - return ScheduleNow (MakeEvent (f, a1));
15.442 -}
15.443 -
15.444 -template <typename U1, typename U2,
15.445 - typename T1, typename T2>
15.446 -void
15.447 -WallclockSimulator::ScheduleNow (void (*f) (U1,U2), T1 a1, T2 a2)
15.448 -{
15.449 - return ScheduleNow (MakeEvent (f, a1, a2));
15.450 -}
15.451 -
15.452 -template <typename U1, typename U2, typename U3,
15.453 - typename T1, typename T2, typename T3>
15.454 -void
15.455 -WallclockSimulator::ScheduleNow (void (*f) (U1,U2,U3), T1 a1, T2 a2, T3 a3)
15.456 -{
15.457 - return ScheduleNow (MakeEvent (f, a1, a2, a3));
15.458 -}
15.459 -
15.460 -template <typename U1, typename U2, typename U3, typename U4,
15.461 - typename T1, typename T2, typename T3, typename T4>
15.462 -void
15.463 -WallclockSimulator::ScheduleNow (void (*f) (U1,U2,U3,U4), T1 a1, T2 a2, T3 a3, T4 a4)
15.464 -{
15.465 - return ScheduleNow (MakeEvent (f, a1, a2, a3, a4));
15.466 -}
15.467 -
15.468 -template <typename U1, typename U2, typename U3, typename U4, typename U5,
15.469 - typename T1, typename T2, typename T3, typename T4, typename T5>
15.470 -void
15.471 -WallclockSimulator::ScheduleNow (void (*f) (U1,U2,U3,U4,U5), T1 a1, T2 a2, T3 a3, T4 a4, T5 a5)
15.472 -{
15.473 - return ScheduleNow (MakeEvent (f, a1, a2, a3, a4, a5));
15.474 -}
15.475 -
15.476 -} // namespace ns3
15.477 -
15.478 -#endif /* WALLCLOCK_SIMULATOR_H */
16.1 --- a/src/simulator/wscript Mon Oct 27 12:17:38 2008 +0100
16.2 +++ b/src/simulator/wscript Mon Oct 27 12:47:33 2008 +0100
16.3 @@ -76,7 +76,6 @@
16.4 'event-id.h',
16.5 'event-impl.h',
16.6 'simulator.h',
16.7 - 'wallclock-simulator.h',
16.8 'simulator-impl.h',
16.9 'default-simulator-impl.h',
16.10 'scheduler.h',