def create(obj, priority=None):
if priority is None:
- priority = internal.event.Event.Default_Pri
+ priority = Event.Default_Pri
return PythonEvent(obj, priority)
+
+# As a reminder, priorities found in sim/eventq.hh are stuck into the
+# Event class by swig
class Event(PythonEvent):
def __init__(self, priority=None):
if priority is None:
- priority = internal.event.Event.Default_Pri
+ priority = Event.Default_Pri
super(Event, self).__init__(self, priority)
class ProgressEvent(Event):
if options.trace_start:
check_tracing()
- e = event.create(trace.enable)
+ e = event.create(trace.enable, Event.Trace_Enable_Pri)
event.mainq.schedule(e, options.trace_start)
else:
trace.enable()
from internal.trace import clear, output, set, ignore
+def disable():
+ internal.trace.cvar.enabled = False
+
def enable():
internal.trace.cvar.enabled = True