14#ifndef _NETSIM_CELLULAR_H_
15#define _NETSIM_CELLULAR_H_
16#include "IP_Addressing.h"
18#pragma comment(lib,"Mobility.lib")
31#define DATA_RATE 0.270
37 ChannelType_TRAFFICCHANNEL=1,
38}CELLULAR_CHANNEL_TYPE;
43 Status_ChannelRequested,
44 Status_ChannelRequestedForIncoming,
45 Status_ChannelRequestedForHandover,
47 Status_CallInProgress,
51enum enum_cellular_packet_type
53 PacketType_ChannelRequest,
54 PacketType_CallRequest,
55 PacketType_ChannelGranted,
56 PacketType_ChannelUngranted,
57 PacketType_ChannelRequestForIncoming,
58 PacketType_CallAccepted,
59 PacketType_CallRejected,
60 PacketType_ChannelRelease,
61 PacketType_ChannelRequestForHandover,
63 PacketType_HandoverInfo,
66#define CELLULAR_PACKET_TYPE(protocol,type) protocol*100+type
68enum enum_cellular_subevent
73#define CELLULAR_SUBEVENT(protocol,type) protocol*100+type
79 NETSIM_ID nInterfaceId;
80 NETSIM_IPAddress MSIP;
105 NETSIM_ID nChannelId;
109 double dUpLinkMinimumFrequency;
110 double dUpLinkMaximumFrequency;
111 double dDownLinkMinimumFrequency;
112 double dDownLinkMaximumFreqency;
152 double dDuplexDistance;
153 char* szDuplexTechnique;
154 char* szHandoverType;
159 double dTotalBandwidth;
161 double dVoiceActivityFactor;
164 double dChannelDataRate;
166 char* szMultipleAccessTechnology;
167 char* szSpeechCoding;
170 unsigned int nChannelCount;
171 unsigned int nAllocatedChannel;
172 unsigned int nFreeChannel;
173 unsigned int nRACHChannel;
174 unsigned int nTrafficChannel;
181 unsigned int nBTSCount;
182 unsigned int nMSCount;
190 unsigned int nCallGenerated;
191 unsigned int nCallBlocked;
192 double dCallBlockingProbability;
193 unsigned int nChannelRequestSent;
194 unsigned int nCallRequestSent;
195 unsigned int nCallRequestReceived;
196 unsigned int nCallAccepted;
197 unsigned int nCallRejected;
198 unsigned int nHandoverRequest;
199 double dCallDroppingProbability;
200 unsigned int nCallDropeed;
205 char* szMobilieNumber;
209 MS_STATUS nMSStatusFlag;
210 NETSIM_ID nApplicationId;
211 unsigned int nSourceFlag;
215 NETSIM_ID nBTSInterface;
216 Cellular_CHANNEL* pstruAllocatedChannel;
219 NetSim_PACKET**** pstruPacketList;
220 NetSim_PACKET**** receivedPacketList;
225 double dHandoverTime;
228 Cellular_MS_Metrics MSMetrics;
245 unsigned int nRequestType;
247 NETSIM_ID nApplicationId;
253 unsigned int nAllocationFlag;
261 unsigned int nTimeSlot;
263 NETSIM_ID nApplicationId;
267 NetSim_PACKET* originalPacket;
271NetSim_PACKET* fn_NetSim_Cellular_createPacket(
double time,
272 unsigned int nPacketType,
274 NETSIM_ID nDestinationId,
276 MAC_LAYER_PROTOCOL protocol);
277_declspec(dllexport)
int fn_NetSim_FormCDMAChannel(NETSIM_ID nBTSId,Cellular_BS_MAC* BSMac,
int nCDMA_ETA,
int nCDMA_SIGMA,
double dCDMA_DATARATE);
278int fn_NetSim_Cellular_MoveMS(NETSIM_ID nDeviceId,NETSIM_ID nBTSId);
279int fn_NetSim_Cellular_Run();
280int fn_NetSim_Cellular_FreePacket(NetSim_PACKET* packet);
281int fn_NetSim_Cellular_FormBurst(NetSim_PACKET* packet,Cellular_MS_MAC* MSMac);
282int fn_NetSim_Cellular_MS_SendChannelRelease(Cellular_CHANNEL* channel,NETSIM_ID nMSId,NETSIM_ID nMSInterface,
double time);
283int isCellularChannelAllocated(NETSIM_ID nMSId,NETSIM_ID nInterfaceId,NETSIM_ID nApplicationId);
284int fn_NetSim_Cellular_AddPacketToBuffer(NetSim_PACKET* packet,NETSIM_ID nDeviceId,NETSIM_ID nInterfaceId);
285int fn_NetSim_Cellular_AllocateChannel(NetSim_EVENTDETAILS* pstruEventDetails,NetSim_PACKET* packet);
286int fn_NetSim_Cellular_ChannelResponse(NetSim_PACKET* packet);
287int fn_NetSim_Cellular_MS_ProcessCallRequest();
288int fn_NetSim_Cellular_MS_ProcessCallResponse();
289int fn_NetSim_Cellular_MS_SendChannelRelease(Cellular_CHANNEL* channel,NETSIM_ID nMSId,NETSIM_ID nMSInterface,
double time);
290int fn_NetSim_Cellular_DropCall();
291int fn_NetSim_Cellular_MS_ReassembleBurst();
292int fn_NetSim_Cellular_allocateChannel(NetSim_PACKET* packet);
293int fn_NetSim_Cellular_BS_ReleaseChannel();
294int fn_NetSim_GSM_BS_PhyOut();
295int fn_NetSim_Cellular_BS_AssignTimeSlot(NetSim_PACKET* packet,NETSIM_ID nBTSId);
296int fn_NetSim_Cellular_ChannelResponseForHandover();
297int fn_NetSim_Cellular_ForwardToMSC();
298int fn_NetSim_Cellular_HandoverCall(NETSIM_ID nMSId,NETSIM_ID nMSInterface,
double time);
299int fn_NetSim_Cellular_InitBTSList(NETSIM_ID nBTSId);
300int fn_NetSim_Cellular_InitVLRList(NETSIM_ID nMSId,NETSIM_ID nMSInterface);
301int fn_NetSim_Cellular_Metrics(PMETRICSWRITER metricsWriter);
302int fn_NetSim_Cellular_MS_PhyOut();
303int fn_NetSim_Cellular_Msc_ProcessPacket();
304int fn_NetSim_Cellular_SendCallend(NETSIM_ID nMSID,NETSIM_ID nMSInterface,NETSIM_ID nDestinationId,
double time);
305int fn_NetSim_Cellular_TransmitOnwireline();
306int fn_NetSim_FormGSMChannel(DEVVAR_MSC* mscVar);
307int fn_NetSim_Cellular_CopyPacket(NetSim_PACKET* pstruDestPacket,NetSim_PACKET* pstruSrcPacket);
CELLULAR_CHANNEL_TYPE nChannelType
Data structure for Visitor Location Register.