5G-LENA  nr-v3.0-14-g6b2b265
The 5G/NR module for the ns-3 simulator
ns3::NrChAccessManager Class Referenceabstract

The Channel Access Manager class. More...

#include "nr-ch-access-manager.h"

+ Inheritance diagram for ns3::NrChAccessManager:
+ Collaboration diagram for ns3::NrChAccessManager:

Public Types

typedef std::function< void()> AccessDeniedCallback
 A function that signal that the channel is denied and the request should be retried.
 
typedef std::function< void(const Time &time)> AccessGrantedCallback
 A function that signal that the channel has been earned.
 

Public Member Functions

 NrChAccessManager ()
 ChannelAccessManager constructor.
 
 ~NrChAccessManager () override
 ~ChannelAccessManager
 
virtual void Cancel ()=0
 Cancel a previously invoked request for accessing the channel.
 
Time GetGrantDuration () const
 Get grant duration time. More...
 
Ptr< NrGnbMacGetNrGnbMac ()
 Getter for MAC instance to which is connected this channel access manager. More...
 
Ptr< NrSpectrumPhyGetNrSpectrumPhy ()
 Getter for spectrum phy instance to which is connected this channel access manager. More...
 
virtual void RequestAccess ()=0
 RequestAccess. More...
 
virtual void SetAccessDeniedCallback (const AccessDeniedCallback &cb)=0
 Set Access-Denied Callback. More...
 
virtual void SetAccessGrantedCallback (const AccessGrantedCallback &cb)=0
 Set Access-Granted Callback. More...
 
void SetGrantDuration (Time grantDuration)
 Set duration of grant for transmission. More...
 
virtual void SetNrGnbMac (Ptr< NrGnbMac > mac)
 Set MAC instance for this channel access manager. More...
 
virtual void SetNrSpectrumPhy (Ptr< NrSpectrumPhy > spectrumPhy)
 Set spectrum phy instance for this channel access manager. More...
 

Static Public Member Functions

static TypeId GetTypeId ()
 Get the type ID. More...
 

Detailed Description

The Channel Access Manager class.

This is the interface for any channel access manager. A channel access manager is responsible to listen to the channel, informing the PHY when it is free for transmitting.

Requesting the channel

The PHY would call the method RequestAccess(). Then, when the channel is available for transmission, the channel access manager would call the callback set with the method SetAccessGrantedCallback(). If the channel cannot be access, then the callback set with SetAccessDeniedCallback() will be called, instead. The request can be cancelled by calling Cancel().

Configuration

Any channel access manager attribute can be set through the helper methods NrHelper::SetUeChannelAccessManagerAttribute() or NrHelper::SetGnbChannelAccessManagerAttribute(). Another option is directly calling SetAttribute on the pointer. The list of attributes is reported below, in the Attributes section.

See also
NrAlwaysOnAccessManager

Introspection did not find any typical Config paths.

Attributes

  • GrantDuration: Duration of grant for transmitting.
    • Set with class: ns3::TimeValue
    • Underlying type: Time –9223372036854775808.0ns:+9223372036854775807.0ns
    • Initial value: +60000000000.0ns
    • Flags: construct write read

No TraceSources are defined for this type.
Size of this type is 56 bytes (on a 64-bit architecture).

Definition at line 48 of file nr-ch-access-manager.h.

Member Function Documentation

◆ GetGrantDuration()

Time ns3::NrChAccessManager::GetGrantDuration ( ) const

Get grant duration time.

Returns
default grant duration

Definition at line 53 of file nr-ch-access-manager.cc.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ GetNrGnbMac()

Ptr< NrGnbMac > ns3::NrChAccessManager::GetNrGnbMac ( )

Getter for MAC instance to which is connected this channel access manager.

Returns
pointer to MAC instance

Definition at line 81 of file nr-ch-access-manager.cc.

◆ GetNrSpectrumPhy()

Ptr< NrSpectrumPhy > ns3::NrChAccessManager::GetNrSpectrumPhy ( )

Getter for spectrum phy instance to which is connected this channel access manager.

Returns
pointer to spectrum phy instance

Definition at line 67 of file nr-ch-access-manager.cc.

◆ GetTypeId()

TypeId ns3::NrChAccessManager::GetTypeId ( )
static

Get the type ID.

Returns
the type id

Definition at line 21 of file nr-ch-access-manager.cc.

References GetGrantDuration(), and SetGrantDuration().

+ Here is the call graph for this function:

◆ RequestAccess()

virtual void ns3::NrChAccessManager::RequestAccess ( )
pure virtual

RequestAccess.

When the channel is granted, the callback set with SetAccessGrantedCallback() will be called.

Implemented in ns3::NrAlwaysOnAccessManager.

◆ SetAccessDeniedCallback()

virtual void ns3::NrChAccessManager::SetAccessDeniedCallback ( const AccessDeniedCallback cb)
pure virtual

Set Access-Denied Callback.

Parameters
cbthe callback to invoke when the channel access is denied

Implemented in ns3::NrAlwaysOnAccessManager.

◆ SetAccessGrantedCallback()

virtual void ns3::NrChAccessManager::SetAccessGrantedCallback ( const AccessGrantedCallback cb)
pure virtual

Set Access-Granted Callback.

Parameters
cbthe callback to invoke when the channel access is granted

Implemented in ns3::NrAlwaysOnAccessManager.

◆ SetGrantDuration()

void ns3::NrChAccessManager::SetGrantDuration ( Time  grantDuration)

Set duration of grant for transmission.

Parameters
grantDurationduration of grant

Definition at line 46 of file nr-ch-access-manager.cc.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ SetNrGnbMac()

void ns3::NrChAccessManager::SetNrGnbMac ( Ptr< NrGnbMac mac)
virtual

Set MAC instance for this channel access manager.

Parameters
macgNB mac instance

Definition at line 74 of file nr-ch-access-manager.cc.

◆ SetNrSpectrumPhy()

void ns3::NrChAccessManager::SetNrSpectrumPhy ( Ptr< NrSpectrumPhy spectrumPhy)
virtual

Set spectrum phy instance for this channel access manager.

Parameters
spectrumPhyspectrum phy instance

Definition at line 60 of file nr-ch-access-manager.cc.


The documentation for this class was generated from the following files: