添加手表运行时操作log记录 1531/2 1531/head
authorluozheng <1732036298@qq.com>
Wed, 18 Dec 2024 09:58:33 +0000 (17:58 +0800)
committerluozheng <1732036298@qq.com>
Wed, 18 Dec 2024 09:58:33 +0000 (17:58 +0800)
12 files changed:
code/sdk/application/wearable/fd230app/nativeui/aivoice/src/AiVoiceModel.cpp
code/sdk/application/wearable/fd230app/nativeui/countdown/src/CountDownModel.cpp
code/sdk/application/wearable/fd230app/nativeui/player/src/PlayersModel.cpp
code/sdk/application/wearable/fd230app/nativeui/player/src/PlayersPresenter.cpp
code/sdk/application/wearable/fd230app/nativeui/record/src/RecordingPresenter.cpp
code/sdk/application/wearable/fd230app/nativeui/system/src/SystemLogModel.cpp
code/sdk/application/wearable/service/msg_center/src/msg_center_customer.cpp
code/sdk/application/wearable/service/msg_center/src/notify/alarm_notification.cpp
code/sdk/application/wearable/service/msg_center/src/notify/findwatch_notification.cpp
code/sdk/application/wearable/service/power_manager/src/actions/display_action.c
code/sdk/drivers/peripheral/utils/custom_save_runtime.h
tools/log_parser/runtimeanalysis.py

index 16eb961..2199c1b 100644 (file)
@@ -2,7 +2,7 @@
  * @Author: luozheng 1732036298@qq.com
  * @Date: 2024-06-20 15:14:50
  * @LastEditors: luozheng 1732036298@qq.com
- * @LastEditTime: 2024-12-05 15:04:21
+ * @LastEditTime: 2024-12-18 14:33:30
  * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/aivoice/src/AiVoiceModel.cpp
  */
 #include "aivoice/include/AiVoiceModel.h"
@@ -27,6 +27,7 @@
 #include <unistd.h>
 #include <sys/stat.h>
 #include "bleService.h"
+#include <custom_save_runtime.h>
 namespace OHOS
 {
     // 声明定时器变量
@@ -538,6 +539,7 @@ namespace OHOS
 #elif CURRENT_AIAUDIO_TYPE == AIAUDIO_TYPE_MSBC
             const char *defaultArgs[6] = {"01", "msbc", "16000", "1", "16", audioPath.c_str()};
 #endif
+            uapi_save_runtime_log(RUNTIME_LOG_RECORD_START_AI);//TOOD*
             AudioCaptureSample(6, (const char **)defaultArgs);
         }
         return;
@@ -550,6 +552,7 @@ namespace OHOS
         int32_t argc = 1;
         uint8_t *argv = (uint8_t *)"stop";
         AudioCaptureSample(argc, (const char **)&argv);
+        uapi_save_runtime_log(RUNTIME_LOG_RECORD_STOP_AI);//TOOD*
         return;
     }
 
index 9c8817f..f326026 100644 (file)
@@ -2,7 +2,7 @@
  * @Author: luozheng 1732036298@qq.com\r
  * @Date: 2024-04-07 18:15:53\r
  * @LastEditors: luozheng 1732036298@qq.com\r
- * @LastEditTime: 2024-11-21 16:38:01\r
+ * @LastEditTime: 2024-12-18 17:42:19\r
  * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/countdown/src/CountDownModel.cpp\r
  */\r
 #include "countdown/include/CountDownModel.h"\r
@@ -20,6 +20,7 @@
 #include "NativeAbility.h"\r
 #include <custom_utils.h>\r
 #include <errcode.h>\r
