6#include "nr-spectrum-phy.h"
8#include <ns3/event-id.h>
10#include <ns3/object.h>
14#ifndef NR_CH_ACCESS_MANAGER_H_
15#define NR_CH_ACCESS_MANAGER_H_
135 Time m_grantDuration;
194 std::vector<AccessGrantedCallback> m_accessGrantedCb;
A Channel access manager that sees the channel always free for transmitting.
void Cancel() override
Cancel a previously invoked request for accessing the channel.
NrAlwaysOnAccessManager()
NrAlwaysOnAccessManager constructor.
void RequestAccess() override
RequestAccess.
void SetAccessGrantedCallback(const AccessGrantedCallback &cb) override
Set Access-Granted Callback.
~NrAlwaysOnAccessManager() override
destructor
static TypeId GetTypeId()
Get the type ID.
void SetAccessDeniedCallback(const AccessDeniedCallback &cb) override
Set Access-Denied Callback.
The Channel Access Manager class.
virtual void SetAccessGrantedCallback(const AccessGrantedCallback &cb)=0
Set Access-Granted Callback.
virtual void SetAccessDeniedCallback(const AccessDeniedCallback &cb)=0
Set Access-Denied Callback.
virtual void Cancel()=0
Cancel a previously invoked request for accessing the channel.
Time GetGrantDuration() const
Get grant duration time.
virtual void RequestAccess()=0
RequestAccess.
void SetGrantDuration(Time grantDuration)
Set duration of grant for transmission.
~NrChAccessManager() override
~ChannelAccessManager
virtual void SetNrGnbMac(Ptr< NrGnbMac > mac)
Set MAC instance for this channel access manager.
std::function< void(const Time &time)> AccessGrantedCallback
A function that signal that the channel has been earned.
std::function< void()> AccessDeniedCallback
A function that signal that the channel is denied and the request should be retried.
Ptr< NrGnbMac > GetNrGnbMac()
Getter for MAC instance to which is connected this channel access manager.
NrChAccessManager()
ChannelAccessManager constructor.
virtual void SetNrSpectrumPhy(Ptr< NrSpectrumPhy > spectrumPhy)
Set spectrum phy instance for this channel access manager.
static TypeId GetTypeId()
Get the type ID.
Ptr< NrSpectrumPhy > GetNrSpectrumPhy()
Getter for spectrum phy instance to which is connected this channel access manager.