RingDetector.h revision 10447:a465576671d4
1#ifndef __DSENT_MODEL_OPTICAL_RINGDETECTOR_H__
2#define __DSENT_MODEL_OPTICAL_RINGDETECTOR_H__
3
4#include "util/CommonType.h"
5#include "model/OpticalModel.h"
6#include "model/optical_graph/OpticalReceiver.h"
7
8namespace DSENT
9{
10    class RingDetector : public OpticalModel, public OpticalReceiver
11    {
12        public:
13            // Receiver topolgy strings
14            static const String INTEGRATINGSENSEAMP;
15
16        public:
17            RingDetector(const String& instance_name_, const TechModel* tech_model_);
18            virtual ~RingDetector();
19
20        public:
21            // Set a list of properties' name needed to construct model
22            void initParameters();
23            // Set a list of properties' name needed to construct model
24            void initProperties();
25            // Returns the sensitivity of the receiver given an extinction ratio
26            double getSensitivity(double ER_dB_) const;
27
28        private:
29            // Precompute values based on tech parameters
30            void precomputeTech();
31            // Design the receiver helper function
32            void designReceiver();
33            // Calculates inverse normal cdf
34            double calcInvNormCdf(double num_);
35
36        protected:
37            // Build the model
38            virtual void constructModel();
39            virtual void updateModel();
40            virtual void useModel();
41            virtual void propagateTransitionInfo();
42
43        private:
44            // Precomputed numbers
45            double m_quad_a_;
46            double m_quad_b1_;
47            double m_quad_b2_;
48            double m_quad_c_;
49
50    }; // class RingDetector
51} // namespace DSENT
52
53#endif // __DSENT_MODEL_OPTICAL_RINGDETECTOR_H__
54
55