ot::LinkQualityInfo::GetLinkQuality() const method
Returns the current one-way link quality value. The link quality value is a number 0-3. The link quality is calculated by comparing the current link margin with a set of thresholds (per Thread spec). More specifically, link margin > 20 dB gives link quality 3, link margin > 10 dB gives link quality 2, link margin > 2 dB gives link quality 1, and link margin below or equal to 2 dB yields link quality of 0. In order to ensure that a link margin near the boundary of two different link quality values does not cause frequent changes, a hysteresis of 2 dB is applied when determining the link quality. For example, the average link margin must be at least 12 dB to change a quality 1 link to a quality 2 link.
Return value
The current link quality value (value 0-3 as per Thread specification).