+#include <custom_save_runtime.h>\r
 namespace OHOS\r
 {\r
     /* -------------------------------------------------------------------------- */\r
@@ -208,7 +209,12 @@ namespace OHOS
         // playerCtr->SetVolume(50, 50); // 将左声道和右声道音量都设置为50\r
         playerCtr->SetAudioSessionId(sessionId);\r
         // 播放\r
-        playerCtr->Play();\r
+        ret = playerCtr->Play();\r
+        if(ret == 0)\r
+        {\r
+            //如果倒计时铃声播放成功,记录该事件\r
+            uapi_save_runtime_log(RUNTIME_LOG_RING_PLAY_START_COUNTDOWN);//TOOD*\r
+        }\r
         playerCtr->EnableSingleLooping(true); // 设置是否循环播放\r
         return OHOS_SUCCESS;\r
     }\r
@@ -258,6 +264,8 @@ namespace OHOS
                 WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[CountDownModel] Failed to stop the player");\r
                 return OHOS_FAILURE;\r
             }\r
+            //如果倒计时铃声停止播放成功,记录该事件\r
+            uapi_save_runtime_log(RUNTIME_LOG_RING_PLAY_STOP_COUNTDOWN);//TOOD*\r
         }\r
         ret = playerCtr->Reset();\r
         if (ret != 0)\r
index bf5da77..5ab941c 100644 (file)
@@ -23,6 +23,7 @@
 #include "bluetooth/include/BluetoothHeadsetEvent.h"
 #include <bts_a2dp_sink.h>
 #include "system/include/SystemLogModel.h"
+#include <custom_save_runtime.h>
 namespace OHOS {
 
 static constexpr int VOLUME_MAXIMUM = 100;
@@ -139,6 +140,9 @@ int PlayersModel::PlayerStat()
         }
         AudioManager::GetInstance().DeactivateAudioInterrupt(interrupt);
         isActivateAudioInterrupt = false;
+    } else {
+        //如果播放成功,记录该事件
+        uapi_save_runtime_log(RUNTIME_LOG_LOCAL_MUSIC_PLAY_START);//TOOD*
     }
     return OHOS_SUCCESS;
 }
@@ -485,6 +489,9 @@ int PlayersModel::PlayerPlay(void)
         if (ret != 0) {
             WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "Play err, ret:%d", ret);
             return EXECUTE_FUNC_FAILED;
+        } else {
+            //如果播放成功,记录该事件
+            uapi_save_runtime_log(RUNTIME_LOG_LOCAL_MUSIC_PLAY_START);//TOOD*
         }
         PlayersModel::GetInstance()->SetPlayButtonState(true);      // 播放控件图形同步
         ConncetBtResetButton(); // 蓝牙连接的音频控制,对按钮属性进行设置
@@ -526,6 +533,8 @@ int PlayersModel::PlayerPause(void)
             WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "Pause err, ret:%d!!", ret);
             return EXECUTE_FUNC_FAILED;
         } else {
+            //本地音乐暂停成功,记录该事件
+            uapi_save_runtime_log(RUNTIME_LOG_LOCAL_MUSIC_PLAY_PAUSE);//TOOD*
             PlayersModel::GetInstance()->SetPlayButtonState(false);
             ConncetBtResetButton();
             return NORMAL;
@@ -550,6 +559,7 @@ int PlayersModel::PlayerStop(void)
         return EXECUTE_FUNC_FAILED;
     }
     if (state == PlayerStates::PLAYER_STARTED || state == PlayerStates::PLAYER_PLAYBACK_COMPLETE) {
+        
         int ret = playerCtr->Stop();
         if (ret != 0) {
             WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "Stop err, ret:%d", ret);
@@ -564,6 +574,8 @@ int PlayersModel::PlayerStop(void)
             PlayersModel::GetInstance()->SetPlayButtonState(false);
             PlayersModel::GetInstance()->SetCircleProgress(0);
             ConncetBtResetButton();
+            // 本地音乐停止成功,记录该事件
+            uapi_save_runtime_log(RUNTIME_LOG_LOCAL_MUSIC_PLAY_STOP);//TOOD*
         }
         AudioManager::GetInstance().DeactivateAudioInterrupt(interrupt);
         return NORMAL;
