11 int nChannelBandwidth;
17 nChannelCount = (nEndFrequency-nStartFrequency)/nChannelBandwidth;
25 fnNetSimError(
"Channel count is 0.\nStart frequency=%d\nEnd Frequency =%d\nBandwidth=%d\nChannel Count=%d\n",nStartFrequency,nEndFrequency,nChannelBandwidth,0);
28 for(nLoop=0;nLoop<nChannelCount;nLoop++)
32 pstruFirstChannel->
dUpperFrequency = nStartFrequency + nChannelBandwidth;
36 nStartFrequency += nChannelBandwidth;
46 unsigned int nSID=0x001;
61 fnNetSimError(
"No link found from Device %d and interface %d\n",
DEVICE(nDeviceId)->nConfigDeviceId,nInterfaceId);
79 pstruCPEMAC->
nSID = nSID-1;
80 pstruCPEMAC->
nBSID = nDeviceId;
95 pstruCPEMAC->
nSID = nSID-1;
96 pstruCPEMAC->
nBSID = nDeviceId;
112 pstruCPEMAC->
nSID = nSID-1;
113 pstruCPEMAC->
nBSID = nDeviceId;
132 pstruCPEMAC->
nSID = nSID-1;
133 pstruCPEMAC->
nBSID = nDeviceId;
295 if(dDistance <= input->pstruIncumbent[nLoop]->dKeepOutDistance)
333 if(pstruGMH->
n_UCS == 1 && !pstruBSMAC->nCHSREQFlag)
335 pstruBSMAC->nCHSREQFlag =
ONE;
336 pstruBSMAC->chsFrameCount = 2;
352 pstruBSMAC->struBSMetrics.nCHS_REQSent++;
355 if(pstruBSMAC->pstruBroadcastPDU)
364 pstruBSMAC->pstruBroadcastPDU = pstruCHS_REQ;
#define GMH_SIZE
GMH Size is 4 Bytes.
@ ChannelState_UNCLASSIFIED
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.
int fn_NetSim_CR_ScanChannel(BS_MAC *pstruBSMAC, BS_PHY *pstruBSPhy)
#define CR_CONTROL_PACKET(MMM)
int fn_NetSim_CR_UpdateOperatingChannel(BS_PHY *pstruBSPhy)
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
CHANNELS * pstruChannelList
#define fnNetSimError(x,...)
#define fnpAllocateMemory(count, size)
void add_dest_to_packet(NetSim_PACKET *packet, NETSIM_ID dest)
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()
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_HWADDRESS(DeviceId, InterfaceId)
#define DEVICE_PHYVAR(DeviceId, InterfaceId)
double fn_NetSim_Utilities_GenerateRandomNo(unsigned long *uSeed, unsigned long *uSeed1)
@ MAC_PROTOCOL_IEEE802_22
#define DEVICE_MACVAR(DeviceId, InterfaceId)
EXPORTED struct stru_NetSim_EventDetails * pstruEventDetails
#define DEVICE_PHYLAYER(DeviceId, InterfaceId)
#define DEVICE_POSITION(DeviceId)
double fn_NetSim_Utilities_CalculateDistance(NetSim_COORDINATES *coordinate1, NetSim_COORDINATES *coordinates2)
#define fn_NetSim_Packet_CreatePacket(layer)
#define fnpAddEvent(pstruEvent)
int * anSIDFromDevId
Have the list of CPE associated with BS. If SID is set CPE is associated else not.
double dSensingPeriodDuration
int nFalseAlramProbability
double dSensingPeriodInterval
INCUMBENT ** pstruIncumbent
NETSIM_ID nIncumbentCount
unsigned int nIntraFrameQuietPeriodCycleLength
unsigned int nMINFrequency
char szIntraframeQuietPeiordBitmap[17]
unsigned int nIntraFrameQuietPeriodDuration
struct stru_802_22_Channel * pstruOpratingChannel
Currently operating channel.
SYMBOL_PARAMETER * pstruSymbolParameter
unsigned int nMAXFrequency
Maximum frequency <=862 MHz.
struct stru_802_22_Channel * pstruChannelSet
Channel set where BS can operate
unsigned int nChannelBandwidth
! Minimum frequency >=54 MHz
CPE structure for IEEE 802.22 MAC.
CPE_METRICS struCPEMetrics
unsigned int nSID
Unique station idetifier.
NetSim_PACKET * pstruQueuedPacketList[MAX_FID]
CPE structure for CPE PHY.
SYMBOL_PARAMETER * pstruSymbol
Same parameter as BS have.
struct stru_802_22_Channel * pstruChannelSet
struct stru_802_22_Channel * pstruOperatingChannel
CHANNEL_STATE nChannelState
unsigned int nChannelNumber
struct stru_802_22_Channel * pstruNextChannel
NetSim_COORDINATES * position
INCUMBENT_STATUS nIncumbentStatus
Spectrum Sensing Function output signals.
unsigned int nSensingMode
unsigned int nSignalPresentVector
int nChannelBandwidth
Channel Bandwidth in MHz.
unsigned int nCHS_REQReceived
struct stru_NetSim_Packet * pPacket
netsimDEVICE_TYPE nDeviceType
NETSIM_ID * anDevInterfaceIds
NETSIM_ID nConnectedDeviceCount
NETSIM_ID nConnectedDeviceCount
NETSIM_ID nCenterInterfaceId
NETSIM_ID * anDevInterfaceIds
NETSIM_ID nCenterDeviceId
NETSIM_ID nSecondInterfaceId
NETSIM_ID nFirstInterfaceId
NETSIM_ID nSecondDeviceId
union stru_NetSim_Links::uni_NetSim_Link_DeviceList puniDevList
MAC_LAYER_PROTOCOL nMACProtocol
PNETSIM_MACADDRESS szNextHopMac
PNETSIM_MACADDRESS szDestMac
void * Packet_MACProtocol
PNETSIM_MACADDRESS szSourceMac
unsigned int nControlDataType
struct stru_NetSim_Packet * pstruNextPacket
PACKET_PRIORITY nPacketPriority
struct stru_NetSim_Packet_MACLayer * pstruMacData
struct stru_NetSim_Links::uni_NetSim_Link_DeviceList::stru_NetSim_P2P pstruP2P
struct stru_NetSim_Links::uni_NetSim_Link_DeviceList::stru_NetSim_P2MP pstrup2MP
struct stru_NetSim_Links::uni_NetSim_Link_DeviceList::stru_NetSim_MP2MP pstruMP2MP