5G-LENA nr-v3.1-69-g2dd513a7
The 5G/NR module for the ns-3 simulator
Loading...
Searching...
No Matches
ns3::NrAlwaysOnAccessManager Class Reference

A Channel access manager that sees the channel always free for transmitting. More...

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

+ Inheritance diagram for ns3::NrAlwaysOnAccessManager:
+ Collaboration diagram for ns3::NrAlwaysOnAccessManager:

Public Member Functions

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

Static Public Member Functions

static TypeId GetTypeId ()
 Get the type ID.
 
- Static Public Member Functions inherited from ns3::NrChAccessManager
static TypeId GetTypeId ()
 Get the type ID.
 

Additional Inherited Members

- Public Types inherited from ns3::NrChAccessManager
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.
 

Detailed Description

A Channel access manager that sees the channel always free for transmitting.

This channel access manager is installed by default in NR instances.

always_on_usage

This is the CAM that is created by default. However, if you want to set it manually, you can invoke the helper function before installing the gnb:

  nrHelper->SetGnbChannelAccessManagerTypeId (NrAlwaysOnAccessManager::GetTypeId());
  ...
  nrHelper->InstallGnb ...

or the UE-side:

  nrHelper->SetUeChannelAccessManagerTypeId (NrAlwaysOnAccessManager::GetTypeId());
  ...
  nrHelper->InstallUe ...

The type of the channel access manager cannot be changed after the helper has installed the UE or the GNB node.

Introspection did not find any typical Config paths.
No Attributes are defined for this type.

Attributes defined in parent class ns3::NrChAccessManager

  • GrantDuration: Duration of grant for transmitting.
    • Set with class: ns3::TimeValue
    • Underlying type: Time +9.22337e+18ns:+9.22337e+18ns
    • Initial value: +6e+10ns
    • Flags: construct write read

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

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

Constructor & Destructor Documentation

◆ NrAlwaysOnAccessManager()

ns3::NrAlwaysOnAccessManager::NrAlwaysOnAccessManager ( )

NrAlwaysOnAccessManager constructor.

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

◆ ~NrAlwaysOnAccessManager()

ns3::NrAlwaysOnAccessManager::~NrAlwaysOnAccessManager ( )
override

destructor

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

Member Function Documentation

◆ Cancel()

void ns3::NrAlwaysOnAccessManager::Cancel ( )
overridevirtual

Cancel a previously invoked request for accessing the channel.

Implements ns3::NrChAccessManager.

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

◆ GetTypeId()

TypeId ns3::NrAlwaysOnAccessManager::GetTypeId ( )
static

Get the type ID.

Returns
the type id

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

Referenced by ns3::NrHelper::NrHelper().

+ Here is the caller graph for this function:

◆ RequestAccess()

void ns3::NrAlwaysOnAccessManager::RequestAccess ( )
overridevirtual

RequestAccess.

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

Implements ns3::NrChAccessManager.

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

◆ SetAccessDeniedCallback()

void ns3::NrAlwaysOnAccessManager::SetAccessDeniedCallback ( const AccessDeniedCallback cb)
overridevirtual

Set Access-Denied Callback.

Parameters
cbthe callback to invoke when the channel access is denied

Implements ns3::NrChAccessManager.

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

◆ SetAccessGrantedCallback()

void ns3::NrAlwaysOnAccessManager::SetAccessGrantedCallback ( const AccessGrantedCallback cb)
overridevirtual

Set Access-Granted Callback.

Parameters
cbthe callback to invoke when the channel access is granted

Implements ns3::NrChAccessManager.

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


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