NetSim Source Code Help
Loading...
Searching...
No Matches
UCD.c
Go to the documentation of this file.
1#include "main.h"
2#include "802_22.h"
3/** This message shall be transmitted by the BS at a periodic interval to define
4the characteristics of an upstream physical channel. */
6{
7 NetSim_PACKET* pstruPacket;
8 BS_MAC* pstruBSMAC = (BS_MAC*)DEVICE_MACVAR(nDeviceId,nInterfaceId);
9 BS_PHY* pstruBSPHY = (BS_PHY*)DEVICE_PHYVAR(nDeviceId,nInterfaceId);
10 pstruBSMAC->pstruUCD = (UCD*)calloc(1,sizeof(UCD));
11 pstruBSMAC->pstruUCD->nBWRequestBackoffEnd = pstruBSPHY->nBWRequestBackoffEnd;
13 pstruBSMAC->pstruUCD->nConfigurationChangeCount = 0;
14 pstruBSMAC->pstruUCD->nManagementMessageType = MMM_UCD%10;
15 pstruBSMAC->pstruUCD->nUCSNotificationBackoffEnd = 0; //NO UCS
16 pstruBSMAC->pstruUCD->nUCSNotificationBackoffStart = 0; //NO UCS
17 pstruBSMAC->pstruUCD->nUpstreamBurstProfileCount = 0;
18
19 //Create a UCD Packet
20 pstruPacket = fn_NetSim_CR_GenerateBroadcastCtrlPacket(nDeviceId,nInterfaceId,MMM_UCD);
21 return pstruPacket;
22}
@ MMM_UCD
Definition: 802_22.h:175
NetSim_PACKET * fn_NetSim_CR_GenerateBroadcastCtrlPacket(int nDeviceId, int nInterfaceId, MANAGEMENT_MESSAGE nMessageType)
unsigned int NETSIM_ID
Definition: Animation.h:45
#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
NetSim_PACKET * fn_NetSim_CR_FormUCD(NETSIM_ID nDeviceId, NETSIM_ID nInterfaceId)
Definition: UCD.c:5
int nBWRequestBackoffEnd
Final size of BW Request opportunity used by CPEs to contend to send BW requests to BS....
Definition: 802_22.h:849
int nBWRequestBackoffStart
Initial size of BW Request opportunity used by CPEs to contend to send BW requests to BS....
Definition: 802_22.h:848
unsigned int nManagementMessageType
Definition: 802_22.h:1068
unsigned int nBWRequestBackoffStart
Definition: 802_22.h:1070
unsigned int nUCSNotificationBackoffEnd
Definition: 802_22.h:1073
unsigned int nBWRequestBackoffEnd
Definition: 802_22.h:1071
unsigned int nUCSNotificationBackoffStart
Definition: 802_22.h:1072
unsigned int nUpstreamBurstProfileCount
Definition: 802_22.h:1075
unsigned int nConfigurationChangeCount
Definition: 802_22.h:1069