@@ -576,6 +588,8 @@ int PlayersModel::PlayerStop(void)
             PlayersModel::GetInstance()->SetPlayButtonState(false);
             PlayersModel::GetInstance()->SetCircleProgress(0);
             ConncetBtResetButton();
+            // 本地音乐停止成功,记录该事件
+            uapi_save_runtime_log(RUNTIME_LOG_LOCAL_MUSIC_PLAY_STOP);//TOOD*
         }
         AudioManager::GetInstance().DeactivateAudioInterrupt(interrupt);
         return NORMAL;
@@ -693,7 +707,11 @@ void PlayersModel::ConnectBtAndLocalPlay(int32_t connCtState, int32_t connTgStat
     if (connCtState == HFP_SCO_STATE_CONNECTED || connTgState == HFP_SCO_STATE_CONNECTED) {
         if (playerState == PlayerStates::PLAYER_PAUSED) {
                 WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "BTPLAYER_PAUSED play, 122.");
-                PlayersModel::GetInstance()->GetPlayerCtr()->Play(); // 暂停后的播放
+                ret = PlayersModel::GetInstance()->GetPlayerCtr()->Play(); // 暂停后的播放
+                if (ret == 0) {
+                    //如果播放成功,记录该事件
+                    uapi_save_runtime_log(RUNTIME_LOG_LOCAL_MUSIC_PLAY_START);//TOOD*
+                }
                 PlayersModel::GetInstance()->SetBTMusicPlay(playNotification);
         } else {
                 ret = PlayersModel::GetInstance()->PlayerStat(); // 蓝牙连接播放
@@ -706,7 +724,11 @@ void PlayersModel::ConnectBtAndLocalPlay(int32_t connCtState, int32_t connTgStat
     } else {
         if (playerState == PlayerStates::PLAYER_PAUSED) {
                 WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "PLAYER_PAUSED play, 122.");
-                PlayersModel::GetInstance()->GetPlayerCtr()->Play();
+                ret = PlayersModel::GetInstance()->GetPlayerCtr()->Play();
+                if (ret == 0) {
+                    //如果播放成功,记录该事件
+                    uapi_save_runtime_log(RUNTIME_LOG_LOCAL_MUSIC_PLAY_START);//TOOD*
+                }
         } else {
                 ret = PlayersModel::GetInstance()->PlayerStat(); // 本地播放
                 if (ret != 0) {
@@ -737,6 +759,11 @@ void PlayersModel::ConnectBtAndLocalPause(int32_t connCtState, int32_t connTgSta
         ret = PlayersModel::GetInstance()->GetPlayerCtr()->Pause(); // 本地暂停
         WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "Pause, ret:%d", ret);
     }
+    if(ret == 0)
+    {
+        //本地音乐暂停成功,记录该事件
+        uapi_save_runtime_log(RUNTIME_LOG_LOCAL_MUSIC_PLAY_PAUSE);//TOOD*
+    }
 }
 
 void PlayersModel::ClearActivateAudioInterrupt()
index 987d006..70c45b4 100644 (file)
@@ -26,6 +26,7 @@
 #include "ConfigModel.h"\r
 #include "ctype.h"\r
 #include <custom_utils.h>\r
+#include <custom_save_runtime.h>\r
 namespace OHOS {\r
 static PlayerOnDragListener *g_pPlayerOnDragListener = nullptr;\r
 static JumpView *g_pJumpView = nullptr;\r
@@ -1021,6 +1022,8 @@ static void Pause(void)
     if (state == PLAYER_STARTED) {\r
         ret = player->Pause();\r
         if (ret == 0) {\r
+            //本地音乐暂停成功,记录该事件\r
+            uapi_save_runtime_log(RUNTIME_LOG_LOCAL_MUSIC_PLAY_PAUSE);//TOOD*\r
             if (playersView == nullptr) {\r
                 PlayersModel::GetInstance()->SetPlayButtonState(false);\r
             } else {\r
@@ -1062,6 +1065,8 @@ static void Resume(void)
     if (state == PLAYER_PAUSED && PlayerIntrptListener->IsPaused() == true) {\r
         ret = player->Play();\r
         if (ret == 0) {\r
+            //如果播放成功,记录该事件\r
+            uapi_save_runtime_log(RUNTIME_LOG_LOCAL_MUSIC_PLAY_START);//TOOD*\r
             if (playersView == nullptr) {\r
                 PlayersModel::GetInstance()->SetPlayButtonState(true);\r
             } else {\r
index ac45664..84a7b8f 100644 (file)
@@ -2,7 +2,7 @@
  * @Author: luozheng 1732036298@qq.com\r
  * @Date: 2024-03-30 09:14:38\r
  * @LastEditors: luozheng 1732036298@qq.com\r
- * @LastEditTime: 2024-11-05 14:38:39\r
+ * @LastEditTime: 2024-12-18 14:33:46\r
  * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/record/src/RecordingPresenter.cpp\r
  */\r
 \r
@@ -20,6 +20,7 @@
 #include <unistd.h>\r
 #include "record/include/RecordingModel.h"\r
 #include <cstring>\r
+#include <custom_save_runtime.h>\r
 \r
 namespace OHOS\r
 {\r
@@ -198,6 +199,7 @@ namespace OHOS
         p_RecordingModel->SetRecordFileName(recordfileNme);\r
         sprintf(args[5], "%s%s.mp3", RecordingModel::GetInstance()->GetRecordDirectory(), recordfileNme.c_str());\r
         /* ---------------------------------- 开始录音 ---------------------------------- */\r
+        uapi_save_runtime_log(RUNTIME_LOG_RECORD_START);//TOOD*\r
         AudioCaptureSample(6, (const char **)args);\r
         /* --------------------------------- 跳转到录音界面 -------------------------------- */\r
         view_->ChangeView(RECORDINGVIEW, RECORDGOINGVIEW);\r
@@ -217,6 +219,7 @@ namespace OHOS
         int32_t argc = 1;\r
         uint8_t *argv = (uint8_t *)"stop";\r
         AudioCaptureSample(argc, (const char **)&argv);\r
+        uapi_save_runtime_log(RUNTIME_LOG_RECORD_STOP);//TOOD*\r
         /* ---------------------------------- 停止定时器 --------------------------------- */\r
         p_RecordingModel->Recording_StopTimer();\r
         /* --------------------------------- 录音数量加1 --------------------------------- */\r
index 231b4bd..8de463f 100644 (file)
@@ -27,7 +27,7 @@
 #include <thread>
 #include <vector>
 #include "ConfigModel.h"
-
+#include "custom_save_runtime.h"
 #define SYSTEM_LOG_PATH "/user/system/"
 #define SYSTEM_LOG_FILE_PATH "/user/system/system_log.txt"
 #define SYSTEM_LOG_FILE_PATH_NEXTDAY "/user/system/system_log_nextday.txt"
@@ -106,6 +106,28 @@ uint32_t SystemLogModel::GetCurrentTime() {
 // 保存日志
 bool SystemLogModel::saveLog(SystemLogData data) {
 
+  //记录开机,关机,重启,ota升级,恢复出厂事件
+  switch (data.type)
+  {
+  case SystemLogType::POWER_ON:
+      uapi_save_runtime_log(RUNTIME_LOG_POWER_ON);//TOOD*
+      break;
+  case SystemLogType::POWER_OFF:
+      uapi_save_runtime_log(RUNTIME_LOG_POWER_OFF);//TOOD*
+      break;
+  case SystemLogType::RESTART:
+      uapi_save_runtime_log(RUNTIME_LOG_REBOOT);//TOOD*
+      break;
+  case SystemLogType::FACTORY_RESET:
+      uapi_save_runtime_log(RUNTIME_LOG_FACTORY_RESET);//TOOD*
+      break;
+  case SystemLogType::SOFTWARE_UPDATE:
+      uapi_save_runtime_log(RUNTIME_LOG_OTA);//TOOD*
+      break;
+  default:
+      break;
+  }
+
   // 将新日志添加到日志数据
   logData.push_back(data);
 
index e5f5a34..1830424 100644 (file)
@@ -87,6 +87,7 @@
 #include "DialModelStepgoal.h"
 #include "msg_center_customerC.h"
 #include "PhoneAGService.h"
+#include <custom_save_runtime.h>
 
 #define DIALDATASET 1
 //#include "Systemupgrade.h"
@@ -552,6 +553,9 @@ void MsgCenterNotifyChargePlugProc(const Topic topic, Request* req)
         display_api->turn_on_screen();
     }
 
+    //充电开始事件
+    uapi_save_runtime_log(RUNTIME_LOG_CHARGE_START);//TOOD*
+
 #if DIALDATASET
     DialModelCharge::GetInstance()->UpdatechargeStatus(1);
 #endif
@@ -586,6 +590,9 @@ void MsgCenterNotifyChargePlugProc(const Topic topic, Request* req)
 /*充电器已拔掉*/
 void MsgCenterNotifyChargeUnPlugProc(const Topic topic, Request* req)
 {
+    //充电停止事件
+    uapi_save_runtime_log(RUNTIME_LOG_CHARGE_STOP);//TOOD*
+
     unused(req);
     unused(topic);
     WEARABLE_LOGI(WEARABLE_LOG_MODULE_APP, "MsgCenterNotifyProc:: CHarger UnPlug !");
@@ -1437,6 +1444,8 @@ void MsgCenterNotifyFindWatchProc(const Topic topic, Request* req)
         FindWatchViewEventListener::GetInstance().PopInterPlayMusic(nullptr);//播放铃声
         NotificationManager::GetInstance()->SetNotifyPriority(PRIORITY_TWO);
         NotificationManager::GetInstance()->ShowNotify(showFindWatchNotify, (uint16_t)topic, true);
+        //如果查找手表铃声播放成功,记录该事件
+        uapi_save_runtime_log(RUNTIME_LOG_RING_PLAY_START_FINDWATCH);//TOOD*
     }
     else
     {
index 954641f..937abc9 100755 (executable)
@@ -20,6 +20,7 @@
 #include <custom_runtime.h>
 #include "../../../../../../drivers/peripheral/vibrator/service/vibrator_service.h"
 #include <custom_utils.h>
+#include <custom_save_runtime.h>
 namespace OHOS
 {
     static constexpr const char *RING_AGAIN = "响铃将在十分钟后再次响起";
@@ -656,6 +657,8 @@ namespace OHOS
 #else
         FindWatchViewEventListener::GetInstance().PopInterPlayMusic("/music/ring/alarm.mp3");//播放铃声
 #endif
+        //如果闹钟铃声播放成功,记录该事件
+        uapi_save_runtime_log(RUNTIME_LOG_RING_PLAY_START_ALARM);//TOOD*
     }
 
     void AlarmViewEventListener::CancelAlarmRing()
@@ -664,6 +667,9 @@ namespace OHOS
         FindWatchViewEventListener::GetInstance().PopInterCancelMusic();
         AlarmClockModel::GetInstance()->CancelAlarmRing();
         NotificationManager::GetInstance()->StopNotify();
+
+        //如果闹钟铃声停止播放成功,记录该事件
+        uapi_save_runtime_log(RUNTIME_LOG_RING_PLAY_STOP_ALARM);//TOOD*
     }
 
     void AlarmViewEventListener::DelayAlarmRing()
index 182215f..e820984 100644 (file)
@@ -41,6 +41,7 @@
 #include "../../../../../../../drivers/peripheral/utils/custom_runtime.h"
 #include <custom_utils.h>
 #include "aivoice/include/AiVoiceModel.h"
+#include <custom_save_runtime.h>
 
 namespace OHOS
 {
@@ -509,6 +510,8 @@ namespace OHOS
         {
             ScreenAlwaysOnCtr(CANCEL_SCREEN_ALWAYS_ON);
         }
+        //如果查找手表铃声停止播放成功,记录该事件
+        uapi_save_runtime_log(RUNTIME_LOG_RING_PLAY_STOP_FINDWATCH);//TOOD*
     }
 
     /* ----------------------- FindWatchRingPlayerListener ---------------------- */
index acc67a0..58601b5 100755 (executable)
@@ -4,7 +4,7 @@
  * Author:
  * Create:
  */
-
+#include <custom_save_runtime.h>
 #include "power_display_service.h"
 #include "display_action.h"
 #include "common_def.h"
@@ -186,6 +186,7 @@ static uint32_t action_display_lcd_on()
 
     //增加视频表盘的播放;
     PRINT("开始亮屏\n");
+    uapi_save_runtime_log(RUNTIME_LOG_LCD_ON);//TOOD*
 
     return ERRCODE_SUCC;
 }
@@ -208,6 +209,7 @@ static uint32_t action_display_lcd_off()
     }
     //增加视频表盘的暂停;
     PRINT("开始灭屏\n");
+    uapi_save_runtime_log(RUNTIME_LOG_LCD_OFF);//TOOD*
     
     last_screen_off_timestamp = get_display_timestamp();
     caculate_screen_on_time();
index 5ae981f..1cfe015 100644 (file)
@@ -1,3 +1,10 @@
+/*
+ * @Author: luozheng 1732036298@qq.com
+ * @Date: 2024-12-18 10:27:52
+ * @LastEditors: luozheng 1732036298@qq.com
+ * @LastEditTime: 2024-12-18 16:53:11
+ * @FilePath: /FD230/code/sdk/drivers/peripheral/utils/custom_save_runtime.h
+ */
 /**
  * Copyright (c) @CompanyNameMagicTag 2022-2022. All rights reserved. \n
  *
@@ -22,8 +29,11 @@ extern "C" {
 typedef enum  {
     //开机关机
     RUNTIME_LOG_POWER_MIN =0x0000,
-    RUNTIME_LOG_POWER_ON,//0x0001
-    RUNTIME_LOG_OTA, //
+    RUNTIME_LOG_POWER_ON,                                   //0x0001 开机
+    RUNTIME_LOG_POWER_OFF,                                  //0x0002 关机
+    RUNTIME_LOG_REBOOT,                                     //0x0003 重启
+    RUNTIME_LOG_OTA,                                        //0x0004 ota升级
+    RUNTIME_LOG_FACTORY_RESET,                              //0x0005 恢复出厂设置
 
     //蓝牙
     RUNTIME_LOG_BLE_MIN=0x0100,
@@ -41,24 +51,43 @@ typedef enum  {
     RUNTIME_LOG_OXTGEN_MIN= 0x0700,
     //LCD
     RUNTIME_LOG_LCD_MIN=0x0800,
+    RUNTIME_LOG_LCD_ON,                                     //0x0801 屏幕亮
+    RUNTIME_LOG_LCD_OFF,                                    //0x0802 屏幕灭
     //抬腕
     RUNTIME_LOG_RAISE_MIN=0x0900,
     //充电
     RUNTIME_LOG_CHARGE_MIN=0x0A00,
+    RUNTIME_LOG_CHARGE_START,                               //0x0A01 充电开始
+    RUNTIME_LOG_CHARGE_STOP,                                //0x0A02 充电停止
     //电池电量变化
     RUNTIME_LOG_BATTERY_MIN=0x0B00,
     //马达
     RUNTIME_LOG_MOTOR_MIN=0x0C00,
+    RUNTIME_LOG_MOTOR_START,                                //0x0C01 马达开始转动
+    RUNTIME_LOG_MOTOR_STOP,                                 //0x0C02 马达停止转动
     //表盘
     RUNTIME_LOG_DIAL_MIN=0x0D00,
     //音乐
     RUNTIME_LOG_MUSIC_MIN=0x0E00,
+    RUNTIME_LOG_LOCAL_MUSIC_PLAY_START,                     //0x0E01 本地音乐开始播放
+    RUNTIME_LOG_LOCAL_MUSIC_PLAY_PAUSE,                     //0x0E02 本地音乐开始暂停
+    RUNTIME_LOG_LOCAL_MUSIC_PLAY_STOP,                      //0x0E03 本地音乐播放停止
     //铃声
     RUNTIME_LOG_RING_MIN=0x0F00,
+    RUNTIME_LOG_RING_PLAY_START_ALARM,                      //0x0F01 闹钟铃声开始播放
+    RUNTIME_LOG_RING_PLAY_STOP_ALARM,                       //0x0F02 闹钟铃声播放停止
+    RUNTIME_LOG_RING_PLAY_START_COUNTDOWN,                  //0x0F03 倒计时铃声开始播放
+    RUNTIME_LOG_RING_PLAY_STOP_COUNTDOWN,                   //0x0F04 倒计时铃声播放停止
+    RUNTIME_LOG_RING_PLAY_START_FINDWATCH,                  //0x0F05 查找手表铃声开始播放
+    RUNTIME_LOG_RING_PLAY_STOP_FINDWATCH,                   //0x0F06 查找手表铃声播放停止
     //低功耗记录
     RUNTIME_LOG_lOW_POWER_MIN=0x1000,
     //录音
     RUNTIME_LOG_RECORD_MIN=0x1100,
+    RUNTIME_LOG_RECORD_START,                               //0x1101 录音开始
+    RUNTIME_LOG_RECORD_STOP,                                //0x1102 录音停止
+    RUNTIME_LOG_RECORD_START_AI,                            //0x1103 AI录音开始
+    RUNTIME_LOG_RECORD_STOP_AI,                             //0x1104 AI录音停止
 
 
 } runtime_log_cmd_Id;
index da3d327..480c624 100644 (file)
@@ -6,8 +6,30 @@ path = r"."
 \r
 txtname = sys.argv[-1]\r
 \r
-str_bin_list =[['0000',"测试 "],\r
-               ['0001',"测试2 "]\r
+# 字母要小写\r
+str_bin_list =[\r
+               ['0001',"开机 "],\r
+               ['0002',"关机 "],\r
+               ['0003',"重启 "],\r
+               ['0004',"ota升级 "],\r
+               ['0005',"恢复出厂设置 "],\r
+               ['0801',"屏幕亮 "],\r
+               ['0802',"屏幕灭 "],\r
+               ['0a01',"充电开始 "],\r
+               ['0a02',"充电停止 "],\r
+               ['0e01',"本地音乐开始播放 "],\r
+               ['0e02',"本地音乐开始暂停 "],\r
+               ['0e03',"本地音乐播放停止 "],\r
+               ['0f01',"闹钟铃声开始播放 "],\r
+               ['0f02',"闹钟铃声播放停止 "],\r
+               ['0f03',"倒计时铃声开始播放 "],\r
+               ['0f04',"倒计时铃声播放停止 "],\r
+               ['0f05',"查找手表铃声开始播放 "],\r
+               ['0f06',"查找手表铃声播放停止 "],\r
+               ['1101',"录音开始 "],\r
+               ['1102',"录音停止 "],\r
+               ['1103',"AI录音开始 "],\r
+               ['1104',"AI录音停止 "]\r
                ]\r
 \r
 \r