Since the energy model is a node attribute, it may be defined by the following node configuration APIs:
$ns_ node-config -energyModel $energymodel \ -rxPower $p_rx \ -txPower $p_tx \ -initialEnergy $initialenergyOptional values for above configuration parameters of the energy model are given in the following table:
Attribute | optional values | default values |
-energyModel | "EnergyModel" | none |
-rxPower | receiving power in watts (e.g 0.3) | 281.8mW |
-txPower | transmitting power in watts (e.g 0.4) | 281.8mW |
-initialEnergy | energy in joules (e.g 0.1) | 0.0 |