mirror of
https://gitee.com/openharmony/communication_wifi.git
synced 2024-11-27 09:12:20 +00:00
关键KPI,无法上网频率
Signed-off-by: Wuhongbo <wuhongbo7@h-partners.com>
This commit is contained in:
parent
353540151f
commit
883317b603
@ -30,6 +30,7 @@ WIFI_SCAN:
|
||||
__BASE: {type: STATISTIC, level: MINOR, tag: PowerStats, desc: Wifi scan event}
|
||||
EXECUTE_RESULT: {type: INT32, desc: 0 is scan fail and 1 is scan success}
|
||||
PACKAGE_NAME: {type: STRING, desc: Package name}
|
||||
FAIL_REASON: {type: STRING, desc: API called fail reason}
|
||||
|
||||
# Wi-Fi event received
|
||||
WIFI_EVENT_RECEIVED:
|
||||
@ -81,7 +82,7 @@ BROWSER_FAILED_FOR_PROTAL:
|
||||
RESP_CODE: {type: INT32, desc: resp code}
|
||||
SERVER: {type: STRING, desc: server}
|
||||
|
||||
WIFI_CONNECT_FAILED_EVENT:
|
||||
WIFI_CONNECT_FAILED:
|
||||
__BASE: {type: FAULT, level: MINOR, desc: wifi connect failed event}
|
||||
ASSOC_FAIL_CNT: {type: INT32, desc: assoc fail cnt}
|
||||
DHCP_FAIL_CNT: {type: INT32, desc: dhcp fail cnt}
|
||||
@ -106,7 +107,9 @@ WIFI_KPI:
|
||||
OPEN_COUNT: {type: INT32, desc: Wifi open count}
|
||||
OPEN_SUCCESS_COUNT: {type: INT32, desc: Wifi open success count}
|
||||
PNO_SCAN_COUNT: {type: INT32, desc: pno scan count}
|
||||
|
||||
INT_ACCESS_FAIL_COUNT: {type: INT32, desc: Number of Internet Access Failures}
|
||||
INT_ACCESS_DURATION: {type: INT32, desc: internet access duration}
|
||||
|
||||
WIFI_KPI_SSID:
|
||||
__BASE: {type: STATISTIC, level: MINOR, desc: Wifi KPI SSID}
|
||||
ABNORMAL_DISCONNECT_COUNT: {type: INT32, desc: sum of abnormal disconnection}
|
||||
|
@ -30,6 +30,7 @@
|
||||
#include "wifi_supplicant_hal_interface.h"
|
||||
#include "wifi_hisysevent.h"
|
||||
#include "wifi_config_center.h"
|
||||
#include "wifi_hisysevent.h"
|
||||
#ifndef OHOS_ARCH_LITE
|
||||
#include "ability_manager_client.h"
|
||||
#include "wifi_net_observer.h"
|
||||
@ -2393,12 +2394,14 @@ void StaStateMachine::HandleNetCheckResult(StaNetState netState, const std::stri
|
||||
WIFI_LOGI("Enter HandleNetCheckResult, netState:%{public}d.", netState);
|
||||
if (linkedInfo.connState != ConnState::CONNECTED) {
|
||||
WIFI_LOGE("connState is NOT in connected state, connState:%{public}d\n", linkedInfo.connState);
|
||||
WriteIsInternetHiSysEvent(false);
|
||||
return;
|
||||
}
|
||||
mPortalUrl = portalUrl;
|
||||
if (netState == StaNetState::NETWORK_STATE_WORKING) {
|
||||
WIFI_LOGI("HandleNetCheckResult network state is working\n");
|
||||
/* Save connection information to WifiSettings. */
|
||||
WriteIsInternetHiSysEvent(true);
|
||||
SaveLinkstate(ConnState::CONNECTED, DetailedState::WORKING);
|
||||
InvokeOnStaConnChanged(OperateResState::CONNECT_NETWORK_ENABLED, linkedInfo);
|
||||
if (portalFlag == true) {
|
||||
@ -2421,6 +2424,7 @@ void StaStateMachine::HandleNetCheckResult(StaNetState netState, const std::stri
|
||||
netNoWorkNum = 0;
|
||||
} else {
|
||||
WIFI_LOGI("HandleNetCheckResult network state is notworking.\n");
|
||||
WriteIsInternetHiSysEvent(false);
|
||||
SaveLinkstate(ConnState::CONNECTED, DetailedState::NOTWORKING);
|
||||
InvokeOnStaConnChanged(OperateResState::CONNECT_NETWORK_DISABLED, linkedInfo);
|
||||
int delay = 1 << netNoWorkNum;
|
||||
|
@ -92,6 +92,8 @@ void WriteP2pConnectFailedHiSysEvent(int errCode, int failRes);
|
||||
void WriteP2pAbDisConnectHiSysEvent(int errCode, int failRes);
|
||||
|
||||
void WriteSoftApAbDisconnectHiSysEvent(int errorCode);
|
||||
|
||||
void WriteIsInternetHiSysEvent(bool isInternet);
|
||||
} // namespace Wifi
|
||||
} // namespace OHOS
|
||||
#endif
|
@ -195,5 +195,14 @@ void WriteSoftApAbDisconnectHiSysEvent(int errorCode)
|
||||
root["ERROR_CODE"] = errorCode;
|
||||
WriteEvent("WIFI_CHR_EVENT", "EVENT_NAME", "SOTFAP_ABNORMAL_DISCONNECT", "EVENT_VALUE", writer.write(root));
|
||||
}
|
||||
|
||||
void WriteIsInternetHiSysEvent(bool isInternet)
|
||||
{
|
||||
Json::Value root;
|
||||
Json::FastWriter writer;
|
||||
root["IS_INTERNET"] = isInternet;
|
||||
WriteEvent("WIFI_CHR_EVENT", "EVENT_NAME", "WIFI_KPI_INTERNET", "EVENT_VALUE", writer.write(root));
|
||||
}
|
||||
|
||||
} // namespace Wifi
|
||||
} // namespace OHOS
|
Loading…
Reference in New Issue
Block a user