PtrIEEE802_15_4_PHY_VAR phy = WSN_PHY(nDeviceId) Inside fn_NetSim_Zigbee_ChangeRadioState() function present in ChangeRadioState.c file add following codes(highlighted in red):īool fn_NetSim_Zigbee_ChangeRadioState(NETSIM_ID nDeviceId, PHY_TX_STATUS nOldState, PHY_TX_STATUS nNewState) Note: The power source needs to be set to Battery to see the effect of this code change to see the impact. Note that NetSim is a discrete event simulator and hence you may see this line printed multiple times, each time that particular event (where the fprintf is written) is called.Įxample 1: Printing remaining power of sensors in WSN You may insert such a line at a suitable place. Fprintf () statement can be used to print to NetSim console using the default file descriptor stderr.įprintf(stderr, "The value of the variable X is %d\n", X)
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |