To print the Received power and BER in NetSim console, follow the steps given below:


STEP 1: Open  function fn_NetSim_IEEE802_11_MacInit() present in IEEE802_11_Mac.c file inside IEEE802_11 project


STEP 2:  Inside the function fn_NetSim_IEEE802_11_MacInit(), make the modifications as given below (hightlighted in red) : 


static int fn_NetSim_IEEE802_11_MacInit()
{
PIEEE802_11_MAC_VAR mac=IEEE802_11_CURR_MAC;
NetSim_BUFFER* pstruBuffer = DEVICE_ACCESSBUFFER(pstruEventDetails->nDeviceId,pstruEventDetails->nInterfaceId);

if (pstruEventDetails->nDeviceType == ACCESSPOINT)
{
fprintf(stderr, "\nAccess Point %d current buffer size = %f\n", pstruEventDetails->nDeviceId, pstruBuffer->dCurrentBufferSize);
}


while(fn_NetSim_GetBufferStatus(pstruBuffer))
{
NetSim_PACKET* pstruPacket = fn_NetSim_Packet_GetPacketFromBuffer(pstruBuffer,1);

.....


STEP 3: After the source code is modified, rebuild IEEE802_11 module and replace the newly built libIEEE802.11.dll file in the bin folder of NetSim after renaming the original libIEEE802.11.dll file to say, libIEEE802.11_original.dll as a backup


STEP 4: Create a simple scenario in internetworks with a Wired node,  Router, Access point and  a Wireless node. Run simulation for 10 seconds and user can see the following output on the console