else
{
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[TOKEN] 刷新 Token 失败");
+ websocket_retry_connect_count++;
+ if (websocket_retry_connect_count >= 100)
+ {
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[TOKEN] 网络离线,无法刷新 Token,重试次数超过10次,进入休眠");
+ ln_ws_enter_sleep();
+ }
+ else
+ {
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[TOKEN] 网络离线,无法刷新 Token,重试次数: %d", websocket_retry_connect_count);
+ }
return NULL;
}
}
{
if (device_id == NULL || device_iccid == NULL)
{
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "ln_get_device_token_http: invalid parameters");
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "ln_get_device_token_http: invalid parameters,device_id=%s,device_iccid=%s", device_id, device_iccid);
return ERRCODE_FAIL;
}
"data": {\r
"textContent": "你好,我听到了你的话",\r
"audioUrl": "https://example.com/response_audio.mp3",\r
- "intention": null,\r
- "npcEmotion": null\r
+ "intention": "None",\r
+ "npcEmotion": "Winking"\r
}\r
}\r
}\r
|--------|------|------|\r
| textContent | String | 回复的文本内容 |\r
| audioUrl | String | 回复音频文件URL |\r
-| intention | String | 用户意图识别结果,如"StartSleepMode"等 |\r
+| audioDuration | Integer | 回复音频时长,单位:毫秒 |\r
+| intention | String | 用户意图识别结果,如"None","StartSleepMode"等 |\r
| npcEmotion | String | NPC情感状态,如"happy"等 |\r
\r
\r