[Ns-developers] A few more questions/comments about wireless-phy
Ruben Merz
ruben.merz at epfl.ch
Mon Nov 20 01:50:26 PST 2006
In wireless-phy.cc: why Phy80211 and not WirelessPHY?
enum WirelessPhy::State
WirelessPhy::GetState (void)
{
if (m_endTx > Now ())
{
/* rmz: why 80211? */
return Phy80211::TX;
}
if (m_endRx > Now ())
{
/* rmz: why 80211? */
return Phy80211::RX;
}
else if (m_syncing)
{
return Phy80211::SYNC;
}
else if (m_endBusy > Now ())
{
return Phy80211::CCA_BUSY;
}
else
{
return Phy80211::IDLE;
}
}
Then, in wireless-phy.h
void SetTxAntennaGainDbm (double txGain);
/**
* \param rxGain rx gain (dbm)
*
* set the rx gain.
*/
void SetRxAntennaGainDbm (double rxGain);
/*
* rmz
*
* This is just a detail, but I would remove the Antenna from the
* function name. Because the gain can come from the antenna or from
* an amplifier, and this both at Rx an Tx
*
*/
Still in wireless-phy.h
void NotifySyncEndOk (Packet p, uint8_t mode, double snr);
void NotifySyncEndError (Packet p, uint8_t mode, double snr);
/* rmz:
*
* maybe we should not restrict ourself to a SNR. Instead, I
* would suggest having a "statistic" class
*
*/
For the transmission mode, why not have a class Mode?
class Mode {
public:
unint32_t getBitRate ();
unint32_t getModulation ();
unint32_t getChannelCodeRate ();
private:
unint8_t m_modulation;
double m_codeRate;
}
Best,
Ruben
More information about the Ns-developers
mailing list