OpticalModulator.h revision 10447
1#ifndef __DSENT_MODEL_OPTICALGRAPH_OPTICALMODULATOR_H__ 2#define __DSENT_MODEL_OPTICALGRAPH_OPTICALMODULATOR_H__ 3 4#include "model/optical_graph/OpticalNode.h" 5#include "util/CommonType.h" 6 7namespace DSENT 8{ 9 class OpticalTransmitter; 10 11 class OpticalModulator : public OpticalNode 12 { 13 public: 14 OpticalModulator(const String& instance_name_, OpticalModel* model_, const WavelengthGroup& wavelengths_, bool opt_loss_, OpticalTransmitter* transmitter_); 15 ~OpticalModulator(); 16 17 public: 18 // Set losses 19 void setLosses(double IL_dB_, double ER_dB_); 20 // Tell the modulator to set a new insertion loss and extinction ratio 21 bool setModulatorSpec(double IL_dB_, double ER_dB_); 22 // Get modulator insertion loss 23 double getInsertionLoss() const; 24 // Get modulator extinction ratio 25 double getExtinctionRatio() const; 26 // Ask whether the model is able to optimize for insertion loss 27 // and extinction ratios 28 bool canOptimizeLoss() const; 29 // Ask the modulator for its power at a given utilization 30 double getPower(double util_) const; 31 32 private: 33 // Disable copy constructor 34 OpticalModulator(const OpticalModulator& node_); 35 36 private: 37 // Optical sender of the modulator 38 OpticalTransmitter* m_transmitter_; 39 // Insertion loss of the modulator 40 double m_insertion_loss_; 41 // Extinction ratio of the modulator 42 double m_extinction_ratio_; 43 // Whether the modulator can be optimized 44 bool m_opt_loss_; 45 46 }; 47 48} // namespace DSENT 49 50#endif // __DSENT_MODEL_OPTICALGRAPH_OPTICALMODULATOR_H__ 51 52