I can get the value of Wifi RSSI. but don't know how to convert it into level of Wifi strength as we can see in the menubar in Mac OSX (If I receive a strong Wifi, the wifi status will be bold black on all 4 lines of wifi icon).
Is there any methods or library that I can use to do this? Thx in advance.
I don't think you'll find anything in the API to do this.
I think you might have to Use Science™ and do a manual check, literally walking away from your WiFi access point with laptop in hand, noting down the RSSI values at which the WiFi signal indicator icon changes. Do this a few times and you'll likely find a correlation. I can't imagine it would take more than ten or fifteen minutes to get a good range of sample values.
It's probably worth trying it with more than one type of Mac, if possible.