I am trying to use battery power at PHY layer, Bandwidth at MAC layer and Reactive Routing protocol at Network layer to optimized network performance using cross layer approach...
You can find the remaining energy I think from the variable
pstruDevicePower[nDeviceId - 1]->dRemainingPower
It is part of the Power structure in 802.15.4.h
The PHY rate (bandwidth) for 802.15.4 is fixed by the standard at 250 Kbps. To modify this please see https://tetcos.freshdesk.com/support/solutions/articles/14000064748-how-to-change-the-phy-datarate-channel-capacity-in-802-15-4-lrwpan-based-wsn-
What is the logic for using remaining energy / bandwidth in your routing?