5G-LENA  nr-v3.0-29-g83cc959
The 5G/NR module for the ns-3 simulator
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. More...
 
void SetAccessDeniedCallback (const AccessDeniedCallback &cb) override
 Set Access-Denied Callback. More...
 
void SetAccessGrantedCallback (const AccessGrantedCallback &cb) override
 Set Access-Granted Callback. More...
 
- Public Member Functions inherited from ns3::NrChAccessManager
 NrChAccessManager ()
 ChannelAccessManager constructor.
 
 ~NrChAccessManager () override
 ~ChannelAccessManager
 
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...
 
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...
 
- Static Public Member Functions inherited from ns3::NrChAccessManager
static TypeId GetTypeId ()
 Get the type ID. More...
 

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 –9223372036854775808.0ns:+9223372036854775807.0ns
    • Initial value: +60000000000.0ns
    • Flags: construct write read

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

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

Member Function Documentation

◆ GetTypeId()

TypeId ns3::NrAlwaysOnAccessManager::GetTypeId ( )
static

Get the type ID.

Returns
the type id

Definition at line 90 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 111 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 129 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 122 of file nr-ch-access-manager.cc.


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