OpticalFilter.h revision 10447:a465576671d4
1#ifndef __DSENT_MODEL_OPTICALGRAPH_OPTICALFILTER_H__
2#define __DSENT_MODEL_OPTICALGRAPH_OPTICALFILTER_H__
3
4#include "model/optical_graph/OpticalNode.h"
5#include "util/CommonType.h"
6
7namespace DSENT
8{
9    class OpticalFilter : public OpticalNode
10    {
11        public:
12            OpticalFilter(const String& instance_name_, OpticalModel* model_, const WavelengthGroup& wavelengths_, bool drop_all_, const WavelengthGroup& drop_wavelengths_);
13            ~OpticalFilter();
14
15        public:
16            // Get the drop all flag
17            bool getDropAll() const;
18            // Get drop wavelengths
19            WavelengthGroup getDropWavelengths() const;
20            // Set and get the drop loss
21            void setDropLoss(double drop_loss_);
22            double getDropLoss() const;
23            // Set and get drop port
24            void setDropPort(OpticalNode* drop_port_);
25            OpticalNode* getDropPort();
26            // Checks to see if a set of wavelengths will be dropped
27            bool isDropped(const WavelengthGroup& wavelengths_) const;
28
29        private:
30            // Disable copy constructor
31            OpticalFilter(const OpticalFilter& node_);
32
33        private:
34            // Whether to drop all the optical signal for the drop wavelengths
35            // i.e. so that the drop wavelengths are not traced anymore
36            const bool m_drop_all_;
37            // The loss incurred from in to drop port
38            double m_drop_loss_;
39            // The wavelengths that are dropped
40            const WavelengthGroup m_drop_wavelengths_;
41            // The node at the drop port
42            OpticalNode* m_drop_port_;
43    };
44
45} // namespace DSENT
46
47#endif // __DSENT_MODEL_OPTICALGRAPH_OPTICALFILTER_H__
48
49