17 #ifndef CHANNEL_COORDINATOR_H
18 #define CHANNEL_COORDINATOR_H
19 #include "ns3/event-id.h"
20 #include "ns3/nstime.h"
21 #include "ns3/object.h"
246 typedef std::vector<Ptr<ChannelCoordinationListener>>
Listeners;
248 typedef std::vector<Ptr<ChannelCoordinationListener>>::iterator
ListenersI;
receive notifications about channel coordination events.
virtual void NotifyGuardSlotStart(Time duration, bool cchi)=0
virtual void NotifyCchSlotStart(Time duration)=0
virtual void NotifySchSlotStart(Time duration)=0
virtual ~ChannelCoordinationListener()
ChannelCoordinator deals with channel coordination in data plane (see 1609.4 chapter 5....
static TypeId GetTypeId()
Get the type ID.
void StartChannelCoordination()
start to make channel coordination events
Time GetSyncInterval() const
~ChannelCoordinator() override
Listeners m_listeners
listeners
void SetSchInterval(Time schi)
bool IsValidConfig() const
Time NeedTimeToCchInterval(Time duration=Seconds(0.0)) const
std::vector< Ptr< ChannelCoordinationListener > >::iterator ListenersI
Listeners iterator typedef.
bool IsSchInterval(Time duration=Seconds(0.0)) const
static Time GetDefaultCchInterval()
bool IsGuardInterval(Time duration=Seconds(0.0)) const
uint32_t m_guardCount
guard count
Time GetSchInterval() const
void SetGuardInterval(Time guardi)
void UnregisterAllListeners()
Remove all listeners.
void StopChannelCoordination()
stop channel coordination events
Time GetCchInterval() const
void NotifySchSlot()
notify listeners of a SCH slot start
Time GetGuardInterval() const
static Time GetDefaultGuardInterval()
EventId m_coordination
coordination event
Time NeedTimeToSchInterval(Time duration=Seconds(0.0)) const
static Time GetDefaultSchInterval()
void DoInitialize() override
Initialize() implementation.
Time NeedTimeToGuardInterval(Time duration=Seconds(0.0)) const
static Time GetDefaultSyncInterval()
void UnregisterListener(Ptr< ChannelCoordinationListener > listener)
void NotifyCchSlot()
notify listeners of a CCH slot start
void DoDispose() override
Destructor implementation.
void SetCchInterval(Time cchi)
std::vector< Ptr< ChannelCoordinationListener > > Listeners
Listeners typedef.
void NotifyGuardSlot()
notify listeners of a guard slot start
Time GetRemainTime(Time duration=Seconds(0.0)) const
Time GetIntervalTime(Time duration=Seconds(0.0)) const
bool IsCchInterval(Time duration=Seconds(0.0)) const
void RegisterListener(Ptr< ChannelCoordinationListener > listener)
An identifier for simulation events.
A base class which provides memory management and object aggregation.
A template-based reference counting class.
Simulation virtual time values and global simulation resolution.
a unique identifier for an interface.
Time Seconds(double value)
Construct a Time in the indicated unit.
Every class exported by the ns3 library is enclosed in the ns3 namespace.