vault backup: 2023-02-06 15:40:13
This commit is contained in:
6
.obsidian/workspace.json
vendored
6
.obsidian/workspace.json
vendored
@@ -43,9 +43,9 @@
|
||||
"state": {
|
||||
"file": "00. Inbox/vc-fwUpdate code trace(Meetup).canvas",
|
||||
"viewState": {
|
||||
"x": 612,
|
||||
"y": -674.8746549560854,
|
||||
"zoom": -0.9105785977715345,
|
||||
"x": 123.76462614365573,
|
||||
"y": 1188.9566445116031,
|
||||
"zoom": -0.2317578660159072,
|
||||
"snapToGrid": false
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
{"id":"c1122f185b292a7c","x":-247,"y":-227,"width":480,"height":145,"type":"text","text":"`vc-fwUpdate\\Frontends-developer\\LogiFWUpdate\\Ui\\LogiFWUpdateDlg.cpp:2761`\n\n--------------------------------------------\n\n`InitializeImageProviders()`"},
|
||||
{"id":"6aab61cd927b9307","x":-434,"y":-48,"width":311,"height":60,"type":"text","text":"`Impl::RegisterForPnpNotification()`"},
|
||||
{"id":"dade636ce2d72147","x":-434,"y":40,"width":250,"height":60,"type":"text","text":"`Impl::InitializeTasks()`"},
|
||||
{"id":"5d03eb8ecaadd1dd","x":-750,"y":-823,"width":337,"height":60,"type":"text","text":"`BOOL CLogiFWUpdateDlg::OnInitDialog()`"},
|
||||
{"id":"5f57db192293a0ec","x":257,"y":-537,"width":168,"height":51,"type":"text","text":"`Impl() d_`"},
|
||||
{"id":"5e7c147cd533a922","x":453,"y":-537,"width":289,"height":51,"type":"text","text":"`d_->CreatePnpProvider();`"},
|
||||
{"id":"cd7947e8636e6b51","x":779,"y":-596,"width":347,"height":110,"type":"text","text":"建立一個看不見的window,背後會有一個 thread 來接收 device notification events:`WM_DEVICECHANGE`"},
|
||||
@@ -18,16 +17,25 @@
|
||||
{"id":"aa2444242b481f93","x":1007,"y":-247,"width":250,"height":55,"type":"text","text":"`VideoDeviceUpdateTask`"},
|
||||
{"id":"eca2584c45b6e6d5","x":1007,"y":-167,"width":250,"height":60,"type":"text","text":"`VideoEepromUpdateTask`"},
|
||||
{"id":"ce300adbc95c5a4b","x":-7,"y":40,"width":369,"height":113,"type":"text","text":"```cpp\nfor (...) {\n task->GetDeviceInfo(initialQuery)\n}\n```"},
|
||||
{"id":"551e749e0cf332d3","x":427,"y":-28,"width":635,"height":249,"type":"text","text":"```cpp\nDoOpenDevice()\n⬇\nd_->OpenDevice();\n⬇\nUvcDeviceFactory().CreateUvcDevice({ UsbVidLogitech, UsbVideoPid });\n⬇\nWindowsUvcDevice::FindDevice(usbId);\n⬇\nImpl::OpenUvcDevice(usbId.Vid, usbId.Pid, devicePath, friendlyName);\n```"},
|
||||
{"id":"18c6dbc9cf46e214","x":1132,"y":-33,"width":333,"height":260,"type":"text","text":"`Impl::OpenUvcDevice` 會使用\n```cpp\nSetupDiGetClassDevs(...)\nSetupDiEnumDeviceInterfaces(...)\n```\n等 API 來列舉裝置。\n\n----\n在 `Impl::OpenUvcDevice` 也會打開 XU 。\n在 `uvcDevice->d_->Init();` 裡面。"},
|
||||
{"id":"c0e439a5140dbceb","x":1531,"y":-36,"width":443,"height":267,"type":"text","text":"`vc-fwUpdate\\UpdateController\\WindowsUvcDevice.cpp`\n\n----\n\n`uvcDevice->d_->Init();` 也就是 `Impl::Init()`\n會呼叫 `InitExtensionUnits();`,其呼叫順序:\n```cpp\nInitExtensionUnits();\n⬇\nEnumNodePropertySets();\n⬇\nDeviceIoControl(...)\n```\n\n"},
|
||||
{"id":"cb5dc2c4eb714d15","x":-7,"y":231,"width":369,"height":223,"type":"text","text":"`vc-fwUpdate\\Frontends-developer\\LogiFWUpdate\\Ui\\LogiFWUpdateDlg.cpp:2117`\n\n----\n```cpp\nfor (...) {\n task->GetImageInfo();\n}\n```"},
|
||||
{"id":"b272fd16c8f236a3","x":-7,"y":499,"width":432,"height":60,"type":"text","text":"```cpp\ncontroller_->SetTaskEnabled(taskId, enable);\n```"},
|
||||
{"id":"7ff8bac3fc3253f1","x":-434,"y":642,"width":311,"height":55,"type":"text","text":"`Impl::InitializeDynamicControls()`"},
|
||||
{"id":"798d72cd46e3502b","x":-582,"y":-1107,"width":388,"height":52,"type":"text","text":"`CLogiFWUpdateDlg::OnBnClickedUpdateDevice()`"},
|
||||
{"id":"a659de4263799b85","x":362,"y":-1105,"width":291,"height":50,"type":"text","text":"`controller_->StartUpdate();`"},
|
||||
{"id":"f6cfbfc1376ca01e","x":-123,"y":-1107,"width":424,"height":182,"type":"text","text":"`d_->PerformUpdate();`\n⬇️\n```cpp\nbool CLogiFWUpdateDlg::Impl::PerformUpdate() {\n\n}\n```"},
|
||||
{"id":"b398a6dd7e91ef4e","x":714,"y":-1073,"width":250,"height":60,"type":"text","text":"d_->StartUpdate();"}
|
||||
{"id":"b2215d89fc0b5735","x":-600,"y":-1160,"width":3450,"height":312,"type":"group","label":"GUI Update Procedure"},
|
||||
{"id":"bca845f9b6b579f8","x":699,"y":-1041,"width":397,"height":117,"type":"text","text":"```cpp\nfor (auto& p : tasks_) {\n task->PerformUpdate();\n task->GetUpdateResult(taskSuccessful);\n}\n```"},
|
||||
{"id":"dd3394779b454c65","x":1134,"y":-1093,"width":413,"height":222,"type":"text","text":"`vc-fwUpdate\\Backends\\CommonBackend\\UpdateTask.cpp`\n\n----\n先 `DoOpenDevice()` ,確認裝置 ok。\n然後 `d_->imageProvider_->Open();`\n\n最後 `DoPerformUpdate();`"},
|
||||
{"id":"1b43952d80e220e4","x":1607,"y":-1098,"width":502,"height":230,"type":"text","text":"`vc-fwUpdate\\Backends\\CommonBackend\\VideoEepromUpdateTask.cpp`\n\n----\n```cpp\nvoid\nlogitech::fwupdate::backend::VideoEepromUpdateTask::DoPerformUpdate() {\n d_->PerformUpdate();\n}\n```"},
|
||||
{"id":"798d72cd46e3502b","x":-579,"y":-1075,"width":398,"height":52,"type":"text","text":"`CLogiFWUpdateDlg::OnBnClickedUpdateDevice()`"},
|
||||
{"id":"f6cfbfc1376ca01e","x":-121,"y":-1140,"width":424,"height":182,"type":"text","text":"`d_->PerformUpdate();`\n⬇️\n```cpp\nbool CLogiFWUpdateDlg::Impl::PerformUpdate() {\n\n}\n```"},
|
||||
{"id":"a659de4263799b85","x":364,"y":-1138,"width":291,"height":50,"type":"text","text":"`controller_->StartUpdate();`"},
|
||||
{"id":"b398a6dd7e91ef4e","x":405,"y":-1008,"width":250,"height":50,"type":"text","text":"`d_->StartUpdate();`"},
|
||||
{"id":"ed5fc2b9d34dbdd7","x":713,"y":-55,"width":1587,"height":307,"type":"group","label":"DoOpenDevice()"},
|
||||
{"id":"551e749e0cf332d3","x":733,"y":-27,"width":635,"height":249,"type":"text","text":"```cpp\nDoOpenDevice()\n⬇\nd_->OpenDevice();\n⬇\nUvcDeviceFactory().CreateUvcDevice({ UsbVidLogitech, UsbVideoPid });\n⬇\nWindowsUvcDevice::FindDevice(usbId);\n⬇\nImpl::OpenUvcDevice(usbId.Vid, usbId.Pid, devicePath, friendlyName);\n```"},
|
||||
{"id":"18c6dbc9cf46e214","x":1438,"y":-32,"width":333,"height":260,"type":"text","text":"`Impl::OpenUvcDevice` 會使用\n```cpp\nSetupDiGetClassDevs(...)\nSetupDiEnumDeviceInterfaces(...)\n```\n等 API 來列舉裝置。\n\n----\n在 `Impl::OpenUvcDevice` 也會打開 XU 。\n在 `uvcDevice->d_->Init();` 裡面。"},
|
||||
{"id":"c0e439a5140dbceb","x":1837,"y":-35,"width":443,"height":267,"type":"text","text":"`vc-fwUpdate\\UpdateController\\WindowsUvcDevice.cpp`\n\n----\n\n`uvcDevice->d_->Init();` 也就是 `Impl::Init()`\n會呼叫 `InitExtensionUnits();`,其呼叫順序:\n```cpp\nInitExtensionUnits();\n⬇\nEnumNodePropertySets();\n⬇\nDeviceIoControl(...)\n```\n\n"},
|
||||
{"id":"eed51d8e5331c29c","x":2160,"y":-1061,"width":664,"height":156,"type":"text","text":"```cpp\nbool\nlogitech::fwupdate::backend::VideoEepromUpdateTask::Impl::PerformUpdate() {\n SendImage(ActionProgress(progress_, 90));\n ...\n RebootDevice();\n}\n```"},
|
||||
{"id":"5d03eb8ecaadd1dd","x":-970,"y":-911,"width":339,"height":181,"type":"text","text":"`vc-fwUpdate\\Frontends-developer\\LogiFWUpdate\\Ui\\LogiFWUpdateDlg.cpp`\n\n----\n`BOOL CLogiFWUpdateDlg::OnInitDialog()`"},
|
||||
{"id":"4d601b6034046222","x":-474,"y":777,"width":861,"height":205,"type":"text","text":"```cpp\nbool silentUpdate = ci.GetOption(L\"silentupdate\") ? true : false;\nbool forceUpdate = ci.GetOption(L\"force\")? true: false;\n\nauto cli = make_unique<cliwrapper>(logfile, version, forceUpdate, recovery, launcher, restartUpdate);\n\nbool success = cli->Initialize();\ncli->InitializeTasks();\nret = cli->PerformUpdate();\n```"},
|
||||
{"id":"12867a0e216a1bc9","x":-970,"y":790,"width":420,"height":179,"type":"text","text":"`vc-fwUpdate\\Frontends-developer\\LogiFWUpdate\\Ui\\LogiFWUpdate.cpp`\n\n----\n```cpp\nBOOL CLogiFWUpdateApp::InitInstance() {\n ...\n}\n```"}
|
||||
],
|
||||
"edges":[
|
||||
{"id":"b621a476fd748a7d","fromNode":"35301ec811a15aa2","fromSide":"bottom","toNode":"e01a865b5a13d6e9","toSide":"left"},
|
||||
@@ -52,6 +60,16 @@
|
||||
{"id":"762bcd1254df7890","fromNode":"18c6dbc9cf46e214","fromSide":"right","toNode":"c0e439a5140dbceb","toSide":"left"},
|
||||
{"id":"d03a2aa8290e6113","fromNode":"dade636ce2d72147","fromSide":"bottom","toNode":"ce300adbc95c5a4b","toSide":"left"},
|
||||
{"id":"27e46e4e71993a05","fromNode":"dade636ce2d72147","fromSide":"bottom","toNode":"cb5dc2c4eb714d15","toSide":"left"},
|
||||
{"id":"41d665388fdcd5fd","fromNode":"dade636ce2d72147","fromSide":"bottom","toNode":"b272fd16c8f236a3","toSide":"left"}
|
||||
{"id":"41d665388fdcd5fd","fromNode":"dade636ce2d72147","fromSide":"bottom","toNode":"b272fd16c8f236a3","toSide":"left"},
|
||||
{"id":"49b718b35ea3578d","fromNode":"5d03eb8ecaadd1dd","fromSide":"top","toNode":"798d72cd46e3502b","toSide":"left"},
|
||||
{"id":"88c0e726b9eb326c","fromNode":"798d72cd46e3502b","fromSide":"right","toNode":"f6cfbfc1376ca01e","toSide":"left"},
|
||||
{"id":"498207d5461e35f6","fromNode":"f6cfbfc1376ca01e","fromSide":"right","toNode":"a659de4263799b85","toSide":"left"},
|
||||
{"id":"46a3a7fdd1d5f6a4","fromNode":"a659de4263799b85","fromSide":"right","toNode":"b398a6dd7e91ef4e","toSide":"left"},
|
||||
{"id":"d2047bc4edfdbefa","fromNode":"b398a6dd7e91ef4e","fromSide":"right","toNode":"bca845f9b6b579f8","toSide":"left"},
|
||||
{"id":"743ecb415fe5fcb6","fromNode":"bca845f9b6b579f8","fromSide":"right","toNode":"dd3394779b454c65","toSide":"left"},
|
||||
{"id":"c8bf7d8b482bfe48","fromNode":"dd3394779b454c65","fromSide":"right","toNode":"1b43952d80e220e4","toSide":"left"},
|
||||
{"id":"04fcccc24a59d13e","fromNode":"1b43952d80e220e4","fromSide":"right","toNode":"eed51d8e5331c29c","toSide":"left"},
|
||||
{"id":"1fa5f7d458e72c17","fromNode":"dd3394779b454c65","fromSide":"bottom","toNode":"ed5fc2b9d34dbdd7","toSide":"top","color":"#ffdd00","label":"DoOpenDevice()"},
|
||||
{"id":"742e84e0e8003c92","fromNode":"12867a0e216a1bc9","fromSide":"right","toNode":"4d601b6034046222","toSide":"left"}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user