104 NS_LOG_FUNCTION(
this << satConf);
106 double baseFrequency;
109 double allocatedBandwidth;
114 baseFrequency = 1.5e9;
117 allocatedBandwidth = 125000;
121 baseFrequency = 0.868e9;
124 allocatedBandwidth = 125000;
128 NS_FATAL_ERROR(
"Unknown physical layer standard");
132 satConf->SetAttribute(
"FwdFeederLinkBandwidth", DoubleValue(bandwidth));
133 satConf->SetAttribute(
"FwdFeederLinkBaseFrequency", DoubleValue(baseFrequency));
134 satConf->SetAttribute(
"RtnFeederLinkBandwidth", DoubleValue(bandwidth));
135 satConf->SetAttribute(
"RtnFeederLinkBaseFrequency", DoubleValue(baseFrequency));
136 satConf->SetAttribute(
"FwdUserLinkBandwidth", DoubleValue(bandwidth));
137 satConf->SetAttribute(
"FwdUserLinkBaseFrequency", DoubleValue(baseFrequency));
138 satConf->SetAttribute(
"RtnUserLinkBandwidth", DoubleValue(bandwidth));
139 satConf->SetAttribute(
"RtnUserLinkBaseFrequency", DoubleValue(baseFrequency));
140 satConf->SetAttribute(
"FwdUserLinkChannels", UintegerValue(channels));
141 satConf->SetAttribute(
"RtnUserLinkChannels", UintegerValue(channels));
142 satConf->SetAttribute(
"FwdFeederLinkChannels", UintegerValue(channels));
143 satConf->SetAttribute(
"RtnFeederLinkChannels", UintegerValue(channels));
144 satConf->SetAttribute(
"FwdCarrierAllocatedBandwidth", DoubleValue(allocatedBandwidth));
150 NS_LOG_FUNCTION(
this << gatewayMac);
158 Ptr<LoraLogicalChannel> lc1 = CreateObject<LoraLogicalChannel>(868.1, 0, 5);
159 Ptr<LoraLogicalChannel> lc2 = CreateObject<LoraLogicalChannel>(868.3, 0, 5);
160 Ptr<LoraLogicalChannel> lc3 = CreateObject<LoraLogicalChannel>(868.5, 0, 5);
165 gatewayMac->SetLoraLogicalChannelHelper(channelHelper);
167 gatewayMac->SetSfForDataRate(std::vector<uint8_t>{12, 11, 10, 9, 8, 7, 7});
168 gatewayMac->SetBandwidthForDataRate(
169 std::vector<double>{125000, 125000, 125000, 125000, 125000, 125000, 250000});
170 gatewayMac->SetMaxAppPayloadForDataRate(
171 std::vector<uint32_t>{59, 59, 59, 123, 230, 230, 230, 230});
177 NS_LOG_FUNCTION(
this << endDeviceMac);
185 Ptr<LoraLogicalChannel> lc1 = CreateObject<LoraLogicalChannel>(868.1, 0, 5);
186 Ptr<LoraLogicalChannel> lc2 = CreateObject<LoraLogicalChannel>(868.3, 0, 5);
187 Ptr<LoraLogicalChannel> lc3 = CreateObject<LoraLogicalChannel>(868.5, 0, 5);
192 endDeviceMac->SetLoraLogicalChannelHelper(channelHelper);
194 endDeviceMac->SetSfForDataRate(std::vector<uint8_t>{12, 11, 10, 9, 8, 7, 7});
195 endDeviceMac->SetBandwidthForDataRate(
196 std::vector<double>{125000, 125000, 125000, 125000, 125000, 125000, 250000});
197 endDeviceMac->SetMaxAppPayloadForDataRate(
198 std::vector<uint32_t>{59, 59, 59, 123, 230, 230, 230, 230});
201 {{1, 0, 0, 0, 0, 0}},
202 {{2, 1, 0, 0, 0, 0}},
203 {{3, 2, 1, 0, 0, 0}},
204 {{4, 3, 2, 1, 0, 0}},
205 {{5, 4, 3, 2, 1, 0}},
206 {{6, 5, 4, 3, 2, 1}},
207 {{7, 6, 5, 4, 3, 2}}}};
208 endDeviceMac->SetReplyDataRateMatrix(matrix);
210 endDeviceMac->SetNPreambleSymbols(8);
214 endDeviceMac->SetSecondReceiveWindowDataRate(4);
215 endDeviceMac->SetSecondReceiveWindowFrequency(869.525);
221 NS_LOG_FUNCTION(
this << gatewayMac);
236 Ptr<LoraLogicalChannel> lc1 = CreateObject<LoraLogicalChannel>(1500.125, 0, 5);
239 gatewayMac->SetLoraLogicalChannelHelper(channelHelper);
241 gatewayMac->SetSfForDataRate(std::vector<uint8_t>{12, 11, 10, 9, 8, 7, 7});
242 gatewayMac->SetBandwidthForDataRate(
243 std::vector<double>{125000, 125000, 125000, 125000, 125000, 125000, 250000});
244 gatewayMac->SetMaxAppPayloadForDataRate(
245 std::vector<uint32_t>{59, 59, 59, 123, 230, 230, 230, 230});
251 NS_LOG_FUNCTION(
this << endDeviceMac);
259 Ptr<LoraLogicalChannel> lc1 = CreateObject<LoraLogicalChannel>(1500.125, 0, 5);
262 endDeviceMac->SetLoraLogicalChannelHelper(channelHelper);
264 endDeviceMac->SetSfForDataRate(std::vector<uint8_t>{12, 11, 10, 9, 8, 7, 7});
265 endDeviceMac->SetBandwidthForDataRate(
266 std::vector<double>{125000, 125000, 125000, 125000, 125000, 125000, 250000});
267 endDeviceMac->SetMaxAppPayloadForDataRate(
268 std::vector<uint32_t>{59, 59, 59, 123, 230, 230, 230, 230});
271 {{1, 0, 0, 0, 0, 0}},
272 {{2, 1, 0, 0, 0, 0}},
273 {{3, 2, 1, 0, 0, 0}},
274 {{4, 3, 2, 1, 0, 0}},
275 {{5, 4, 3, 2, 1, 0}},
276 {{6, 5, 4, 3, 2, 1}},
277 {{7, 6, 5, 4, 3, 2}}}};
278 endDeviceMac->SetReplyDataRateMatrix(matrix);
280 endDeviceMac->SetNPreambleSymbols(8);
284 endDeviceMac->SetSecondReceiveWindowDataRate(4);
285 endDeviceMac->SetSecondReceiveWindowFrequency(869.525);