45
inline friend std::ostream& operator<<(std::ostream& out, Mode mode)
49
case Mode::unknown: out << "Mode::unknown"; break;
50
case Mode::adhoc: out << "Mode::adhoc"; break;
51
case Mode::infrastructure: out << "Mode::infrastructure"; break;
59
50
/** @brief Tags a frequency measurement for a wireless network. */
81
bool operator==(const WirelessNetwork& rhs) const
83
return bssid == rhs.bssid &&
86
frequency == rhs.frequency &&
87
signal_strength == rhs.signal_strength;
90
friend std::ostream& operator<<(std::ostream& out, const WirelessNetwork& wifi)
93
<< "bssid: " << wifi.bssid << ", "
94
<< "ssid: " << wifi.ssid << ", "
95
<< "mode: " << wifi.mode << ", "
96
<< "frequency: " << wifi.frequency << ", "
97
<< "strength: " << wifi.signal_strength
101
73
std::string bssid; ///< The BSSID of the network.
102
74
std::string ssid; ///< The SSID of the network.
103
75
Mode mode; ///< The mode of the network.
104
76
Frequency frequency; ///< Frequency of the network/AP.
105
77
SignalStrength signal_strength; ///< Signal quality of the network/AP in percent.
80
/** @brief Returns true iff lhs equals rhs. */
81
bool operator==(const WirelessNetwork& lhs, const WirelessNetwork& rhs);
83
/** @brief Pretty-prints the given mode to the given output stream. */
84
std::ostream& operator<<(std::ostream& out, WirelessNetwork::Mode mode);
86
/** @brief Pretty-prints the given wireless network to the given output stream. */
87
std::ostream& operator<<(std::ostream& out, const WirelessNetwork& wifi);