candlesdk 1.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (219) hide show
  1. candlesdk-1.1.0/.clang-format +181 -0
  2. candlesdk-1.1.0/.clangd +4 -0
  3. candlesdk-1.1.0/.devcontainer/devcontainer.json +29 -0
  4. candlesdk-1.1.0/.git/FETCH_HEAD +1 -0
  5. candlesdk-1.1.0/.git/HEAD +1 -0
  6. candlesdk-1.1.0/.git/config +15 -0
  7. candlesdk-1.1.0/.git/config.worktree +5 -0
  8. candlesdk-1.1.0/.git/description +1 -0
  9. candlesdk-1.1.0/.git/hooks/applypatch-msg.sample +15 -0
  10. candlesdk-1.1.0/.git/hooks/commit-msg.sample +24 -0
  11. candlesdk-1.1.0/.git/hooks/fsmonitor-watchman.sample +174 -0
  12. candlesdk-1.1.0/.git/hooks/post-update.sample +8 -0
  13. candlesdk-1.1.0/.git/hooks/pre-applypatch.sample +14 -0
  14. candlesdk-1.1.0/.git/hooks/pre-commit.sample +49 -0
  15. candlesdk-1.1.0/.git/hooks/pre-merge-commit.sample +13 -0
  16. candlesdk-1.1.0/.git/hooks/pre-push.sample +53 -0
  17. candlesdk-1.1.0/.git/hooks/pre-rebase.sample +169 -0
  18. candlesdk-1.1.0/.git/hooks/pre-receive.sample +24 -0
  19. candlesdk-1.1.0/.git/hooks/prepare-commit-msg.sample +42 -0
  20. candlesdk-1.1.0/.git/hooks/push-to-checkout.sample +78 -0
  21. candlesdk-1.1.0/.git/hooks/sendemail-validate.sample +77 -0
  22. candlesdk-1.1.0/.git/hooks/update.sample +128 -0
  23. candlesdk-1.1.0/.git/index +0 -0
  24. candlesdk-1.1.0/.git/info/exclude +6 -0
  25. candlesdk-1.1.0/.git/logs/HEAD +1 -0
  26. candlesdk-1.1.0/.git/logs/refs/heads/main +1 -0
  27. candlesdk-1.1.0/.git/logs/refs/remotes/origin/main +1 -0
  28. candlesdk-1.1.0/.git/objects/pack/pack-a51d9cfa4ee4f938da6220e9685aba068a792922.idx +0 -0
  29. candlesdk-1.1.0/.git/objects/pack/pack-a51d9cfa4ee4f938da6220e9685aba068a792922.pack +0 -0
  30. candlesdk-1.1.0/.git/objects/pack/pack-a51d9cfa4ee4f938da6220e9685aba068a792922.rev +0 -0
  31. candlesdk-1.1.0/.git/refs/heads/main +1 -0
  32. candlesdk-1.1.0/.git/refs/remotes/origin/main +1 -0
  33. candlesdk-1.1.0/.git/shallow +1 -0
  34. candlesdk-1.1.0/.github/workflows/cleanup_gh_artifacts.yml +24 -0
  35. candlesdk-1.1.0/.github/workflows/mab_candle_sdk_workflow.yml +353 -0
  36. candlesdk-1.1.0/.gitignore +44 -0
  37. candlesdk-1.1.0/.gitmodules +9 -0
  38. candlesdk-1.1.0/.vscode/extensions.json +10 -0
  39. candlesdk-1.1.0/.vscode/launch.json +213 -0
  40. candlesdk-1.1.0/.vscode/settings.json +93 -0
  41. candlesdk-1.1.0/CMakeLists.txt +57 -0
  42. candlesdk-1.1.0/LICENSE.txt +21 -0
  43. candlesdk-1.1.0/PKG-INFO +144 -0
  44. candlesdk-1.1.0/README.md +105 -0
  45. candlesdk-1.1.0/artifacts/Candletool-build-artifacts-arm64/candletool-1.1.0-r-Linux-aarch64.deb +0 -0
  46. candlesdk-1.1.0/artifacts/Candletool-build-artifacts-armhf/candletool-1.1.0-r-Linux-armhf.deb +0 -0
  47. candlesdk-1.1.0/artifacts/Candletool-build-artifacts-x86_64/candletool-1.1.0-r-Linux-x86_64.deb +0 -0
  48. candlesdk-1.1.0/artifacts/cibw-wheels-linux/candlesdk-1.1.0-cp310-cp310-manylinux_2_28_x86_64.whl +0 -0
  49. candlesdk-1.1.0/artifacts/cibw-wheels-linux/candlesdk-1.1.0-cp311-cp311-manylinux_2_28_x86_64.whl +0 -0
  50. candlesdk-1.1.0/artifacts/cibw-wheels-linux/candlesdk-1.1.0-cp312-cp312-manylinux_2_28_x86_64.whl +0 -0
  51. candlesdk-1.1.0/artifacts/cibw-wheels-linux/candlesdk-1.1.0-cp313-cp313-manylinux_2_28_x86_64.whl +0 -0
  52. candlesdk-1.1.0/artifacts/cibw-wheels-linux/candlesdk-1.1.0-cp314-cp314-manylinux_2_28_x86_64.whl +0 -0
  53. candlesdk-1.1.0/artifacts/cibw-wheels-windows/candlesdk-1.1.0-cp313-cp313-win_amd64.whl +0 -0
  54. candlesdk-1.1.0/artifacts/cibw-wheels-windows/candlesdk-1.1.0-cp314-cp314-win_amd64.whl +0 -0
  55. candlesdk-1.1.0/candlelib/CMakeLists.txt +148 -0
  56. candlesdk-1.1.0/candlelib/Doxyfile +2579 -0
  57. candlesdk-1.1.0/candlelib/LICENSE +155 -0
  58. candlesdk-1.1.0/candlelib/README.md +4 -0
  59. candlesdk-1.1.0/candlelib/cmake/modules/Findlibusb.cmake +136 -0
  60. candlesdk-1.1.0/candlelib/include/crc.hpp +24 -0
  61. candlesdk-1.1.0/candlelib/src/MD/MD.cpp +577 -0
  62. candlesdk-1.1.0/candlelib/src/MD/MD.hpp +516 -0
  63. candlesdk-1.1.0/candlelib/src/MD/MDStatus.hpp +187 -0
  64. candlesdk-1.1.0/candlelib/src/MD/MD_strings.hpp +224 -0
  65. candlesdk-1.1.0/candlelib/src/MD/MD_test.cpp +82 -0
  66. candlesdk-1.1.0/candlelib/src/can_bootloader/can_bootloader.cpp +174 -0
  67. candlesdk-1.1.0/candlelib/src/can_bootloader/can_bootloader.hpp +81 -0
  68. candlesdk-1.1.0/candlelib/src/communication_device/candle.cpp +207 -0
  69. candlesdk-1.1.0/candlelib/src/communication_device/candle.hpp +234 -0
  70. candlesdk-1.1.0/candlelib/src/communication_device/candle_bootloader.cpp +115 -0
  71. candlesdk-1.1.0/candlelib/src/communication_device/candle_bootloader.hpp +109 -0
  72. candlesdk-1.1.0/candlelib/src/communication_device/candle_bootloader_test.cpp +40 -0
  73. candlesdk-1.1.0/candlelib/src/communication_device/candle_test.cpp +92 -0
  74. candlesdk-1.1.0/candlelib/src/communication_device/candle_types.hpp +36 -0
  75. candlesdk-1.1.0/candlelib/src/communication_interface/I_communication_interface.hpp +53 -0
  76. candlesdk-1.1.0/candlelib/src/communication_interface/I_communication_interface_mock.hpp +20 -0
  77. candlesdk-1.1.0/candlelib/src/communication_interface/SPI.cpp +6 -0
  78. candlesdk-1.1.0/candlelib/src/communication_interface/SPI.hpp +9 -0
  79. candlesdk-1.1.0/candlelib/src/communication_interface/SPI_test.cpp +12 -0
  80. candlesdk-1.1.0/candlelib/src/communication_interface/USB.cpp +366 -0
  81. candlesdk-1.1.0/candlelib/src/communication_interface/USB.hpp +97 -0
  82. candlesdk-1.1.0/candlelib/src/communication_interface/USB_test.cpp +12 -0
  83. candlesdk-1.1.0/candlelib/src/crc.cpp +74 -0
  84. candlesdk-1.1.0/candlelib/src/pds/brake_resistor.cpp +89 -0
  85. candlesdk-1.1.0/candlelib/src/pds/brake_resistor.hpp +54 -0
  86. candlesdk-1.1.0/candlelib/src/pds/isolated_converter.cpp +150 -0
  87. candlesdk-1.1.0/candlelib/src/pds/isolated_converter.hpp +112 -0
  88. candlesdk-1.1.0/candlelib/src/pds/pds.cpp +549 -0
  89. candlesdk-1.1.0/candlelib/src/pds/pds.hpp +128 -0
  90. candlesdk-1.1.0/candlelib/src/pds/pds_module.cpp +30 -0
  91. candlesdk-1.1.0/candlelib/src/pds/pds_module.hpp +191 -0
  92. candlesdk-1.1.0/candlelib/src/pds/pds_protocol.cpp +185 -0
  93. candlesdk-1.1.0/candlelib/src/pds/pds_protocol.hpp +115 -0
  94. candlesdk-1.1.0/candlelib/src/pds/power_stage.cpp +178 -0
  95. candlesdk-1.1.0/candlelib/src/pds/power_stage.hpp +179 -0
  96. candlesdk-1.1.0/candlelib/test/pds_protocol_test.cpp +202 -0
  97. candlesdk-1.1.0/candlelib/third_party/libusb/inc/libusb-1.0/libusb.h +2135 -0
  98. candlesdk-1.1.0/candlelib/third_party/libusb/lib/windows/libusb-1.0.a +0 -0
  99. candlesdk-1.1.0/candlelib/third_party/libusb/lib/windows/libusb-1.0.dll +0 -0
  100. candlesdk-1.1.0/candlelib/third_party/libusb/lib/windows/libusb-1.0.dll.a +0 -0
  101. candlesdk-1.1.0/candletool/3rd_party/mINI/.gitignore +7 -0
  102. candlesdk-1.1.0/candletool/3rd_party/mINI/CHANGELOG.md +51 -0
  103. candlesdk-1.1.0/candletool/3rd_party/mINI/LICENSE +19 -0
  104. candlesdk-1.1.0/candletool/3rd_party/mINI/README.md +332 -0
  105. candlesdk-1.1.0/candletool/3rd_party/mINI/src/mini/ini.h +789 -0
  106. candlesdk-1.1.0/candletool/3rd_party/mINI/tests/build.bat +7 -0
  107. candlesdk-1.1.0/candletool/3rd_party/mINI/tests/build.sh +6 -0
  108. candlesdk-1.1.0/candletool/3rd_party/mINI/tests/building.txt +25 -0
  109. candlesdk-1.1.0/candletool/3rd_party/mINI/tests/clean.bat +3 -0
  110. candlesdk-1.1.0/candletool/3rd_party/mINI/tests/clean.sh +3 -0
  111. candlesdk-1.1.0/candletool/3rd_party/mINI/tests/lest/LICENSE.txt +23 -0
  112. candlesdk-1.1.0/candletool/3rd_party/mINI/tests/lest/lest.hpp +1392 -0
  113. candlesdk-1.1.0/candletool/3rd_party/mINI/tests/run.bat +7 -0
  114. candlesdk-1.1.0/candletool/3rd_party/mINI/tests/run.sh +6 -0
  115. candlesdk-1.1.0/candletool/3rd_party/mINI/tests/testcasesens.cpp +100 -0
  116. candlesdk-1.1.0/candletool/3rd_party/mINI/tests/testcopy.cpp +77 -0
  117. candlesdk-1.1.0/candletool/3rd_party/mINI/tests/testgenerate.cpp +287 -0
  118. candlesdk-1.1.0/candletool/3rd_party/mINI/tests/testhuge.cpp +59 -0
  119. candlesdk-1.1.0/candletool/3rd_party/mINI/tests/testread.cpp +457 -0
  120. candlesdk-1.1.0/candletool/3rd_party/mINI/tests/testutf8.cpp +141 -0
  121. candlesdk-1.1.0/candletool/3rd_party/mINI/tests/testwrite.cpp +747 -0
  122. candlesdk-1.1.0/candletool/CMakeLists.txt +151 -0
  123. candlesdk-1.1.0/candletool/LICENSE +21 -0
  124. candlesdk-1.1.0/candletool/MAB.ico +0 -0
  125. candlesdk-1.1.0/candletool/README.md +3 -0
  126. candlesdk-1.1.0/candletool/doc/candletool.drawio +10 -0
  127. candlesdk-1.1.0/candletool/include/canLoader.hpp +28 -0
  128. candlesdk-1.1.0/candletool/include/candle_cli.hpp +34 -0
  129. candlesdk-1.1.0/candletool/include/configHelpers.hpp +188 -0
  130. candlesdk-1.1.0/candletool/include/iLoader.hpp +47 -0
  131. candlesdk-1.1.0/candletool/include/mabFileParser.hpp +44 -0
  132. candlesdk-1.1.0/candletool/include/mab_crc.hpp +17 -0
  133. candlesdk-1.1.0/candletool/include/md_cfg_map.hpp +243 -0
  134. candlesdk-1.1.0/candletool/include/md_cli.hpp +184 -0
  135. candlesdk-1.1.0/candletool/include/pds_cli.hpp +151 -0
  136. candlesdk-1.1.0/candletool/include/utilities.hpp +125 -0
  137. candlesdk-1.1.0/candletool/launch/buildAndTest.bash +14 -0
  138. candlesdk-1.1.0/candletool/src/canLoader.cpp +100 -0
  139. candlesdk-1.1.0/candletool/src/candle_cli.cpp +66 -0
  140. candlesdk-1.1.0/candletool/src/mabFileParser.cpp +95 -0
  141. candlesdk-1.1.0/candletool/src/mab_crc.cpp +128 -0
  142. candlesdk-1.1.0/candletool/src/main.cpp +155 -0
  143. candlesdk-1.1.0/candletool/src/md_cli.cpp +1318 -0
  144. candlesdk-1.1.0/candletool/src/pds_cli.cpp +2104 -0
  145. candlesdk-1.1.0/candletool/src/uploader.cpp +88 -0
  146. candlesdk-1.1.0/candletool/src/utilities.cpp +17 -0
  147. candlesdk-1.1.0/candletool/template_package/etc/candletool/config/candletool.ini +47 -0
  148. candlesdk-1.1.0/candletool/template_package/etc/candletool/config/motors/AK10-9-KV100.cfg +48 -0
  149. candlesdk-1.1.0/candletool/template_package/etc/candletool/config/motors/AK60-6.cfg +69 -0
  150. candlesdk-1.1.0/candletool/template_package/etc/candletool/config/motors/AK80-6.cfg +48 -0
  151. candlesdk-1.1.0/candletool/template_package/etc/candletool/config/motors/AK80-9.cfg +48 -0
  152. candlesdk-1.1.0/candletool/template_package/etc/candletool/config/motors/AK80-9_aux_center_mot.cfg +48 -0
  153. candlesdk-1.1.0/candletool/template_package/etc/candletool/config/motors/AK80-9_aux_center_rep.cfg +48 -0
  154. candlesdk-1.1.0/candletool/template_package/etc/candletool/config/motors/AK80-9_aux_center_start.cfg +48 -0
  155. candlesdk-1.1.0/candletool/template_package/etc/candletool/config/motors/AK80-9_aux_offaxis.cfg +48 -0
  156. candlesdk-1.1.0/candletool/template_package/etc/candletool/config/motors/BGM4114.cfg +48 -0
  157. candlesdk-1.1.0/candletool/template_package/etc/candletool/config/motors/EX8108.cfg +48 -0
  158. candlesdk-1.1.0/candletool/template_package/etc/candletool/config/motors/GB4106.cfg +48 -0
  159. candlesdk-1.1.0/candletool/template_package/etc/candletool/config/motors/MN4004.cfg +48 -0
  160. candlesdk-1.1.0/candletool/template_package/etc/candletool/config/motors/MN5006.cfg +48 -0
  161. candlesdk-1.1.0/candletool/template_package/etc/candletool/config/motors/MN6007.cfg +48 -0
  162. candlesdk-1.1.0/candletool/template_package/etc/candletool/config/motors/default.cfg +67 -0
  163. candlesdk-1.1.0/candletool/template_package/etc/candletool/config/pds_template.cfg +28 -0
  164. candlesdk-1.1.0/candletool/template_package/postinst +4 -0
  165. candlesdk-1.1.0/cmake/linux.arm64.toolchain.cmake +29 -0
  166. candlesdk-1.1.0/cmake/linux.armhf.toolchain.cmake +29 -0
  167. candlesdk-1.1.0/cmake/windows.x86_64.gcc.toolchain.cmake +20 -0
  168. candlesdk-1.1.0/commons/CMakeLists.txt +15 -0
  169. candlesdk-1.1.0/commons/logger/logger.cpp +217 -0
  170. candlesdk-1.1.0/commons/logger/logger.hpp +199 -0
  171. candlesdk-1.1.0/commons/logger/logger_test.cpp +23 -0
  172. candlesdk-1.1.0/commons/shared_data/CMakeLists.txt +5 -0
  173. candlesdk-1.1.0/commons/shared_data/mab_def.hpp +11 -0
  174. candlesdk-1.1.0/commons/shared_data/mab_types.hpp +135 -0
  175. candlesdk-1.1.0/commons/shared_data/manufacturer_data.hpp +51 -0
  176. candlesdk-1.1.0/commons/shared_data/md_types.hpp +364 -0
  177. candlesdk-1.1.0/commons/shared_data/pds_properties.hpp +186 -0
  178. candlesdk-1.1.0/commons/shared_data/pds_types.hpp +71 -0
  179. candlesdk-1.1.0/commons/unit_test_runner/CMakeLists.txt +6 -0
  180. candlesdk-1.1.0/commons/unit_test_runner/unit_test_runner.cpp +7 -0
  181. candlesdk-1.1.0/docker_images/linux/arm64/Dockerfile +17 -0
  182. candlesdk-1.1.0/docker_images/linux/armhf/Dockerfile +17 -0
  183. candlesdk-1.1.0/docker_images/linux/x86_64/Dockerfile +24 -0
  184. candlesdk-1.1.0/docker_images/windows/x86_64/Dockerfile +11 -0
  185. candlesdk-1.1.0/examples/CMakeLists.txt +14 -0
  186. candlesdk-1.1.0/examples/cpp/md_example_diagnostics.cpp +40 -0
  187. candlesdk-1.1.0/examples/cpp/md_example_dual_chanel.cpp +38 -0
  188. candlesdk-1.1.0/examples/cpp/md_example_impedance.cpp +73 -0
  189. candlesdk-1.1.0/examples/cpp/md_example_latency.cpp +23 -0
  190. candlesdk-1.1.0/examples/cpp/pds_example_basic.cpp +55 -0
  191. candlesdk-1.1.0/examples/cpp/pds_example_battery_monitor_and_config_save.cpp +68 -0
  192. candlesdk-1.1.0/examples/cpp/pds_example_submodules.cpp +80 -0
  193. candlesdk-1.1.0/examples/py/md_impedance.py +49 -0
  194. candlesdk-1.1.0/examples/py/pds_example_basic.py +660 -0
  195. candlesdk-1.1.0/examples/unit_test/CMakeLists.txt +3 -0
  196. candlesdk-1.1.0/examples/unit_test/ut_example.cpp +14 -0
  197. candlesdk-1.1.0/git_func.cmake +43 -0
  198. candlesdk-1.1.0/launch/buildForLinux.sh +18 -0
  199. candlesdk-1.1.0/launch/buildForWindows.bat +22 -0
  200. candlesdk-1.1.0/launch/buildForWindows.sh +19 -0
  201. candlesdk-1.1.0/launch/install_rules.sh +17 -0
  202. candlesdk-1.1.0/launch/pythonBuildLocal.sh +23 -0
  203. candlesdk-1.1.0/launch/pythonBuildOnWin.ps1 +2 -0
  204. candlesdk-1.1.0/launch/pythonBuildWheel.sh +36 -0
  205. candlesdk-1.1.0/launch/runDockerForLinux86-64.sh +27 -0
  206. candlesdk-1.1.0/launch/runDockerForWindows.sh +27 -0
  207. candlesdk-1.1.0/launch/run_all_tests.sh +5 -0
  208. candlesdk-1.1.0/pycandle/.gitignore +11 -0
  209. candlesdk-1.1.0/pycandle/CMakeLists.txt +13 -0
  210. candlesdk-1.1.0/pycandle/README.md +32 -0
  211. candlesdk-1.1.0/pycandle/docs/md_python_bindings.md +120 -0
  212. candlesdk-1.1.0/pycandle/docs/pds_python_bindings.md +160 -0
  213. candlesdk-1.1.0/pycandle/generate_pybind_module_registers.py +145 -0
  214. candlesdk-1.1.0/pycandle/release.sh +5 -0
  215. candlesdk-1.1.0/pycandle/src/__init__.py +0 -0
  216. candlesdk-1.1.0/pycandle/src/bindings.cpp +907 -0
  217. candlesdk-1.1.0/pycandle/test_release.sh +5 -0
  218. candlesdk-1.1.0/pycandle/test_release_no_upload.sh +4 -0
  219. candlesdk-1.1.0/pyproject.toml +62 -0
