OpticalDetector.h revision 10447
1#ifndef __DSENT_MODEL_OPTICALGRAPH_OPTICALDETECTOR_H__
2#define __DSENT_MODEL_OPTICALGRAPH_OPTICALDETECTOR_H__
3
4#include "model/optical_graph/OpticalNode.h"
5#include "util/CommonType.h"
6
7namespace DSENT
8{
9    class OpticalReceiver;
10
11    class OpticalDetector : public OpticalNode
12    {
13        public:
14            OpticalDetector(const String& instance_name_, OpticalModel* model_, const WavelengthGroup& wavelengths_, OpticalReceiver* receiver_);
15            ~OpticalDetector();
16
17        public:
18            // Set the responsitivity of the photodetector
19            void setResponsivity(double responsivity_);
20
21            // Get the detector sensitivity given an extinction ratio (in Watts)
22            double getSensitivity(double ER_dB_) const;
23
24            // Ask the receiver for its power (ONLY use for power optimization, as this
25            // assumes an activity of 1.0)
26            double getPower() const;
27
28        private:
29            // Disable copy constructor
30            OpticalDetector(const OpticalDetector& node_);
31
32        private:
33            // The required laser power
34            double m_sensitivity_;
35            // The receiver connected to this detector
36            OpticalReceiver* m_receiver_;
37            // Responsivity of the photodetector
38            double m_responsivity_;
39
40    };
41
42} // namespace DSENT
43
44#endif // __DSENT_MODEL_OPTICALGRAPH_OPTICALDETECTOR_H__
45
46