[Ns-developers] A few more questions/comments about wireless-phy

Mathieu Lacage Mathieu.Lacage at sophia.inria.fr
Mon Nov 20 03:57:40 PST 2006


On Mon, 2006-11-20 at 10:50 +0100, Ruben Merz wrote:
> In wireless-phy.cc: why Phy80211 and not WirelessPHY?

because I did a copy/paste error.

> 
> 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

ok.

>     *
>     */
> 
> 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

What other information would you put in there ?

>     *
>     */
> 
> 
> 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;
>    }

Yes, this makes sense. I think we need to update the proposal to do what
you requested, that is, export the array of modes and channels to the
MAC.

Mathieu
-- 



More information about the Ns-developers mailing list