NetSim Source Code Help v14.4
All 13 Components
 
Loading...
Searching...
No Matches
LTENR_RLC.c
1/************************************************************************************
2* Copyright (C) 2023 *
3* TETCOS, Bangalore. India *
4* *
5* Tetcos owns the intellectual property rights in the Product and its content. *
6* The copying, redistribution, reselling or publication of any or all of the *
7* Product or its content without express prior written consent of Tetcos is *
8* prohibited. Ownership and / or any other right relating to the software and all *
9* intellectual property rights therein shall remain at all times with Tetcos. *
10* *
11* This source code is licensed per the NetSim license agreement. *
12* *
13* No portion of this source code may be used as the basis for a derivative work, *
14* or used, for any purpose other than its intended use per the NetSim license *
15* agreement. *
16* *
17* This source code and the algorithms contained within it are confidential trade *
18* secrets of TETCOS and may not be used as the basis for any other software, *
19* hardware, product or service. *
20* *
21* Author: Shashi Kant Suman *
22* *
23* ----------------------------------------------------------------------------------*/
24
25#pragma region HEADER_FILES
26#include "stdafx.h"
27#include "LTENR_RLC.h"
28#include "LTENR_RLCMSG.h"
29#pragma endregion
30
31#pragma region RLC_GLOBAL_VAIABLE
32#pragma endregion
33
34#pragma region RLC_FUNCTIONPROTOTYPE
35static void LTENR_RLC_ESTABLISHENTITY(NETSIM_ID d, NETSIM_ID in,
36 NETSIM_ID peerId, NETSIM_ID peerIf,
37 LTENR_RLCMODE mode,
38 bool isTransmitting,
39 bool isReceiving);
40void LTENR_RLC_ESTABLISHENTITYALL(NETSIM_ID d, NETSIM_ID in,
41 NETSIM_ID peerId, NETSIM_ID peerIf);
42static void LTENR_RLC_ESTABLISHBROADCASTENTITY(NETSIM_ID d, NETSIM_ID in);
43void LTENR_RLC_Handle_t_reassemblyTimer();
44#pragma endregion
45
46#pragma region RLC_INIT
47void fn_NetSim_LTENR_RLC_Init()
48{
49 LTENR_RLCMSG_INIT();
50
51 LTENR_SUBEVENT_REGISTER(LTENR_SUBEVNT_RLC_TREASSEMBLYTIMER,
52 "LTENR_RLC_t_reassemblyTimer",
53 LTENR_RLC_Handle_t_reassemblyTimer);
54 LTENR_SUBEVENT_REGISTER(LTENR_SUBEVNT_RLC_TPOLLRETRANSMITTIMER,
55 "LTENR_RLCAM_t_PollRetransmitTimer",
56 LTENR_RLCAM_Handle_t_PollRetransmitTimer);
57
58 LTENR_SUBEVENT_REGISTER(LTENR_SUBEVNT_RLC_TSTATUSPROHIBITTIMER,
59 "LTENR_RLCAM_t_StatusProhibitTimer",
60 LTENR_RLCAM_Handle_t_StatusProhibitTimer);
61 fn_NetSim_LTENR_RegisterCallBackForAssociation(LTENR_RLC_ASSOCIATION);
62}
63
64void fn_NetSim_LTENR_UERLC_Init(NETSIM_ID ueId, NETSIM_ID ueIf)
65{
66 ptrLTENR_PROTODATA pd = LTENR_PROTODATA_GET(ueId, ueIf);
67
68 ptrLTENR_RLCVAR rlc = calloc(1, sizeof * rlc);
69 LTENR_UERLC_SET(ueId, ueIf, rlc);
70
71 rlc->t_reassembly = str_to_time(pd->t_reassembly);
72
73 ptrLTENR_ASSOCIATIONINFO info = LTENR_ASSOCIATEINFO_FIND(ueId, ueIf, 0, 0);
74 while (info)
75 {
76 //LTENR_RLC_ESTABLISHENTITYALL(ueId, ueIf, info->d, info->in);
77 info = info->next;
78 }
79
80 LTENR_RLC_ESTABLISHBROADCASTENTITY(ueId, ueIf);
81}
82
83void fn_NetSim_LTENR_GNBRLC_Init(NETSIM_ID gnbId, NETSIM_ID gnbIf)
84{
85 ptrLTENR_PROTODATA pd = LTENR_PROTODATA_GET(gnbId, gnbIf);
86 ptrLTENR_RLCVAR rlc = calloc(1, sizeof * rlc);
87 LTENR_GNBRLC_SET(gnbId, gnbIf, rlc);
88
89 rlc->t_reassembly = str_to_time(pd->t_reassembly);
90
91 ptrLTENR_ASSOCIATIONINFO info = LTENR_ASSOCIATEINFO_FIND(gnbId, gnbIf, 0, 0);
92 while (info)
93 {
94 //LTENR_RLC_ESTABLISHENTITYALL(gnbId, gnbIf, info->d, info->in);
95 info = info->next;
96 }
97
98 LTENR_RLC_ESTABLISHBROADCASTENTITY(gnbId, gnbIf);
99}
100#pragma endregion
101
102#pragma region RLC_ENTITY
103ptrLTENR_RLCENTITY LTENR_RLC_FINDENTITY(NETSIM_ID d, NETSIM_ID in,
104 NETSIM_ID peerId, NETSIM_ID peerIf,
105 LTENR_RLCMODE mode,
106 bool isTransmitting,
107 bool isReceiving)
108{
109 ptrLTENR_RLCVAR rlc = LTENR_RLC_GET(d, in);
110 ptrLTENR_RLCENTITY entity = rlc ? rlc->rlcEntities : NULL;
111 while (entity)
112 {
113 if (entity->d == d && entity->in == in &&
114 entity->peerId == peerId && entity->peerIf == peerIf &&
115 entity->rlcMode == mode &&
116 entity->isTransmittingRLCEntity == isTransmitting &&
117 entity->isReceivingRLCEntity == isReceiving)
118 return entity;
119 entity = LTENR_RLCENTITY_NEXT(entity);
120 }
121 return NULL;
122}
123
124
125static void LTENR_RLC_ESTABLISHENTITY(NETSIM_ID d, NETSIM_ID in,
126 NETSIM_ID peerId, NETSIM_ID peerIf,
127 LTENR_RLCMODE mode,
128 bool isTransmitting,
129 bool isReceiving)
130{
131 ptrLTENR_RLCENTITY entity = LTENR_RLC_FINDENTITY(d, in,
132 peerId, peerIf,
133 mode, isTransmitting, isReceiving);
134
135 if (entity)
136 return;
137
138 ptrLTENR_PROTODATA pd = LTENR_PROTODATA_GET(d, in);
139 ptrLTENR_RLCVAR rlc = LTENR_RLC_GET(d, in);
140 if (!rlc) return;
141
142 entity = LTENR_RLCENTITY_ALLOC();
143 entity->retransmissionBuffer = LTENR_RLCBUFFER_ALLOC();
144 entity->transmissionBuffer = LTENR_RLCBUFFER_ALLOC();
145 entity->transmittedBuffer = LTENR_RLCBUFFER_ALLOC();
146 LTENR_RLCENTITY_ADD(rlc, entity);
147
148 entity->t_Reassembly = rlc->t_reassembly;
149
150 entity->d = d;
151 entity->in = in;
152 entity->peerId = peerId;
153 entity->peerIf = peerIf;
154
155 entity->rlcMode = mode;
156 entity->isReceivingRLCEntity = isReceiving;
157 entity->isTransmittingRLCEntity = isTransmitting;
158
159 //Config parameter
160 entity->t_PollRetransmit = str_to_time(pd->t_pollRetransmit);
161 entity->t_StatusProhibit = str_to_time(pd->t_statusProhibit);
162 entity->t_Reassembly = str_to_time(pd->t_reassembly);
163 entity->pollByte = str_to_bytes(pd->pollBytes);
164 entity->pollPDU = atoi(pd->pollPdu + 1);
165 entity->maxRetxThreshold = atoi(pd->maxRetxThreshold + 1);
166}
167
168static void LTENR_RLC_UNESTABLISHENTITY(NETSIM_ID d, NETSIM_ID in,
169 NETSIM_ID peerId, NETSIM_ID peerIf,
170 LTENR_RLCMODE mode,
171 bool isTransmitting,
172 bool isReceiving)
173{
174 ptrLTENR_RLCVAR rlc = LTENR_RLC_GET(d, in);
175 if (!rlc) return;
176
177 ptrLTENR_RLCENTITY entity = LTENR_RLC_FINDENTITY(d, in,
178 peerId, peerIf,
179 mode, isTransmitting, isReceiving);
180
181 LTENR_RLCENTITY_REMOVE(rlc, entity);
182}
183
184void LTENR_RLC_ESTABLISHENTITYALL(NETSIM_ID d, NETSIM_ID in,
185 NETSIM_ID peerId, NETSIM_ID peerIf)
186{
187 LTENR_RLC_ESTABLISHENTITY(d, in, peerId, peerIf, LTENR_RLCMODE_TM, true, false);
188 LTENR_RLC_ESTABLISHENTITY(d, in, peerId, peerIf, LTENR_RLCMODE_TM, false, true);
189 LTENR_RLC_ESTABLISHENTITY(d, in, peerId, peerIf, LTENR_RLCMODE_UM, true, false);
190 LTENR_RLC_ESTABLISHENTITY(d, in, peerId, peerIf, LTENR_RLCMODE_UM, false, true);
191 LTENR_RLC_ESTABLISHENTITY(d, in, peerId, peerIf, LTENR_RLCMODE_AM, true, true);
192}
193
194void LTENR_RLC_UNESTABLISHENTITYALL(NETSIM_ID d, NETSIM_ID in,
195 NETSIM_ID peerId, NETSIM_ID peerIf)
196{
197 LTENR_RLC_UNESTABLISHENTITY(d, in, peerId, peerIf, LTENR_RLCMODE_TM, true, false);
198 LTENR_RLC_UNESTABLISHENTITY(d, in, peerId, peerIf, LTENR_RLCMODE_TM, false, true);
199 LTENR_RLC_UNESTABLISHENTITY(d, in, peerId, peerIf, LTENR_RLCMODE_UM, true, false);
200 LTENR_RLC_UNESTABLISHENTITY(d, in, peerId, peerIf, LTENR_RLCMODE_UM, false, true);
201 LTENR_RLC_UNESTABLISHENTITY(d, in, peerId, peerIf, LTENR_RLCMODE_AM, true, true);
202}
203
204void LTENR_RLC_TMESTABLISHENTITYALL(NETSIM_ID d, NETSIM_ID in,
205 NETSIM_ID peerId, NETSIM_ID peerIf) {
206 LTENR_RLC_ESTABLISHENTITY(d, in, peerId, peerIf, LTENR_RLCMODE_TM, true, false);
207 LTENR_RLC_ESTABLISHENTITY(d, in, peerId, peerIf, LTENR_RLCMODE_TM, false, true);
208}
209
210static void LTENR_RLC_ESTABLISHBROADCASTENTITY(NETSIM_ID d, NETSIM_ID in)
211{
212 LTENR_RLC_ESTABLISHENTITY(d, in, 0, 0, LTENR_RLCMODE_TM, true, false);
213 LTENR_RLC_ESTABLISHENTITY(d, in, 0, 0, LTENR_RLCMODE_TM, false, true);
214 LTENR_RLC_ESTABLISHENTITY(d, in, 0, 0, LTENR_RLCMODE_UM, true, false);
215 LTENR_RLC_ESTABLISHENTITY(d, in, 0, 0, LTENR_RLCMODE_UM, false, true);
216 LTENR_RLC_ESTABLISHENTITY(d, in, 0, 0, LTENR_RLCMODE_AM, true, true);
217}
218#pragma endregion
219
220#pragma region RLC_ASSOCIATION
221void LTENR_RLC_ASSOCIATION(NETSIM_ID gnbId, NETSIM_ID gnbIf,
222 NETSIM_ID ueId, NETSIM_ID ueIf,
223 bool isAssociated)
224{
225 ptrLTENR_RLCVAR grlc = LTENR_GNBRLC_GET(gnbId, gnbIf);
226 if (!grlc)
227 return; // gNB RLC is still not initiallized.
228
229 ptrLTENR_RLCVAR urlc = LTENR_UERLC_GET(ueId, ueIf);
230 if (!urlc)
231 return; // UE RLC is still not initiallized.
232
233 if (isAssociated)
234 {
235 LTENR_RLC_ESTABLISHENTITYALL(gnbId, gnbIf, ueId, ueIf);
236 LTENR_RLC_ESTABLISHENTITYALL(ueId, ueIf, gnbId, gnbIf);
237 }
238 else
239 {
240 LTENR_RLC_UNESTABLISHENTITYALL(gnbId, gnbIf, ueId, ueIf);
241 LTENR_RLC_UNESTABLISHENTITYALL(ueId, ueIf, gnbId, gnbIf);
242 }
243}
244#pragma endregion
245
246#pragma region RLC_TM
247void LTENR_RLC_TM_HandlePDUFromUpperLayer()
248{
249 print_ltenr_log("Packet is TM mode.\n");
250 NETSIM_ID d = pstruEventDetails->nDeviceId;
251 NETSIM_ID in = pstruEventDetails->nInterfaceId;
252 NetSim_PACKET* packet = pstruEventDetails->pPacket;
253 ptrLTENR_RLCENTITY entity;
254 NETSIM_ID rin = 0;
255 if (packet->nReceiverId)
256 {
257 rin = LTENR_FIND_ASSOCIATEINTERFACE(d, in, packet->nReceiverId);
258 entity = LTENR_RLC_FINDENTITY(d, in,
259 packet->nReceiverId, rin,
260 LTENR_RLCMODE_TM,
261 true, false);
262 }
263 else
264 {
265 entity = LTENR_RLC_FINDENTITY(d, in,
266 0, 0,
267 LTENR_RLCMODE_TM,
268 true, false);
269 }
270
271 if (!entity)
272 {
273 fnNetSimError("LTENR-RLCTM, No entity is found between device %d-%d and %d-%d\n"
274 "Dropping packet.\n",
275 d, in, packet->nReceiverId, rin);
276 fn_NetSim_Packet_FreePacket(packet);
277 pstruEventDetails->pPacket = NULL;
278 return;
279 }
280
281 print_ltenr_log("Adding packet to transmission buffer.\n");
282 LTENR_LOGICALCHANNEL channel = LTENR_PACKET_GET_LOGICALCHANNEL(packet);
283 LTENR_RLCBuffer_AddPacket(entity->transmissionBuffer, packet, 0, 0, channel);
284 entity->bufferStatus[channel] += (UINT)packet->pstruMacData->dPacketSize;
285}
286
287static UINT LTENR_RLC_TM_SEND_PDU(NETSIM_ID d, NETSIM_ID in,
288 NETSIM_ID r, NETSIM_ID rin,
289 UINT size, LTENR_LOGICALCHANNEL logicalChannel)
290{
291 ptrLTENR_RLCENTITY entity = LTENR_RLC_GET_TM_TRANSMITTING_ENTITY(d, in, r, rin);
292 NetSim_PACKET* tmdpdu = NULL;
293
294 UINT left = size;
295 ptrLTENR_RLCBUFFER_DATA buf = entity->transmissionBuffer->head;
296 while (buf)
297 {
298 tmdpdu = buf->packet;
299
300 LTENR_LOGICALCHANNEL ch = LTENR_PACKET_GET_LOGICALCHANNEL(tmdpdu);
301 if (ch != logicalChannel)
302 {
303 buf = buf->next;
304 continue;
305 }
306
307 if (LTENR_IS_UPLANE_MSG(tmdpdu) &&
308 tmdpdu->pstruMacData->dPacketSize > left)
309 {
310 LTENR_RLCBuffer_MarkForRemoval(buf);
311 fn_NetSim_Packet_FreePacket(tmdpdu);
312 buf = buf->next;
313 continue;
314 }
315 LTENR_RLCBuffer_MarkForRemoval(buf);
316 buf = buf->next;
317 left -= (UINT)tmdpdu->pstruMacData->dPacketSize;
318 LTENR_RLCMSG_TMHDR_ADD(tmdpdu);
319 LTENR_RLC_SENDPDUTOMAC(d, in, tmdpdu);
320 }
321 LTENR_RLCBuffer_UpdateBuffer(entity->transmissionBuffer);
322 return size - left;
323}
324
325static void LTENR_RLC_TM_ReceivePDU()
326{
327 NetSim_PACKET* p = pstruEventDetails->pPacket;
328 switch (p->nControlDataType)
329 {
330 case LTENR_MSG_RLC_STATUSPDU:
331 LTENR_RLCAM_ReceiveStatusPDU();
332 break;
333 case LTENR_MSG_RRC_MIB:
334 case LTENR_MSG_RRC_SIB1:
335 case LTENR_MSG_RRC_SI:
336 case LTENR_MSG_RRC_SETUP_REQUEST:
337 LTENR_CallRRCIn();
338 break;
339 default:
340 LTENR_CallPDCPIN();
341 break;
342 }
343}
344#pragma endregion
345
346#pragma region RLC_PACKETPROCESSING
347
348static bool LTENR_RLC_VALIDATE_PDU(NetSim_PACKET* packet, char* fun)
349{
350 if (!packet)
351 {
352 fnNetSimError("LTENR-RLC %s function is called without packet\n", fun);
353 return false;
354 }
355
356 ptrLTENR_MSG msg = packet->pstruMacData->Packet_MACProtocol;
357 if (!msg)
358 {
359 fnNetSimError("LTENR-RLC %s function is called without LTENR-MSG\n", fun);
360 return false;
361 }
362
363 if (msg->rlcMode == LTENR_RLCMODE_TM)
364 {
365
366 if (!LTENR_RLC_IS_LOGICALCHANNEL_FOR_TM(msg->logicalChannel))
367 {
368 fnNetSimError("LTENR-RLC TM mode is only supporetd for BCCH, CCCH or PCCH logical channel\n");
369 return false;
370 }
371 }
372
373 if (msg->rlcMode == LTENR_RLCMODE_UM)
374 {
375
376 if (!LTENR_RLC_IS_LOGICALCHANNEL_FOR_UM(msg->logicalChannel))
377 {
378 fnNetSimError("LTENR-RLC UM mode is only supporetd for DTCH logical channel\n");
379 return false;
380 }
381 }
382
383 if (msg->rlcMode == LTENR_RLCMODE_AM)
384 {
385
386 if (!LTENR_RLC_IS_LOGICALCHANNEL_FOR_AM(msg->logicalChannel))
387 {
388 fnNetSimError("LTENR-RLC AM mode is only supporetd for DTCH or DCCH logical channel\n");
389 return false;
390 }
391 }
392
393 return true;
394}
395
396void fn_NetSim_LTENR_RLC_HandlePDUFromUpperLayer()
397{
398 LTENR_RLC_PRINT_PACKET_LOG_OUT();
399 NetSim_PACKET* packet = pstruEventDetails->pPacket;
400
401 if (!LTENR_RLC_VALIDATE_PDU(packet, __FUNCTION__))
402 return;
403
404 ptrLTENR_MSG msg = packet->pstruMacData->Packet_MACProtocol;
405 switch (msg->rlcMode)
406 {
407 case LTENR_RLCMODE_TM:
408 LTENR_RLC_TM_HandlePDUFromUpperLayer();
409 break;
410 case LTENR_RLCMODE_UM:
411 LTENR_RLC_UM_HandlePDUFromUpperLayer();
412 break;
413 case LTENR_RLCMODE_AM:
414 LTENR_RLCAM_HandlePDUFromUpperLayer();
415 break;
416 default:
417 fnNetSimError("LTENR-RLC Unknown RLC mode %d\n", msg->rlcMode);
418 break;
419 }
420 print_ltenr_log("\n");
421}
422
423void fn_NetSim_LTENR_RLC_TransmissionStatusNotification(NETSIM_ID d, NETSIM_ID in,
424 NETSIM_ID r, NETSIM_ID rin,
425 UINT size, LTENR_LOGICALCHANNEL logicalChannel)
426{
427#ifdef LTENR_RLC_TRANSMISSIONSTATUSNOTIFICATION_LOG
428 print_ltenr_log("LTENR-RLC, Transmission status notification\n"
429 "\tTime = %lf us\n"
430 "\tDevice Id = %d\n"
431 "\tInterface Id = %d\n"
432 "\tRemote device id = %d\n"
433 "\tRemote device interface = %d\n"
434 "\tLogical channel = %s\n",
435 pstruEventDetails->dEventTime,
436 d, in, r, rin,
437 strLTENR_LOGICALCHANNEL[logicalChannel]);
438#endif
439
440 UINT tsize, usize, asize;
441 tsize = usize = asize = 0;
442 if (LTENR_RLC_IS_LOGICALCHANNEL_FOR_TM(logicalChannel))
443 {
444 tsize = LTENR_RLC_TM_SEND_PDU(d, in, r, rin, size, logicalChannel);
445 size -= tsize;
446 }
447
448 if (LTENR_RLC_IS_LOGICALCHANNEL_FOR_UM(logicalChannel))
449 {
450 usize = LTENR_RLC_UM_SEND_PDU(d, in, r, rin, size, logicalChannel);
451 size -= usize;
452 }
453
454 if (LTENR_RLC_IS_LOGICALCHANNEL_FOR_AM(logicalChannel))
455 {
456 asize = LTENR_RLCAM_SEND_PDU(d, in, r, rin, size, logicalChannel);
457 size -= asize;
458 }
459#ifdef LTENR_RLC_TRANSMISSIONSTATUSNOTIFICATION_LOG
460 print_ltenr_log("\tTM bytes sent = %d\n"
461 "\tUM bytes sent = %d\n"
462 "\tAM bytes sent = %d\n"
463 "\tTotal bytes sent = %d\n",
464 tsize, usize, asize,
465 tsize + usize + asize);
466 print_ltenr_log("\n");
467#endif
468}
469
470UINT fn_NetSim_LTENR_RLC_BufferStatusNotificaton(NETSIM_ID d, NETSIM_ID in,
471 NETSIM_ID r, NETSIM_ID rin,
472 LTENR_LOGICALCHANNEL logicalChannel)
473{
474 ptrLTENR_RLCENTITY entity;
475 UINT tsize, usize, asize, size;
476 tsize = usize = asize = size = 0;
477 if (LTENR_RLC_IS_LOGICALCHANNEL_FOR_TM(logicalChannel))
478 {
479 entity = LTENR_RLC_FINDENTITY(d, in, r, rin, LTENR_RLCMODE_TM, true, false);
480 if(entity)
481 tsize = entity->bufferStatus[logicalChannel];
482 }
483 if (LTENR_RLC_IS_LOGICALCHANNEL_FOR_UM(logicalChannel))
484 {
485 entity = LTENR_RLC_FINDENTITY(d, in, r, rin, LTENR_RLCMODE_UM, true, false);
486 if(entity)
487 usize = entity->bufferStatus[logicalChannel];
488 }
489 if (LTENR_RLC_IS_LOGICALCHANNEL_FOR_AM(logicalChannel))
490 {
491 entity = LTENR_RLC_FINDENTITY(d, in, r, rin, LTENR_RLCMODE_AM, true, true);
492 if(entity)
493 asize = entity->bufferStatus[logicalChannel];
494 }
495
496 size = tsize + usize + asize;
497#ifdef LTENR_RLC_BUFFERSTATUSREPORTING_LOG
498 print_ltenr_log("LTENR-RLC, Buffer status reporting\n"
499 "\tTime = %lf us\n"
500 "\tDevice Id = %d\n"
501 "\tInterface Id = %d\n"
502 "\tRemote device id = %d\n"
503 "\tRemote device interface = %d\n"
504 "\tLogical channel = %s\n"
505 "\tTM buffer size = %d bytes\n"
506 "\tUM buffer size = %d bytes\n"
507 "\tAM buffer size = %d bytes\n"
508 "\tTotal buffer size = %d bytes\n",
509 pstruEventDetails->dEventTime,
510 d, in, r, rin,
511 strLTENR_LOGICALCHANNEL[logicalChannel],
512 tsize, usize, asize, size);
513 print_ltenr_log("\n");
514#endif
515 return size;
516}
517
518void fn_NetSim_LTENR_RLC_HandleMACIN()
519{
520 LTENR_RLC_PRINT_PACKET_LOG_IN();
521 LTENR_RLCMODE mode = LTENR_PACKET_GET_RLCMODE(pstruEventDetails->pPacket);
522 switch (mode)
523 {
524 case LTENR_RLCMODE_TM:
525 LTENR_RLC_TM_ReceivePDU();
526 break;
527 case LTENR_RLCMODE_UM:
528 LTENR_RLC_UM_RECEIVE_PDU();
529 break;
530 case LTENR_RLCMODE_AM:
531 LTENR_RLC_AM_RECEIVE_PDU();
532 break;
533 default:
534 fnNetSimError("Packet arrives to RLC in has no valid RLC mode.\n"
535 "Dropping packet.\n");
536 fn_NetSim_Packet_FreePacket(pstruEventDetails->pPacket);
537 pstruEventDetails->pPacket = NULL;
538 break;
539 }
540}
541#pragma endregion
542
543#pragma region RLC_t_ReassemblyTime
544void LTENR_RLC_Handle_t_reassemblyTimer()
545{
546 ptrLTENR_RLCENTITY entity = pstruEventDetails->szOtherDetails;
547 LTENR_RLCMODE mode = entity->rlcMode;
548
549 switch (mode)
550 {
551 case LTENR_RLCMODE_UM:
552 LTENR_RLC_UM_Handle_t_reassemblyTimer();
553 break;
554 case LTENR_RLCMODE_AM:
555 LTENR_RLCAM_Handle_t_reassemblyTimer();
556 break;
557 default:
558 fnNetSimError("t_reassembly timer is triggered without valid rlc mode.\n");
559 break;
560 }
561}
562#pragma endregion