Applicable VersionsNetSim StandardNetSim Pro

1. Go to the IEEE802_11 project, please add the code given below


IEEE802.11 standard related code (IEEE802_11 Project):

Users can select the IEEE802.11 standard, standard related code description to find Rx power given below, extra code to get Rx power printed on NetSim console has highlighted in red color.


IEEE802.11b- Under IEEE802_11_DSSSPhy.c file int fn_NetSim_IEEE802_11_DSSSPhy_DataRate() function contains code related data rate calculation, user can find the Rx power,

NETSIM_ID in = fn_NetSim_Stack_GetConnectedInterface(nDeviceId, nInterfaceId, nReceiverId);

double power=GET_RX_POWER_dbm(nDeviceId, nInterfaceId, nReceiverId, in, time);


fprintf(stderr, "\n Rx Power = %lf \n", power);

 

IEEE802.11ac/n- Under IEEE802_11_HTPhy.c file int fn_NetSim_IEEE802_11_HTPhy_DataRate() function contains code related data rate calculation, user can find the Rx power,

NETSIM_ID in = fn_NetSim_Stack_GetConnectedInterface(nDeviceId, nInterfaceId, nReceiverId);

double power = GET_RX_POWER_dbm(nDeviceId, nInterfaceId, nReceiverId, in, time);

fprintf(stderr, "\n Rx Power = %lf \n", power);


IEEE802.11a/g/p- Under IEEE802_11_OFDMPhy.c file int fn_NetSim_IEEE802_11_OFDMPhy_DataRate() function contains code related data rate calculation, user can find the Rx power,

NETSIM_ID in = fn_NetSim_Stack_GetConnectedInterface(nDeviceId, nInterfaceId, nReceiverId);

double rssi =GET_RX_POWER_dbm(nDeviceId, nInterfaceId, nReceiverId, in, time); 

 

fprintf(stderr, "\n Rx Power = %lf \n", rssi);


2. Right-click on the IEEE802_11 project in the solution explorer and click on rebuild. 


3. After the IEEE802_11 project is rebuilt successfully, create a network scenario whereby an AP transmits to a wireless node, and run the simulation.

 

Users can define the value of transmitter power by using UI parameter Transmitter Power(mW) (Wireless Node/ Access Point properties -> Interface (wireless) -> Physical layer)


Related article:

how-to-obtain-a-log-of-receiver-sensitivity-received-power-and-phy-data-rate-for-802-11-based-simulations-