46 static TypeId tid =
TypeId(
"ns3::PriorityQueueScheduler")
96 auto it = std::find(this->c.begin(), this->c.end(), ev);
97 if (it != this->c.end())
100 std::make_heap(this->c.begin(), this->c.end(), this->comp);
NS_ASSERT() and NS_ASSERT_MSG() macro definitions.
bool remove(const Scheduler::Event &ev)
Remove a specific event from the event list.
a std::priority_queue event scheduler
static TypeId GetTypeId()
Register this type.
Scheduler::Event RemoveNext() override
Remove the earliest event from the event list.
~PriorityQueueScheduler() override
Destructor.
void Insert(const Scheduler::Event &ev) override
Insert a new Event in the schedule.
Scheduler::Event PeekNext() const override
Get a pointer to the next event.
void Remove(const Scheduler::Event &ev) override
Remove a specific event from the event list.
EventPriorityQueue m_queue
The event queue.
PriorityQueueScheduler()
Constructor.
bool IsEmpty() const override
Test if the schedule is empty.
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
ns3::EventImpl declarations.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Definition of empty logging macros and the NS_LOG_NOOP_INTERNAL macro.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Declaration of ns3::PriorityQueueScheduler class.
ns3::Scheduler abstract base class, ns3::Scheduler::Event and ns3::Scheduler::EventKey declarations.
EventKey key
Key for sorting and ordering Events.
EventImpl * impl
Pointer to the event implementation.
uint64_t m_ts
Event time stamp.
uint32_t m_uid
Event unique id.