2008年1月1日 星期二

per packet power control

For per packet power control, transmit power needsto be associated with every packet. An appropriate place for this is hdr_cmn in common/packet.h, which is somewhat analogous to struct skbuff in the Linux kernel. We add a new field txpower_ in hdr_cmn, which is an integer denoting the powerlevel.

Code is added in WirelessPhy::sendDown() to extract the power level from the common header and set Pt_ equal to the transmit power corresponding to that power level. The mapping between power levels and the exact value in watts is controlled by the variables TxPowerVal_x_ (x=1 to 6), which can be set from tcl space. Another variable DefaultTxPowerLevel_ can be set from tcl for everynode which is used for setting the Pt_ for those packets in which txpower_ in hdr_cmn is set to zero.

沒有留言: