next up previous contents index
Next: 3. Support Up: 19. Energy Model in Previous: 19.1 The C++ EnergyModel

   
19.2 The OTcl interface

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 $initialenergy
Optional 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




2000-08-24