@@ -0,0 +1,181 @@
1
+ ---
2
+ Language: Cpp
3
+ BasedOnStyle: Microsoft
4
+ AlignAfterOpenBracket: Align
5
+ AlignConsecutiveMacros: true
6
+ AlignConsecutiveAssignments: true
7
+ AlignConsecutiveBitFields: true
8
+ AlignConsecutiveDeclarations: true
9
+ AlignEscapedNewlines: Left
10
+ AlignOperands: Align
11
+ AlignTrailingComments: true
12
+ AllowAllArgumentsOnNextLine: true
13
+ AllowAllConstructorInitializersOnNextLine: true
14
+ AllowAllParametersOfDeclarationOnNextLine: true
15
+ AllowShortEnumsOnASingleLine: true
16
+ AllowShortBlocksOnASingleLine: false
17
+ AllowShortCaseLabelsOnASingleLine: false
18
+ AllowShortFunctionsOnASingleLine: false
19
+ AllowShortLambdasOnASingleLine: All
20
+ AllowShortIfStatementsOnASingleLine: Never
21
+ AllowShortLoopsOnASingleLine: false
22
+ AlwaysBreakAfterDefinitionReturnType: None
23
+ AlwaysBreakAfterReturnType: None
24
+ AlwaysBreakBeforeMultilineStrings: true
25
+ AlwaysBreakTemplateDeclarations: Yes
26
+ BinPackArguments: false
27
+ BinPackParameters: false
28
+ BraceWrapping:
29
+ AfterCaseLabel: false
30
+ AfterClass: false
31
+ AfterControlStatement: Never
32
+ AfterEnum: false
33
+ AfterFunction: false
34
+ AfterNamespace: false
35
+ AfterObjCDeclaration: false
36
+ AfterStruct: false
37
+ AfterUnion: false
38
+ AfterExternBlock: false
39
+ BeforeCatch: false
40
+ BeforeElse: false
41
+ BeforeLambdaBody: false
42
+ BeforeWhile: false
43
+ IndentBraces: true
44
+ SplitEmptyFunction: true
45
+ SplitEmptyRecord: true
46
+ SplitEmptyNamespace: true
47
+ BreakBeforeBinaryOperators: None
48
+ BreakBeforeBraces: Allman
49
+ BreakBeforeInheritanceComma: false
50
+ BreakInheritanceList: BeforeColon
51
+ BreakBeforeTernaryOperators: true
52
+ BreakConstructorInitializersBeforeComma: false
53
+ BreakConstructorInitializers: BeforeColon
54
+ BreakAfterJavaFieldAnnotations: false
55
+ BreakStringLiterals: true
56
+ ColumnLimit: 100
57
+ CommentPragmas: '^ IWYU pragma:'
58
+ CompactNamespaces: false
59
+ ConstructorInitializerAllOnOneLineOrOnePerLine: true
60
+ ConstructorInitializerIndentWidth: 4
61
+ ContinuationIndentWidth: 4
62
+ Cpp11BracedListStyle: true
63
+ DeriveLineEnding: true
64
+ DerivePointerAlignment: false
65
+ DisableFormat: false
66
+ ExperimentalAutoDetectBinPacking: false
67
+ FixNamespaceComments: true
68
+ ForEachMacros:
69
+ - foreach
70
+ - Q_FOREACH
71
+ - BOOST_FOREACH
72
+ IncludeBlocks: Regroup
73
+ IncludeCategories:
74
+ - Regex: '^<ext/.*\.h>'
75
+ Priority: 2
76
+ SortPriority: 0
77
+ - Regex: '^<.*\.h>'
78
+ Priority: 1
79
+ SortPriority: 0
80
+ - Regex: '^<.*'
81
+ Priority: 2
82
+ SortPriority: 0
83
+ - Regex: '.*'
84
+ Priority: 3
85
+ SortPriority: 0
86
+ IncludeIsMainRegex: '([-_](test|unittest))?$'
87
+ IncludeIsMainSourceRegex: ''
88
+ IndentCaseLabels: true
89
+ IndentCaseBlocks: false
90
+ IndentGotoLabels: true
91
+ IndentPPDirectives: None
92
+ IndentExternBlock: AfterExternBlock
93
+ IndentWidth: 4
94
+ IndentWrappedFunctionNames: false
95
+ InsertTrailingCommas: None
96
+ JavaScriptQuotes: Leave
97
+ JavaScriptWrapImports: true
98
+ KeepEmptyLinesAtTheStartOfBlocks: false
99
+ MacroBlockBegin: ''
100
+ MacroBlockEnd: ''
101
+ MaxEmptyLinesToKeep: 1
102
+ NamespaceIndentation: All
103
+ ObjCBinPackProtocolList: Never
104
+ ObjCBlockIndentWidth: 2
105
+ ObjCBreakBeforeNestedBlockParam: true
106
+ ObjCSpaceAfterProperty: false
107
+ ObjCSpaceBeforeProtocolList: true
108
+ PenaltyBreakAssignment: 2
109
+ PenaltyBreakBeforeFirstCallParameter: 1
110
+ PenaltyBreakComment: 300
111
+ PenaltyBreakFirstLessLess: 120
112
+ PenaltyBreakString: 1000
113
+ PenaltyBreakTemplateDeclaration: 10
114
+ PenaltyExcessCharacter: 1000000
115
+ PenaltyReturnTypeOnItsOwnLine: 200
116
+ PointerAlignment: Left
117
+ RawStringFormats:
118
+ - Language: Cpp
119
+ Delimiters:
120
+ - cc
121
+ - CC
122
+ - cpp
123
+ - Cpp
124
+ - CPP
125
+ - 'c++'
126
+ - 'C++'
127
+ CanonicalDelimiter: ''
128
+ BasedOnStyle: google
129
+ - Language: TextProto
130
+ Delimiters:
131
+ - pb
132
+ - PB
133
+ - proto
134
+ - PROTO
135
+ EnclosingFunctions:
136
+ - EqualsProto
137
+ - EquivToProto
138
+ - PARSE_PARTIAL_TEXT_PROTO
139
+ - PARSE_TEST_PROTO
140
+ - PARSE_TEXT_PROTO
141
+ - ParseTextOrDie
142
+ - ParseTextProtoOrDie
143
+ - ParseTestProto
144
+ - ParsePartialTestProto
145
+ CanonicalDelimiter: ''
146
+ BasedOnStyle: google
147
+ ReflowComments: true
148
+ SortIncludes: false
149
+ SortUsingDeclarations: true
150
+ SpaceAfterCStyleCast: false
151
+ SpaceAfterLogicalNot: false
152
+ SpaceAfterTemplateKeyword: true
153
+ SpaceBeforeAssignmentOperators: true
154
+ SpaceBeforeCpp11BracedList: false
155
+ SpaceBeforeCtorInitializerColon: true
156
+ SpaceBeforeInheritanceColon: true
157
+ SpaceBeforeParens: ControlStatements
158
+ SpaceBeforeRangeBasedForLoopColon: true
159
+ SpaceInEmptyBlock: false
160
+ SpaceInEmptyParentheses: false
161
+ SpacesBeforeTrailingComments: 2
162
+ SpacesInAngles: false
163
+ SpacesInConditionalStatement: false
164
+ SpacesInContainerLiterals: true
165
+ SpacesInCStyleCastParentheses: false
166
+ SpacesInParentheses: false
167
+ SpacesInSquareBrackets: false
168
+ SpaceBeforeSquareBrackets: false
169
+ BitFieldColonSpacing: Both
170
+ Standard: Auto
171
+ StatementMacros:
172
+ - Q_UNUSED
173
+ - QT_REQUIRE_VERSION
174
+ TabWidth: 4
175
+ UseCRLF: false
176
+ UseTab: Never
177
+ WhitespaceSensitiveMacros:
178
+ - STRINGIZE
179
+ - PP_STRINGIZE
180
+ - BOOST_PP_STRINGIZE
181
+ ...
@@ -0,0 +1,4 @@
1
+ CompileFlags:
2
+ Add: [ ]
3
+ CompilationDatabase: ./build
4
+ Compiler: /usr/bin/c++
@@ -0,0 +1,29 @@
1
+ // For format details, see https://aka.ms/devcontainer.json. For config options, see the
2
+ // README at: https://github.com/devcontainers/templates/tree/main/src/cpp
3
+ {
4
+ "name": "CandleSDK_devcontainer",
5
+ "build": {
6
+ "dockerfile": "Dockerfile"
7
+ },
8
+ "postCreateCommand": "bash",
9
+ "remoteUser": "mabBuildBot",
10
+ "customizations": {
11
+ "vscode": {
12
+ "extensions": [
13
+ "ms-vscode.cpptools-extension-pack",
14
+ "ms-azuretools.vscode-docker",
15
+ "streetsidesoftware.code-spell-checker"
16
+ ]
17
+ }
18
+ }
19
+ // Features to add to the dev container. More info: https://containers.dev/features.
20
+ // "features": {},
21
+ // Use 'forwardPorts' to make a list of ports inside the container available locally.
22
+ // "forwardPorts": [],
23
+ // Use 'postCreateCommand' to run commands after the container is created.
24
+ // "postCreateCommand": "gcc -v",
25
+ // Configure tool-specific properties.
26
+ // "customizations": {},
27
+ // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
28
+ // "remoteUser": "root"
29
+ }
@@ -0,0 +1 @@
1
+ e00ebdd79813e6efc8dbd3d3a4e9565949249a84 'e00ebdd79813e6efc8dbd3d3a4e9565949249a84' of https://github.com/mabrobotics/CANdle-SDK
@@ -0,0 +1 @@
1
+ ref: refs/heads/main
@@ -0,0 +1,15 @@
1
+ [core]
2
+ repositoryformatversion = 0
3
+ filemode = true
4
+ bare = false
5
+ logallrefupdates = true
6
+ [remote "origin"]
7
+ url = https://github.com/mabrobotics/CANdle-SDK
8
+ fetch = +refs/heads/*:refs/remotes/origin/*
9
+ [gc]
10
+ auto = 0
11
+ [http "https://github.com/"]
12
+ extraheader = AUTHORIZATION: basic eC1hY2Nlc3MtdG9rZW46Z2hzX0hMS1BzYXdaTkFNc0xSY24yMllCYU1uWXd0dXE1eTNVUDBVMg==
13
+ [branch "main"]
14
+ remote = origin
15
+ merge = refs/heads/main
@@ -0,0 +1,5 @@
1
+ [core]
2
+ sparseCheckout = false
3
+ sparseCheckoutCone = false
4
+ [index]
5
+ sparse = false
@@ -0,0 +1 @@
1
+ Unnamed repository; edit this file 'description' to name the repository.
@@ -0,0 +1,15 @@
1
+ #!/bin/sh
2
+ #
3
+ # An example hook script to check the commit log message taken by
4
+ # applypatch from an e-mail message.
5
+ #
6
+ # The hook should exit with non-zero status after issuing an
7
+ # appropriate message if it wants to stop the commit. The hook is
8
+ # allowed to edit the commit message file.
9
+ #
10
+ # To enable this hook, rename this file to "applypatch-msg".
11
+
12
+ . git-sh-setup
13
+ commitmsg="$(git rev-parse --git-path hooks/commit-msg)"
14
+ test -x "$commitmsg" && exec "$commitmsg" ${1+"$@"}
15
+ :
@@ -0,0 +1,24 @@
1
+ #!/bin/sh
2
+ #
3
+ # An example hook script to check the commit log message.
4
+ # Called by "git commit" with one argument, the name of the file
5
+ # that has the commit message. The hook should exit with non-zero
6
+ # status after issuing an appropriate message if it wants to stop the
7
+ # commit. The hook is allowed to edit the commit message file.
8
+ #
9
+ # To enable this hook, rename this file to "commit-msg".
10
+
11
+ # Uncomment the below to add a Signed-off-by line to the message.
12
+ # Doing this in a hook is a bad idea in general, but the prepare-commit-msg
13
+ # hook is more suited to it.
14
+ #
15
+ # SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p')
16
+ # grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1"
17
+
18
+ # This example catches duplicate Signed-off-by lines.
19
+
20
+ test "" = "$(grep '^Signed-off-by: ' "$1" |
21
+ sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || {
22
+ echo >&2 Duplicate Signed-off-by lines.
23
+ exit 1
24
+ }
@@ -0,0 +1,174 @@
1
+ #!/usr/bin/perl
2
+
3
+ use strict;
4
+ use warnings;
5
+ use IPC::Open2;
6
+
7
+ # An example hook script to integrate Watchman
8
+ # (https://facebook.github.io/watchman/) with git to speed up detecting
9
+ # new and modified files.
10
+ #
11
+ # The hook is passed a version (currently 2) and last update token
12
+ # formatted as a string and outputs to stdout a new update token and
13
+ # all files that have been modified since the update token. Paths must
14
+ # be relative to the root of the working tree and separated by a single NUL.
15
+ #
16
+ # To enable this hook, rename this file to "query-watchman" and set
17
+ # 'git config core.fsmonitor .git/hooks/query-watchman'
18
+ #
19
+ my ($version, $last_update_token) = @ARGV;
20
+
21
+ # Uncomment for debugging
22
+ # print STDERR "$0 $version $last_update_token\n";
23
+
24
+ # Check the hook interface version
25
+ if ($version ne 2) {
26
+ die "Unsupported query-fsmonitor hook version '$version'.\n" .
27
+ "Falling back to scanning...\n";
28
+ }
29
+
30
+ my $git_work_tree = get_working_dir();
31
+
32
+ my $retry = 1;
33
+
34
+ my $json_pkg;
35
+ eval {
36
+ require JSON::XS;
37
+ $json_pkg = "JSON::XS";
38
+ 1;
39
+ } or do {
40
+ require JSON::PP;
41
+ $json_pkg = "JSON::PP";
42
+ };
43
+
44
+ launch_watchman();
45
+
46
+ sub launch_watchman {
47
+ my $o = watchman_query();
48
+ if (is_work_tree_watched($o)) {
49
+ output_result($o->{clock}, @{$o->{files}});
50
+ }
51
+ }
52
+
53
+ sub output_result {
54
+ my ($clockid, @files) = @_;
55
+
56
+ # Uncomment for debugging watchman output
57
+ # open (my $fh, ">", ".git/watchman-output.out");
58
+ # binmode $fh, ":utf8";
59
+ # print $fh "$clockid\n@files\n";
60
+ # close $fh;
61
+
62
+ binmode STDOUT, ":utf8";
63
+ print $clockid;
64
+ print "\0";
65
+ local $, = "\0";
66
+ print @files;
67
+ }
68
+
69
+ sub watchman_clock {
70
+ my $response = qx/watchman clock "$git_work_tree"/;
71
+ die "Failed to get clock id on '$git_work_tree'.\n" .
72
+ "Falling back to scanning...\n" if $? != 0;
73
+
74
+ return $json_pkg->new->utf8->decode($response);
75
+ }
76
+
77
+ sub watchman_query {
78
+ my $pid = open2(\*CHLD_OUT, \*CHLD_IN, 'watchman -j --no-pretty')
79
+ or die "open2() failed: $!\n" .
80
+ "Falling back to scanning...\n";
81
+
82
+ # In the query expression below we're asking for names of files that
83
+ # changed since $last_update_token but not from the .git folder.
84
+ #
85
+ # To accomplish this, we're using the "since" generator to use the
86
+ # recency index to select candidate nodes and "fields" to limit the
87
+ # output to file names only. Then we're using the "expression" term to
88
+ # further constrain the results.
89
+ my $last_update_line = "";
90
+ if (substr($last_update_token, 0, 1) eq "c") {
91
+ $last_update_token = "\"$last_update_token\"";
92
+ $last_update_line = qq[\n"since": $last_update_token,];
93
+ }
94
+ my $query = <<" END";
95
+ ["query", "$git_work_tree", {$last_update_line
96
+ "fields": ["name"],
97
+ "expression": ["not", ["dirname", ".git"]]
98
+ }]
99
+ END
100
+
101
+ # Uncomment for debugging the watchman query
102
+ # open (my $fh, ">", ".git/watchman-query.json");
103
+ # print $fh $query;
104
+ # close $fh;
105
+
106
+ print CHLD_IN $query;
107
+ close CHLD_IN;
108
+ my $response = do {local $/; <CHLD_OUT>};
109
+
110
+ # Uncomment for debugging the watch response
111
+ # open ($fh, ">", ".git/watchman-response.json");
112
+ # print $fh $response;
113
+ # close $fh;
114
+
115
+ die "Watchman: command returned no output.\n" .
116
+ "Falling back to scanning...\n" if $response eq "";
117
+ die "Watchman: command returned invalid output: $response\n" .
118
+ "Falling back to scanning...\n" unless $response =~ /^\{/;
119
+
120
+ return $json_pkg->new->utf8->decode($response);
121
+ }
122
+
123
+ sub is_work_tree_watched {
124
+ my ($output) = @_;
125
+ my $error = $output->{error};
126
+ if ($retry > 0 and $error and $error =~ m/unable to resolve root .* directory (.*) is not watched/) {
127
+ $retry--;
128
+ my $response = qx/watchman watch "$git_work_tree"/;
129
+ die "Failed to make watchman watch '$git_work_tree'.\n" .
130
+ "Falling back to scanning...\n" if $? != 0;
131
+ $output = $json_pkg->new->utf8->decode($response);
132
+ $error = $output->{error};
133
+ die "Watchman: $error.\n" .
134
+ "Falling back to scanning...\n" if $error;
135
+
136
+ # Uncomment for debugging watchman output
137
+ # open (my $fh, ">", ".git/watchman-output.out");
138
+ # close $fh;
139
+
140
+ # Watchman will always return all files on the first query so
141
+ # return the fast "everything is dirty" flag to git and do the
142
+ # Watchman query just to get it over with now so we won't pay
143
+ # the cost in git to look up each individual file.
144
+ my $o = watchman_clock();
145
+ $error = $output->{error};
146
+
147
+ die "Watchman: $error.\n" .
148
+ "Falling back to scanning...\n" if $error;
149
+
150
+ output_result($o->{clock}, ("/"));
151
+ $last_update_token = $o->{clock};
152
+
153
+ eval { launch_watchman() };
154
+ return 0;
155
+ }
156
+
157
+ die "Watchman: $error.\n" .
158
+ "Falling back to scanning...\n" if $error;
159
+
160
+ return 1;
161
+ }
162
+
163
+ sub get_working_dir {
164
+ my $working_dir;
165
+ if ($^O =~ 'msys' || $^O =~ 'cygwin') {
166
+ $working_dir = Win32::GetCwd();
167
+ $working_dir =~ tr/\\/\//;
168
+ } else {
169
+ require Cwd;
170
+ $working_dir = Cwd::cwd();
171
+ }
172
+
173
+ return $working_dir;
174
+ }
@@ -0,0 +1,8 @@
1
+ #!/bin/sh
2
+ #
3
+ # An example hook script to prepare a packed repository for use over
4
+ # dumb transports.
5
+ #
6
+ # To enable this hook, rename this file to "post-update".
7
+
8
+ exec git update-server-info
@@ -0,0 +1,14 @@
1
+ #!/bin/sh
2
+ #
3
+ # An example hook script to verify what is about to be committed
4
+ # by applypatch from an e-mail message.
5
+ #
6
+ # The hook should exit with non-zero status after issuing an
7
+ # appropriate message if it wants to stop the commit.
8
+ #
9
+ # To enable this hook, rename this file to "pre-applypatch".
10
+
11
+ . git-sh-setup
12
+ precommit="$(git rev-parse --git-path hooks/pre-commit)"
13
+ test -x "$precommit" && exec "$precommit" ${1+"$@"}
14
+ :
@@ -0,0 +1,49 @@
1
+ #!/bin/sh
2
+ #
3
+ # An example hook script to verify what is about to be committed.
4
+ # Called by "git commit" with no arguments. The hook should
5
+ # exit with non-zero status after issuing an appropriate message if
6
+ # it wants to stop the commit.
7
+ #
8
+ # To enable this hook, rename this file to "pre-commit".
9
+
10
+ if git rev-parse --verify HEAD >/dev/null 2>&1
11
+ then
12
+ against=HEAD
13
+ else
14
+ # Initial commit: diff against an empty tree object
15
+ against=$(git hash-object -t tree /dev/null)
16
+ fi
17
+
18
+ # If you want to allow non-ASCII filenames set this variable to true.
19
+ allownonascii=$(git config --type=bool hooks.allownonascii)
20
+
21
+ # Redirect output to stderr.
22
+ exec 1>&2
23
+
24
+ # Cross platform projects tend to avoid non-ASCII filenames; prevent
25
+ # them from being added to the repository. We exploit the fact that the
26
+ # printable range starts at the space character and ends with tilde.
27
+ if [ "$allownonascii" != "true" ] &&
28
+ # Note that the use of brackets around a tr range is ok here, (it's
29
+ # even required, for portability to Solaris 10's /usr/bin/tr), since
30
+ # the square bracket bytes happen to fall in the designated range.
31
+ test $(git diff-index --cached --name-only --diff-filter=A -z $against |
32
+ LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0
33
+ then
34
+ cat <<\EOF
35
+ Error: Attempt to add a non-ASCII file name.
36
+
37
+ This can cause problems if you want to work with people on other platforms.
38
+
39
+ To be portable it is advisable to rename the file.
40
+
41
+ If you know what you are doing you can disable this check using:
42
+
43
+ git config hooks.allownonascii true
44
+ EOF
45
+ exit 1
46
+ fi
47
+
48
+ # If there are whitespace errors, print the offending file names and fail.
49
+ exec git diff-index --check --cached $against --
@@ -0,0 +1,13 @@
1
+ #!/bin/sh
2
+ #
3
+ # An example hook script to verify what is about to be committed.
4
+ # Called by "git merge" with no arguments. The hook should
5
+ # exit with non-zero status after issuing an appropriate message to
6
+ # stderr if it wants to stop the merge commit.
7
+ #
8
+ # To enable this hook, rename this file to "pre-merge-commit".
9
+
10
+ . git-sh-setup
11
+ test -x "$GIT_DIR/hooks/pre-commit" &&
12
+ exec "$GIT_DIR/hooks/pre-commit"
13
+ :
@@ -0,0 +1,53 @@
1
+ #!/bin/sh
2
+
3
+ # An example hook script to verify what is about to be pushed. Called by "git
4
+ # push" after it has checked the remote status, but before anything has been
5
+ # pushed. If this script exits with a non-zero status nothing will be pushed.
6
+ #
7
+ # This hook is called with the following parameters:
8
+ #
9
+ # $1 -- Name of the remote to which the push is being done
10
+ # $2 -- URL to which the push is being done
11
+ #
12
+ # If pushing without using a named remote those arguments will be equal.
13
+ #
14
+ # Information about the commits which are being pushed is supplied as lines to
15
+ # the standard input in the form:
16
+ #
17
+ # <local ref> <local oid> <remote ref> <remote oid>
18
+ #
19
+ # This sample shows how to prevent push of commits where the log message starts
20
+ # with "WIP" (work in progress).
21
+
22
+ remote="$1"
23
+ url="$2"
24
+
25
+ zero=$(git hash-object --stdin </dev/null | tr '[0-9a-f]' '0')
26
+
27
+ while read local_ref local_oid remote_ref remote_oid
28
+ do
29
+ if test "$local_oid" = "$zero"
30
+ then
31
+ # Handle delete
32
+ :
33
+ else
34
+ if test "$remote_oid" = "$zero"
35
+ then
36
+ # New branch, examine all commits
37
+ range="$local_oid"
38
+ else
39
+ # Update to existing branch, examine new commits
40
+ range="$remote_oid..$local_oid"
41
+ fi
42
+
43
+ # Check for WIP commit
44
+ commit=$(git rev-list -n 1 --grep '^WIP' "$range")
45
+ if test -n "$commit"
46
+ then
47
+ echo >&2 "Found WIP commit in $local_ref, not pushing"
48
+ exit 1
49
+ fi
50
+ fi
51
+ done
52
+
53
+ exit 0