NetSim Source Code Help
Loading...
Searching...
No Matches
SpectrumManager.c
Go to the documentation of this file.
1#include "main.h"
2#include "802_22.h"
3#include "SpectrumManager.h"
4/** This function is used set the channel number and assign the channel characteristics for all channels */
6{
7 struct stru_802_22_Channel* pstruFirstChannel;
8 int nStartFrequency;
9 int nEndFrequency;
10 int nChannelCount;
11 int nChannelBandwidth;
12 int nLoop;
13 unsigned int nChannelNumber = 1;
14 nStartFrequency = pstruBSPhy->nMINFrequency;
15 nEndFrequency = pstruBSPhy->nMAXFrequency;
16 nChannelBandwidth = pstruBSPhy->nChannelBandwidth;
17 nChannelCount = (nEndFrequency-nStartFrequency)/nChannelBandwidth;
18 if(nChannelCount)
19 {
20 pstruFirstChannel = (struct stru_802_22_Channel*)fnpAllocateMemory(nChannelCount+1,sizeof *pstruFirstChannel);
21 pstruBSPhy->pstruChannelSet = pstruFirstChannel;
22 }
23 else
24 {
25 fnNetSimError("Channel count is 0.\nStart frequency=%d\nEnd Frequency =%d\nBandwidth=%d\nChannel Count=%d\n",nStartFrequency,nEndFrequency,nChannelBandwidth,0);
26 return -1;
27 }
28 for(nLoop=0;nLoop<nChannelCount;nLoop++)
29 {
30 pstruFirstChannel->dChannelBandwidth = nChannelBandwidth;
31 pstruFirstChannel->dLowerFrequency = nStartFrequency;
32 pstruFirstChannel->dUpperFrequency = nStartFrequency + nChannelBandwidth;
33 pstruFirstChannel->nChannelState = ChannelState_UNCLASSIFIED;
34 pstruFirstChannel->pstruNextChannel = pstruFirstChannel+1;
35 pstruFirstChannel->nChannelNumber = nChannelNumber++;
36 nStartFrequency += nChannelBandwidth;
37 pstruFirstChannel++;
38 }
39 pstruFirstChannel--;
40 pstruFirstChannel->pstruNextChannel = NULL;
41 return 0;
42}
43/** This function is used to perform CPE network entry & initialization process */
45{
46 unsigned int nSID=0x001;
47 NETSIM_ID nLoop;
48 BS_MAC* pstruBSMac = (BS_MAC*)DEVICE_MACVAR(nDeviceId,nInterfaceId);
49 BS_PHY* pstruBSPhy = (BS_PHY*)DEVICE_PHYVAR(nDeviceId,nInterfaceId);
50 NetSim_LINKS* pstruLink;
51 CPE_MAC* pstruCPEMAC;
52 CPE_PHY* pstruCPEPhy;
53 NETSIM_ID nCPEID=0;
54 NETSIM_ID nCPEInterfaceId=0;
55 SYMBOL_PARAMETER* pstruSymbol = pstruBSPhy->pstruSymbolParameter;
56 struct stru_802_22_Channel* pstruChannelSet = pstruBSPhy->pstruChannelSet;
57 struct stru_802_22_Channel* pstruOperatingChannel = pstruBSPhy->pstruOpratingChannel;
58 char* szCountryCode = pstruBSMac->szISOCountryCode;
59 pstruLink = DEVICE_PHYLAYER(nDeviceId,nInterfaceId)->pstruNetSimLinks;
60 if(!pstruLink)
61 fnNetSimError("No link found from Device %d and interface %d\n",DEVICE(nDeviceId)->nConfigDeviceId,nInterfaceId);
62 switch(pstruLink->nLinkType)
63 {
64 case LinkType_P2P:
65 if(nDeviceId != pstruLink->puniDevList.pstruP2P.nFirstDeviceId)
66 {
67 nCPEID = pstruLink->puniDevList.pstruP2P.nFirstDeviceId;
68 nCPEInterfaceId = pstruLink->puniDevList.pstruP2P.nFirstInterfaceId;
69 pstruBSMac->anSIDFromDevId[pstruLink->puniDevList.pstruP2P.nFirstDeviceId] = nSID++;
70 }
71 if(nDeviceId != pstruLink->puniDevList.pstruP2P.nSecondDeviceId)
72 {
73 nCPEID = pstruLink->puniDevList.pstruP2P.nSecondDeviceId;
74 nCPEInterfaceId = pstruLink->puniDevList.pstruP2P.nSecondInterfaceId;
75 pstruBSMac->anSIDFromDevId[pstruLink->puniDevList.pstruP2P.nSecondDeviceId] = nSID++;
76 }
77 pstruCPEMAC = (CPE_MAC*)DEVICE_MACVAR(nCPEID,nCPEInterfaceId);
78 pstruCPEPhy = (CPE_PHY*)DEVICE_PHYVAR(nCPEID,nCPEInterfaceId);
79 pstruCPEMAC->nSID = nSID-1;
80 pstruCPEMAC->nBSID = nDeviceId;
81 pstruCPEMAC->nBSInterface = nInterfaceId;
82 pstruCPEPhy->pstruSymbol = pstruSymbol;
83 pstruCPEPhy->pstruChannelSet = pstruChannelSet;
84 pstruCPEPhy->pstruOperatingChannel = pstruOperatingChannel;
85 strcpy(pstruCPEMAC->szCountryCode,szCountryCode);
86 break;
87 case LinkType_P2MP:
88 if(nDeviceId != pstruLink->puniDevList.pstrup2MP.nCenterDeviceId)
89 {
90 nCPEID = pstruLink->puniDevList.pstrup2MP.nCenterDeviceId;
91 nCPEInterfaceId = pstruLink->puniDevList.pstrup2MP.nCenterInterfaceId;
92 pstruBSMac->anSIDFromDevId[pstruLink->puniDevList.pstrup2MP.nCenterDeviceId] = nSID++;
93 pstruCPEMAC = (CPE_MAC*)DEVICE_MACVAR(nCPEID,nCPEInterfaceId);
94 pstruCPEPhy = (CPE_PHY*)DEVICE_PHYVAR(nCPEID,nCPEInterfaceId);
95 pstruCPEMAC->nSID = nSID-1;
96 pstruCPEMAC->nBSID = nDeviceId;
97 pstruCPEMAC->nBSInterface = nInterfaceId;
98 pstruCPEPhy->pstruSymbol = pstruSymbol;
99 pstruCPEPhy->pstruChannelSet = pstruChannelSet;
100 pstruCPEPhy->pstruOperatingChannel = pstruOperatingChannel;
101 strcpy(pstruCPEMAC->szCountryCode,szCountryCode);
102 }
103 for(nLoop=0;nLoop<pstruLink->puniDevList.pstrup2MP.nConnectedDeviceCount-1;nLoop++)
104 {
105 if(nDeviceId != pstruLink->puniDevList.pstrup2MP.anDevIds[nLoop])
106 {
107 nCPEID = pstruLink->puniDevList.pstrup2MP.anDevIds[nLoop];
108 nCPEInterfaceId = pstruLink->puniDevList.pstrup2MP.anDevInterfaceIds[nLoop];
109 pstruBSMac->anSIDFromDevId[pstruLink->puniDevList.pstrup2MP.anDevIds[nLoop]] = nSID++;
110 pstruCPEMAC = (CPE_MAC*)DEVICE_MACVAR(nCPEID,nCPEInterfaceId);
111 pstruCPEPhy = (CPE_PHY*)DEVICE_PHYVAR(nCPEID,nCPEInterfaceId);
112 pstruCPEMAC->nSID = nSID-1;
113 pstruCPEMAC->nBSID = nDeviceId;
114 pstruCPEMAC->nBSInterface = nInterfaceId;
115 pstruCPEPhy->pstruSymbol = pstruSymbol;
116 pstruCPEPhy->pstruChannelSet = pstruChannelSet;
117 pstruCPEPhy->pstruOperatingChannel = pstruOperatingChannel;
118 strcpy(pstruCPEMAC->szCountryCode,szCountryCode);
119 }
120 }
121 break;
122 case LinkType_MP2MP:
123 for(nLoop=0;nLoop<pstruLink->puniDevList.pstruMP2MP.nConnectedDeviceCount;nLoop++)
124 {
125 if(nDeviceId != pstruLink->puniDevList.pstruMP2MP.anDevIds[nLoop])
126 {
127 nCPEID = pstruLink->puniDevList.pstruMP2MP.anDevIds[nLoop];
128 nCPEInterfaceId = pstruLink->puniDevList.pstruMP2MP.anDevInterfaceIds[nLoop];
129 pstruBSMac->anSIDFromDevId[pstruLink->puniDevList.pstruMP2MP.anDevIds[nLoop]] = nSID++;
130 pstruCPEMAC = (CPE_MAC*)DEVICE_MACVAR(nCPEID,nCPEInterfaceId);
131 pstruCPEPhy = (CPE_PHY*)DEVICE_PHYVAR(nCPEID,nCPEInterfaceId);
132 pstruCPEMAC->nSID = nSID-1;
133 pstruCPEMAC->nBSID = nDeviceId;
134 pstruCPEMAC->nBSInterface = nInterfaceId;
135 pstruCPEPhy->pstruSymbol = pstruSymbol;
136 pstruCPEPhy->pstruChannelSet = pstruChannelSet;
137 pstruCPEPhy->pstruOperatingChannel = pstruOperatingChannel;
138 strcpy(pstruCPEMAC->szCountryCode,szCountryCode);
139 }
140 }
141 break;
142 }
143 return 1;
144}
145/** SSA initialization processes shall exist at the BS and CPE. In the case
146of the BS SSA initialization, if there is at least one available channel (N0),
147a selection shall be made and a second round of spectrum sensing shall then take place on the
148adjacent channels of the selected channel.
149If a WRAN signal is detected, RF signal sensing and signal classification shall then be carried
150out on the channel (N0+1 or N0–1 or both) through the sensing path during the identified quiet
151periods to verify the presence and the identity of the incumbent service underneath the WRAN
152operation. In such case, a new available channel will need to be selected. */
154{
155 //Initial scan the channel
156 fn_NetSim_CR_IniScanChannel(pstruBSMAC,pstruBSPHY);
157 //Update the operating channel
159 return 1;
160}
161/** The mechanism for quiet period management consists of the following two sensing stages,
162which are realized through the use of network-wide quiet periods, but which have different
163time scales:
164 a) Intra-frame sensing
165 b) Inter-frame sensing
166
167 For more Information,refer IEEE 802.22-2011 Document Section 7.21.1*/
169{
172 if(pstruBSPhy->nIFQPOffset == pstruBSPhy->nIntraFrameQuietPeriodCycleLength)
173 pstruBSPhy->nIFQPOffset = 0;
174 if(pstruBSPhy->nIntraFrameQuietPeriodCycleLength && !pstruBSPhy->nIFQPOffset)
175 {
177 pstruBSPhy->nIFQPOffset++;
180 }
181 else
182 {
184 pstruBSPhy->nIFQPOffset++;
185 strcpy(pstruSCH->sz_Current_Intra_frame_Quiet_period_Cycle_Frame_Bitmap,"0000000000000000");
186 }
195 return 1;
196}
197/** In order to meet the Channel Detection Time for detecting the presence of incumbents
198in the operating channel, an IEEE 802.22 network shall schedule network-wide quiet periods
199for sensing. During these quiet periods, all network traffic is suspended and base stations
200and CPEs shall perform in-band sensing. This process is coordinated by the BS, which is
201responsible for scheduling the quiet periods.
202
203Note: For further details, please Refer IEEE 802.22-2011 Document Section 7.21 */
205{
208 BS_MAC* pstruBSMAC = (BS_MAC*)DEVICE_MACVAR(pstruCPEMAC->nBSID,pstruCPEMAC->nBSInterface);
209 struct stru_802_22_SSFInput* input;
210 struct stru_802_22_SSFOutput* output;
211 input = (struct stru_802_22_SSFInput*)fnpAllocateMemory(1,sizeof* input);
212 input->nChannelBandwidth = pstruCPEPHY->pstruSymbol->nChannelBandwidth;
214 strcpy(input->szCountryCode,pstruCPEMAC->szCountryCode);
215 input->pstruChannelList = pstruCPEPHY->pstruChannelSet;
217 input->nSensingMode = 0;
221 input->nIncumbentCount = pstruBSMAC->nIncumbentCount;
222 input->pstruIncumbent = pstruBSMAC->pstruIncumbent;
223 //Call SSF function
225 if(output->nSignalPresentVector == 0xFF)
226 {
227 //Generate the UCS notification packet
228 NetSim_PACKET* pstruPacket;
229 NetSim_PACKET* pstruTempPacket;
230 GMH* pstruGMH = (GMH*)fnpAllocateMemory(1,sizeof *pstruGMH);
233 add_dest_to_packet(pstruPacket, pstruCPEMAC->nBSID);
234 pstruPacket->nPacketPriority = Priority_High;
235 pstruPacket->nPacketType = PacketType_Control;
236 pstruPacket->nReceiverId = pstruCPEMAC->nBSID;
237 pstruPacket->nSourceId = pstruEventDetails->nDeviceId;
240 pstruPacket->pstruMacData->dOverhead = GMH_SIZE;
241 pstruPacket->pstruMacData->dPacketSize = GMH_SIZE;
243 pstruPacket->pstruMacData->Packet_MACProtocol = pstruGMH;
244 pstruPacket->pstruMacData->szDestMac = DEVICE_HWADDRESS(pstruCPEMAC->nBSID,pstruCPEMAC->nBSInterface);
245 pstruPacket->pstruMacData->szNextHopMac = DEVICE_HWADDRESS(pstruCPEMAC->nBSID,pstruCPEMAC->nBSInterface);
247 pstruGMH->n_UCS = 1;
248
249 //Add the packet to mac queue
250 pstruTempPacket = pstruCPEMAC->pstruQueuedPacketList[0];
251 if(!pstruTempPacket)
252 {
253 pstruCPEMAC->pstruQueuedPacketList[0] = pstruPacket;
254 }
255 else
256 {
257 while(pstruTempPacket->pstruNextPacket)
258 pstruTempPacket = pstruTempPacket->pstruNextPacket;
259 pstruTempPacket->pstruNextPacket = pstruPacket;
260 }
261 //Add UCS to CR metrics
262 pstruCPEMAC->struCPEMetrics.nUCSSent++;
263 }
264 fnpFreeMemory(input);
265 fnpFreeMemory(output);
266 return 1;
267}
268/** The Spectrum Sensing Function observes the RF spectrum of a television channel for
269a set of signal types and reports the results of this observation. The spectrum sensing
270function is implemented in both the base station and the CPEs. There are MAC management
271frames that allow the base station to control the operation of the spectrum sensing function within each of the
272CPEs. The inputs to the spectrum sensing function come from the SM via SSA. The use of any
273specific sensing technique is optional, as long as the inputs, outputs and behavior meet
274the specification of this sub clause.
275
276Note: For further details, please Refer IEEE 802.22-2011 Document Section 10.4.1 */
277#define PD 0.9
279{
280 struct stru_802_22_SSFOutput* output = (struct stru_802_22_SSFOutput*)fnpAllocateMemory(1,sizeof *output);
281 unsigned int nLoop;
282 double dDistance;
283 int nflag = 0;
284
285 double p = fn_NetSim_Utilities_GenerateRandomNo(&DEVICE(nDevId)->ulSeed[0],
286 &DEVICE(nDevId)->ulSeed[1])/NETSIM_RAND_MAX;
287 if(p<(double)input->nMaxProbabilityOfFalseAlram/100.0)
288 nflag = 1;
289
290 for(nLoop=0;nLoop<input->nIncumbentCount;nLoop++)
291 {
293 {
295 if(dDistance <= input->pstruIncumbent[nLoop]->dKeepOutDistance)
296 {
297 //Incumbent detected
298 //check for possible interference
300 input->pstruChannelList,
301 input->pstruIncumbent[nLoop]->nStartFrequeny,
302 input->pstruIncumbent[nLoop]->nEndFrequency))
303 {
304 p = fn_NetSim_Utilities_GenerateRandomNo(&DEVICE(nDevId)->ulSeed[0],
305 &DEVICE(nDevId)->ulSeed[1])/NETSIM_RAND_MAX;
306 if(p<(double)PD)
307 nflag = 1;
308 }
309 }
310 }
311 }
312 output->nSensingMode = input->nSensingMode;
313 if(nflag)
314 {
315 output->nSignalPresentVector = 0xFF;
316 }
317 else
318 output->nSignalPresentVector = 0x00;
319 return output;
320}
321/** Urgent Coexistence Situation Used by the CPE to alert the BS about an UCS with
322incumbents in the channel currently being used by the BS or either of its adjacent channels:
323
324 0: no incumbent (default)
325 1: incumbent detected */
327{
329 GMH* pstruGMH = (GMH*)pstruPacket->pstruMacData->Packet_MACProtocol;
333 if(pstruGMH->n_UCS == 1 && !pstruBSMAC->nCHSREQFlag)
334 {
335 pstruBSMAC->nCHSREQFlag = ONE;
336 pstruBSMAC->chsFrameCount = 2;
340 //Find the first back up channel
341 pstruChannelList = pstruBSPHY->pstruChannelSet;
342 while(pstruChannelList)
343 {
344 if(pstruChannelList->nChannelState == ChannelState_BACKUP)
345 {
346 NetSim_PACKET* pstruCHS_REQ;
347 //Switch to channel
349 //Generate the channel switch message
351 //Add CHS-REQ to CR Metrics
352 pstruBSMAC->struBSMetrics.nCHS_REQSent++;
353
354 //Add packet to broadcast packet list
355 if(pstruBSMAC->pstruBroadcastPDU)
356 {
357 NetSim_PACKET* pPacket = pstruBSMAC->pstruBroadcastPDU;
358 while(pPacket->pstruNextPacket)
359 pPacket = pPacket->pstruNextPacket;
360 pPacket->pstruNextPacket = pstruCHS_REQ;
361 }
362 else
363 {
364 pstruBSMAC->pstruBroadcastPDU = pstruCHS_REQ;
365 }
367 break;
368 }
369 pstruChannelList = pstruChannelList->pstruNextChannel;
370 }
371 if(pstruChannelList == NULL)
372 {
373 pstruBSPHY->pstruOpratingChannel = NULL;
375 }
376 }
377 return 1;
378}
379/** When the BS decides to switch channels during normal operation, it shall execute
380the following procedure to determine when to schedule the channel switching operation.
381 The BS selects the first backup channel from its backup/candidate channel list,
382it shall select a waiting time T46 to make sure that all its CPEs are prepared for the
383channel switch. The value of T46 is a configuration parameter that could be set by the
384management interface. The first requirement is the value of T46 shall be smaller or equal to
385the maximum allowed channel moving time and the second requirement is that is long enough
386for the CPEs to recover from an incumbent detection.
387
388Note: For further details, please Refer IEEE 802.22-2011 Document Section 7.22.2 */
390{
393 BS_PHY* pstruBSPHY = (BS_PHY*)DEVICE_PHYVAR(pstruCPEMAC->nBSID,pstruCPEMAC->nBSInterface);
394 pstruCPEPHY->pstruOperatingChannel = pstruBSPHY->pstruOpratingChannel;
395 //Add CHS-REQ to CR Metrics
396 pstruCPEMAC->struCPEMetrics.nCHS_REQReceived++;
397 return 1;
398}
399/** This function is used to update the operating channel as well as to update the
400 event details */
402{
405 //Initial scan the channel
406 fn_NetSim_CR_ScanChannel(pstruBSMAC,pstruBSPHY);
407 //Update the operating channel
409 if(pstruBSPHY->pstruOpratingChannel)
410 {
422 }
423 else
424 {
425 pstruEventDetails->dEventTime += 1000000;
427 }
428 return 1;
429}
#define GMH_SIZE
GMH Size is 4 Bytes.
Definition: 802_22.h:121
@ ChannelState_UNCLASSIFIED
Definition: 802_22.h:142
@ ChannelState_PROTECTED
Definition: 802_22.h:141
@ ChannelState_BACKUP
Definition: 802_22.h:139
int fn_NetSim_Check_Interference(unsigned int nChannelNumber, struct stru_802_22_Channel *pstruChannelList, unsigned int nLowerFrequency, unsigned int nHigherFrequency)
int fn_NetSim_CR_UpdateIncumbentMetrics(BS_MAC *pstruBSMAC, BS_PHY *pstruBSPHY, double dTime)
@ 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_UCS_NOTIFICATION
Definition: 802_22.h:233
int fn_NetSim_CR_ScanChannel(BS_MAC *pstruBSMAC, BS_PHY *pstruBSPhy)
#define CR_CONTROL_PACKET(MMM)
Definition: 802_22.h:235
int fn_NetSim_CR_UpdateOperatingChannel(BS_PHY *pstruBSPhy)
@ TRANSMIT_SCH
Definition: 802_22.h:149
int fn_NetSim_CR_IniScanChannel(BS_MAC *pstruBSMAC, BS_PHY *pstruBSPhy)
NetSim_PACKET * fn_NetSim_CR_GenerateBroadcastCtrlPacket(int nDeviceId, int nInterfaceId, MANAGEMENT_MESSAGE nMessageType)
@ IncumbentStatus_OPERATIOAL
Definition: 802_22.h:255
unsigned int NETSIM_ID
Definition: Animation.h:45
CHANNELS * pstruChannelList
#define fnNetSimError(x,...)
Definition: Linux.h:56
#define fnpFreeMemory(p)
Definition: Memory.h:36
#define fnpAllocateMemory(count, size)
Definition: Memory.h:34
@ PacketType_Control
Definition: Packet.h:66
void add_dest_to_packet(NetSim_PACKET *packet, NETSIM_ID dest)
@ Priority_High
Definition: Packet.h:82
int fn_NetSim_CR_FormChannelSet(BS_PHY *pstruBSPhy)
struct stru_802_22_SSFOutput * fn_NetSim_CR_CPE_SSF(struct stru_802_22_SSFInput *input, NETSIM_ID nDevId, NETSIM_ID nInterfaceId)
int fn_NetSim_CR_SSA_Initialization(BS_MAC *pstruBSMAC, BS_PHY *pstruBSPHY)
int fn_NetSim_CR_UpdateChannel()
#define PD
int fn_NetSim_CR_AssociateCPE(NETSIM_ID nDeviceId, NETSIM_ID nInterfaceId)
int fn_Netsim_CR_SM_ScheduleQuietPeriod(BS_PHY *pstruBSPhy, SCH *pstruSCH)
int fn_NetSim_CR_QuietPeriod()
int fn_NetSim_CR_CPE_SwitchChannel()
int fn_NetSim_CR_BS_UCS()
#define DEVICE(DeviceId)
Definition: Stack.h:769
#define DEVICE_HWADDRESS(DeviceId, InterfaceId)
Definition: Stack.h:799
@ ONE
Definition: Stack.h:77
#define DEVICE_PHYVAR(DeviceId, InterfaceId)
Definition: Stack.h:797
@ BASESTATION
Definition: Stack.h:287
double fn_NetSim_Utilities_GenerateRandomNo(unsigned long *uSeed, unsigned long *uSeed1)
@ MAC_PROTOCOL_IEEE802_22
Definition: Stack.h:210
@ TIMER_EVENT
Definition: Stack.h:114
@ MAC_LAYER
Definition: Stack.h:95
#define NETSIM_RAND_MAX
Definition: Stack.h:849
#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
@ LinkType_P2P
Definition: Stack.h:315
@ LinkType_P2MP
Definition: Stack.h:316
@ LinkType_MP2MP
Definition: Stack.h:317
#define DEVICE_POSITION(DeviceId)
Definition: Stack.h:790
double fn_NetSim_Utilities_CalculateDistance(NetSim_COORDINATES *coordinate1, NetSim_COORDINATES *coordinates2)
#define fn_NetSim_Packet_CreatePacket(layer)
Definition: main.h:186
#define fnpAddEvent(pstruEvent)
Definition: main.h:191
char szISOCountryCode[4]
Definition: 802_22.h:791
int * anSIDFromDevId
Have the list of CPE associated with BS. If SID is set CPE is associated else not.
Definition: 802_22.h:802
int nNumSensingPeriod
Definition: 802_22.h:730
double dSensingPeriodDuration
Definition: 802_22.h:737
int nFalseAlramProbability
Definition: 802_22.h:711
double dSensingPeriodInterval
Definition: 802_22.h:745
INCUMBENT ** pstruIncumbent
Definition: 802_22.h:797
NETSIM_ID nIncumbentCount
Definition: 802_22.h:796
unsigned int nIntraFrameQuietPeriodCycleLength
Definition: 802_22.h:855
unsigned int nMINFrequency
Definition: 802_22.h:831
unsigned int nIFQPOffset
Definition: 802_22.h:858
char szIntraframeQuietPeiordBitmap[17]
Definition: 802_22.h:856
unsigned int nIntraFrameQuietPeriodDuration
Definition: 802_22.h:857
struct stru_802_22_Channel * pstruOpratingChannel
Currently operating channel.
Definition: 802_22.h:840
SYMBOL_PARAMETER * pstruSymbolParameter
Definition: 802_22.h:854
unsigned int nMAXFrequency
Maximum frequency <=862 MHz.
Definition: 802_22.h:830
struct stru_802_22_Channel * pstruChannelSet
Channel set where BS can operate
Definition: 802_22.h:839
unsigned int nChannelBandwidth
! Minimum frequency >=54 MHz
Definition: 802_22.h:832
CPE structure for IEEE 802.22 MAC.
Definition: 802_22.h:869
CPE_METRICS struCPEMetrics
Definition: 802_22.h:897
char szCountryCode[4]
Definition: 802_22.h:895
NETSIM_ID nBSInterface
Definition: 802_22.h:871
NETSIM_ID nBSID
Definition: 802_22.h:870
unsigned int nSID
Unique station idetifier.
Definition: 802_22.h:873
NetSim_PACKET * pstruQueuedPacketList[MAX_FID]
Definition: 802_22.h:891
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 * pstruChannelSet
Definition: 802_22.h:919
struct stru_802_22_Channel * pstruOperatingChannel
Definition: 802_22.h:918
CHANNEL_STATE nChannelState
Definition: 802_22.h:928
double dUpperFrequency
Definition: 802_22.h:925
double dLowerFrequency
Definition: 802_22.h:926
unsigned int nChannelNumber
Definition: 802_22.h:924
struct stru_802_22_Channel * pstruNextChannel
Definition: 802_22.h:930
double dChannelBandwidth
Definition: 802_22.h:927
NetSim_COORDINATES * position
Definition: 802_22.h:1020
INCUMBENT_STATUS nIncumbentStatus
Definition: 802_22.h:1016
struct stru_802_22_Channel * pstruChannelList
struct stru_802_22_SSFInput::stru_SensingWindowSpecificationArray SensingWindowSpecificationArray
unsigned int nChannelNumber
unsigned int nIncumbentCount
unsigned int nSensingMode
unsigned int nMaxProbabilityOfFalseAlram
INCUMBENT ** pstruIncumbent
unsigned int nChannelBandwidth
Spectrum Sensing Function output signals.
unsigned int nSensingMode
unsigned int nSignalPresentVector
unsigned int n_Synchronization_Counter_for_Intra_frame_Quiet_Period_Duration
Definition: 802_22.h:392
unsigned int n_Current_Intra_frame_Quiet_Period_Duration
Definition: 802_22.h:340
unsigned int n_Inter_frame_Quiet_Period_Duration
Definition: 802_22.h:399
unsigned int n_Current_Intra_frame_Quiet_Period_Cycle_Offset
Definition: 802_22.h:322
unsigned int n_Current_Intra_frame_Quiet_Period_Cycle_Length
Definition: 802_22.h:312
unsigned int n_Claimed_Intra_frame_Quiet_Period_Duration
Definition: 802_22.h:375
char sz_Current_Intra_frame_Quiet_period_Cycle_Frame_Bitmap[17]
Definition: 802_22.h:329
unsigned int n_Claimed_Intra_frame_Quiet_Period_Cycle_Offset
Definition: 802_22.h:356
unsigned int n_Claimed_Intra_frame_Quiet_Period_Cycle_Length
Definition: 802_22.h:347
unsigned int n_Inter_frame_Quiet_Period_Offset
Definition: 802_22.h:412
unsigned int n_Synchronization_Counter_for_Intra_frame_Quiet_Period_Rate
Definition: 802_22.h:382
unsigned int n_Claimed_Intra_frame_Quiet_period_Cycle_Frame_Bitmap
Definition: 802_22.h:364
int nChannelBandwidth
Channel Bandwidth in MHz.
Definition: 802_22.h:951
unsigned int nCHS_REQReceived
Definition: 802_22.h:668
unsigned int nUCSSent
Definition: 802_22.h:669
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
MAC_LAYER_PROTOCOL nMACProtocol
Definition: Packet.h:223
PNETSIM_MACADDRESS szNextHopMac
Definition: Packet.h:222
PNETSIM_MACADDRESS szDestMac
Definition: Packet.h:221
PNETSIM_MACADDRESS szSourceMac
Definition: Packet.h:220
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
PACKET_TYPE nPacketType
Definition: Packet.h:257
PACKET_PRIORITY nPacketPriority
Definition: Packet.h:260
NETSIM_ID nSourceId
Definition: Packet.h:263
struct stru_NetSim_Packet_MACLayer * pstruMacData
Definition: Packet.h:276