class for module NCC used as shared module among Gateways (GWs). More...
#include "satellite-ncc.h"
Public Types | |
typedef SatBeamScheduler::SendCtrlMsgCallback | SendCallback |
Define type SendCallback. More... | |
typedef Callback< void, Ptr< SatTbtpMessage > > | SendTbtpCallback |
typedef Callback< void, Address, Address, Address > | UpdateRoutingCallback |
Update routes and ARP tables on gateways after a terminal handover. More... | |
Public Member Functions | |
SatNcc () | |
Construct a SatNcc. More... | |
~SatNcc () | |
Destroy a SatNcc. More... | |
void | AddBeam (uint32_t satId, uint32_t beamId, SatNcc::SendCallback cb, SatNcc::SendTbtpCallback tbtpCb, Ptr< SatSuperframeSeq > seq, uint32_t maxFrameSizeInBytes, Address gwAddress) |
Function for adding the beam. More... | |
void | AddUt (Ptr< SatLowerLayerServiceConf > llsConf, Address utId, uint32_t satId, uint32_t beamId, Callback< void, uint32_t > setRaChannelCallback, bool verifyExisting=false) |
Function for adding the UT. More... | |
void | DoRandomAccessDynamicLoadControl (uint32_t satId, uint32_t beamId, uint32_t carrierId, uint8_t allocationChannelId, double averageNormalizedOfferedLoad) |
Function for adjusting the random access allocation channel specific load. More... | |
Ptr< SatBeamScheduler > | GetBeamScheduler (uint32_t satId, uint32_t beamId) const |
virtual TypeId | GetInstanceTypeId (void) const |
Get the type ID of instance. More... | |
void | MoveUtBetweenBeams (Address utId, uint32_t satId, uint32_t srcBeamId, uint32_t destBeamId) |
Check if a terminal can be moved between two beams. More... | |
void | ReceiveControlBurst (Address utId, uint32_t satId, uint32_t beamId) |
Function to call when a control burst has been received. More... | |
void | RemoveUt (Address utId, uint32_t satId, uint32_t beamId) |
Remove a UT. More... | |
void | ReserveLogonChannel (uint32_t logonChannelId) |
void | SetRandomAccessAverageNormalizedOfferedLoadThreshold (uint8_t allocationChannelId, double threshold) |
Function for setting the random access allocation channel specific high load backoff probabilities. More... | |
void | SetRandomAccessHighLoadBackoffProbability (uint8_t allocationChannelId, uint16_t highLoadBackOffProbability) |
Function for setting the random access allocation channel specific high load backoff probabilities. More... | |
void | SetRandomAccessHighLoadBackoffTime (uint8_t allocationChannelId, uint16_t highLoadBackOffTime) |
Function for setting the random access allocation channel specific high load backoff time. More... | |
void | SetRandomAccessLowLoadBackoffProbability (uint8_t allocationChannelId, uint16_t lowLoadBackOffProbability) |
Function for setting the random access allocation channel specific high load backoff probabilities. More... | |
void | SetRandomAccessLowLoadBackoffTime (uint8_t allocationChannelId, uint16_t lowLoadBackOffTime) |
Function for setting the random access allocation channel specific high load backoff time. More... | |
void | SetUpdateRoutingCallback (SatNcc::UpdateRoutingCallback cb) |
Set the callback used to update routes and APR tables after a terminal handover. More... | |
void | SetUseLogon (bool useLogon) |
Set if logon is used in this simulation. More... | |
void | SetUseLora (bool useLora) |
Set if SNS-3 is used with Lora standard. More... | |
void | UtCnoUpdated (uint32_t satId, uint32_t beamId, Address sourceMac, Address gwId, double cno, bool isSatelliteMac) |
Update UT specific C/N0 information. More... | |
void | UtCrReceived (uint32_t satId, uint32_t beamId, Address utId, Ptr< SatCrMessage > crMsg) |
Capacity request receiver. More... | |
Static Public Member Functions | |
static TypeId | GetTypeId (void) |
Get the type ID. More... | |
Private Member Functions | |
SatNcc (const SatNcc &) | |
void | CheckTimeout (Address utId, uint32_t satId, uint32_t beamId) |
Check if a UT has not been receiving control bursts, and then need to logoff. More... | |
void | CreateRandomAccessLoadControlMessage (uint16_t backoffProbability, uint16_t backoffTime, uint32_t satId, uint32_t beamId, uint8_t allocationChannelId) |
Function for creating the random access control message. More... | |
void | DoDispose (void) |
void | DoMoveUtBetweenBeams (Address utId, uint32_t satId, uint32_t srcBeamId, uint32_t destBeamId) |
Perform terminal handover on the terestrial network. More... | |
SatNcc & | operator= (const SatNcc &) |
Private Attributes | |
std::map< std::pair< uint32_t, uint32_t >, Ptr< SatBeamScheduler > > | m_beamSchedulers |
The map containing beams in use (set). More... | |
std::map< uint8_t, uint16_t > | m_highLoadBackOffProbability |
Map for random access allocation channel specific high load backoff probabilities. More... | |
std::map< uint8_t, uint16_t > | m_highLoadBackOffTime |
Map for random access allocation channel specific high load backoff time. More... | |
std::map< std::tuple< uint32_t, uint32_t, uint8_t >, bool > | m_isLowRandomAccessLoad |
Map for keeping track of the load status of each random access allocation channel Tuple is (satId, beamId, allocationChannelId) More... | |
std::map< std::tuple< Address, uint32_t, uint32_t >, Time > | m_lastControlBurstReception |
List of reception time for all UTs. More... | |
std::map< uint8_t, uint16_t > | m_lowLoadBackOffProbability |
Map for random access allocation channel specific low load backoff probabilities. More... | |
std::map< uint8_t, uint16_t > | m_lowLoadBackOffTime |
Map for random access allocation channel specific low load backoff time. More... | |
TracedCallback< Ptr< const Packet > > | m_nccRxTrace |
The trace source fired for Capacity Requests (CRs) received by the NCC. More... | |
TracedCallback< Ptr< const Packet > > | m_nccTxTrace |
The trace source fired for TBTPs sent by the NCC. More... | |
std::map< uint8_t, double > | m_randomAccessAverageNormalizedOfferedLoadThreshold |
Map for random access allocation channel specific load thresholds. More... | |
UpdateRoutingCallback | m_updateRoutingCallback |
Callback to update routing tables and ARP tables on gateways once a handover request has been accepted and treated. More... | |
bool | m_useLogon |
Flag indicating if logon procedure is used. More... | |
bool | m_useLora |
Flag indicating if lora standard is used. More... | |
Time | m_utHandoverDelay |
Delay between handover acceptance and effective information transfer. More... | |
Time | m_utTimeout |
Timeout to logoff a UT, if logon procedure is used. More... | |
class for module NCC used as shared module among Gateways (GWs).
This SatNcc class implements NCC functionality in Satellite network. It is shared module among GWs. Communication between NCC and GW is handled by callback functions.
Definition at line 52 of file satellite-ncc.h.
Define type SendCallback.
Definition at line 133 of file satellite-ncc.h.
typedef Callback<void, Ptr<SatTbtpMessage> > ns3::SatNcc::SendTbtpCallback |
msg | the TBTP sent |
Definition at line 138 of file satellite-ncc.h.
typedef Callback<void, Address, Address, Address> ns3::SatNcc::UpdateRoutingCallback |
Update routes and ARP tables on gateways after a terminal handover.
Address | address of the UT whose handover is completed |
Address | address of the GW handling this UT before handover |
Address | address of the GW handling this UT after handover |
Definition at line 246 of file satellite-ncc.h.
ns3::SatNcc::SatNcc | ( | ) |
Construct a SatNcc.
This is the constructor for the SatNcc
Definition at line 79 of file satellite-ncc.cc.
ns3::SatNcc::~SatNcc | ( | ) |
Destroy a SatNcc.
This is the destructor for the SatNcc.
Definition at line 88 of file satellite-ncc.cc.
|
private |
void ns3::SatNcc::AddBeam | ( | uint32_t | satId, |
uint32_t | beamId, | ||
SatNcc::SendCallback | cb, | ||
SatNcc::SendTbtpCallback | tbtpCb, | ||
Ptr< SatSuperframeSeq > | seq, | ||
uint32_t | maxFrameSizeInBytes, | ||
Address | gwAddress | ||
) |
Function for adding the beam.
satId | ID of the satellite which for callback is set |
beamId | ID of the beam which for callback is set |
cb | callback to invoke whenever a TBTP is ready for sending and must be forwarded to the Beam UTs. |
tbtpCb | callback to invoke whenever a TBTP has been sent |
seq | Super frame sequence |
maxFrameSizeInBytes | Maximum non fragmented BB frame size with most robust ModCod |
gwAddress | Mac address of the gateway responsible for this beam |
Definition at line 317 of file satellite-ncc.cc.
References m_beamSchedulers.
void ns3::SatNcc::AddUt | ( | Ptr< SatLowerLayerServiceConf > | llsConf, |
Address | utId, | ||
uint32_t | satId, | ||
uint32_t | beamId, | ||
Callback< void, uint32_t > | setRaChannelCallback, | ||
bool | verifyExisting = false |
||
) |
Function for adding the UT.
utId | ID (mac address) of the UT to be added |
llsConf | Lower layer service configuration for the UT to be added. |
satId | ID of the satellite where UT is connected. |
beamId | ID of the beam where UT is connected. |
setRaChannelCallback | callback to invoke whenever the UT to be added should change its RA allocation channel |
Definition at line 345 of file satellite-ncc.cc.
References m_beamSchedulers.
|
private |
Check if a UT has not been receiving control bursts, and then need to logoff.
utId | The UT to check |
satId | The satellite ID |
beamId | The beam ID |
Definition at line 567 of file satellite-ncc.cc.
References m_lastControlBurstReception, m_utTimeout, and RemoveUt().
Referenced by ReceiveControlBurst().
|
private |
Function for creating the random access control message.
backoffProbability | Backoff probability |
backoffProbability | Backoff Time |
satId | Satellite ID |
satId | Satellite ID |
beamId | Beam ID |
allocationChannelId | Allocation channel ID |
set the random access allocation channel this message affects
attach the new load control parameters to the message
Definition at line 277 of file satellite-ncc.cc.
References m_beamSchedulers.
Referenced by DoRandomAccessDynamicLoadControl().
|
private |
Definition at line 94 of file satellite-ncc.cc.
References m_isLowRandomAccessLoad, and m_updateRoutingCallback.
|
private |
Perform terminal handover on the terestrial network.
utId | the UT moving between beams |
satId | the sat ID. Does not change here |
srcBeamId | the beam ID this UT is moving from |
destBeamId | the beam ID this UT is moving to |
Definition at line 452 of file satellite-ncc.cc.
References GetBeamScheduler(), and m_updateRoutingCallback.
Referenced by MoveUtBetweenBeams().
void ns3::SatNcc::DoRandomAccessDynamicLoadControl | ( | uint32_t | satId, |
uint32_t | beamId, | ||
uint32_t | carrierId, | ||
uint8_t | allocationChannelId, | ||
double | averageNormalizedOfferedLoad | ||
) |
Function for adjusting the random access allocation channel specific load.
satId | Satellite ID |
beamId | Beam ID |
carrierId | Carrier ID |
allocationChannelId | Allocation channel ID |
averageNormalizedOfferedLoad | Measured average normalized offered load |
search for the current status of load control
low RA load in effect
check the load against the parameterized value
use high load back off value
flag RA load as high load
high RA load in effect
check the load against the parameterized value
use low load back off value
flag RA load as low load
Definition at line 125 of file satellite-ncc.cc.
References CreateRandomAccessLoadControlMessage(), m_highLoadBackOffProbability, m_highLoadBackOffTime, m_isLowRandomAccessLoad, m_lowLoadBackOffProbability, m_lowLoadBackOffTime, and m_randomAccessAverageNormalizedOfferedLoadThreshold.
Referenced by ns3::SatGwHelper::InstallDvb(), and ns3::SatGwHelper::InstallLora().
Ptr< SatBeamScheduler > ns3::SatNcc::GetBeamScheduler | ( | uint32_t | satId, |
uint32_t | beamId | ||
) | const |
satId | the ID of the satellite. |
beamId | the ID of the beam. |
Definition at line 434 of file satellite-ncc.cc.
References m_beamSchedulers.
Referenced by DoMoveUtBetweenBeams(), ns3::SatUtHelper::InstallDvb(), and MoveUtBetweenBeams().
|
virtual |
Get the type ID of instance.
Definition at line 72 of file satellite-ncc.cc.
References GetTypeId().
|
static |
Get the type ID.
Definition at line 41 of file satellite-ncc.cc.
References m_nccRxTrace, m_nccTxTrace, m_utHandoverDelay, and m_utTimeout.
Referenced by GetInstanceTypeId().
void ns3::SatNcc::MoveUtBetweenBeams | ( | Address | utId, |
uint32_t | satId, | ||
uint32_t | srcBeamId, | ||
uint32_t | destBeamId | ||
) |
Check if a terminal can be moved between two beams.
If yes, schedule the actual move at a later point in time.
utId | the UT wanting to move between beams |
satId | the satellite ID. Does not change here |
srcBeamId | the beam ID this UT is moving from |
destBeamId | the beam ID this UT is moving to |
Definition at line 469 of file satellite-ncc.cc.
References DoMoveUtBetweenBeams(), GetBeamScheduler(), and m_utHandoverDelay.
Referenced by ns3::SatGwHelper::InstallDvb().
void ns3::SatNcc::ReceiveControlBurst | ( | Address | utId, |
uint32_t | satId, | ||
uint32_t | beamId | ||
) |
Function to call when a control burst has been received.
utId | The address of the sending UT |
satId | The satellite ID |
beamId | The beam ID |
Definition at line 537 of file satellite-ncc.cc.
References CheckTimeout(), m_lastControlBurstReception, m_useLogon, and m_utTimeout.
Referenced by ns3::SatGwHelper::InstallDvb().
void ns3::SatNcc::RemoveUt | ( | Address | utId, |
uint32_t | satId, | ||
uint32_t | beamId | ||
) |
Remove a UT.
utId | ID (mac address) of the UT to be removed |
satId | ID of the satellite where UT is connected |
beamId | ID of the beam where UT is connected |
Definition at line 369 of file satellite-ncc.cc.
References m_beamSchedulers.
Referenced by CheckTimeout(), and ns3::SatGwHelper::InstallDvb().
void ns3::SatNcc::ReserveLogonChannel | ( | uint32_t | logonChannelId | ) |
Definition at line 526 of file satellite-ncc.cc.
References m_beamSchedulers.
void ns3::SatNcc::SetRandomAccessAverageNormalizedOfferedLoadThreshold | ( | uint8_t | allocationChannelId, |
double | threshold | ||
) |
Function for setting the random access allocation channel specific high load backoff probabilities.
allocationChannelId | Allocation channel ID |
threshold | Average normalized offered load threshold |
Definition at line 423 of file satellite-ncc.cc.
References m_randomAccessAverageNormalizedOfferedLoadThreshold.
void ns3::SatNcc::SetRandomAccessHighLoadBackoffProbability | ( | uint8_t | allocationChannelId, |
uint16_t | highLoadBackOffProbability | ||
) |
Function for setting the random access allocation channel specific high load backoff probabilities.
allocationChannelId | Allocation channel ID |
highLoadBackOffProbability | High load backoff probability |
Definition at line 391 of file satellite-ncc.cc.
References m_highLoadBackOffProbability.
void ns3::SatNcc::SetRandomAccessHighLoadBackoffTime | ( | uint8_t | allocationChannelId, |
uint16_t | highLoadBackOffTime | ||
) |
Function for setting the random access allocation channel specific high load backoff time.
allocationChannelId | Allocation channel ID |
highLoadBackOffTime | High load backoff time |
Definition at line 412 of file satellite-ncc.cc.
References m_highLoadBackOffTime.
void ns3::SatNcc::SetRandomAccessLowLoadBackoffProbability | ( | uint8_t | allocationChannelId, |
uint16_t | lowLoadBackOffProbability | ||
) |
Function for setting the random access allocation channel specific high load backoff probabilities.
allocationChannelId | Allocation channel ID |
lowLoadBackOffProbability | Low load backoff probability |
Definition at line 380 of file satellite-ncc.cc.
References m_lowLoadBackOffProbability.
void ns3::SatNcc::SetRandomAccessLowLoadBackoffTime | ( | uint8_t | allocationChannelId, |
uint16_t | lowLoadBackOffTime | ||
) |
Function for setting the random access allocation channel specific high load backoff time.
allocationChannelId | Allocation channel ID |
lowLoadBackOffTime | Low load backoff time |
Definition at line 402 of file satellite-ncc.cc.
References m_lowLoadBackOffTime.
void ns3::SatNcc::SetUpdateRoutingCallback | ( | SatNcc::UpdateRoutingCallback | cb | ) |
Set the callback used to update routes and APR tables after a terminal handover.
cb | the routing update callback |
Definition at line 518 of file satellite-ncc.cc.
References m_updateRoutingCallback.
void ns3::SatNcc::SetUseLogon | ( | bool | useLogon | ) |
Set if logon is used in this simulation.
Logoff is disbled if logon is not used.
useLogon | boolean indicating if logon is used. |
Definition at line 551 of file satellite-ncc.cc.
References m_useLogon.
void ns3::SatNcc::SetUseLora | ( | bool | useLora | ) |
Set if SNS-3 is used with Lora standard.
TBTPs are not sent in this mode.
useLora | boolean indicating if lora is used. |
Definition at line 559 of file satellite-ncc.cc.
References m_useLora.
void ns3::SatNcc::UtCnoUpdated | ( | uint32_t | satId, |
uint32_t | beamId, | ||
Address | sourceMac, | ||
Address | gwId, | ||
double | cno, | ||
bool | isSatelliteMac | ||
) |
Update UT specific C/N0 information.
The SatNcc receives C/N0 information of packet receptions from UTs to take into account when making schedule decisions.
satId | The id of the satellite where C/N0 is from. |
beamId | The id of the beam where C/N0 is from. |
sourceMac | The MAC of the UT or SAT. (sender address) |
gwId | The id (address) of the GW. (receiver address) |
cno | Value of the C/N0. |
isSatelliteMac | If true, cno corresponds to link SAT to GW; if false, cno corresponds to link UT to GW |
Definition at line 105 of file satellite-ncc.cc.
References m_beamSchedulers.
Referenced by ns3::SatGwHelper::InstallDvb(), and ns3::SatGwHelper::InstallLora().
void ns3::SatNcc::UtCrReceived | ( | uint32_t | satId, |
uint32_t | beamId, | ||
Address | utId, | ||
Ptr< SatCrMessage > | crMsg | ||
) |
Capacity request receiver.
The SatNcc receives Capacity Rrequest (CR) messages from UTs to take into account when making schedule decisions.
satId | The id of the satellite where C/N0 is from. |
beamId | The id of the beam where C/N0 is from. |
utId | The id of the UT. (sender address) |
crMsg | Pointer to received Capacity Request |
Definition at line 309 of file satellite-ncc.cc.
References m_beamSchedulers.
Referenced by ns3::SatGwHelper::InstallDvb().
|
private |
The map containing beams in use (set).
Definition at line 320 of file satellite-ncc.h.
Referenced by AddBeam(), AddUt(), CreateRandomAccessLoadControlMessage(), GetBeamScheduler(), RemoveUt(), ReserveLogonChannel(), UtCnoUpdated(), and UtCrReceived().
|
private |
Map for random access allocation channel specific high load backoff probabilities.
Definition at line 355 of file satellite-ncc.h.
Referenced by DoRandomAccessDynamicLoadControl(), and SetRandomAccessHighLoadBackoffProbability().
|
private |
Map for random access allocation channel specific high load backoff time.
Definition at line 365 of file satellite-ncc.h.
Referenced by DoRandomAccessDynamicLoadControl(), and SetRandomAccessHighLoadBackoffTime().
|
private |
Map for keeping track of the load status of each random access allocation channel Tuple is (satId, beamId, allocationChannelId)
Definition at line 340 of file satellite-ncc.h.
Referenced by DoDispose(), and DoRandomAccessDynamicLoadControl().
|
private |
List of reception time for all UTs.
Used to trigger timeouts and logoff UTs. Tuple is (UT address, satId, beamId)
Definition at line 391 of file satellite-ncc.h.
Referenced by CheckTimeout(), and ReceiveControlBurst().
|
private |
Map for random access allocation channel specific low load backoff probabilities.
Definition at line 350 of file satellite-ncc.h.
Referenced by DoRandomAccessDynamicLoadControl(), and SetRandomAccessLowLoadBackoffProbability().
|
private |
Map for random access allocation channel specific low load backoff time.
Definition at line 360 of file satellite-ncc.h.
Referenced by DoRandomAccessDynamicLoadControl(), and SetRandomAccessLowLoadBackoffTime().
|
private |
The trace source fired for Capacity Requests (CRs) received by the NCC.
Definition at line 327 of file satellite-ncc.h.
Referenced by GetTypeId().
|
private |
The trace source fired for TBTPs sent by the NCC.
Definition at line 334 of file satellite-ncc.h.
Referenced by GetTypeId().
|
private |
Map for random access allocation channel specific load thresholds.
Definition at line 345 of file satellite-ncc.h.
Referenced by DoRandomAccessDynamicLoadControl(), and SetRandomAccessAverageNormalizedOfferedLoadThreshold().
|
private |
Callback to update routing tables and ARP tables on gateways once a handover request has been accepted and treated.
Definition at line 397 of file satellite-ncc.h.
Referenced by DoDispose(), DoMoveUtBetweenBeams(), and SetUpdateRoutingCallback().
|
private |
Flag indicating if logon procedure is used.
Definition at line 380 of file satellite-ncc.h.
Referenced by ReceiveControlBurst(), and SetUseLogon().
|
private |
Flag indicating if lora standard is used.
Definition at line 385 of file satellite-ncc.h.
Referenced by SetUseLora().
|
private |
Delay between handover acceptance and effective information transfer.
Definition at line 370 of file satellite-ncc.h.
Referenced by GetTypeId(), and MoveUtBetweenBeams().
|
private |
Timeout to logoff a UT, if logon procedure is used.
Definition at line 375 of file satellite-ncc.h.
Referenced by CheckTimeout(), GetTypeId(), and ReceiveControlBurst().