20 #ifndef SATELLITE_MARKOV_CONTAINER_H
21 #define SATELLITE_MARKOV_CONTAINER_H
30 #include <ns3/traced-callback.h>
31 #include <ns3/vector.h>
237 TracedCallback<double,
Base class for fading models such as Markov-based fading or fading trace.
Callback< double > VelocityCallback
Gets velocity in m/s.
Callback< double > ElevationCallback
Gets elevation angle in degrees.
ChannelType_t
Types of channel.
MarkovFaderType_t
Possible types of Markov state faders.
Container for Markov-model.
double DoGetFading(Address macAddress, SatEnums::ChannelType_t channeltype)
Function for getting the fading.
void UpdateProbabilities(uint32_t set)
Function for updating the state change probabilities.
Time m_latestCalculationTime_up
Latest calculation time for uplink fading value.
bool m_useDecibels
Defines whether the calculations should return the fading value in decibels or not.
double m_minimumPositionChangeInMeters
Minimum state change distance in meters.
void UnlockSetAndState()
Function for unlocking the parameter set and state.
SatMarkovContainer()
Constructor.
void EvaluateStateChange(SatEnums::ChannelType_t channelType)
Function for evaluating state change.
void DoDispose()
Do needed dispose actions.
uint32_t m_currentState
Current state.
double m_latestCalculatedFadingValue_down
Latest calculated downlink fading value.
Time m_latestCalculationTime_down
Latest calculation time for downlink fading value.
uint32_t m_numOfSets
Number of parameter sets available.
double GetCachedFadingValue(SatEnums::ChannelType_t channelType)
Function for getting the cached fading values.
double m_latestCalculatedFadingValue_up
Latest calculated uplink fading value.
void LockToSet(uint32_t newSet)
Function for locking the parameter set.
void RandomizeLockedSetAndState()
Function for locking the parameter set and state to random values.
Ptr< SatMarkovConf > m_markovConf
Markoc model configuration.
void(* FadingTraceCallback)(double time, SatEnums::ChannelType_t channelType, double value)
Callback for FadingTrace trace source.
TracedCallback< double, SatEnums::ChannelType_t, double > m_fadingTrace
Fading trace function.
bool m_enableSetLock
Variable for disabling the parameter set change.
uint32_t m_numOfStates
Number of states available.
double CalculateFading(SatEnums::ChannelType_t channelType)
Function for calculating the fading value.
VelocityCallback m_velocity
Node movement velocity.
void Reset()
Clear used variables.
double CalculateElevation()
Function for calculating the elevation.
~SatMarkovContainer()
Destructor.
double CalculateDistanceSinceLastStateChange()
Function for calculating the distance since latest state change position.
static TypeId GetTypeId(void)
NS-3 function for type id.
bool HasCooldownPeriodPassed(SatEnums::ChannelType_t channelType)
Function for checking whether the cooldown period has passed.
uint32_t m_currentSet
Current parameter set.
ElevationCallback m_currentElevation
Current elevation value.
bool m_enableStateLock
Variable for disabling state changes.
void RandomizeLockedState(uint32_t set)
Function for locking the state to random value.
Ptr< SatBaseFader > m_fader_up
Uplink fader.
Time m_cooldownPeriodLength
Cooldown period length in time.
Time m_latestStateChangeTime
Latest calculation time for state change.
Ptr< SatBaseFader > m_fader_down
Downlink fader.
void LockToSetAndState(uint32_t newSet, uint32_t newState)
Function for locking the parameter set and state.
void CreateFaders(SatMarkovConf::MarkovFaderType_t faderType)
Function for creating the Markov state faders.
Ptr< SatMarkovModel > m_markovModel
Markov model object.
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.