NetSim Source Code Help v14.4
All 13 Components
 
Loading...
Searching...
No Matches
Wireless.h
1/************************************************************************************
2 * Copyright (C) 2023 *
3 * TETCOS, Bangalore. India *
4 * *
5 * Tetcos owns the intellectual property rights in the Product and its content. *
6 * The copying, redistribution, reselling or publication of any or all of the *
7 * Product or its content without express prior written consent of Tetcos is *
8 * prohibited. Ownership and / or any other right relating to the software and all *
9 * intellectual property rights therein shall remain at all times with Tetcos. *
10 * *
11 * Author: Shashi Kant Suman *
12 * *
13 * ---------------------------------------------------------------------------------*/
14#ifndef _NETSIM_WIRELESS_H_
15#define _NETSIM_WIRELESS_H_
16#ifdef __cplusplus
17extern "C" {
18#endif
19
20#ifndef NETSIM_ID
21 typedef unsigned int NETSIM_ID; //unique id
22#endif
23
24 typedef double CODINGRATE;
25
26#include "PropagationModel.h"
27
28 typedef enum enum_Modulation
29 {
30 Modulation_Zero, // Keep me in first
31 Modulation_DBPSK,
32 Modulation_DQPSK,
33 Modulation_CCK5_5,
34 Modulation_CCK11,
35 Modulation_BPSK,
36 Modulation_QPSK,
37 Modulation_8_QAM,
38 Modulation_16_QAM,
39 Modulation_32_QAM,
40 Modulation_64_QAM,
41 Modulation_128_QAM,
42 Modulation_256_QAM,
43 Modulation_1024_QAM,
44 Modulation_GMSK,
45 Modulation_FSK,
46 Modulation_8PSK,
47 Modulation_16APSK,
48 Modulation_32APSK,
49 Modulation_CPM,
50 Modulation_MSK,
51 Modulation_LAST, // Keep me in last
52 }PHY_MODULATION;
53 static const char* strPHY_MODULATION[] = {
54 "NULL",
55 "DBPSK",
56 "DQPSK",
57 "CCK5.5",
58 "CCK11",
59 "BPSK",
60 "QPSK",
61 "8QAM",
62 "16QAM",
63 "32QAM",
64 "64QAM",
65 "128QAM",
66 "256QAM",
67 "1024QAM",
68 "GMSK",
69 "FSK",
70 "8PSK",
71 "16APSK",
72 "32APSK",
73 "CPM",
74 "MSK"
75 };
76
77 /* Enumeration for Transmitter status */
78 typedef enum enum_tx_status
79 {
80 RX_OFF,
81 RX_ON_IDLE,
82 RX_ON_BUSY,
83 TRX_ON_BUSY,
84 SLEEP,
85 }PHY_TX_STATUS;
86
87 typedef struct stru_phytype_wireless
88 {
89 double dUpperFrequency;
90 double dLowerFrequency;
91 double dChannelBandwidth;
92 PHY_TX_STATUS txStatus;
93 double dTransmitPower_mw;
94 double dTransmitPower_dbm;
95 double* dReceivedPower_dbm;
96 PHY_MODULATION modulation;
97 }PHYPROP_WIRELESS,*PPHYPROP_WIRELESS;
98
99 //Function Prototype
100 _declspec(dllexport) PPHYPROP_WIRELESS get_phy_type_wireless(NETSIM_ID nDeviceId,NETSIM_ID nInterfaceId);
101 _declspec(dllexport) void fn_NetSim_Wireless_SetFrequency(NETSIM_ID nDeviceId,
102 NETSIM_ID nInterfaceId,
103 double dUpperFrequency,
104 double dLowerFrequency);
105 _declspec(dllexport) void fn_NetSim_Wireless_SetChannelBandwidth(NETSIM_ID nDeviceId,
106 NETSIM_ID nInterfaceId,
107 double dChannelBandwidth);
108 _declspec(dllexport) void fn_NetSim_Wireless_SetTxStatus(NETSIM_ID nDeviceId,
109 NETSIM_ID nInterfaceId,
110 PHY_TX_STATUS txStatus);
111 _declspec(dllexport) void fn_NetSim_Wireless_SetTxPower_mw(NETSIM_ID nDeviceId,
112 NETSIM_ID nInterfaceId,
113 double txPower_mw);
114 _declspec(dllexport) void fn_NetSim_Wireless_SetTxPower_dbm(NETSIM_ID nDeviceId,
115 NETSIM_ID nInterfaceId,
116 double txPower_dbm);
117 _declspec(dllexport) void fn_NetSim_Wireless_SetRxPower_dbm(NETSIM_ID nDeviceId,
118 NETSIM_ID nInterfaceId,
119 NETSIM_ID nTransmitterId,
120 double rxPower_dbm);
121 _declspec(dllexport) void fn_NetSim_Wireless_SetRxPower_mw(NETSIM_ID nDeviceId,
122 NETSIM_ID nInterfaceId,
123 NETSIM_ID nTransmitterId,
124 double rxPower_mw);
125 _declspec(dllexport) void fn_NetSim_Wireless_GetRxPower(NETSIM_ID recvId,
126 NETSIM_ID recvInterface,
127 NETSIM_ID transmitterId,
128 double* rxPower_mw,
129 double* rxPower_dbm);
130 _declspec(dllexport) void fn_NetSim_Wireless_SetModulation(NETSIM_ID nDeviceId,
131 NETSIM_ID nInterfaceId,
132 PHY_MODULATION modulation);
133 _declspec(dllexport) void fn_NetSim_Wireless_SetProperty(NETSIM_ID nDeviceId,
134 NETSIM_ID nInterfaceId,
135 double dUpperFrequency,
136 double dLowerFrequency,
137 double dChannelBandwidth,
138 double dTxPower_mw,
139 PHY_MODULATION modulation,
140 PHY_TX_STATUS txStatus);
141 _declspec(dllexport) void fn_NetSim_Wireless_GetProperty(NETSIM_ID nDeviceId,
142 NETSIM_ID nInterfaceId,
143 double* dUpperFrequency,
144 double* dLowerFrequency,
145 double* dChannelBandwidth,
146 double* dTxPower_mw,
147 PHY_MODULATION* modulation,
148 PHY_TX_STATUS* txStatus);
149
150
151
152#ifdef __cplusplus
153}
154#endif
155#endif //_NETSIM_WIRELESS_H_