git://git.onelab.eu
/
nepi.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Changing reschedule_delay internals
[nepi.git]
/
src
/
nepi
/
resources
/
ns3
/
ns3dceapplication.py
diff --git
a/src/nepi/resources/ns3/ns3dceapplication.py
b/src/nepi/resources/ns3/ns3dceapplication.py
index
2b0f974
..
4b40ef9
100644
(file)
--- a/
src/nepi/resources/ns3/ns3dceapplication.py
+++ b/
src/nepi/resources/ns3/ns3dceapplication.py
@@
-18,7
+18,7
@@
# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
from nepi.execution.attribute import Attribute, Flags, Types
# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
from nepi.execution.attribute import Attribute, Flags, Types
-from nepi.execution.resource import clsinit_copy, ResourceState
, reschedule_delay
+from nepi.execution.resource import clsinit_copy, ResourceState
from nepi.resources.ns3.ns3application import NS3BaseApplication
from nepi.resources.ns3.ns3wrapper import SIMULATOR_UUID
from nepi.resources.ns3.ns3application import NS3BaseApplication
from nepi.resources.ns3.ns3wrapper import SIMULATOR_UUID
@@
-60,6
+60,11
@@
class NS3BaseDceApplication(NS3BaseApplication):
"DCE environment variables.",
flags = Flags.Design)
"DCE environment variables.",
flags = Flags.Design)
+ use_dlm = Attribute("useDlmLoader",
+ "Use ns3::DlmLoaderFactory as library loader",
+ type = Types.Bool,
+ flags = Flags.Design)
+
starttime = Attribute("StartTime",
"Time at which the application will start",
default = "+0.0ns",
starttime = Attribute("StartTime",
"Time at which the application will start",
default = "+0.0ns",
@@
-74,6
+79,7
@@
class NS3BaseDceApplication(NS3BaseApplication):
cls._register_attribute(stack_size)
cls._register_attribute(arguments)
cls._register_attribute(environment)
cls._register_attribute(stack_size)
cls._register_attribute(arguments)
cls._register_attribute(environment)
+ cls._register_attribute(use_dlm)
cls._register_attribute(stoptime)
cls._register_attribute(starttime)
cls._register_attribute(stoptime)
cls._register_attribute(starttime)
@@
-92,7
+98,14
@@
class NS3BaseDceApplication(NS3BaseApplication):
@property
def dce_manager_helper_uuid(self):
if not self._dce_manager_helper_uuid:
@property
def dce_manager_helper_uuid(self):
if not self._dce_manager_helper_uuid:
- self._dce_manager_helper_uuid = self.simulation.create("DceManagerHelper")
+ self._dce_manager_helper_uuid = self.simulation.create(
+ "DceManagerHelper")
+
+ if self.get("useDlmLoader"):
+ self.simulation.invoke(
+ self._dce_manager_helper_uuid, "SetLoader",
+ "ns3::DlmLoaderFactory")
+
return self._dce_manager_helper_uuid
@property
return self._dce_manager_helper_uuid
@property
@@
-173,7
+186,7
@@
class NS3BaseDceApplication(NS3BaseApplication):
def do_start(self):
if self.simulation.state < ResourceState.STARTED:
self.debug("---- RESCHEDULING START ----" )
def do_start(self):
if self.simulation.state < ResourceState.STARTED:
self.debug("---- RESCHEDULING START ----" )
- self.ec.schedule(reschedule_delay, self.start)
+ self.ec.schedule(
self.
reschedule_delay, self.start)
else:
self._configure_traces()
super(NS3BaseApplication, self).do_start()
else:
self._configure_traces()
super(NS3BaseApplication, self).do_start()