28NS_LOG_COMPONENT_DEFINE(
"SatUtMacState");
39 TypeId(
"ns3::SatUtMacState")
41 .AddConstructor<SatUtMacState>()
42 .AddAttribute(
"NcrSyncTimeout",
43 "Time allowed before switching to NCR_RECOVERY state",
44 TimeValue(Seconds(1)),
47 .AddAttribute(
"NcrRecoveryTimeout",
48 "Time allowed before switching from NCR_RECOVERY to OFF_STANDBY",
49 TimeValue(Seconds(1)),
62 NS_LOG_FUNCTION(
this);
67 NS_LOG_FUNCTION(
this);
73 NS_LOG_FUNCTION(
this);
81 NS_LOG_FUNCTION(
this);
89 NS_LOG_FUNCTION(
this);
98 NS_LOG_FUNCTION(
this);
107 NS_LOG_FUNCTION(
this);
117 NS_FATAL_ERROR(
"Cannot transition to READY_FOR_LOGON state");
124 NS_LOG_FUNCTION(
this);
133 NS_FATAL_ERROR(
"Cannot transition to READY_FOR_TDMA_SYNC state");
140 NS_LOG_FUNCTION(
this);
151 NS_FATAL_ERROR(
"Cannot transition to TDMA_SYNC state");
158 NS_LOG_FUNCTION(
this);
167 NS_FATAL_ERROR(
"Cannot transition to NCR_RECOVERY state");
174 NS_LOG_FUNCTION(
this);
187 NS_LOG_FUNCTION(
this);
195 NS_LOG_FUNCTION(
this);
218 NS_LOG_FUNCTION(
this);
Class handling UT Mac states and transitions.
void SwitchToReadyForTdmaSync()
Change state to READY_FOR_TDMA_SYNC.
void SwitchToNcrRecovery()
Change state to NCR_RECOVERY.
void SetLogOffCallback(LogOffCallback cb)
Set logOff callback.
LogOffCallback m_logOffCallback
void SwitchToOffStandby()
Change state to OFF_STANDBY.
void NcrControlMessageReceived()
Inform the state diagram that a NCR message has been received.
void SwitchToReadyForLogon()
Change state to READY_FOR_LOGON.
Time m_lastNcrDateReceived
RcstState_t GetState() const
Get the current state.
~SatUtMacState()
Destroy a SatUtMacState.
void SwitchToTdmaSync()
Change state to TDMA_SYNC.
SatUtMacState()
Default constructor, which is not used.
Time m_checkNcrRecoveryScheduled
void SwitchToHoldStandby()
Change state to HOLD_STANDBY.
Callback< void > LogOffCallback
LogOff callback.
void CheckNcrTimeout()
Check if NCR has been received before sending a timeout.
void CheckNcrRecoveryTimeout()
Check if timeout reached in NCR_RECOVERY state.
Time m_ncrRecoveryTimeout
bool IsNcrTimeout() const
Check if NCR m_ncrSyncTimeout has been reached.
static TypeId GetTypeId(void)
Derived from Object.
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.