diff --git a/src/core/model/attribute.h b/src/core/model/attribute.h index a90785e32..af3da5569 100644 --- a/src/core/model/attribute.h +++ b/src/core/model/attribute.h @@ -273,6 +273,13 @@ public: virtual bool HasSetter (void) const; }; +/** + * \ingroup attribute + * + * \brief Create an empty AttributeAccessor. + * + * \returns The empty AttributeAccessor (runtime exception if used) + */ static inline Ptr MakeEmptyAttributeAccessor () { @@ -298,6 +305,13 @@ public: virtual bool Copy (const AttributeValue &source, AttributeValue &destination) const; }; +/** + * \ingroup attribute + * + * \brief Create an empty AttributeChecker. + * + * \returns The empty AttributeChecker (runtime exception if used) + */ static inline Ptr MakeEmptyAttributeChecker () { diff --git a/src/core/model/nstime.h b/src/core/model/nstime.h index 6de2620cd..d4976d5bc 100644 --- a/src/core/model/nstime.h +++ b/src/core/model/nstime.h @@ -723,44 +723,107 @@ namespace TracedValueCallback { /// Force static initialization of Time static bool NS_UNUSED_GLOBAL (g_TimeStaticInit) = Time::StaticInit (); +/** + * \ingroup time + * \brief Equality operator for Time. + * \param [in] lhs The first value + * \param [in] rhs The second value + * \returns true if the two input values are equal. + */ inline bool operator == (const Time & lhs, const Time & rhs) { return lhs.m_data == rhs.m_data; } +/** + * \ingroup time + * \brief Inequality operator for Time. + * \param [in] lhs The first value + * \param [in] rhs The second value + * \returns true if the two input values not are equal. + */ inline bool operator != (const Time & lhs, const Time & rhs) { return lhs.m_data != rhs.m_data; } +/** + * \ingroup time + * \brief Less than or equal operator for Time. + * \param [in] lhs The first value + * \param [in] rhs The second value + * \returns true if the first input value is less than or equal to the second input value. + */ inline bool operator <= (const Time & lhs, const Time & rhs) { return lhs.m_data <= rhs.m_data; } +/** + * \ingroup time + * \brief Greater than or equal operator for Time. + * \param [in] lhs The first value + * \param [in] rhs The second value + * \returns true if the first input value is greater than or equal to the second input value. + */ inline bool operator >= (const Time & lhs, const Time & rhs) { return lhs.m_data >= rhs.m_data; } +/** + * \ingroup time + * \brief Less than operator for Time. + * \param [in] lhs The first value + * \param [in] rhs The second value + * \returns true if the first input value is less than the second input value. + */ inline bool operator < (const Time & lhs, const Time & rhs) { return lhs.m_data < rhs.m_data; } +/** + * \ingroup time + * \brief Greater than operator for Time. + * \param [in] lhs The first value + * \param [in] rhs The second value + * \returns true if the first input value is greater than the second input value. + */ inline bool operator > (const Time & lhs, const Time & rhs) { return lhs.m_data > rhs.m_data; } +/** + * \ingroup time + * \brief Addition operator for Time. + * \param [in] lhs The first value + * \param [in] rhs The second value + * \returns the sum of the two input values. + */ inline Time operator + (const Time & lhs, const Time & rhs) { return Time (lhs.m_data + rhs.m_data); } +/** + * \ingroup time + * \brief Difference operator for Time. + * \param [in] lhs The first value + * \param [in] rhs The seconds value + * \returns the difference of the two input values. + */ inline Time operator - (const Time & lhs, const Time & rhs) { return Time (lhs.m_data - rhs.m_data); } +/** + * \ingroup time + * \brief Multiplication operator for Time. + * \param [in] lhs The first value + * \param [in] rhs The second value + * \returns the product of the two input values. + */ inline Time operator * (const Time & lhs, const int64_t & rhs) { @@ -768,6 +831,13 @@ operator * (const Time & lhs, const int64_t & rhs) res.m_data *= rhs; return res; } +/** + * \ingroup time + * \brief Multiplication operator for Time. + * \param [in] lhs The first value + * \param [in] rhs The second value + * \returns the product of the two input values. + */ inline Time operator * (const int64_t & lhs, const Time & rhs) { @@ -775,12 +845,26 @@ operator * (const int64_t & lhs, const Time & rhs) res.m_data *= lhs; return res; } +/** + * \ingroup time + * \brief Division operator for Time. + * \param [in] lhs The first value + * \param [in] rhs The second value + * \returns the resultof the first input value divided by the second input value. + */ inline int64_t operator / (const Time & lhs, const Time & rhs) { int64_t res = lhs.m_data / rhs.m_data; return res; } +/** + * \ingroup time + * \brief Division operator for Time. + * \param [in] lhs The first value + * \param [in] rhs The second value + * \returns the resultof the first input value divided by the second input value. + */ inline Time operator / (const Time & lhs, const int64_t & rhs) { @@ -788,11 +872,25 @@ operator / (const Time & lhs, const int64_t & rhs) res.m_data /= rhs; return res; } +/** + * \ingroup time + * \brief Addition operator for Time. + * \param [in] lhs The first value + * \param [in] rhs The second value + * \returns the result of the first input value plus the second input value. + */ inline Time & operator += (Time & lhs, const Time & rhs) { lhs.m_data += rhs.m_data; return lhs; } +/** + * \ingroup time + * \brief Subtraction operator for Time. + * \param [in] lhs The first value + * \param [in] rhs The second value + * \returns the result of the first input value minus the second input value. + */ inline Time & operator -= (Time & lhs, const Time & rhs) { lhs.m_data -= rhs.m_data; diff --git a/src/core/model/type-id.cc b/src/core/model/type-id.cc index aa4015632..b8310a298 100644 --- a/src/core/model/type-id.cc +++ b/src/core/model/type-id.cc @@ -1181,11 +1181,23 @@ TypeId::SetUid (uint16_t uid) m_tid = uid; } +/** + * \brief Insertion operator for TypeId + * \param [in] os the output stream + * \param [in] tid the TypeId + * \returns the updated output stream. + */ std::ostream & operator << (std::ostream &os, TypeId tid) { os << tid.GetName (); return os; } +/** + * \brief Extraction operator for TypeId + * \param [in] is the input stream + * \param [out] tid the TypeId value + * \returns the updated input stream. + */ std::istream & operator >> (std::istream &is, TypeId &tid) { std::string tidString; diff --git a/src/wifi/model/error-rate-model.h b/src/wifi/model/error-rate-model.h index a167cb163..e0a80e4e1 100644 --- a/src/wifi/model/error-rate-model.h +++ b/src/wifi/model/error-rate-model.h @@ -33,6 +33,10 @@ namespace ns3 { class ErrorRateModel : public Object { public: + /** + * \brief Get the type ID. + * \return the object TypeId + */ static TypeId GetTypeId (void); /** @@ -60,7 +64,7 @@ public: * other information as needed. * * \param mode the Wi-Fi mode applicable to this chunk - * \param txvector TXVECTOR of the overall transmission + * \param txVector TXVECTOR of the overall transmission * \param snr the SNR of the chunk * \param nbits the number of bits in this chunk * diff --git a/src/wifi/model/qos-utils.cc b/src/wifi/model/qos-utils.cc index 99eb42edd..0de917641 100644 --- a/src/wifi/model/qos-utils.cc +++ b/src/wifi/model/qos-utils.cc @@ -93,6 +93,12 @@ QosUtilsIsOldPacket (uint16_t startingSeq, uint16_t seqNumber) return (distance >= 2048); } +/** + * \brief Extraction operator for TypeId + * \param [in] packet is the packet + * \param [in] hdr is Wifi MAC header + * \returns the TypeId of the MAC header + */ uint8_t GetTid (Ptr packet, const WifiMacHeader hdr) { diff --git a/src/wifi/model/wifi-channel.h b/src/wifi/model/wifi-channel.h index 119032d3e..40fe7eb1b 100644 --- a/src/wifi/model/wifi-channel.h +++ b/src/wifi/model/wifi-channel.h @@ -40,6 +40,10 @@ namespace ns3 { class WifiChannel : public Channel { public: + /** + * \brief Get the type ID. + * \return the object TypeId + */ static TypeId GetTypeId (void); }; diff --git a/src/wifi/model/yans-error-rate-model.h b/src/wifi/model/yans-error-rate-model.h index 07063ae60..e2b11032c 100644 --- a/src/wifi/model/yans-error-rate-model.h +++ b/src/wifi/model/yans-error-rate-model.h @@ -54,6 +54,10 @@ namespace ns3 { class YansErrorRateModel : public ErrorRateModel { public: + /** + * \brief Get the type ID. + * \return the object TypeId + */ static TypeId GetTypeId (void); YansErrorRateModel (); diff --git a/src/wifi/model/yans-wifi-channel.h b/src/wifi/model/yans-wifi-channel.h index d3a495125..ec53e05f8 100644 --- a/src/wifi/model/yans-wifi-channel.h +++ b/src/wifi/model/yans-wifi-channel.h @@ -45,6 +45,10 @@ class PropagationDelayModel; class YansWifiChannel : public WifiChannel { public: + /** + * \brief Get the type ID. + * \return the object TypeId + */ static TypeId GetTypeId (void); YansWifiChannel (); diff --git a/src/wifi/model/yans-wifi-phy.h b/src/wifi/model/yans-wifi-phy.h index fed72ff91..346c8fa71 100644 --- a/src/wifi/model/yans-wifi-phy.h +++ b/src/wifi/model/yans-wifi-phy.h @@ -47,6 +47,10 @@ class YansWifiChannel; class YansWifiPhy : public WifiPhy { public: + /** + * \brief Get the type ID. + * \return the object TypeId + */ static TypeId GetTypeId (void); YansWifiPhy ();