28 NS_LOG_COMPONENT_DEFINE(
"SatGeoFeederLlc");
33 NS_OBJECT_ENSURE_REGISTERED(SatGeoFeederLlc);
38 static TypeId tid = TypeId(
"ns3::SatGeoFeederLlc").SetParent<
SatGeoLlc>();
45 NS_LOG_FUNCTION(
this);
51 :
SatGeoLlc(forwardLinkRegenerationMode, returnLinkRegenerationMode)
53 NS_LOG_FUNCTION(
this);
58 NS_LOG_FUNCTION(
this);
70 NS_LOG_FUNCTION(
this << key->m_encapAddress << key->m_decapAddress
71 << (uint32_t)(key->m_flowId));
73 Ptr<SatBaseEncapsulator> feederEncap;
78 feederEncap = CreateObject<SatBaseEncapsulator>(key->m_encapAddress,
80 key->m_sourceE2EAddress,
81 key->m_destE2EAddress,
86 feederEncap = CreateObject<SatReturnLinkEncapsulatorArq>(key->m_encapAddress,
88 key->m_sourceE2EAddress,
89 key->m_destE2EAddress,
95 feederEncap = CreateObject<SatReturnLinkEncapsulator>(key->m_encapAddress,
97 key->m_sourceE2EAddress,
98 key->m_destE2EAddress,
103 Ptr<SatQueue> queue = CreateObject<SatQueue>(key->m_flowId);
105 feederEncap->SetQueue(queue);
107 NS_LOG_INFO(
"Create encapsulator with key (" << key->m_encapAddress <<
", "
108 << key->m_decapAddress <<
", "
109 << (uint32_t)key->m_flowId <<
")");
112 std::pair<EncapContainer_t::iterator, bool> result =
113 m_encaps.insert(std::make_pair(key, feederEncap));
114 if (result.second ==
false)
116 NS_FATAL_ERROR(
"Insert to map with key (" << key->m_encapAddress <<
", "
117 << key->m_decapAddress <<
", "
118 << (uint32_t)key->m_flowId <<
") failed!");
125 NS_LOG_FUNCTION(
this << key->m_encapAddress << key->m_decapAddress
126 << (uint32_t)(key->m_flowId));
128 Ptr<SatBaseEncapsulator> userDecap;
133 userDecap = CreateObject<SatBaseEncapsulator>(key->m_encapAddress,
135 key->m_sourceE2EAddress,
136 key->m_destE2EAddress,
141 userDecap = CreateObject<SatGenericStreamEncapsulatorArq>(key->m_encapAddress,
143 key->m_sourceE2EAddress,
144 key->m_destE2EAddress,
150 userDecap = CreateObject<SatGenericStreamEncapsulator>(key->m_encapAddress,
152 key->m_sourceE2EAddress,
153 key->m_destE2EAddress,
160 NS_LOG_INFO(
"Create decapsulator with key (" << key->m_encapAddress <<
", "
161 << key->m_decapAddress <<
", "
162 << (uint32_t)key->m_flowId <<
")");
165 std::pair<EncapContainer_t::iterator, bool> result =
166 m_decaps.insert(std::make_pair(key, userDecap));
167 if (result.second ==
false)
169 NS_FATAL_ERROR(
"Insert to map with key (" << key->m_encapAddress <<
", "
170 << key->m_decapAddress <<
", "
171 << (uint32_t)key->m_flowId <<
") failed!");
RegenerationMode_t
The regeneration mode used in satellites.
static TypeId GetTypeId(void)
Derived from Object.
virtual void CreateEncap(Ptr< EncapKey > key)
Method to create a new encapsulator 'on-a-need-basis' dynamically.
virtual ~SatGeoFeederLlc()
Destroy a SatGeoFeederLlc.
SatGeoFeederLlc()
Construct a SatGeoFeederLlc, should not be used.
virtual void DoDispose()
Dispose of this class instance.
virtual void CreateDecap(Ptr< EncapKey > key)
Virtual method to create a new decapsulator 'on-a-need-basis' dynamically.
SatGeoLlc holds the GEO implementation of LLC layer.
uint32_t m_additionalHeaderSize
Additional header size to add to encapsulation/decapsulation.
bool m_fwdLinkArqEnabled
Is FWD link ARQ enabled.
SatEnums::RegenerationMode_t m_returnLinkRegenerationMode
Regeneration mode on return link.
EncapContainer_t m_decaps
Map of decapsulator base pointers.
EncapContainer_t m_encaps
Map of encapsulator base pointers.
SatEnums::RegenerationMode_t m_forwardLinkRegenerationMode
Regeneration mode on forward link.
virtual void ReceiveHigherLayerPdu(Ptr< Packet > packet, Mac48Address source, Mac48Address dest)
Receive HL PDU from encapsulator/decapsulator entity.
bool m_rtnLinkArqEnabled
Is RTN link ARQ enabled.
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.