11---
22
3+ extra_includes :
4+ - sim_value_cb.h
5+ - pybind11/functional.h
6+
37strip_prefixes :
48- HALSIM_
59
@@ -9,26 +13,83 @@ functions:
913 HALSIM_RegisterSimDeviceCreatedCallback :
1014 ignore : true
1115 HALSIM_CancelSimDeviceCreatedCallback :
16+ ignore : true
1217 HALSIM_RegisterSimDeviceFreedCallback :
1318 ignore : true
1419 HALSIM_CancelSimDeviceCreatedCallback :
20+ ignore : true
1521 HALSIM_CancelSimDeviceFreedCallback :
22+ ignore : true
1623 HALSIM_GetSimDeviceHandle :
1724 HALSIM_GetSimDeviceName :
1825 HALSIM_GetSimValueDeviceHandle :
1926 HALSIM_EnumerateSimDevices :
2027 ignore : true
2128 HALSIM_RegisterSimValueCreatedCallback :
22- ignore : true
29+ param_override :
30+ param :
31+ ignore : true
32+ cpp_code : |
33+ [](hal::SimDevice &simdevice, std::function<void(const char *, HAL_SimValueHandle, HAL_SimValueDirection, HAL_Value)> fn, bool initialNotify) -> std::unique_ptr<SimValueCB> {
34+ auto cb = std::make_unique<SimValueCB>(fn, HALSIM_CancelSimDeviceCreatedCallback);
35+ auto uid = HALSIM_RegisterSimValueCreatedCallback(simdevice, cb.get(),
36+ [](const char* name, void* param,
37+ HAL_SimValueHandle handle,
38+ int32_t direction,
39+ const struct HAL_Value* value) {
40+ ((SimValueCB*)param)->m_fn(name, handle, (HAL_SimValueDirection)direction, *value);
41+ }, initialNotify);
42+ cb->SetUID(uid);
43+ return std::move(cb);
44+ }
2345 HALSIM_CancelSimDeviceCreatedCallback :
46+ ignore : true
2447 HALSIM_CancelSimValueCreatedCallback :
25- HALSIM_RegisterSimValueChangedCallback :
2648 ignore : true
49+ HALSIM_RegisterSimValueChangedCallback :
50+ param_override :
51+ handle :
52+ name : value
53+ param :
54+ ignore : true
55+ cpp_code : |
56+ [](hal::SimValue &simvalue, std::function<void(const char *, HAL_SimValueHandle, HAL_SimValueDirection, HAL_Value)> fn, bool initialNotify) -> std::unique_ptr<SimValueCB> {
57+ auto cb = std::make_unique<SimValueCB>(fn, HALSIM_CancelSimValueChangedCallback);
58+ auto uid = HALSIM_RegisterSimValueChangedCallback(simvalue, cb.get(),
59+ [](const char* name, void* param,
60+ HAL_SimValueHandle handle,
61+ int32_t direction,
62+ const struct HAL_Value* value) {
63+ ((SimValueCB*)param)->m_fn(name, handle, (HAL_SimValueDirection)direction, *value);
64+ }, initialNotify);
65+ cb->SetUID(uid);
66+ return std::move(cb);
67+ }
2768 HALSIM_CancelSimDeviceCreatedCallback :
69+ ignore : true
2870 HALSIM_CancelSimValueChangedCallback :
29- HALSIM_RegisterSimValueResetCallback :
3071 ignore : true
72+ HALSIM_RegisterSimValueResetCallback :
73+ param_override :
74+ handle :
75+ name : value
76+ param :
77+ ignore : true
78+ cpp_code : |
79+ [](hal::SimValue &simvalue, std::function<void(const char *, HAL_SimValueHandle, HAL_SimValueDirection, HAL_Value)> fn, bool initialNotify) -> std::unique_ptr<SimValueCB> {
80+ auto cb = std::make_unique<SimValueCB>(fn, HALSIM_CancelSimValueResetCallback);
81+ auto uid = HALSIM_RegisterSimValueChangedCallback(simvalue, cb.get(),
82+ [](const char* name, void* param,
83+ HAL_SimValueHandle handle,
84+ int32_t direction,
85+ const struct HAL_Value* value) {
86+ ((SimValueCB*)param)->m_fn(name, handle, (HAL_SimValueDirection)direction, *value);
87+ }, initialNotify);
88+ cb->SetUID(uid);
89+ return std::move(cb);
90+ }
3191 HALSIM_CancelSimValueResetCallback :
92+ ignore : true
3293 HALSIM_GetSimValueHandle :
3394 HALSIM_EnumerateSimValues :
3495 ignore : true
0 commit comments