wifimanager: add wifi status report msg for Qt UI.
This commit is contained in:
parent
f5c57f6d1d
commit
6cb7b6aa46
|
@ -512,7 +512,8 @@ int api_wifi_state_notify(int state,int rssi, std::string ssid, std::string mac)
|
|||
if(NULL != pEvtJson)
|
||||
{
|
||||
//status = api_wifi_module_cmd_send((1<<MODULE_CONTROLLER),CMD_WIFI_STATE_NTF, pStateJson);
|
||||
status = api_wifi_module_cmd_send(0xffffffff,CMD_WIFI_STATE_NTF, pEvtJson);
|
||||
// TO BE FIXED. msg type & recver.
|
||||
status = api_wifi_module_cmd_send((1<<MODULE_CLOCK_FRAME),CMD_WIFI_STATE_RESP, pEvtJson);
|
||||
if(0 != status)
|
||||
{
|
||||
LOG_EX(LOG_Debug, "Wifi module send wifi state notify msg to control er:%d\r\n",status);
|
||||
|
@ -1005,8 +1006,8 @@ PDBUS_MSG_PACK DBusOnMessage(uv_loop_t *pLoop, DBusConnection *pConn,
|
|||
pResJson = (uint8_t *)api_wifi_res_json_get(rsp_code);
|
||||
if(NULL != pResJson)
|
||||
{
|
||||
if(0 == rsp_code)mask = 1<<MODULE_CONTROLLER | (1<<MODULE_CLOCK_FRAME);
|
||||
else mask = (1<<MODULE_BT)|(1<<MODULE_CONTROLLER) | (1<<MODULE_CLOCK_FRAME);
|
||||
if(0 == rsp_code)mask = 1<<MODULE_CONTROLLER;
|
||||
else mask = (1<<MODULE_BT)|(1<<MODULE_CONTROLLER)|(1<<MODULE_CLOCK_FRAME);
|
||||
|
||||
status = api_wifi_module_cmd_send(mask,CMD_WIFI_CONF_RESP, (const char *)pResJson);
|
||||
if(0 != status)
|
||||
|
|
|
@ -4,16 +4,17 @@
|
|||
static std::thread thdDbusLoop;
|
||||
static const char* g_pDBusInterfaceName = NULL;
|
||||
|
||||
PDBUS_MSG_PACK DBusOnMessage(uv_loop_t *pLoop, DBusConnection *pConn,PDBUS_MSG_PACK pMsg) {
|
||||
|
||||
|
||||
if(pMsg->busCmd != 0xa0a)
|
||||
LOG_EX(LOG_Debug, "Frame module get message cmd:0x%x\r\n",pMsg->busCmd);
|
||||
PDBUS_MSG_PACK DBusOnMessage(uv_loop_t *pLoop, DBusConnection *pConn,PDBUS_MSG_PACK pMsg)
|
||||
{
|
||||
if (!pMsg || !pLoop || !pConn) {
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
if(pMsg->busCmd != 0xa0a)
|
||||
{
|
||||
LOG_EX(LOG_Debug, "Frame module get message cmd:0x%x\r\n",pMsg->busCmd);
|
||||
LOG_EX(LOG_Debug, "Frame module get message: %s\r\n",pMsg->pMsg);
|
||||
}
|
||||
|
||||
LOG_EX(LOG_Debug, "Frame module get message: %s\r\n",pMsg->pMsg);
|
||||
switch (pMsg->busCmd) {
|
||||
case CMD_WIFI_SCAN_RESP:
|
||||
mailbox->recvWifiScanResult(QByteArray(pMsg->pMsg));
|
||||
|
@ -21,8 +22,8 @@ PDBUS_MSG_PACK DBusOnMessage(uv_loop_t *pLoop, DBusConnection *pConn,PDBUS_MSG_P
|
|||
case CMD_WIFI_CONF_RESP:
|
||||
mailbox->recvWifiConfResult(QByteArray(pMsg->pMsg));
|
||||
break;
|
||||
case CMD_WIFI_STATE_NTF:
|
||||
mailbox->recvWifiConfResult(QByteArray(pMsg->pMsg));
|
||||
case CMD_WIFI_STATE_RESP:
|
||||
mailbox->recvWifiStatusChange(QByteArray(pMsg->pMsg));
|
||||
break;
|
||||
case CMD_WIFI_DISCONNECT_RESP:
|
||||
mailbox->recvWifiDisconnectResult(QByteArray(pMsg->pMsg));
|
||||
|
|
Loading…
Reference in New Issue