}
uint64_t
-TestControl::getRcvdPacketsNum(const ExchangeType xchg_type) const {
+TestControl::getRcvdPacketsNum(ExchangeType xchg_type) const {
uint8_t ip_version = CommandOptions::instance().getIpVersion();
if (ip_version == 4) {
return (stats_mgr4_->getRcvdPacketsNum(xchg_type));
}
uint64_t
-TestControl::getSentPacketsNum(const ExchangeType xchg_type) const {
+TestControl::getSentPacketsNum(ExchangeType xchg_type) const {
uint8_t ip_version = CommandOptions::instance().getIpVersion();
if (ip_version == 4) {
return (stats_mgr4_->getSentPacketsNum(xchg_type));
/// Get the number of received packets from the Statistics Manager.
/// Function may throw if Statistics Manager object is not
/// initialized.
+ ///
+ /// \note The method parameter is non-const to suppress the cppcheck
+ /// warning about the object being passed by value. However, passing
+ /// an enum by reference doesn't make much sense. At the same time,
+ /// removing the constness should be pretty safe for this function.
+ ///
/// \param xchg_type packet exchange type.
/// \return number of received packets.
- uint64_t getRcvdPacketsNum(const ExchangeType xchg_type) const;
+ uint64_t getRcvdPacketsNum(ExchangeType xchg_type) const;
/// \brief Get number of sent packets.
///
/// Get the number of sent packets from the Statistics Manager.
/// Function may throw if Statistics Manager object is not
/// initialized.
+ ///
+ /// \note The method parameter is non-const to suppress the cppcheck
+ /// warning about the object being passed by value. However, passing
+ /// an enum by reference doesn't make much sense. At the same time,
+ /// removing the constness should be pretty safe for this function.
+ ///
/// \param xchg_type packet exchange type.
/// \return number of sent packets.
- uint64_t getSentPacketsNum(const ExchangeType xchg_type) const;
+ uint64_t getSentPacketsNum(ExchangeType xchg_type) const;
/// \brief Handle child signal.
///