31 NS_LOG_COMPONENT_DEFINE(
"SatOrbiterFeederLlc");
36 NS_OBJECT_ENSURE_REGISTERED(SatOrbiterFeederLlc);
41 static TypeId tid = TypeId(
"ns3::SatOrbiterFeederLlc").SetParent<
SatOrbiterLlc>();
48 NS_LOG_FUNCTION(
this);
53 NS_LOG_FUNCTION(
this);
65 NS_LOG_FUNCTION(
this << key->m_encapAddress << key->m_decapAddress
66 << (uint32_t)(key->m_flowId));
68 Ptr<SatBaseEncapsulator> feederEncap;
73 feederEncap = CreateObject<SatBaseEncapsulator>(key->m_encapAddress,
75 key->m_sourceE2EAddress,
76 key->m_destE2EAddress,
81 feederEncap = CreateObject<SatReturnLinkEncapsulatorArq>(key->m_encapAddress,
83 key->m_sourceE2EAddress,
84 key->m_destE2EAddress,
90 feederEncap = CreateObject<SatReturnLinkEncapsulator>(key->m_encapAddress,
92 key->m_sourceE2EAddress,
93 key->m_destE2EAddress,
98 Ptr<SatQueue> queue = CreateObject<SatQueue>(key->m_flowId);
100 feederEncap->SetQueue(queue);
102 NS_LOG_INFO(
"Create encapsulator with key (" << key->m_encapAddress <<
", "
103 << key->m_decapAddress <<
", "
104 << (uint32_t)key->m_flowId <<
")");
107 std::pair<EncapContainer_t::iterator, bool> result =
108 m_encaps.insert(std::make_pair(key, feederEncap));
109 if (result.second ==
false)
111 NS_FATAL_ERROR(
"Insert to map with key (" << key->m_encapAddress <<
", "
112 << key->m_decapAddress <<
", "
113 << (uint32_t)key->m_flowId <<
") failed!");
120 NS_LOG_FUNCTION(
this << key->m_encapAddress << key->m_decapAddress
121 << (uint32_t)(key->m_flowId));
123 Ptr<SatBaseEncapsulator> userDecap;
128 userDecap = CreateObject<SatBaseEncapsulator>(key->m_encapAddress,
130 key->m_sourceE2EAddress,
131 key->m_destE2EAddress,
136 userDecap = CreateObject<SatGenericStreamEncapsulatorArq>(key->m_encapAddress,
138 key->m_sourceE2EAddress,
139 key->m_destE2EAddress,
145 userDecap = CreateObject<SatGenericStreamEncapsulator>(key->m_encapAddress,
147 key->m_sourceE2EAddress,
148 key->m_destE2EAddress,
155 NS_LOG_INFO(
"Create decapsulator with key (" << key->m_encapAddress <<
", "
156 << key->m_decapAddress <<
", "
157 << (uint32_t)key->m_flowId <<
")");
160 std::pair<EncapContainer_t::iterator, bool> result =
161 m_decaps.insert(std::make_pair(key, userDecap));
162 if (result.second ==
false)
164 NS_FATAL_ERROR(
"Insert to map with key (" << key->m_encapAddress <<
", "
165 << key->m_decapAddress <<
", "
166 << (uint32_t)key->m_flowId <<
") failed!");
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.
virtual void CreateDecap(Ptr< EncapKey > key)
Virtual method to create a new decapsulator 'on-a-need-basis' dynamically.
virtual void DoDispose()
Dispose of this class instance.
virtual void CreateEncap(Ptr< EncapKey > key)
Method to create a new encapsulator 'on-a-need-basis' dynamically.
virtual ~SatOrbiterFeederLlc()
Destroy a SatOrbiterFeederLlc.
static TypeId GetTypeId(void)
Derived from Object.
SatOrbiterFeederLlc()
Construct a SatOrbiterFeederLlc.
SatOrbiterLlc holds the orbiter implementation of LLC layer.
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.