NetSim Source Code Help
Loading...
Searching...
No Matches
DCD.c
Go to the documentation of this file.
1#include "main.h"
2#include "802_22.h"
3/** DCD (Downstream Channel Descriptor) message shall be transmitted by the BS at a
4periodic interval to define the characteristics of a downstream physical channel. */
6{
7 BS_MAC* pstruBSMAC = (BS_MAC*)DEVICE_MACVAR(nDeviceId,nInterfaceId);
8 BS_PHY* pstruBSPHY = (BS_PHY*)DEVICE_PHYVAR(nDeviceId,nInterfaceId);
9 pstruBSMAC->pstruDCD = (DCD*)calloc(1,sizeof(DCD));
10 pstruBSMAC->pstruDCD->nConfigurationChangeCount = 0;
13 pstruBSMAC->pstruDCD->pstruDCDChannelIE.EIRP = 0;
15 pstruBSMAC->pstruDCD->pstruDCDChannelIE.nActionMode = 0;
20 pstruBSMAC->pstruDCD->pstruDCDChannelIE.nMACVersion = 0x01;
21 pstruBSMAC->pstruDCD->pstruDCDChannelIE.RSS = 0;
23 return fn_NetSim_CR_GenerateBroadcastCtrlPacket(nDeviceId,nInterfaceId,MMM_DCD);
24}
#define B3_000
Definition: 802_22.h:31
@ MMM_DCD
Definition: 802_22.h:172
NetSim_PACKET * fn_NetSim_CR_GenerateBroadcastCtrlPacket(int nDeviceId, int nInterfaceId, MANAGEMENT_MESSAGE nMessageType)
unsigned int NETSIM_ID
Definition: Animation.h:45
NetSim_PACKET * fn_NetSim_CR_FormDCD(NETSIM_ID nDeviceId, NETSIM_ID nInterfaceId)
Definition: DCD.c:5
#define calloc(c, s)
Definition: Memory.h:29
#define DEVICE_PHYVAR(DeviceId, InterfaceId)
Definition: Stack.h:797
#define DEVICE_MACVAR(DeviceId, InterfaceId)
Definition: Stack.h:798
unsigned int nSuperframeNumber
Current super frame number
Definition: 802_22.h:828
unsigned int nFrameNumber
Current super frame number
Definition: 802_22.h:829
struct stru_802_22_DCD_Channel_Information_Element::stru_802_22_BackupChannelList struBackupChannelList
struct stru_802_22_DCD_Channel_Information_Element pstruDCDChannelIE
Definition: 802_22.h:1130
unsigned int nDownStreamBurstProfileCount
Definition: 802_22.h:1131
unsigned int nConfigurationChangeCount
Definition: 802_22.h:1129
unsigned int nManagementMessageType
Definition: 802_22.h:1128