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. | |
| typedef Callback< void, Ptr< SatTbtpMessage > > | SendTbtpCallback |
| typedef Callback< void, Address, Address, Address > | UpdateRoutingCallback |
| Update routes and ARP tables on gateways after a terminal handover. | |
Public Member Functions | |
| SatNcc () | |
| Construct a SatNcc. | |
| ~SatNcc () | |
| Destroy a SatNcc. | |
| void | AddBeam (uint32_t satId, uint32_t beamId, Ptr< SatNetDevice > gwNetDevice, Ptr< SatOrbiterNetDevice > orbiterNetDevice, SatNcc::SendCallback cb, SatNcc::SendTbtpCallback tbtpCb, Ptr< SatSuperframeSeq > seq, uint32_t maxFrameSizeInBytes, Address satAddress, Address gwAddress) |
| Function for adding the beam. | |
| 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. | |
| 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. | |
| Ptr< SatBeamScheduler > | GetBeamScheduler (uint32_t satId, uint32_t beamId) const |
| void | MoveUtBetweenBeams (Address utId, uint32_t srcSatId, uint32_t srcBeamId, uint32_t destSatId, uint32_t destBeamId) |
| Check if a terminal can be moved between two beams. | |
| void | ReceiveControlBurst (Address utId, uint32_t satId, uint32_t beamId) |
| Function to call when a control burst has been received. | |
| void | RemoveUt (Address utId, uint32_t satId, uint32_t beamId) |
| Remove a UT. | |
| 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. | |
| void | SetRandomAccessHighLoadBackoffProbability (uint8_t allocationChannelId, uint16_t highLoadBackOffProbability) |
| Function for setting the random access allocation channel specific high load backoff probabilities. | |
| void | SetRandomAccessHighLoadBackoffTime (uint8_t allocationChannelId, uint16_t highLoadBackOffTime) |
| Function for setting the random access allocation channel specific high load backoff time. | |
| void | SetRandomAccessLowLoadBackoffProbability (uint8_t allocationChannelId, uint16_t lowLoadBackOffProbability) |
| Function for setting the random access allocation channel specific high load backoff probabilities. | |
| void | SetRandomAccessLowLoadBackoffTime (uint8_t allocationChannelId, uint16_t lowLoadBackOffTime) |
| Function for setting the random access allocation channel specific high load backoff time. | |
| void | SetUpdateRoutingCallback (SatNcc::UpdateRoutingCallback cb) |
| Set the callback used to update routes and APR tables after a terminal handover. | |
| void | SetUseLogon (bool useLogon) |
| Set if logon is used in this simulation. | |
| void | SetUseLora (bool useLora) |
| Set if SNS-3 is used with Lora standard. | |
| void | UtCnoUpdated (uint32_t satId, uint32_t beamId, Address sourceMac, Address gwId, double cno, bool isSatelliteMac) |
| Update UT specific C/N0 information. | |
| void | UtCrReceived (uint32_t satId, uint32_t beamId, Address utId, Ptr< SatCrMessage > crMsg) |
| Capacity request receiver. | |
Static Public Member Functions | |
| static TypeId | GetTypeId (void) |
| Get the type ID. | |
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. | |
| 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. | |
| void | DoDispose (void) |
| void | DoMoveUtBetweenBeams (Address utId, uint32_t srcSatId, uint32_t srcBeamId, uint32_t destSatId, uint32_t destBeamId) |
| Perform terminal handover on the terestrial network. | |
| 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). | |
| std::map< uint8_t, uint16_t > | m_highLoadBackOffProbability |
| Map for random access allocation channel specific high load backoff probabilities. | |
| std::map< uint8_t, uint16_t > | m_highLoadBackOffTime |
| Map for random access allocation channel specific high load backoff time. | |
| 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). | |
| std::map< std::tuple< Address, uint32_t, uint32_t >, Time > | m_lastControlBurstReception |
| List of reception time for all UTs. | |
| std::map< uint8_t, uint16_t > | m_lowLoadBackOffProbability |
| Map for random access allocation channel specific low load backoff probabilities. | |
| std::map< uint8_t, uint16_t > | m_lowLoadBackOffTime |
| Map for random access allocation channel specific low load backoff time. | |
| TracedCallback< Ptr< const Packet > > | m_nccRxTrace |
| The trace source fired for Capacity Requests (CRs) received by the NCC. | |
| TracedCallback< Ptr< const Packet > > | m_nccTxTrace |
| The trace source fired for TBTPs sent by the NCC. | |
| std::map< uint8_t, double > | m_randomAccessAverageNormalizedOfferedLoadThreshold |
| Map for random access allocation channel specific load thresholds. | |
| UpdateRoutingCallback | m_updateRoutingCallback |
| Callback to update routing tables and ARP tables on gateways once a handover request has been accepted and treated. | |
| bool | m_useLogon |
| Flag indicating if logon procedure is used. | |
| bool | m_useLora |
| Flag indicating if lora standard is used. | |
| Time | m_utHandoverDelay |
| Delay between handover acceptance and effective information transfer. | |
| Time | m_utTimeout |
| Timeout to logoff a UT, if logon procedure is used. | |
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 56 of file satellite-ncc.h.
Define type SendCallback.
Definition at line 131 of file satellite-ncc.h.
| typedef Callback<void, Ptr<SatTbtpMessage> > ns3::SatNcc::SendTbtpCallback |
| msg | the TBTP sent |
Definition at line 136 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 255 of file satellite-ncc.h.
| ns3::SatNcc::SatNcc | ( | ) |
Construct a SatNcc.
This is the constructor for the SatNcc
Definition at line 75 of file satellite-ncc.cc.
References m_useLogon, m_useLora, m_utHandoverDelay, and m_utTimeout.
Referenced by SatNcc(), and operator=().
| ns3::SatNcc::~SatNcc | ( | ) |
Destroy a SatNcc.
This is the destructor for the SatNcc.
Definition at line 84 of file satellite-ncc.cc.
|
private |
| void ns3::SatNcc::AddBeam | ( | uint32_t | satId, |
| uint32_t | beamId, | ||
| Ptr< SatNetDevice > | gwNetDevice, | ||
| Ptr< SatOrbiterNetDevice > | orbiterNetDevice, | ||
| SatNcc::SendCallback | cb, | ||
| SatNcc::SendTbtpCallback | tbtpCb, | ||
| Ptr< SatSuperframeSeq > | seq, | ||
| uint32_t | maxFrameSizeInBytes, | ||
| Address | satAddress, | ||
| 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 |
| gwNetDevice | GW NetDevice linked to this beam |
| orbiterNetDevice | OrbiterNetDevice on satellite linked to this beam |
| 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 |
| satAddress | Mac address of the satellite responsible for this beam |
| gwAddress | Mac address of the gateway responsible for this beam |
Definition at line 313 of file satellite-ncc.cc.
References m_beamSchedulers, and m_useLora.
| 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 355 of file satellite-ncc.cc.
References AddUt(), and m_beamSchedulers.
Referenced by AddUt().
|
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 597 of file satellite-ncc.cc.
References CheckTimeout(), m_lastControlBurstReception, m_utTimeout, and RemoveUt().
Referenced by CheckTimeout(), and 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 273 of file satellite-ncc.cc.
References m_beamSchedulers.
Referenced by DoRandomAccessDynamicLoadControl().
|
private |
Definition at line 90 of file satellite-ncc.cc.
References m_isLowRandomAccessLoad, and m_updateRoutingCallback.
|
private |
Perform terminal handover on the terestrial network.
| utId | the UT wanting to move between beams |
| srcSatId | the sat ID this UT is moving from |
| srcBeamId | the beam ID this UT is moving from |
| destSatId | the sat ID this UT is moving to |
| destBeamId | the beam ID this UT is moving to |
Definition at line 462 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 121 of file satellite-ncc.cc.
References CreateRandomAccessLoadControlMessage(), m_highLoadBackOffProbability, m_highLoadBackOffTime, m_isLowRandomAccessLoad, m_lowLoadBackOffProbability, m_lowLoadBackOffTime, and m_randomAccessAverageNormalizedOfferedLoadThreshold.
Referenced by ns3::SatGwHelperDvb::Install(), and ns3::SatGwHelperLora::Install().
| 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 444 of file satellite-ncc.cc.
References m_beamSchedulers.
Referenced by DoMoveUtBetweenBeams(), ns3::SatGwHelperDvb::Install(), ns3::SatUtHelperDvb::Install(), ns3::SatUtHelperLora::Install(), and MoveUtBetweenBeams().
|
static |
Get the type ID.
Definition at line 45 of file satellite-ncc.cc.
References m_nccRxTrace, m_nccTxTrace, m_utHandoverDelay, and m_utTimeout.
| void ns3::SatNcc::MoveUtBetweenBeams | ( | Address | utId, |
| uint32_t | srcSatId, | ||
| uint32_t | srcBeamId, | ||
| uint32_t | destSatId, | ||
| 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 |
| srcSatId | the sat ID this UT is moving from |
| srcBeamId | the beam ID this UT is moving from |
| destSatId | the sat ID this UT is moving to |
| destBeamId | the beam ID this UT is moving to |
Definition at line 488 of file satellite-ncc.cc.
References DoMoveUtBetweenBeams(), GetBeamScheduler(), and m_utHandoverDelay.
Referenced by ns3::SatGwHelperDvb::Install().
| 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 561 of file satellite-ncc.cc.
References CheckTimeout(), m_lastControlBurstReception, m_useLogon, and m_utTimeout.
Referenced by ns3::SatGwHelperDvb::Install().
| 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 379 of file satellite-ncc.cc.
References m_beamSchedulers.
Referenced by CheckTimeout(), and ns3::SatGwHelperDvb::Install().
| void ns3::SatNcc::ReserveLogonChannel | ( | uint32_t | logonChannelId | ) |
Definition at line 550 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 433 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 401 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 422 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 390 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 412 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 542 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 575 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 583 of file satellite-ncc.cc.
References m_beamSchedulers, and 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 101 of file satellite-ncc.cc.
References m_beamSchedulers.
Referenced by ns3::SatGwHelperDvb::Install(), and ns3::SatGwHelperLora::Install().
| 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 305 of file satellite-ncc.cc.
References m_beamSchedulers.
Referenced by ns3::SatGwHelperDvb::Install().
|
private |
The map containing beams in use (set).
Definition at line 331 of file satellite-ncc.h.
Referenced by AddBeam(), AddUt(), CreateRandomAccessLoadControlMessage(), GetBeamScheduler(), RemoveUt(), ReserveLogonChannel(), SetUseLora(), UtCnoUpdated(), and UtCrReceived().
|
private |
Map for random access allocation channel specific high load backoff probabilities.
Definition at line 366 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 376 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 351 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 402 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 361 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 371 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 338 of file satellite-ncc.h.
Referenced by GetTypeId().
|
private |
The trace source fired for TBTPs sent by the NCC.
Definition at line 345 of file satellite-ncc.h.
Referenced by GetTypeId().
|
private |
Map for random access allocation channel specific load thresholds.
Definition at line 356 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 408 of file satellite-ncc.h.
Referenced by DoDispose(), DoMoveUtBetweenBeams(), and SetUpdateRoutingCallback().
|
private |
Flag indicating if logon procedure is used.
Definition at line 391 of file satellite-ncc.h.
Referenced by SatNcc(), ReceiveControlBurst(), and SetUseLogon().
|
private |
Flag indicating if lora standard is used.
Definition at line 396 of file satellite-ncc.h.
Referenced by SatNcc(), AddBeam(), and SetUseLora().
|
private |
Delay between handover acceptance and effective information transfer.
Definition at line 381 of file satellite-ncc.h.
Referenced by SatNcc(), GetTypeId(), and MoveUtBetweenBeams().
|
private |
Timeout to logoff a UT, if logon procedure is used.
Definition at line 386 of file satellite-ncc.h.
Referenced by SatNcc(), CheckTimeout(), GetTypeId(), and ReceiveControlBurst().