⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fading.hpp

📁 RFID reader 语 tag 模拟器
💻 HPP
字号:
 #ifndef FADING_H #define FADING_H #include <map> using namespace std; #include <boost/shared_ptr.hpp> #include <boost/utility.hpp> #include "utility.hpp" class WirelessCommSignal; class PhysicalLayer; class NodeId; class Fading : boost::noncopyable { public:    typedef boost::shared_ptr<Fading> FadingPtr;    virtual ~Fading();    virtual double fadingFactor(const WirelessCommSignal& signal,       const NodeId& nodeId) = 0; protected:    map<NodeId,int> m_nodeOffset;    Fading();    Fading(const Fading& rhs); private:    Fading& operator= (const Fading& rhs); }; typedef boost::shared_ptr<Fading> FadingPtr; class Ricean : public Fading { public:    typedef boost::shared_ptr<Ricean> RiceanPtr;    static inline RiceanPtr create();    static inline RiceanPtr create(const Ricean& rhs);    static inline RiceanPtr create(double maxVelocity, double k);    virtual double fadingFactor(const WirelessCommSignal& signal,       const NodeId& nodeId); protected:    Ricean();    Ricean(double maxVelocity, double k);    Ricean(const Ricean& rhs);    static const double m_DEFAULT_MAX_VELOCITY; private:    static const double m_DEFAULT_K;    static const t_uint m_NUMBER_OF_POINTS;    static const double m_MAX_DOPPLER_FREQUENCY;    static const double m_MAX_SAMPLE_RATE;    static const double m_GAUSSIAN_DATA1[];    static const double m_GAUSSIAN_DATA2[];    double m_maxVelocity;    double m_kParameter;    Ricean& operator= (const Ricean& rhs); }; typedef boost::shared_ptr<Ricean> RiceanPtr; class Rayleigh : public Ricean { public:    typedef boost::shared_ptr<Rayleigh> RayleighPtr;    static inline RayleighPtr create();    static inline RayleighPtr create(const Rayleigh& rhs);    static inline RayleighPtr create(double maxVelocity); protected:    Rayleigh();    Rayleigh(double maxVelocity);    Rayleigh(const Rayleigh& rhs); private:    Rayleigh& operator= (const Rayleigh& rhs); }; typedef boost::shared_ptr<Rayleigh> RayleighPtr; // Inline Functions inline RiceanPtr Ricean::create() {    RiceanPtr p(new Ricean());    return p; } inline RiceanPtr Ricean::create(double maxVelocity, double k) {    RiceanPtr p(new Ricean(maxVelocity, k));    return p; } inline RiceanPtr Ricean::create(const Ricean& rhs) {    RiceanPtr p(new Ricean(rhs));    return p; } inline RayleighPtr Rayleigh::create() {    RayleighPtr p(new Rayleigh());    return p; } inline RayleighPtr Rayleigh::create(double maxVelocity) {    RayleighPtr p(new Rayleigh(maxVelocity));    return p; } inline RayleighPtr Rayleigh::create(const Rayleigh& rhs) {    RayleighPtr p(new Rayleigh(rhs));    return p; } // Overloaded Operators #endif // FADING_H

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -