This function parses the format of the WiFi name using a regular expression to split the format string into individual components. It then replaces the placeholders in the format string with the actual values of the device's MAC address, UUID, and SN (serial number) to generate the final WiFi name. If any of these values are invalid or missing, the function replaces the corresponding placeholder with the string "unknown". The function also checks for different sources of the WiFi name format (license, AP platform configuration file, or default value) and uses the highest priority source available. Finally, the function logs the generated WiFi name and returns it as a string

stdstring TuyaParameterWifiNameFormatParse stdstring wifi_format_str; stdstring wifi_regex = ^+; JsonValue other_info_json = GetOtherInfo; stdstring tmp_str; JsoncppParseReadParseJsonT

原文地址: https://www.cveoy.top/t/topic/dxox 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录