chapter 07-05

除錯 (還原預設值-外部)

此章節說明當資料現在值檔案損毀導致資料錯誤時, 如何使用 [除錯 (還原預設值-外部)] 模式做處理.


使用方式

使用方式和 [除錯 (還原預設值-內部)] 相同, 差別在於需要做還原預設值處理時, 會使用 [還原預設值 (外部)] 的方式.

詳細使用方式參考 [除錯 (還原預設值-內部)][還原預設值 (外部)].


範例程式的使用

01.  範例程式目錄在 mint_cm/usage/example/0705.


02.  下面關於 make 的操作沒有特別註明的話都是在 mint_cm 目錄.


03.  第一次使用, 使用 make example_add KEY=0705 載入範例並編譯.


04.  執行 mcm_daemon 並加入 -e 3 參數就可以看到結果.
注意當程式檢查到錯誤並執行處理後, mcm_store_profile_current.txt 會重新產生並且內容是正確的的.


05.  測試完畢不使用後, 使用 make example_del KEY=0705 將範例移除.


06.  範例程式目錄下的檔案在做完 make example_add 後會複製到真正使用的位置, 要修改做測試的話要改在複製後的.
來源 profile/mcm_data_profile_0705.xml
目地 mint_cm/mcm_build/mcm_data_profile.xml
資料模型範例
有修改要使用 make all 重新編譯
來源 profile/mcm_store_profile_default_0705.txt
目地 mint_cm/mcm_build/mcm_store_profile_default.txt
資料預設值範例
使用 make all 後會再複製到 mint_cm/run
來源 profile/mcm_store_profile_current_0705.txt
目地 mint_cm/run/mcm_store_profile_current.txt
資料現在值範例
來源 module/mcm_custom_0705.c
目地 mint_cm/mcm_daemon/mcm_module
處理函式範例
有修改要使用 make all 重新編譯
來源 module/mcm_module_0705.c
目地 mint_cm/mcm_daemon/mcm_module
內部模組範例
有修改要使用 make all 重新編譯