NetSim Source Code Help
Loading...
Searching...
No Matches
Wireless.h
Go to the documentation of this file.
1/************************************************************************************
2 * Copyright (C) 2020 *
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
48 Modulation_LAST, // Keep me in last
50 static const char* strPHY_MODULATION[] = {
51 "NULL",
52 "DBPSK",
53 "DQPSK",
54 "CCK5.5",
55 "CCK11",
56 "BPSK",
57 "QPSK",
58 "8QAM",
59 "16QAM",
60 "32QAM",
61 "64QAM",
62 "128QAM",
63 "256QAM",
64 "GMSK",
65 "FSK",
66 "8PSK",
67 "16APSK",
68 "32APSK"
69 };
70
71 /* Enumeration for Transmitter status */
72 typedef enum enum_tx_status
73 {
80
81 typedef struct stru_phytype_wireless
82 {
92
93 //Function Prototype
96 NETSIM_ID nInterfaceId,
97 double dUpperFrequency,
98 double dLowerFrequency);
100 NETSIM_ID nInterfaceId,
101 double dChannelBandwidth);
103 NETSIM_ID nInterfaceId,
104 PHY_TX_STATUS txStatus);
106 NETSIM_ID nInterfaceId,
107 double txPower_mw);
109 NETSIM_ID nInterfaceId,
110 double txPower_dbm);
112 NETSIM_ID nInterfaceId,
113 NETSIM_ID nTransmitterId,
114 double rxPower_dbm);
116 NETSIM_ID nInterfaceId,
117 NETSIM_ID nTransmitterId,
118 double rxPower_mw);
120 NETSIM_ID recvInterface,
121 NETSIM_ID transmitterId,
122 double* rxPower_mw,
123 double* rxPower_dbm);
125 NETSIM_ID nInterfaceId,
126 PHY_MODULATION modulation);
128 NETSIM_ID nInterfaceId,
129 double dUpperFrequency,
130 double dLowerFrequency,
131 double dChannelBandwidth,
132 double dTxPower_mw,
133 PHY_MODULATION modulation,
134 PHY_TX_STATUS txStatus);
136 NETSIM_ID nInterfaceId,
137 double* dUpperFrequency,
138 double* dLowerFrequency,
139 double* dChannelBandwidth,
140 double* dTxPower_mw,
141 PHY_MODULATION* modulation,
142 PHY_TX_STATUS* txStatus);
143
144
145
146#ifdef __cplusplus
147}
148#endif
149#endif //_NETSIM_WIRELESS_H_
unsigned int NETSIM_ID
Definition: Animation.h:45
#define _declspec(dllexport)
This function is used to trigger the update.
Definition: Linux.h:41
void fn_NetSim_Wireless_SetProperty(NETSIM_ID nDeviceId, NETSIM_ID nInterfaceId, double dUpperFrequency, double dLowerFrequency, double dChannelBandwidth, double dTxPower_mw, PHY_MODULATION modulation, PHY_TX_STATUS txStatus)
static const char * strPHY_MODULATION[]
Definition: Wireless.h:50
void fn_NetSim_Wireless_GetRxPower(NETSIM_ID recvId, NETSIM_ID recvInterface, NETSIM_ID transmitterId, double *rxPower_mw, double *rxPower_dbm)
PPHYPROP_WIRELESS get_phy_type_wireless(NETSIM_ID nDeviceId, NETSIM_ID nInterfaceId)
struct stru_phytype_wireless PHYPROP_WIRELESS
void fn_NetSim_Wireless_SetRxPower_mw(NETSIM_ID nDeviceId, NETSIM_ID nInterfaceId, NETSIM_ID nTransmitterId, double rxPower_mw)
enum enum_tx_status PHY_TX_STATUS
struct stru_phytype_wireless * PPHYPROP_WIRELESS
enum_tx_status
Definition: Wireless.h:73
@ RX_OFF
Definition: Wireless.h:74
@ RX_ON_BUSY
Definition: Wireless.h:76
@ TRX_ON_BUSY
Definition: Wireless.h:77
@ RX_ON_IDLE
Definition: Wireless.h:75
@ SLEEP
Definition: Wireless.h:78
enum enum_Modulation PHY_MODULATION
double CODINGRATE
Definition: Wireless.h:24
enum_Modulation
Definition: Wireless.h:29
@ Modulation_GMSK
Definition: Wireless.h:43
@ Modulation_CCK5_5
Definition: Wireless.h:33
@ Modulation_LAST
Definition: Wireless.h:48
@ Modulation_32APSK
Definition: Wireless.h:47
@ Modulation_Zero
Definition: Wireless.h:30
@ Modulation_BPSK
Definition: Wireless.h:35
@ Modulation_64_QAM
Definition: Wireless.h:40
@ Modulation_QPSK
Definition: Wireless.h:36
@ Modulation_FSK
Definition: Wireless.h:44
@ Modulation_8_QAM
Definition: Wireless.h:37
@ Modulation_16APSK
Definition: Wireless.h:46
@ Modulation_32_QAM
Definition: Wireless.h:39
@ Modulation_8PSK
Definition: Wireless.h:45
@ Modulation_DQPSK
Definition: Wireless.h:32
@ Modulation_CCK11
Definition: Wireless.h:34
@ Modulation_128_QAM
Definition: Wireless.h:41
@ Modulation_16_QAM
Definition: Wireless.h:38
@ Modulation_256_QAM
Definition: Wireless.h:42
@ Modulation_DBPSK
Definition: Wireless.h:31
void fn_NetSim_Wireless_SetFrequency(NETSIM_ID nDeviceId, NETSIM_ID nInterfaceId, double dUpperFrequency, double dLowerFrequency)
void fn_NetSim_Wireless_GetProperty(NETSIM_ID nDeviceId, NETSIM_ID nInterfaceId, double *dUpperFrequency, double *dLowerFrequency, double *dChannelBandwidth, double *dTxPower_mw, PHY_MODULATION *modulation, PHY_TX_STATUS *txStatus)
void fn_NetSim_Wireless_SetRxPower_dbm(NETSIM_ID nDeviceId, NETSIM_ID nInterfaceId, NETSIM_ID nTransmitterId, double rxPower_dbm)
void fn_NetSim_Wireless_SetModulation(NETSIM_ID nDeviceId, NETSIM_ID nInterfaceId, PHY_MODULATION modulation)
unsigned int NETSIM_ID
Definition: Wireless.h:21
void fn_NetSim_Wireless_SetTxPower_dbm(NETSIM_ID nDeviceId, NETSIM_ID nInterfaceId, double txPower_dbm)
void fn_NetSim_Wireless_SetChannelBandwidth(NETSIM_ID nDeviceId, NETSIM_ID nInterfaceId, double dChannelBandwidth)
void fn_NetSim_Wireless_SetTxPower_mw(NETSIM_ID nDeviceId, NETSIM_ID nInterfaceId, double txPower_mw)
void fn_NetSim_Wireless_SetTxStatus(NETSIM_ID nDeviceId, NETSIM_ID nInterfaceId, PHY_TX_STATUS txStatus)
double * dReceivedPower_dbm
Definition: Wireless.h:89
double dTransmitPower_mw
Definition: Wireless.h:87
PHY_TX_STATUS txStatus
Definition: Wireless.h:86
double dTransmitPower_dbm
Definition: Wireless.h:88
double dChannelBandwidth
Definition: Wireless.h:85
PHY_MODULATION modulation
Definition: Wireless.h:90
double dUpperFrequency
Definition: Wireless.h:83
double dLowerFrequency
Definition: Wireless.h:84