Skip to content

Commit

Permalink
Refactor missed frequency fields
Browse files Browse the repository at this point in the history
  • Loading branch information
non-det-alle committed Oct 23, 2024
1 parent 88aa5f9 commit a929065
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions model/end-device-lorawan-mac.cc
Original file line number Diff line number Diff line change
Expand Up @@ -886,8 +886,8 @@ EndDeviceLorawanMac::SetLogicalChannel(uint8_t chIndex,
}

void
EndDeviceLorawanMac::AddSubBand(double startFrequencyHz,
double endFrequencyHz,
EndDeviceLorawanMac::AddSubBand(uint32_t startFrequencyHz,
uint32_t endFrequencyHz,
double dutyCycle,
double maxTxPowerDbm)
{
Expand Down
4 changes: 2 additions & 2 deletions model/end-device-lorawan-mac.h
Original file line number Diff line number Diff line change
Expand Up @@ -331,8 +331,8 @@ class EndDeviceLorawanMac : public LorawanMac
* \param dutyCycle The SubBand's duty cycle, in fraction form.
* \param maxTxPowerDbm The maximum transmission power allowed on the SubBand.
*/
void AddSubBand(double startFrequencyHz,
double endFrequencyHz,
void AddSubBand(uint32_t startFrequencyHz,
uint32_t endFrequencyHz,
double dutyCycle,
double maxTxPowerDbm);

Expand Down
16 changes: 8 additions & 8 deletions model/lora-interference-helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@ class LoraInterferenceHelper
/**
* Get the frequency this event was on.
*
* \return The carrier frequency as a double.
* \return The carrier frequency [Hz] as a uint32_t.
*/
double GetFrequency() const;
uint32_t GetFrequency() const;

/**
* Print the current event in a human readable form.
Expand All @@ -120,12 +120,12 @@ class LoraInterferenceHelper
void Print(std::ostream& stream) const;

private:
Time m_startTime; //!< The time this signal begins (at the device).
Time m_endTime; //!< The time this signal ends (at the device).
uint8_t m_sf; //!< The spreading factor of this signal.
double m_rxPowerdBm; //!< The power of this event in dBm (at the device).
Ptr<Packet> m_packet; //!< The packet this event was generated for.
double m_frequencyHz; //!< The frequency this event was on.
Time m_startTime; //!< The time this signal begins (at the device).
Time m_endTime; //!< The time this signal ends (at the device).
uint8_t m_sf; //!< The spreading factor of this signal.
double m_rxPowerdBm; //!< The power of this event in dBm (at the device).
Ptr<Packet> m_packet; //!< The packet this event was generated for.
uint32_t m_frequencyHz; //!< The carrier frequency [Hz] this event was on.
};

/**
Expand Down
4 changes: 2 additions & 2 deletions model/sub-band.h
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@ class SubBand : public Object
double GetMaxTxPowerDbm() const;

private:
double m_firstFrequencyHz; //!< Starting frequency of the subband, in Hz
double m_lastFrequencyHz; //!< Ending frequency of the subband, in Hz
uint32_t m_firstFrequencyHz; //!< Starting frequency of the subband, in Hz
uint32_t m_lastFrequencyHz; //!< Ending frequency of the subband, in Hz
double m_dutyCycle; //!< The duty cycle that needs to be enforced on this subband
Time m_nextTransmissionTime; //!< The next time a transmission will be allowed in this subband
double m_maxTxPowerDbm; //!< The maximum transmission power that is admitted on this subband
Expand Down

0 comments on commit a929065

Please sign in to comment.