OLD | NEW |
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ | 1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
2 /* | 2 /* |
3 * Copyright (c) 2012 CTTC | 3 * Copyright (c) 2012 CTTC |
4 * | 4 * |
5 * This program is free software; you can redistribute it and/or modify | 5 * This program is free software; you can redistribute it and/or modify |
6 * it under the terms of the GNU General Public License version 2 as | 6 * it under the terms of the GNU General Public License version 2 as |
7 * published by the Free Software Foundation; | 7 * published by the Free Software Foundation; |
8 * | 8 * |
9 * This program is distributed in the hope that it will be useful, | 9 * This program is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 */ | 50 */ |
51 class RemSpectrumPhy : public SpectrumPhy | 51 class RemSpectrumPhy : public SpectrumPhy |
52 { | 52 { |
53 | 53 |
54 public: | 54 public: |
55 RemSpectrumPhy (); | 55 RemSpectrumPhy (); |
56 virtual ~RemSpectrumPhy (); | 56 virtual ~RemSpectrumPhy (); |
57 | 57 |
58 // inherited from Object | 58 // inherited from Object |
59 void DoDispose (); | 59 void DoDispose (); |
| 60 /** |
| 61 * \brief Get the type ID. |
| 62 * \return the object TypeId |
| 63 */ |
60 static TypeId GetTypeId (void); | 64 static TypeId GetTypeId (void); |
61 | 65 |
62 // inherited from SpectrumPhy | 66 // inherited from SpectrumPhy |
63 void SetChannel (Ptr<SpectrumChannel> c); | 67 void SetChannel (Ptr<SpectrumChannel> c); |
64 void SetMobility (Ptr<MobilityModel> m); | 68 void SetMobility (Ptr<MobilityModel> m); |
65 void SetDevice (Ptr<NetDevice> d); | 69 void SetDevice (Ptr<NetDevice> d); |
66 Ptr<MobilityModel> GetMobility (); | 70 Ptr<MobilityModel> GetMobility (); |
67 Ptr<NetDevice> GetDevice () const; | 71 Ptr<NetDevice> GetDevice () const; |
68 Ptr<const SpectrumModel> GetRxSpectrumModel () const; | 72 Ptr<const SpectrumModel> GetRxSpectrumModel () const; |
69 Ptr<AntennaModel> GetRxAntenna (); | 73 Ptr<AntennaModel> GetRxAntenna (); |
70 void StartRx (Ptr<SpectrumSignalParameters> params); | 74 void StartRx (Ptr<SpectrumSignalParameters> params); |
71 | 75 |
72 /**· | 76 /**· |
73 * set the RX spectrum model to be used | 77 * set the RX spectrum model to be used |
74 *· | 78 *· |
75 * \param m· | 79 * \param m· |
76 */ | 80 */ |
77 void SetRxSpectrumModel (Ptr<const SpectrumModel> m); | 81 void SetRxSpectrumModel (Ptr<const SpectrumModel> m); |
78 | 82 |
79 /**· | 83 /**· |
80 *· | 84 *· |
| 85 * \param noisePower the noise power |
81 * \return the Signal to Noise Ratio calculated· | 86 * \return the Signal to Noise Ratio calculated· |
82 */ | 87 */ |
83 double GetSinr (double noisePower); | 88 double GetSinr (double noisePower); |
84 | 89 |
85 /** | 90 /** |
86 * make StartRx a no-op from now on, and mark instance as inactive | 91 * make StartRx a no-op from now on, and mark instance as inactive |
87 * | 92 * |
88 */ | 93 */ |
89 void Deactivate (); | 94 void Deactivate (); |
90 | 95 |
(...skipping 17 matching lines...) Expand all Loading... |
108 void SetUseDataChannel (bool value); | 113 void SetUseDataChannel (bool value); |
109 | 114 |
110 /** | 115 /** |
111 * set RB Id | 116 * set RB Id |
112 * | 117 * |
113 * \param rbId Resource Block Id which will be processed | 118 * \param rbId Resource Block Id which will be processed |
114 */ | 119 */ |
115 void SetRbId (int32_t rbId); | 120 void SetRbId (int32_t rbId); |
116 | 121 |
117 private: | 122 private: |
118 Ptr<MobilityModel> m_mobility; | 123 Ptr<MobilityModel> m_mobility; ///< the mobility model |
119 Ptr<const SpectrumModel> m_rxSpectrumModel; | 124 Ptr<const SpectrumModel> m_rxSpectrumModel; ///< receive spectrum model |
120 | 125 |
121 double m_referenceSignalPower; | 126 double m_referenceSignalPower; ///< reference signal power |
122 double m_sumPower; | 127 double m_sumPower; ///< sum power |
123 | 128 |
124 bool m_active; | 129 bool m_active; ///< is active? |
125 | 130 |
126 bool m_useDataChannel; | 131 bool m_useDataChannel; ///< use data channel |
127 int32_t m_rbId; | 132 int32_t m_rbId; ///< RBID |
128 | 133 |
129 }; | 134 }; |
130 | 135 |
131 | 136 |
132 | 137 |
133 | 138 |
134 | 139 |
135 | 140 |
136 } | 141 } |
137 | 142 |
138 | 143 |
139 | 144 |
140 | 145 |
141 | 146 |
142 #endif /* REM_SPECTRUM_PHY_H */ | 147 #endif /* REM_SPECTRUM_PHY_H */ |
OLD | NEW |