NetSim Source Code Help
Loading...
Searching...
No Matches
802_22.c
Go to the documentation of this file.
1#include "main.h"
2#include "802_22.h"
7/** This function Initializes the CR parameters.*/
8_declspec(dllexport) int fn_NetSim_CR_Init(struct stru_NetSim_Network *NETWORK_Formal,\
11{
13 return 1;
14}
15/** This function is called by NetworkStack.dll, whenever the event gets triggered
16 inside the NetworkStack.dll for the MAC layer in Cognitive Radio.
17 It includes MAC_OUT,MAC_IN,PHY_OUT,PHY_IN and TIMER_EVENT. */
19{
21 {
22 case MAC_OUT_EVENT:
23 {
25 {
26 case BASESTATION:
27 {
29 }
30 break;
31 default: //CPE, node or any other device
32 {
34 {
35 case 0:
36 {
38 }
39 break;
40 }
41 }
42 break;
43 }
44 }
45 break;
46 case MAC_IN_EVENT:
48 {
49 case BASESTATION:
50 {
52 }
53 break;
54 default: //CPE, node or any other device
56 break;
57 }
58 break;
60 {
62 {
63 case BASESTATION:
65 {
66 default:
68 break;
69 }
70 break;
71 default: //CPE, Node or and other device
73 break;
74 }
75 }
76 break;
79 break;
80 case TIMER_EVENT:
82 {
85 break;
88 break;
89 case TRANSMIT_SCH:
91 break;
92 case FORM_DS_BURST:
94 break;
97 break;
98 case FORM_US_BURST:
100 break;
103 break;
104 case QUIET_PERIOD:
106 break;
107 case SM_UPDATECHANNEL:
109 break;
110 case DSA_RSP_TIMEOUT:
111 //Not implemented
112 break;
113 case DSA_RVD_TIMEOUT:
114 //Not implemented
115 break;
116 default:
117 printf("CR--- Unknown sub event type %d for CR Network.\n",pstruEventDetails->nSubEventType);
118 break;
119 }
120 break;
121 default:
122 printf("CR--- Unknown event type %d for CR Network.\n",pstruEventDetails->nEventType);
123 }
124 return 1;
125}
126_declspec(dllexport) char* fn_NetSim_CR_Trace(int nSubEvent)
127{
128 return fn_NetSim_CR_Trace_F(nSubEvent);
129}
130/** This function is called by NetworkStack.dll, to copy the CR destination packet to source packet. */
131_declspec(dllexport) int fn_NetSim_CR_CopyPacket(const NetSim_PACKET* pstruSrcPacket,const NetSim_PACKET* pstruDestPacket)
132{
133 return fn_NetSim_CR_CopyPacket_F(pstruSrcPacket,pstruDestPacket);
134}
135/** This function is called by NetworkStack.dll,to free the packet. */
136_declspec(dllexport) int fn_NetSim_CR_FreePacket(const NetSim_PACKET* pstruPacket)
137{
138 return fn_NetSim_CR_FreePacket_F(pstruPacket);
139}
140/** This function write the metrics in metrics.txt */
141_declspec(dllexport) int fn_NetSim_CR_Metrics(PMETRICSWRITER metricsWriter)
142{
143 return fn_NetSim_CR_Metrics_F(metricsWriter);
144}
145/** This function is called by NetworkStack.dll, once the simulation end, this function free
146 the allocated memory for the network. */
148{
149 return fn_NetSim_CR_Finish_F();
150}
151/** This function is called by NetworkStack.dll to configure the CR devices. */
152_declspec(dllexport) int fn_NetSim_CR_Configure(void** var)
153{
155 return 1;
156}
158{
159 return "";
160}
162{
163 return "";
164}
165/** This function is used to initialize the Physical layer parameters of Cognitive Radio Base station */
167{
168 NetSim_PACKET* pstruPacket;
169 BS_PHY* pstruBSPhy;
170 BS_MAC* pstruBSMAC;
171 double dDataRate;
172 double dTransmissionTime;
173 double dTime = pstruEventDetails->dEventTime;
177 pstruPacket = pstruEventDetails->pPacket;
178 pstruBSPhy = DEVICE_PHYVAR(nDeviceId,nInterfaceId);
179 pstruBSMAC = DEVICE_MACVAR(nDeviceId,nInterfaceId);
180 if(pstruPacket->nControlDataType/100 == MAC_PROTOCOL_IEEE802_22)
181 {
182 switch(pstruPacket->nControlDataType%100)
183 {
184 case MMM_SCH:
185 //Update phy layer details in packet
186 pstruPacket->pstruPhyData->dArrivalTime = dTime;
187 pstruPacket->pstruPhyData->dPayload = pstruPacket->pstruMacData->dPacketSize;
188 pstruPacket->pstruPhyData->dOverhead = 0;
189 pstruPacket->pstruPhyData->dPacketSize = pstruPacket->pstruPhyData->dOverhead + pstruPacket->pstruPhyData->dPayload;
190 pstruPacket->pstruPhyData->dStartTime = dTime;
193 //Set the phy mode = 2
195 //Calculate transmission time
196 //SCH packet is one symbol long
197 dTransmissionTime = pstruBSPhy->pstruSymbolParameter->dSymbolDuration;
198 //Set the end time
199 pstruPacket->pstruPhyData->dEndTime = dTime+dTransmissionTime;
200 //Broadcast the packet over link
202
203 //Schedule the FCH Packet
205 pstruEventDetails->nDeviceId = nDeviceId;
206 pstruEventDetails->nDeviceType = nDeviceType;
207 pstruEventDetails->nInterfaceId = nInterfaceId;
216 fn_NetSim_Packet_FreePacket(pstruPacket);
217 break;
218 case MMM_FCH:
219 //Update phy layer details in packet
220 pstruPacket->pstruPhyData->dArrivalTime = dTime;
221 pstruPacket->pstruPhyData->dPayload = pstruPacket->pstruMacData->dPacketSize;
222 pstruPacket->pstruPhyData->dOverhead = 0;
223 pstruPacket->pstruPhyData->dPacketSize = pstruPacket->pstruPhyData->dOverhead + pstruPacket->pstruPhyData->dPayload;
224 pstruPacket->pstruPhyData->dStartTime = dTime;
227 //Set the phy mode = 2
229 //Calculate transmission time
230 //FCH packet is one symbol long
231 dTransmissionTime = fn_NetSim_CR_CalculateTransmissionTime(pstruPacket->pstruMacData->dPacketSize,pstruBSPhy->pstruSymbolParameter);
232 //Set the end time
233 pstruPacket->pstruPhyData->dEndTime = dTime+dTransmissionTime;
234 //Broadcast the packet over link
236
237 //Schedule the next packet
239 pstruEventDetails->nDeviceId = nDeviceId;
240 pstruEventDetails->nDeviceType = nDeviceType;
241 pstruEventDetails->nInterfaceId = nInterfaceId;
250 fn_NetSim_Packet_FreePacket(pstruPacket);
251 break;
252 default:
253 goto TRANSMIT_BS_PACKET;
254 break;
255
256 }
257 }
258 else
259 {
260TRANSMIT_BS_PACKET:
261 //Update phy layer details in packet
262 pstruPacket->pstruPhyData->dArrivalTime = dTime;
263 pstruPacket->pstruPhyData->dPayload = pstruPacket->pstruMacData->dPacketSize;
264 pstruPacket->pstruPhyData->dOverhead = 0;
265 pstruPacket->pstruPhyData->dPacketSize = pstruPacket->pstruPhyData->dOverhead + pstruPacket->pstruPhyData->dPayload;
266 pstruPacket->pstruPhyData->dStartTime = dTime;
269 //Get the data rate
270 dDataRate = pstruBSPhy->pstruSymbolParameter->dDataRate;
271 dTransmissionTime = fn_NetSim_CR_CalculateTransmissionTime(pstruPacket->pstruMacData->dPacketSize,pstruBSPhy->pstruSymbolParameter);
272 pstruPacket->pstruPhyData->dEndTime = dTime+dTransmissionTime;
273 if(isBroadcastPacket(pstruPacket))
274 //Broadcast the packet over link
276 else if(isMulticastPacket(pstruPacket))
278 else
280 //Schedule the next packet
281
283 if(pstruPacket->nControlDataType/100 == MAC_PROTOCOL_IEEE802_22)
284 if(pstruPacket->nControlDataType%100==MMM_DCD)// DCD is the last control packet
286
287
288 pstruEventDetails->nDeviceId = nDeviceId;
289 pstruEventDetails->nDeviceType = nDeviceType;
290 pstruEventDetails->nInterfaceId = nInterfaceId;
299 if(isBroadcastPacket(pstruPacket) ||
300 isMulticastPacket(pstruPacket))
301 fn_NetSim_Packet_FreePacket(pstruPacket);
302 }
303 //Add channel usages in CR metrics
304 pstruBSPhy->pstruOpratingChannel->struChannelMetrics.dUsage += dTransmissionTime;
305 return 0;
306}
307/** This function is used to initialize the Physical layer parameters of Cognitive Radio Base station */
309{
310 //Call function for metrics
312 //Call Trace function to write packet trace
315 {
316 //Add the MAC IN event
319 }
320 return 1;
321}
322/** This function is used to initialize the MAC layer parameters of CR CPE*/
324{
325 NETSIM_ID nDeviceId;
326 NETSIM_ID nInterfaceId;
327 NetSim_PACKET* pstruPacket;
328 nDeviceId = pstruEventDetails->nDeviceId;
329 nInterfaceId = pstruEventDetails->nInterfaceId;
330 //Get the packet
331 pstruPacket = pstruEventDetails->pPacket;
332 if(pstruPacket->nControlDataType/100 == MAC_PROTOCOL_IEEE802_22)
333 switch(pstruPacket->nControlDataType%100)
334 {
335 case MMM_SCH:
336 fn_NetSim_CR_CPE_ProcessSCH(pstruPacket);
337 //Drop the packet
338 fn_NetSim_Packet_FreePacket(pstruPacket);
339 return 1;
340 break;
341 case MMM_FCH:
342 fn_NetSim_CR_CPE_ProcessFCH(pstruPacket);
343 //Drop the packet
344 fn_NetSim_Packet_FreePacket(pstruPacket);
345 return 1;
346 break;
347 case MMM_DS_MAP:
349 //Drop the packet
350 fn_NetSim_Packet_FreePacket(pstruPacket);
351 return 1;
352 break;
353 case MMM_UCD:
354 //Drop the packet
355 fn_NetSim_Packet_FreePacket(pstruPacket);
356 return 1;
357 break;
358 case MMM_US_MAP:
360 fn_NetSim_Packet_FreePacket(pstruPacket);
361 return 1;
362 break;
363 case MMM_DCD:
364 fn_NetSim_Packet_FreePacket(pstruPacket);
365 return 1;
366 break;
367 case MMM_DSA_RSP:
369 fn_NetSim_Packet_FreePacket(pstruPacket);
370 return 1;
371 break;
372 case MMM_DSD_REP:
374 return 1;
375 break;
376 case MMM_CHS_REQ:
378 fn_NetSim_Packet_FreePacket(pstruPacket);
379 return 1;
380 break;
381 default:
382 //Unknown control packet
383 printf("CR--- Unknown control packet arrives to CPE mac in\n");
384 break;
385 }
386 else
387 {
389 }
390 return 0;
391}
392/** This function is used to initialize the Physical layer parameters of CR CPE*/
394 {
395 double dTransmissionTime;
399 //Update the phy layer
401 pstruPacket->pstruPhyData->dPayload = pstruPacket->pstruMacData->dPacketSize;
402 pstruPacket->pstruPhyData->dPacketSize = pstruPacket->pstruPhyData->dPayload;
405 dTransmissionTime = fn_NetSim_CR_CalculateTransmissionTime(pstruPacket->pstruPhyData->dPacketSize,pstruCPEPhy->pstruSymbol);
408 pstruPacket->pstruPhyData->dEndTime = DEVICE_PHYLAYER(pstruEventDetails->nDeviceId,pstruEventDetails->nInterfaceId)->dLastPacketEndTime + dTransmissionTime;
410
412 {
413 //Add an event to transmit US-Burst if not BW_Request packet
423 }
424 //Set the receiver as BS-Id
425 pstruPacket->nReceiverId = pstruCPEMAC->nBSID;
429
430 //Add Channel usages in CR metrics
431 pstruCPEPhy->pstruOperatingChannel->struChannelMetrics.dUsage+=dTransmissionTime;
432 return 0;
433}
434/** This function checks the forwarded packet is Data packet or Control packet and call the appropriate functions */
436{
438 if(pstruPacket->nPacketType != PacketType_Control || pstruPacket->nControlDataType/100 != MAC_PROTOCOL_IEEE802_22)
439 {
440 //Data packet or other protocol control packet
442 }
443 else
444 {
445 // CR Control packet
446 switch(pstruPacket->nControlDataType%100)
447 {
448 case MMM_BW_REQUEST:
449 {
451 fn_NetSim_Packet_FreePacket(pstruPacket);
452 }
453 break;
454 case MMM_DSA_REQ:
455 {
457 fn_NetSim_Packet_FreePacket(pstruPacket);
458 }
459 break;
460 case MMM_DSD_REQ:
461 {
463 }
464 break;
466 {
468 fn_NetSim_Packet_FreePacket(pstruPacket);
469 }
470 break;
471 default:
472 printf("CR--- Unknown control packet arrive to BS Mac\n");
473 break;
474 }
475 }
476 return 0;
477}
478/** This function is used to initialize the MAC layer parameters of CR Base station*/
480{
483 NetSim_PACKET* pstruTempPacket;
485 {
487 fn_NetSim_CR_FragmentPacket(pstruPacket,(double)MAX_SDU_SIZE);
488 }
489 pstruTempPacket = pstruBSMAC->pstruDSPacketList;
490 if(!pstruTempPacket)
491 {
492 pstruBSMAC->pstruDSPacketList = pstruPacket;
493 return 0;
494 }
495 while(pstruTempPacket->pstruNextPacket)
496 pstruTempPacket = pstruTempPacket->pstruNextPacket;
497 pstruTempPacket->pstruNextPacket = pstruPacket;
498 return 0;
499}
500/** The function is used to allocate the bandwidtrh for the CR base-station */
502{
505 BS_MAC* pstruBSMAC = DEVICE_MACVAR(nDeviceId,nInterfaceId);
507 BW_REQUEST* pstruBWrequest = pstruPacket->pstruMacData->Packet_MACProtocol;
508 SYMBOL_PARAMETER* pstruSymol = ((BS_PHY*)DEVICE_PHYVAR(nDeviceId,nInterfaceId))->pstruSymbolParameter;
509 unsigned int nSlot = (unsigned int)ceil(pstruBWrequest->nBR*8.0/pstruSymol->nBitsCountInOneSlot);
510 NETSIM_ID nSID = (NETSIM_ID)(pstruBSMAC->anSIDFromDevId[pstruPacket->nTransmitterId]);
511 fn_NetSim_CR_AllocBandwidth(nSID,pstruPacket->nQOS,&(pstruBSMAC->uplinkAllocInfo),nSlot,pstruSymol->nUPlinkSymbol*pstruSymol->nOFDMSlots);
512 return 0;
513}
514
int fn_NetSim_CR_Metrics(PMETRICSWRITER metricsWriter)
Definition: 802_22.c:141
int fn_NetSim_CR_CopyPacket(const NetSim_PACKET *pstruSrcPacket, const NetSim_PACKET *pstruDestPacket)
Definition: 802_22.c:131
int fn_NetSim_CR_Init(struct stru_NetSim_Network *NETWORK_Formal, NetSim_EVENTDETAILS *pstruEventDetails_Formal, char *pszAppPath_Formal, char *pszWritePath_Formal, int nVersion_Type, void **fnPointer)
Definition: 802_22.c:8
int fn_NetSim_CR_BS_PhysicalOut()
Definition: 802_22.c:166
int fn_NetSim_CR_FreePacket(const NetSim_PACKET *pstruPacket)
Definition: 802_22.c:136
int fn_NetSim_CR_Run()
Definition: 802_22.c:18
int fn_NetSim_CR_CPE_MACIN()
Definition: 802_22.c:323
int fn_NetSim_CR_BS_MacOut()
Definition: 802_22.c:479
int fn_NetSim_CR_BS_AllocateBandwidth()
Definition: 802_22.c:501
char * fn_NetSim_CR_WritePacketTrace()
Definition: 802_22.c:161
int fn_NetSim_CR_Configure(void **var)
Definition: 802_22.c:152
int fn_NetSim_CR_CPE_PhysicalOut()
Definition: 802_22.c:393
int fn_NetSim_CR_Finish()
Definition: 802_22.c:147
char * fn_NetSim_CR_Trace(int nSubEvent)
Definition: 802_22.c:126
char * fn_NetSim_CR_ConfigPacketTrace()
Definition: 802_22.c:157
int fn_NetSim_CR_PhysicalIn()
Definition: 802_22.c:308
int fn_NetSim_CR_BS_MACIN()
Definition: 802_22.c:435
int fn_NetSim_CR_TransmitSCH()
Definition: SCH.c:10
int fn_NetSim_CR_CPE_ProcessDSMAP()
Definition: DSMAP.c:105
char * fn_NetSim_CR_Trace_F(int nSubEvent)
int fn_NetSim_CR_Metrics_F(PMETRICSWRITER metricsWriter)
int fn_NetSim_CR_BS_ProcessDSDReq()
Definition: DSx.c:278
#define MAX_SDU_SIZE
SDU Size is 255 Bytes.
Definition: 802_22.h:124
int fn_NetSim_CR_IncumbentEnd()
Definition: Incumbent.c:52
int fn_NetSim_CR_BS_ProcessDSAReq()
Definition: DSx.c:111
int fn_NetSim_CR_FreePacket_F(const NetSim_PACKET *pstruPacket)
int fn_NetSim_CR_TransmitP2PPacket(NetSim_PACKET *pstruPacket, NETSIM_ID nDevId, NETSIM_ID nInterface)
int fn_NetSim_CR_CPE_ProcessDSA_RSP()
Definition: DSx.c:173
int fn_NetSim_CR_BS_ForwardDataPacket()
Definition: PacketForward.c:5
int fn_NetSim_CR_CPE_ProcessSCH(NetSim_PACKET *pstruPacket)
Definition: SCH.c:106
int fn_NetSim_CR_TransmitDSBurst()
Definition: DSFrame.c:82
int fn_NetSim_CR_MulticastPacket(NetSim_PACKET *pstruPacket, NETSIM_ID nDevId, NETSIM_ID nInterface)
#define FCH_PHY_MODE
Definition: 802_22.h:127
int fn_NetSim_CR_CPE_ProcessFCH(NetSim_PACKET *pstruPacket)
Definition: FCH.c:66
int fn_NetSim_CR_TransmitFCH()
Definition: FCH.c:11
int fn_NetSim_CR_UpdateChannel()
@ MMM_CHS_REQ
Channel switch request, Sent by BS in order to switch the entire cell operation to new channel.
Definition: 802_22.h:203
@ MMM_SCH
Definition: 802_22.h:231
@ MMM_BW_REQUEST
Definition: 802_22.h:232
@ MMM_UCD
Definition: 802_22.h:175
@ MMM_US_MAP
Upstream access definition, defines the access to the upstream information.
Definition: 802_22.h:177
@ MMM_DSD_REP
Definition: 802_22.h:189
@ MMM_UCS_NOTIFICATION
Definition: 802_22.h:233
@ MMM_DSA_REQ
Dynamic service addition request, This message is sent by BS or CPE to create new service request.
Definition: 802_22.h:182
@ MMM_DSA_RSP
This message is generated in response to DSA-REQ message.
Definition: 802_22.h:183
@ MMM_DSD_REQ
Dynamic service deletion request.
Definition: 802_22.h:188
@ MMM_DCD
Definition: 802_22.h:172
@ MMM_DS_MAP
Downstream access definition, defines the access to the downstream information.
Definition: 802_22.h:174
@ MMM_FCH
Definition: 802_22.h:230
int fn_NetSim_CR_Configure_F(void **var)
int fn_NetSim_CR_IncumbentStart()
Definition: Incumbent.c:5
double fn_NetSim_CR_CalculateTransmissionTime(double dPacketSize, SYMBOL_PARAMETER *pstruSymbolParameter)
int fn_NetSim_CR_CPE_ProcessDSD_REP()
Definition: DSx.c:340
int fn_NetSim_CR_PacketArrive()
int fn_NetSim_CR_TransmitUSBurst()
Definition: USFrame.c:162
struct stru_802_22_Phy_Mode struPhyMode[MAX_PHY_MODE]
Definition: OFDMA.c:9
#define SCH_PHY_MODE
Definition: 802_22.h:126
int fn_NetSim_CR_FormUSBurst()
Definition: USFrame.c:20
int fn_NetSim_CR_Finish_F()
int fn_NetSim_CR_CPE_PackPacket()
Definition: Fragmentation.c:81
int fn_NetSim_CR_AllocBandwidth(NETSIM_ID nSID, QUALITY_OF_SERVICE nQos, UPLINKALLOCINFO **ppstruInfo, unsigned int nSlotRequired, unsigned int nTotalSlot)
@ TRANSMIT_US_BURST_CONTROL
Definition: 802_22.h:156
@ INCUMBENT_OPERATION_START
Definition: 802_22.h:147
@ TRANSMIT_SCH
Definition: 802_22.h:149
@ FORM_DS_BURST
Definition: 802_22.h:150
@ DSA_RSP_TIMEOUT
Definition: 802_22.h:153
@ DSA_RVD_TIMEOUT
Definition: 802_22.h:154
@ QUIET_PERIOD
Definition: 802_22.h:157
@ FORM_US_BURST
Definition: 802_22.h:152
@ SM_UPDATECHANNEL
Definition: 802_22.h:165
@ TRANSMIT_US_BURST
Definition: 802_22.h:155
@ INCUMBENT_OPERATION_END
Definition: 802_22.h:148
@ TRANSMIT_DS_BURST
Definition: 802_22.h:151
int fn_NetSim_CR_QuietPeriod()
int fn_NetSim_CR_Init_F(struct stru_NetSim_Network *NETWORK_Formal, NetSim_EVENTDETAILS *pstruEventDetails_Formal, char *pszAppPath_Formal, char *pszWritePath_Formal, int nVersion_Type, void **fnPointer)
int fn_NetSim_CR_CPE_SwitchChannel()
int fn_NetSim_CR_BS_UCS()
int fn_NetSim_CR_CPE_ProcessUSMAP()
Definition: USMAP.c:55
int fn_NetSim_CR_FragmentPacket(NetSim_PACKET *pstruPacket, double dSDUSize)
int fn_NetSim_CR_CopyPacket_F(const NetSim_PACKET *pstruDestPacket, const NetSim_PACKET *pstruSrcPacket)
int fn_NetSim_CR_BroadCastPacket(NetSim_PACKET *pstruPacket, NETSIM_ID nDevId, NETSIM_ID nInterface)
unsigned int NETSIM_ID
Definition: Animation.h:45
#define NETSIM_ID
Definition: CLIInterface.h:46
#define _declspec(dllexport)
This function is used to trigger the update.
Definition: Linux.h:41
void * PMETRICSWRITER
Definition: MetricsWriter.h:27
@ PacketType_Control
Definition: Packet.h:66
NetSim_PACKET * fn_NetSim_Packet_GetPacketFromBuffer(NetSim_BUFFER *pstruBuffer, int nFlag)
bool isMulticastPacket(NetSim_PACKET *packet)
bool isBroadcastPacket(NetSim_PACKET *packet)
@ PacketStatus_NoError
Definition: Packet.h:101
NetSim_EVENTDETAILS * pstruEventDetails_Formal
Definition: RIP.h:178
NetSim_EVENTDETAILS char * pszAppPath_Formal
Definition: RIP.h:178
NetSim_EVENTDETAILS char char int nVersion_Type
Definition: RIP.h:178
NetSim_EVENTDETAILS char char * pszWritePath_Formal
Definition: RIP.h:178
NetSim_EVENTDETAILS char char int void ** fnPointer
Definition: RIP.h:178
#define DEVICE_PHYVAR(DeviceId, InterfaceId)
Definition: Stack.h:797
@ PHY_MEDIUM_WIRELESS
Definition: Stack.h:242
@ BASESTATION
Definition: Stack.h:287
@ MAC_PROTOCOL_IEEE802_22
Definition: Stack.h:210
EXPORTED struct stru_NetSim_Network * NETWORK
Definition: Stack.h:742
@ TIMER_EVENT
Definition: Stack.h:114
@ PHYSICAL_OUT_EVENT
Definition: Stack.h:104
@ MAC_OUT_EVENT
Definition: Stack.h:106
@ MAC_IN_EVENT
Definition: Stack.h:107
@ PHYSICAL_IN_EVENT
Definition: Stack.h:105
#define DEVICE_MACVAR(DeviceId, InterfaceId)
Definition: Stack.h:798
EXPORTED struct stru_NetSim_EventDetails * pstruEventDetails
Definition: Stack.h:837
#define DEVICE_PHYLAYER(DeviceId, InterfaceId)
Definition: Stack.h:788
#define fn_NetSim_Metrics_Add(packet)
Definition: Stack.h:998
enum enum_DeviceType netsimDEVICE_TYPE
Definition: main.h:138
#define fn_NetSim_Packet_FreePacket(pstruPacket)
Definition: main.h:177
#define fn_NetSim_WritePacketTrace(pstruPacket)
Definition: main.h:188
#define fnpAddEvent(pstruEvent)
Definition: main.h:191
int * anSIDFromDevId
Have the list of CPE associated with BS. If SID is set CPE is associated else not.
Definition: 802_22.h:802
struct stru_802_22_UplinkAlloctioninfo * uplinkAllocInfo
Definition: 802_22.h:808
NetSim_PACKET * pstruDSPacketList
Definition: 802_22.h:816
double dFrameStartTime
Definition: 802_22.h:807
struct stru_802_22_Channel * pstruOpratingChannel
Currently operating channel.
Definition: 802_22.h:840
SYMBOL_PARAMETER * pstruSymbolParameter
Definition: 802_22.h:854
CPE structure for IEEE 802.22 MAC.
Definition: 802_22.h:869
NETSIM_ID nBSID
Definition: 802_22.h:870
CPE structure for CPE PHY.
Definition: 802_22.h:902
SYMBOL_PARAMETER * pstruSymbol
Same parameter as BS have.
Definition: 802_22.h:910
struct stru_802_22_Channel * pstruOperatingChannel
Definition: 802_22.h:918
CHANNEL_METRICES struChannelMetrics
Definition: 802_22.h:929
unsigned int nUPlinkSymbol
Definition: 802_22.h:988
double dDataRate
Number of uncoded bits/OFDM symbol duration.
Definition: 802_22.h:987
int nOFDMSlots
OFDM Slot = 1 symbol * 1 subChannel.
Definition: 802_22.h:982
double dSymbolDuration
Tsym = Tfft + Tcp in microsec.
Definition: 802_22.h:966
unsigned int nBR
Definition: 802_22.h:1221
struct stru_NetSim_Device_Buffer * pstruAccessBuffer
Definition: Stack.h:592
struct stru_NetSim_Interface ** ppstruInterfaceList
Definition: Stack.h:717
NETSIM_ID nApplicationId
Definition: Stack.h:752
EVENT_TYPE nEventType
Definition: Stack.h:747
NETSIM_ID nProtocolId
Definition: Stack.h:748
struct stru_NetSim_Packet * pPacket
Definition: Stack.h:754
NETSIM_ID nSubEventType
Definition: Stack.h:757
NETSIM_ID nDeviceId
Definition: Stack.h:750
long long int nPacketId
Definition: Stack.h:755
netsimDEVICE_TYPE nDeviceType
Definition: Stack.h:749
NETSIM_ID nInterfaceId
Definition: Stack.h:751
struct stru_NetSim_Access_Interface * pstruAccessInterface
Definition: Stack.h:697
struct stru_NetSim_Device ** ppstruDeviceList
Definition: Stack.h:737
MAC_LAYER_PROTOCOL nMACProtocol
Definition: Packet.h:223
PACKET_STATUS nPacketErrorFlag
Definition: Packet.h:236
PHYSICAL_LAYER_MEDIUM nPhyMedium
Definition: Packet.h:237
PACKET_STATUS nPacketStatus
Definition: Packet.h:272
struct stru_NetSim_Packet_PhyLayer * pstruPhyData
Definition: Packet.h:277
NETSIM_ID nReceiverId
Definition: Packet.h:266
unsigned int nControlDataType
Definition: Packet.h:258
struct stru_NetSim_Packet * pstruNextPacket
Definition: Packet.h:278
NETSIM_ID nTransmitterId
Definition: Packet.h:265
QUALITY_OF_SERVICE nQOS
Definition: Packet.h:261
PACKET_TYPE nPacketType
Definition: Packet.h:257
struct stru_NetSim_Packet_MACLayer * pstruMacData
Definition: Packet.h:276