ConstellationDAQ 0.1__tar.gz → 0.2__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 (377) hide show
  1. {constellationdaq-0.1 → constellationdaq-0.2}/.codespellrc +1 -1
  2. {constellationdaq-0.1 → constellationdaq-0.2}/.gitlab-ci.yml +15 -7
  3. {constellationdaq-0.1 → constellationdaq-0.2}/.pre-commit-config.yaml +11 -6
  4. {constellationdaq-0.1 → constellationdaq-0.2}/PKG-INFO +8 -3
  5. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/constellation/controller/Controller.cpp +159 -102
  6. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/constellation/controller/Controller.hpp +2 -0
  7. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/constellation/controller/ControllerConfiguration.cpp +84 -0
  8. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/constellation/controller/ControllerConfiguration.hpp +5 -0
  9. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/constellation/controller/meson.build +1 -1
  10. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/constellation/core/chirp/BroadcastRecv.cpp +2 -0
  11. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/constellation/core/chirp/BroadcastRecv.hpp +2 -1
  12. constellationdaq-0.2/cxx/constellation/core/chirp/BroadcastSend.cpp +46 -0
  13. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/constellation/core/chirp/BroadcastSend.hpp +9 -6
  14. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/constellation/core/chirp/CHIRP_definitions.hpp +3 -9
  15. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/constellation/core/chirp/Manager.cpp +38 -23
  16. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/constellation/core/chirp/Manager.hpp +10 -8
  17. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/constellation/core/config/Value.hpp +7 -1
  18. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/constellation/core/config/Value.ipp +8 -4
  19. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/constellation/core/heartbeat/HeartbeatManager.cpp +27 -6
  20. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/constellation/core/heartbeat/HeartbeatManager.hpp +32 -3
  21. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/constellation/core/heartbeat/HeartbeatSend.cpp +9 -4
  22. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/constellation/core/heartbeat/HeartbeatSend.hpp +3 -3
  23. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/constellation/core/log/CMDPSink.cpp +48 -19
  24. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/constellation/core/log/CMDPSink.hpp +11 -3
  25. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/constellation/core/log/SinkManager.cpp +2 -1
  26. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/constellation/core/log/SinkManager.hpp +11 -2
  27. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/constellation/core/meson.build +17 -1
  28. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/constellation/core/message/CDTP1Message.cpp +3 -2
  29. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/constellation/core/message/CHIRPMessage.cpp +4 -4
  30. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/constellation/core/message/CHIRPMessage.hpp +5 -5
  31. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/constellation/core/message/CMDP1Message.cpp +8 -8
  32. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/constellation/core/message/CMDP1Message.hpp +6 -9
  33. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/constellation/core/metrics/Metric.cpp +11 -10
  34. constellationdaq-0.2/cxx/constellation/core/metrics/Metric.hpp +164 -0
  35. constellationdaq-0.2/cxx/constellation/core/metrics/MetricsManager.cpp +182 -0
  36. constellationdaq-0.2/cxx/constellation/core/metrics/MetricsManager.hpp +169 -0
  37. constellationdaq-0.2/cxx/constellation/core/metrics/MetricsManager.ipp +65 -0
  38. constellationdaq-0.2/cxx/constellation/core/metrics/exceptions.hpp +30 -0
  39. constellationdaq-0.2/cxx/constellation/core/metrics/stat.hpp +85 -0
  40. constellationdaq-0.2/cxx/constellation/core/networking/Port.hpp +24 -0
  41. constellationdaq-0.2/cxx/constellation/core/networking/asio_helpers.cpp +96 -0
  42. constellationdaq-0.2/cxx/constellation/core/networking/asio_helpers.hpp +40 -0
  43. constellationdaq-0.2/cxx/constellation/core/networking/exceptions.hpp +65 -0
  44. constellationdaq-0.2/cxx/constellation/core/networking/zmq_helpers.cpp +48 -0
  45. constellationdaq-0.2/cxx/constellation/core/networking/zmq_helpers.hpp +40 -0
  46. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/constellation/core/pools/BasePool.ipp +15 -9
  47. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/constellation/core/pools/SubscriberPool.ipp +32 -21
  48. constellationdaq-0.2/cxx/constellation/core/protocol/CDTP_definitions.hpp +34 -0
  49. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/constellation/core/protocol/CSCP_definitions.hpp +2 -8
  50. constellationdaq-0.2/cxx/constellation/core/utils/enum.hpp +92 -0
  51. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/constellation/core/utils/string.hpp +3 -3
  52. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/constellation/core/utils/timers.hpp +10 -9
  53. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/constellation/core/utils/type.hpp +7 -0
  54. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/constellation/exec/DSOLoader.cpp +16 -2
  55. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/constellation/exec/meson.build +1 -1
  56. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/constellation/exec/satellite.cpp +17 -14
  57. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/constellation/exec/templates/generator.cpp.in +1 -3
  58. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/constellation/meson.build +1 -2
  59. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/constellation/satellite/BaseSatellite.cpp +51 -29
  60. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/constellation/satellite/BaseSatellite.hpp +14 -5
  61. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/constellation/satellite/CommandRegistry.ipp +3 -4
  62. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/constellation/satellite/FSM.cpp +5 -4
  63. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/constellation/satellite/ReceiverSatellite.cpp +59 -32
  64. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/constellation/satellite/ReceiverSatellite.hpp +7 -2
  65. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/constellation/satellite/Satellite.cpp +3 -3
  66. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/constellation/satellite/Satellite.hpp +53 -0
  67. constellationdaq-0.2/cxx/constellation/satellite/Satellite.ipp +65 -0
  68. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/constellation/satellite/TransmitterSatellite.cpp +80 -20
  69. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/constellation/satellite/TransmitterSatellite.hpp +36 -14
  70. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/constellation/satellite/exceptions.hpp +7 -27
  71. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/constellation/satellite/meson.build +4 -3
  72. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/controllers/MissionControl/MissionControl.cpp +54 -23
  73. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/controllers/MissionControl/MissionControl.hpp +5 -0
  74. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/controllers/MissionControl/MissionControl.ui +36 -18
  75. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/controllers/MissionControl/QController.cpp +9 -4
  76. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/satellites/DevNullReceiver/README.md +0 -4
  77. constellationdaq-0.2/cxx/satellites/EudaqNativeWriter/EudaqNativeWriterSatellite.cpp +99 -0
  78. constellationdaq-0.2/cxx/satellites/EudaqNativeWriter/EudaqNativeWriterSatellite.hpp +197 -0
  79. constellationdaq-0.2/cxx/satellites/EudaqNativeWriter/FileSerializer.cpp +241 -0
  80. constellationdaq-0.2/cxx/satellites/EudaqNativeWriter/README.md +72 -0
  81. constellationdaq-0.2/cxx/satellites/EudaqNativeWriter/meson.build +17 -0
  82. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/satellites/RandomTransmitter/README.md +0 -4
  83. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/satellites/Sputnik/README.md +13 -17
  84. constellationdaq-0.2/cxx/satellites/Sputnik/SputnikSatellite.cpp +51 -0
  85. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/satellites/Sputnik/SputnikSatellite.hpp +10 -0
  86. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/satellites/meson.build +1 -0
  87. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/tests/chirp_mock.hpp +14 -4
  88. constellationdaq-0.2/cxx/tests/dummy_controller.hpp +73 -0
  89. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/tests/dummy_satellite.hpp +16 -3
  90. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/tests/meson.build +25 -9
  91. constellationdaq-0.2/cxx/tests/test_controller_base.cpp +504 -0
  92. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/tests/test_controller_config.cpp +4 -0
  93. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/tests/test_core_config.cpp +13 -1
  94. constellationdaq-0.2/cxx/tests/test_core_metrics.cpp +245 -0
  95. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/tests/test_core_pools.cpp +60 -1
  96. constellationdaq-0.2/cxx/tests/test_core_protocol.cpp +38 -0
  97. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/tests/test_core_utils.cpp +36 -1
  98. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/tests/test_satellite_base.cpp +40 -12
  99. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/tests/test_satellite_data.cpp +206 -6
  100. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/tests/test_satellite_fsm.cpp +12 -2
  101. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/tools/chirp_manager.cpp +24 -23
  102. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/tools/chp_receiver.cpp +2 -1
  103. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/tools/chp_sender.cpp +3 -5
  104. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/tools/dummy_controller.cpp +2 -2
  105. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/tools/meson.build +2 -2
  106. {constellationdaq-0.1 → constellationdaq-0.2}/docs/conf.py +12 -14
  107. constellationdaq-0.2/docs/copy_satellite_docs.py +142 -0
  108. constellationdaq-0.2/docs/drawings/ConstellationProtocols.drawio +322 -0
  109. constellationdaq-0.2/docs/manual/concepts/CHP.svg +4 -0
  110. constellationdaq-0.2/docs/manual/concepts/CMDP.svg +4 -0
  111. constellationdaq-0.2/docs/manual/concepts/CSCP.svg +4 -0
  112. constellationdaq-0.2/docs/manual/concepts/autonomy.md +3 -0
  113. constellationdaq-0.2/docs/manual/concepts/controller.md +3 -0
  114. constellationdaq-0.2/docs/manual/concepts/data.md +74 -0
  115. constellationdaq-0.2/docs/manual/concepts/statistics.md +69 -0
  116. constellationdaq-0.2/docs/manual/get_started/install_from_pypi.md +16 -0
  117. constellationdaq-0.1/docs/manual/install.md → constellationdaq-0.2/docs/manual/get_started/install_from_source.md +15 -5
  118. constellationdaq-0.2/docs/manual/howtos/external_satellite.md +110 -0
  119. constellationdaq-0.2/docs/manual/howtos/grafana_add_influxdb.png +0 -0
  120. constellationdaq-0.2/docs/manual/howtos/grafana_dashboard.png +0 -0
  121. constellationdaq-0.2/docs/manual/howtos/grafana_panel_editor.png +0 -0
  122. constellationdaq-0.2/docs/manual/howtos/grafana_panel_editor_final.png +0 -0
  123. constellationdaq-0.2/docs/manual/howtos/grafana_setup_influxdb.png +0 -0
  124. constellationdaq-0.2/docs/manual/howtos/influxdb_api_key.png +0 -0
  125. constellationdaq-0.2/docs/manual/howtos/influxdb_bucket.png +0 -0
  126. constellationdaq-0.2/docs/manual/howtos/influxdb_query_builder.png +0 -0
  127. constellationdaq-0.2/docs/manual/howtos/influxdb_query_script.png +0 -0
  128. constellationdaq-0.2/docs/manual/howtos/influxdb_setup.png +0 -0
  129. {constellationdaq-0.1 → constellationdaq-0.2}/docs/manual/howtos/satellite_py.md +13 -5
  130. constellationdaq-0.2/docs/manual/howtos/setup_influxdb_grafana.md +199 -0
  131. {constellationdaq-0.1 → constellationdaq-0.2}/docs/manual/index.md +5 -1
  132. {constellationdaq-0.1 → constellationdaq-0.2}/docs/manual/tutorials/single_satellite.md +40 -20
  133. {constellationdaq-0.1 → constellationdaq-0.2}/docs/reference/cxx/core/index.rst +2 -0
  134. constellationdaq-0.2/docs/reference/cxx/core/metrics.md +23 -0
  135. constellationdaq-0.2/docs/reference/cxx/core/networking.md +10 -0
  136. {constellationdaq-0.1 → constellationdaq-0.2}/docs/satellites/.gitignore +1 -0
  137. constellationdaq-0.2/docs/satellites/_cxx_ReceiverSatellite.md +7 -0
  138. constellationdaq-0.2/docs/satellites/_cxx_Satellite.md +7 -0
  139. constellationdaq-0.2/docs/satellites/_cxx_TransmitterSatellite.md +8 -0
  140. constellationdaq-0.2/docs/satellites/_parameter_header.md +4 -0
  141. constellationdaq-0.2/docs/satellites/_py_DataReceiver.md +7 -0
  142. constellationdaq-0.2/docs/satellites/_py_Satellite.md +4 -0
  143. {constellationdaq-0.1 → constellationdaq-0.2}/meson.build +2 -2
  144. {constellationdaq-0.1 → constellationdaq-0.2}/meson_options.txt +1 -0
  145. {constellationdaq-0.1 → constellationdaq-0.2}/pyproject.toml +8 -6
  146. {constellationdaq-0.1 → constellationdaq-0.2}/python/constellation/core/base.py +1 -1
  147. {constellationdaq-0.1 → constellationdaq-0.2}/python/constellation/core/broadcastmanager.py +21 -35
  148. {constellationdaq-0.1 → constellationdaq-0.2}/python/constellation/core/cdtp.py +4 -12
  149. {constellationdaq-0.1 → constellationdaq-0.2}/python/constellation/core/chirp.py +3 -9
  150. {constellationdaq-0.1 → constellationdaq-0.2}/python/constellation/core/chp.py +2 -6
  151. {constellationdaq-0.1 → constellationdaq-0.2}/python/constellation/core/commandmanager.py +10 -30
  152. {constellationdaq-0.1 → constellationdaq-0.2}/python/constellation/core/controller.py +1 -1
  153. {constellationdaq-0.1 → constellationdaq-0.2}/python/constellation/core/cscp.py +4 -12
  154. {constellationdaq-0.1 → constellationdaq-0.2}/python/constellation/core/datareceiver.py +2 -2
  155. {constellationdaq-0.1 → constellationdaq-0.2}/python/constellation/core/error.py +2 -6
  156. {constellationdaq-0.1 → constellationdaq-0.2}/python/constellation/core/heartbeatchecker.py +7 -21
  157. {constellationdaq-0.1 → constellationdaq-0.2}/python/constellation/core/heartbeater.py +3 -9
  158. {constellationdaq-0.1 → constellationdaq-0.2}/python/constellation/core/network.py +1 -1
  159. {constellationdaq-0.1 → constellationdaq-0.2}/python/constellation/core/protocol.py +3 -7
  160. {constellationdaq-0.1 → constellationdaq-0.2}/python/constellation/satellites/CaenHV/CaenHV.py +69 -45
  161. {constellationdaq-0.1 → constellationdaq-0.2}/python/constellation/satellites/CaenHV/README.md +27 -20
  162. constellationdaq-0.2/python/constellation/satellites/CaenHV/__main__.py +28 -0
  163. {constellationdaq-0.1 → constellationdaq-0.2}/python/constellation/satellites/CaenHV/lib_caen_ndt1470.py +6 -6
  164. {constellationdaq-0.1 → constellationdaq-0.2}/python/constellation/satellites/H5DataWriter/H5DataWriter.py +6 -34
  165. constellationdaq-0.2/python/constellation/satellites/H5DataWriter/README.md +60 -0
  166. constellationdaq-0.2/python/constellation/satellites/H5DataWriter/__main__.py +28 -0
  167. {constellationdaq-0.1 → constellationdaq-0.2}/python/constellation/satellites/Influx/Influx.py +5 -16
  168. {constellationdaq-0.1 → constellationdaq-0.2}/python/constellation/satellites/Influx/README.md +18 -3
  169. constellationdaq-0.2/python/constellation/satellites/Influx/__main__.py +28 -0
  170. {constellationdaq-0.1 → constellationdaq-0.2}/python/constellation/satellites/Keithley/Keithley.py +4 -16
  171. {constellationdaq-0.1 → constellationdaq-0.2}/python/constellation/satellites/Keithley/README.md +19 -4
  172. constellationdaq-0.2/python/constellation/satellites/Keithley/__main__.py +28 -0
  173. constellationdaq-0.2/python/constellation/satellites/LakeShore218/LakeShore218.py +96 -0
  174. constellationdaq-0.2/python/constellation/satellites/LakeShore218/README.md +73 -0
  175. constellationdaq-0.2/python/constellation/satellites/LakeShore218/__main__.py +27 -0
  176. constellationdaq-0.2/python/constellation/satellites/LakeShore218/meson.build +10 -0
  177. {constellationdaq-0.1 → constellationdaq-0.2}/python/constellation/satellites/Mariner/Mariner.py +5 -33
  178. {constellationdaq-0.1 → constellationdaq-0.2}/python/constellation/satellites/Mariner/README.md +3 -3
  179. constellationdaq-0.2/python/constellation/satellites/Mariner/__main__.py +28 -0
  180. {constellationdaq-0.1 → constellationdaq-0.2}/python/constellation/satellites/meson.build +1 -0
  181. {constellationdaq-0.1 → constellationdaq-0.2}/python/constellation/tools/H5datareader.py +20 -16
  182. {constellationdaq-0.1 → constellationdaq-0.2}/python/tests/test_cdtp.py +2 -2
  183. {constellationdaq-0.1 → constellationdaq-0.2}/python/tests/test_chirp.py +4 -12
  184. {constellationdaq-0.1 → constellationdaq-0.2}/python/tests/test_cmd_receiver.py +1 -3
  185. {constellationdaq-0.1 → constellationdaq-0.2}/python/tests/test_configuration.py +6 -18
  186. {constellationdaq-0.1 → constellationdaq-0.2}/python/tests/test_controller.py +3 -9
  187. {constellationdaq-0.1 → constellationdaq-0.2}/python/tests/test_satellite.py +4 -12
  188. constellationdaq-0.2/subprojects/magic_enum.wrap +10 -0
  189. constellationdaq-0.1/cxx/constellation/core/chirp/BroadcastSend.cpp +0 -36
  190. constellationdaq-0.1/cxx/constellation/core/metrics/Metric.hpp +0 -98
  191. constellationdaq-0.1/cxx/constellation/core/utils/networking.hpp +0 -69
  192. constellationdaq-0.1/cxx/satellites/Sputnik/SputnikSatellite.cpp +0 -21
  193. constellationdaq-0.1/docs/copy_satellite_docs.py +0 -57
  194. constellationdaq-0.1/docs/manual/concepts/autonomy.md +0 -1
  195. constellationdaq-0.1/docs/manual/concepts/controller.md +0 -1
  196. constellationdaq-0.1/docs/manual/concepts/statistics.md +0 -1
  197. constellationdaq-0.1/python/constellation/satellites/CaenHV/__main__.py +0 -11
  198. constellationdaq-0.1/python/constellation/satellites/H5DataWriter/README.md +0 -22
  199. constellationdaq-0.1/python/constellation/satellites/H5DataWriter/__main__.py +0 -11
  200. constellationdaq-0.1/python/constellation/satellites/Influx/__main__.py +0 -10
  201. constellationdaq-0.1/python/constellation/satellites/Keithley/__main__.py +0 -11
  202. constellationdaq-0.1/python/constellation/satellites/Mariner/__main__.py +0 -11
  203. constellationdaq-0.1/subprojects/magic_enum.wrap +0 -10
  204. {constellationdaq-0.1 → constellationdaq-0.2}/.clang-format +0 -0
  205. {constellationdaq-0.1 → constellationdaq-0.2}/.clang-format-ignore +0 -0
  206. {constellationdaq-0.1 → constellationdaq-0.2}/.clang-tidy +0 -0
  207. {constellationdaq-0.1 → constellationdaq-0.2}/.cross/mingw-ucrt.ini +0 -0
  208. {constellationdaq-0.1 → constellationdaq-0.2}/.editorconfig +0 -0
  209. {constellationdaq-0.1 → constellationdaq-0.2}/.gitattributes +0 -0
  210. {constellationdaq-0.1 → constellationdaq-0.2}/.gitignore +0 -0
  211. {constellationdaq-0.1 → constellationdaq-0.2}/.mailmap +0 -0
  212. {constellationdaq-0.1 → constellationdaq-0.2}/.markdownlintrc +0 -0
  213. {constellationdaq-0.1 → constellationdaq-0.2}/CITATION.cff +0 -0
  214. {constellationdaq-0.1 → constellationdaq-0.2}/LICENSE +0 -0
  215. {constellationdaq-0.1 → constellationdaq-0.2}/LICENSES/CC-BY-4.0.txt +0 -0
  216. {constellationdaq-0.1 → constellationdaq-0.2}/LICENSES/CC0-1.0.txt +0 -0
  217. {constellationdaq-0.1 → constellationdaq-0.2}/LICENSES/EUPL-1.2.txt +0 -0
  218. {constellationdaq-0.1 → constellationdaq-0.2}/LICENSES/GPL-3.0-or-later.txt +0 -0
  219. {constellationdaq-0.1 → constellationdaq-0.2}/LICENSES/MIT.txt +0 -0
  220. {constellationdaq-0.1 → constellationdaq-0.2}/README.md +0 -0
  221. {constellationdaq-0.1 → constellationdaq-0.2}/REUSE.toml +0 -0
  222. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/constellation/build.hpp +0 -0
  223. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/constellation/controller/exceptions.hpp +0 -0
  224. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/constellation/core/config/Configuration.cpp +0 -0
  225. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/constellation/core/config/Configuration.hpp +0 -0
  226. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/constellation/core/config/Configuration.ipp +0 -0
  227. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/constellation/core/config/Dictionary.cpp +0 -0
  228. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/constellation/core/config/Dictionary.hpp +0 -0
  229. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/constellation/core/config/Value.cpp +0 -0
  230. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/constellation/core/config/exceptions.cpp +0 -0
  231. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/constellation/core/config/exceptions.hpp +0 -0
  232. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/constellation/core/external/.clang-tidy +0 -0
  233. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/constellation/core/external/md5.h +0 -0
  234. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/constellation/core/heartbeat/HeartbeatRecv.hpp +0 -0
  235. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/constellation/core/log/Level.hpp +0 -0
  236. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/constellation/core/log/Logger.cpp +0 -0
  237. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/constellation/core/log/Logger.hpp +0 -0
  238. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/constellation/core/log/ProxySink.hpp +0 -0
  239. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/constellation/core/log/log.hpp +0 -0
  240. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/constellation/core/message/BaseHeader.cpp +0 -0
  241. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/constellation/core/message/BaseHeader.hpp +0 -0
  242. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/constellation/core/message/CDTP1Message.hpp +0 -0
  243. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/constellation/core/message/CHP1Message.cpp +0 -0
  244. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/constellation/core/message/CHP1Message.hpp +0 -0
  245. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/constellation/core/message/CSCP1Message.cpp +0 -0
  246. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/constellation/core/message/CSCP1Message.hpp +0 -0
  247. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/constellation/core/message/PayloadBuffer.hpp +0 -0
  248. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/constellation/core/message/exceptions.hpp +0 -0
  249. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/constellation/core/pools/BasePool.hpp +0 -0
  250. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/constellation/core/pools/SubscriberPool.hpp +0 -0
  251. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/constellation/core/protocol/CHP_definitions.hpp +0 -0
  252. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/constellation/core/protocol/Protocol.hpp +0 -0
  253. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/constellation/core/utils/casts.hpp +0 -0
  254. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/constellation/core/utils/exceptions.hpp +0 -0
  255. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/constellation/core/utils/std_future.hpp +0 -0
  256. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/constellation/core/utils/string_hash_map.hpp +0 -0
  257. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/constellation/core/utils/windows.hpp +0 -0
  258. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/constellation/exec/DSOLoader.hpp +0 -0
  259. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/constellation/exec/exceptions.hpp +0 -0
  260. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/constellation/exec/main.cpp +0 -0
  261. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/constellation/exec/satellite.hpp +0 -0
  262. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/constellation/exec/templates/main.cpp.in +0 -0
  263. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/constellation/satellite/CommandRegistry.cpp +0 -0
  264. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/constellation/satellite/CommandRegistry.hpp +0 -0
  265. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/constellation/satellite/FSM.hpp +0 -0
  266. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/controllers/MissionControl/MissionControl.qrc +0 -0
  267. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/controllers/MissionControl/QController.hpp +0 -0
  268. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/controllers/MissionControl/meson.build +0 -0
  269. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/controllers/MissionControl/qt_utils.hpp +0 -0
  270. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/controllers/meson.build +0 -0
  271. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/meson.build +0 -0
  272. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/satellites/DevNullReceiver/DevNullReceiverSatellite.cpp +0 -0
  273. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/satellites/DevNullReceiver/DevNullReceiverSatellite.hpp +0 -0
  274. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/satellites/DevNullReceiver/meson.build +0 -0
  275. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/satellites/RandomTransmitter/RandomTransmitterSatellite.cpp +0 -0
  276. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/satellites/RandomTransmitter/RandomTransmitterSatellite.hpp +0 -0
  277. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/satellites/RandomTransmitter/meson.build +0 -0
  278. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/satellites/Sputnik/meson.build +0 -0
  279. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/tests/test_core_chirp_broadcast.cpp +0 -0
  280. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/tests/test_core_chirp_manager.cpp +0 -0
  281. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/tests/test_core_chirp_message.cpp +0 -0
  282. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/tests/test_core_logging.cpp +0 -0
  283. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/tests/test_core_message.cpp +0 -0
  284. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/tests/test_exec_dsoloader.cpp +0 -0
  285. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/tests/test_files/good_config.toml +0 -0
  286. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/tests/test_files/inhomogeneous_array.toml +0 -0
  287. {constellationdaq-0.1 → constellationdaq-0.2}/cxx/tests/test_files/invalid_toml.txt +0 -0
  288. {constellationdaq-0.1 → constellationdaq-0.2}/docs/.gitignore +0 -0
  289. {constellationdaq-0.1 → constellationdaq-0.2}/docs/Doxyfile +0 -0
  290. {constellationdaq-0.1 → constellationdaq-0.2}/docs/Makefile +0 -0
  291. {constellationdaq-0.1 → constellationdaq-0.2}/docs/_static/css/custom.css +0 -0
  292. {constellationdaq-0.1 → constellationdaq-0.2}/docs/_static/undraw_code_typing_re_p8b9.svg +0 -0
  293. {constellationdaq-0.1 → constellationdaq-0.2}/docs/_static/undraw_knowledge_re_5v9l.svg +0 -0
  294. {constellationdaq-0.1 → constellationdaq-0.2}/docs/_static/undraw_online_connection_6778.svg +0 -0
  295. {constellationdaq-0.1 → constellationdaq-0.2}/docs/_static/undraw_open_source_-1-qxw.svg +0 -0
  296. {constellationdaq-0.1 → constellationdaq-0.2}/docs/_static/undraw_set_preferences_kwia.svg +0 -0
  297. {constellationdaq-0.1 → constellationdaq-0.2}/docs/_templates/recentposts.html +0 -0
  298. {constellationdaq-0.1 → constellationdaq-0.2}/docs/index.md.in +0 -0
  299. {constellationdaq-0.1 → constellationdaq-0.2}/docs/logo/logo.png +0 -0
  300. {constellationdaq-0.1 → constellationdaq-0.2}/docs/logo/logo.svg +0 -0
  301. {constellationdaq-0.1 → constellationdaq-0.2}/docs/logo/logo_small.png +0 -0
  302. {constellationdaq-0.1 → constellationdaq-0.2}/docs/manual/concepts/constellation.md +0 -0
  303. {constellationdaq-0.1 → constellationdaq-0.2}/docs/manual/concepts/listener.md +0 -0
  304. {constellationdaq-0.1 → constellationdaq-0.2}/docs/manual/concepts/logging.md +0 -0
  305. {constellationdaq-0.1 → constellationdaq-0.2}/docs/manual/concepts/satellite.md +0 -0
  306. {constellationdaq-0.1 → constellationdaq-0.2}/docs/manual/howtos/bench_frame_size_vs_data_rate.png +0 -0
  307. {constellationdaq-0.1 → constellationdaq-0.2}/docs/manual/howtos/bench_number_of_frames_vs_data_rate.png +0 -0
  308. {constellationdaq-0.1 → constellationdaq-0.2}/docs/manual/howtos/custom_commands.md +0 -0
  309. {constellationdaq-0.1 → constellationdaq-0.2}/docs/manual/howtos/data_transmission_speed.md +0 -0
  310. {constellationdaq-0.1 → constellationdaq-0.2}/docs/manual/howtos/port_eudaq.md +0 -0
  311. {constellationdaq-0.1 → constellationdaq-0.2}/docs/manual/howtos/receiver_cxx.md +0 -0
  312. {constellationdaq-0.1 → constellationdaq-0.2}/docs/manual/howtos/satellite_cxx.md +0 -0
  313. {constellationdaq-0.1 → constellationdaq-0.2}/docs/news.md +0 -0
  314. {constellationdaq-0.1 → constellationdaq-0.2}/docs/protocols/cdtp.md +0 -0
  315. {constellationdaq-0.1 → constellationdaq-0.2}/docs/protocols/chirp.md +0 -0
  316. {constellationdaq-0.1 → constellationdaq-0.2}/docs/protocols/chp.md +0 -0
  317. {constellationdaq-0.1 → constellationdaq-0.2}/docs/protocols/cmdp.md +0 -0
  318. {constellationdaq-0.1 → constellationdaq-0.2}/docs/protocols/cscp.md +0 -0
  319. {constellationdaq-0.1 → constellationdaq-0.2}/docs/protocols/index.rst +0 -0
  320. {constellationdaq-0.1 → constellationdaq-0.2}/docs/reference/contributing.md +0 -0
  321. {constellationdaq-0.1 → constellationdaq-0.2}/docs/reference/cxx/controller/controller.md +0 -0
  322. {constellationdaq-0.1 → constellationdaq-0.2}/docs/reference/cxx/controller/index.rst +0 -0
  323. {constellationdaq-0.1 → constellationdaq-0.2}/docs/reference/cxx/core/chirp.md +0 -0
  324. {constellationdaq-0.1 → constellationdaq-0.2}/docs/reference/cxx/core/config.md +0 -0
  325. {constellationdaq-0.1 → constellationdaq-0.2}/docs/reference/cxx/core/heartbeat.md +0 -0
  326. {constellationdaq-0.1 → constellationdaq-0.2}/docs/reference/cxx/core/log.md +0 -0
  327. {constellationdaq-0.1 → constellationdaq-0.2}/docs/reference/cxx/core/message.md +0 -0
  328. {constellationdaq-0.1 → constellationdaq-0.2}/docs/reference/cxx/core/pools.md +0 -0
  329. {constellationdaq-0.1 → constellationdaq-0.2}/docs/reference/cxx/core/protocol.md +0 -0
  330. {constellationdaq-0.1 → constellationdaq-0.2}/docs/reference/cxx/core/utils.md +0 -0
  331. {constellationdaq-0.1 → constellationdaq-0.2}/docs/reference/cxx/satellite/index.rst +0 -0
  332. {constellationdaq-0.1 → constellationdaq-0.2}/docs/reference/cxx/satellite/satellite.md +0 -0
  333. {constellationdaq-0.1 → constellationdaq-0.2}/docs/reference/index.md +0 -0
  334. {constellationdaq-0.1 → constellationdaq-0.2}/docs/reference/naming.md +0 -0
  335. {constellationdaq-0.1 → constellationdaq-0.2}/docs/reference/protocols.md +0 -0
  336. {constellationdaq-0.1 → constellationdaq-0.2}/docs/reference/satellite.md +0 -0
  337. {constellationdaq-0.1 → constellationdaq-0.2}/docs/satellites/index.md.in +0 -0
  338. {constellationdaq-0.1 → constellationdaq-0.2}/gcovr.cfg +0 -0
  339. {constellationdaq-0.1 → constellationdaq-0.2}/python/constellation/core/__init__.py +0 -0
  340. {constellationdaq-0.1 → constellationdaq-0.2}/python/constellation/core/cmdp.py +0 -0
  341. {constellationdaq-0.1 → constellationdaq-0.2}/python/constellation/core/configuration.py +0 -0
  342. {constellationdaq-0.1 → constellationdaq-0.2}/python/constellation/core/datasender.py +0 -0
  343. {constellationdaq-0.1 → constellationdaq-0.2}/python/constellation/core/fsm.py +0 -0
  344. {constellationdaq-0.1 → constellationdaq-0.2}/python/constellation/core/monitoring.py +0 -0
  345. {constellationdaq-0.1 → constellationdaq-0.2}/python/constellation/core/py.typed +0 -0
  346. {constellationdaq-0.1 → constellationdaq-0.2}/python/constellation/core/satellite.py +0 -0
  347. {constellationdaq-0.1 → constellationdaq-0.2}/python/constellation/core/version_code_name +0 -0
  348. {constellationdaq-0.1 → constellationdaq-0.2}/python/constellation/meson.build +0 -0
  349. {constellationdaq-0.1 → constellationdaq-0.2}/python/constellation/satellites/CaenHV/meson.build +0 -0
  350. {constellationdaq-0.1 → constellationdaq-0.2}/python/constellation/satellites/H5DataWriter/meson.build +0 -0
  351. {constellationdaq-0.1 → constellationdaq-0.2}/python/constellation/satellites/Influx/meson.build +0 -0
  352. {constellationdaq-0.1 → constellationdaq-0.2}/python/constellation/satellites/Keithley/Keithley2410.py +0 -0
  353. {constellationdaq-0.1 → constellationdaq-0.2}/python/constellation/satellites/Keithley/KeithleyInterface.py +0 -0
  354. {constellationdaq-0.1 → constellationdaq-0.2}/python/constellation/satellites/Keithley/meson.build +0 -0
  355. {constellationdaq-0.1 → constellationdaq-0.2}/python/constellation/satellites/Mariner/meson.build +0 -0
  356. {constellationdaq-0.1 → constellationdaq-0.2}/python/constellation/satellites/__init__.py +0 -0
  357. {constellationdaq-0.1 → constellationdaq-0.2}/python/constellation/tools/list_interfaces.py +0 -0
  358. {constellationdaq-0.1 → constellationdaq-0.2}/python/tests/conftest.py +0 -0
  359. {constellationdaq-0.1 → constellationdaq-0.2}/python/tests/test_broadcastmanager.py +0 -0
  360. {constellationdaq-0.1 → constellationdaq-0.2}/python/tests/test_cfg.toml +0 -0
  361. {constellationdaq-0.1 → constellationdaq-0.2}/python/tests/test_example.py +0 -0
  362. {constellationdaq-0.1 → constellationdaq-0.2}/python/tests/test_heartbeat.py +0 -0
  363. {constellationdaq-0.1 → constellationdaq-0.2}/python/tests/test_monitoring.py +0 -0
  364. {constellationdaq-0.1 → constellationdaq-0.2}/scripts/meson_disable_qt_components.sh +0 -0
  365. {constellationdaq-0.1 → constellationdaq-0.2}/scripts/meson_enable_all_components.sh +0 -0
  366. {constellationdaq-0.1 → constellationdaq-0.2}/subprojects/.gitignore +0 -0
  367. {constellationdaq-0.1 → constellationdaq-0.2}/subprojects/argparse.wrap +0 -0
  368. {constellationdaq-0.1 → constellationdaq-0.2}/subprojects/asio.wrap +0 -0
  369. {constellationdaq-0.1 → constellationdaq-0.2}/subprojects/catch2.wrap +0 -0
  370. {constellationdaq-0.1 → constellationdaq-0.2}/subprojects/cppzmq.wrap +0 -0
  371. {constellationdaq-0.1 → constellationdaq-0.2}/subprojects/libzmq.wrap +0 -0
  372. {constellationdaq-0.1 → constellationdaq-0.2}/subprojects/msgpackc-cxx.wrap +0 -0
  373. {constellationdaq-0.1 → constellationdaq-0.2}/subprojects/packagefiles/libzmq/fix-mingw-afunixh.diff +0 -0
  374. {constellationdaq-0.1 → constellationdaq-0.2}/subprojects/packagefiles/libzmq/meson.build +0 -0
  375. {constellationdaq-0.1 → constellationdaq-0.2}/subprojects/packagefiles/libzmq/meson_options.txt +0 -0
  376. {constellationdaq-0.1 → constellationdaq-0.2}/subprojects/spdlog.wrap +0 -0
  377. {constellationdaq-0.1 → constellationdaq-0.2}/subprojects/tomlplusplus.wrap +0 -0
@@ -2,7 +2,7 @@
2
2
  # SPDX-License-Identifier: CC0-1.0
3
3
 
4
4
  [codespell]
5
- skip = .git,.ci,subprojects,AUTHORS.md
5
+ skip = .git,.ci,subprojects,AUTHORS.md,*.svg
6
6
  quiet-level = 2
7
7
  # Words to be ignored, put one word per line and sort alphabetically
8
8
  ignore-words-list =
@@ -14,6 +14,7 @@ workflow:
14
14
  - if: $CI_PIPELINE_SOURCE == "schedule"
15
15
  variables:
16
16
  CCACHE_DISABLE: 1
17
+ - if: $CI_COMMIT_TAG && $CI_PIPELINE_SOURCE == "push"
17
18
  - if: $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH && $CI_PIPELINE_SOURCE == "push"
18
19
  when: never
19
20
  - when: always
@@ -137,9 +138,6 @@ variables:
137
138
 
138
139
  .build-cpp:
139
140
  stage: build
140
- # Select openstack Kubernetes runner for now since they perform better for C++ compilation
141
- tags:
142
- - openstack
143
141
  cache:
144
142
  - *meson-wrap-cache
145
143
  - *ccache
@@ -151,6 +149,8 @@ variables:
151
149
  - build
152
150
  expire_in: 24 hour
153
151
  <<: *cpp-rules
152
+ tags:
153
+ - openstack # Select openstack Kubernetes runner for now since they perform better for C++ compilation
154
154
 
155
155
  .build-py:
156
156
  stage: build
@@ -211,7 +211,6 @@ build:fedora-mingw:
211
211
  - .fedora-mingw
212
212
  variables:
213
213
  BUILD_TYPE: "release"
214
- # Do not build the Qt UI
215
214
  BUILD_OPTIONS: "--cross .cross/mingw-ucrt.ini"
216
215
  BUILD_SCRIPTS: "scripts/meson_disable_qt_components.sh"
217
216
  NINJA_OPTIONS: "-l4"
@@ -429,6 +428,9 @@ lint:clang-tidy:
429
428
  - ninja -C build clang-tidy
430
429
  rules:
431
430
  - if: $CI_PIPELINE_SOURCE != "merge_request_event"
431
+ retry: 2
432
+ tags:
433
+ - openstack
432
434
 
433
435
  lint:clang-tidy-diff:
434
436
  extends:
@@ -455,7 +457,7 @@ lint:clang-scan-build:
455
457
  CCC_CC: clang
456
458
  CCC_CXX: clang++
457
459
  script:
458
- - meson setup build -Dcxx_tests=disabled -Dbuildtype=debug
460
+ - meson setup build -Dcxx_tests=disabled -Dbuildtype=debug $(scripts/meson_enable_all_components.sh)
459
461
  - ninja -C build scan-build
460
462
  - if [ ! -z "$(ls -A build/meson-logs/scanbuild)" ]; then false; fi
461
463
  artifacts:
@@ -478,8 +480,11 @@ lint:coverity-scan:
478
480
  --form project=$COVERITY_SCAN_PROJECT_NAME --form token=$COVERITY_SCAN_TOKEN
479
481
  - tar -xzf /tmp/cov-analysis-linux64.tgz
480
482
  - rm -r /tmp/cov-analysis-linux64.tgz
483
+ - PATH=$PATH:$(echo cov-analysis-linux64-*/bin)
484
+ - CC=$(command -v gcc); CXX=$(command -v g++) # Set directly to avoid ccache
485
+ - cov-configure --comptype gcc --compiler $CXX
481
486
  - meson setup build -Dcxx_tests=disabled -Dbuildtype=debug
482
- - cov-analysis-linux64-*/bin/cov-build --dir cov-int ninja -C build
487
+ - cov-build --dir cov-int ninja -C build
483
488
  - tar -czf cov-int.tgz cov-int
484
489
  - curl -s https://scan.coverity.com/builds?project=$COVERITY_SCAN_PROJECT_NAME
485
490
  --form token=$COVERITY_SCAN_TOKEN --form email=$GITLAB_USER_EMAIL
@@ -487,6 +492,9 @@ lint:coverity-scan:
487
492
  --form description="$CI_COMMIT_REF_NAME / $CI_COMMIT_SHA / $CI_PIPELINE_ID"
488
493
  rules:
489
494
  - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_PIPELINE_SOURCE == "schedule"
495
+ retry: 2
496
+ tags:
497
+ - openstack
490
498
 
491
499
  # format stage
492
500
 
@@ -501,7 +509,7 @@ format:black:
501
509
  - .python-3.11
502
510
  script:
503
511
  - pip install --no-build-isolation -e .[dev]
504
- - black python/
512
+ - black --check python/
505
513
 
506
514
  format:flake8:
507
515
  extends:
@@ -3,7 +3,7 @@
3
3
 
4
4
  repos:
5
5
  - repo: https://github.com/pre-commit/pre-commit-hooks
6
- rev: v4.6.0
6
+ rev: v5.0.0
7
7
  hooks:
8
8
  - id: check-executables-have-shebangs
9
9
  - id: check-merge-conflict
@@ -26,7 +26,7 @@ repos:
26
26
  - id: codespell
27
27
 
28
28
  - repo: https://github.com/pre-commit/mirrors-clang-format
29
- rev: v19.1.1
29
+ rev: v19.1.3
30
30
  hooks:
31
31
  - id: clang-format
32
32
 
@@ -37,19 +37,24 @@ repos:
37
37
  additional_dependencies: [Flake8-pyproject]
38
38
 
39
39
  - repo: https://github.com/psf/black
40
- rev: 24.8.0
40
+ rev: 24.10.0
41
41
  hooks:
42
42
  - id: black
43
43
  language_version: python3
44
44
 
45
45
  - repo: https://github.com/pre-commit/mirrors-mypy
46
- rev: v1.11.2
46
+ rev: v1.13.0
47
47
  hooks:
48
48
  - id: mypy
49
- args: [ --no-warn-unused-ignores, --ignore-missing-imports]
49
+ args: [--no-warn-unused-ignores, --ignore-missing-imports]
50
50
  files: "python/constellation/core"
51
51
 
52
52
  - repo: https://github.com/igorshubovych/markdownlint-cli
53
53
  rev: v0.42.0
54
54
  hooks:
55
- - id: markdownlint
55
+ - id: markdownlint
56
+
57
+ - repo: https://github.com/fsfe/reuse-tool
58
+ rev: v5.0.2
59
+ hooks:
60
+ - id: reuse-lint-file
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ConstellationDAQ
3
- Version: 0.1
3
+ Version: 0.2
4
4
  Summary: The Autonomous Control and Data Acquisition System for Dynamic Experimental Setups
5
5
  Author: Constellation Authors
6
6
  License: EUPL-1.2
@@ -54,10 +54,15 @@ Requires-Dist: pycaenhv>=0.03; extra == "caenhv"
54
54
  Requires-Dist: pyserial; extra == "caenhv"
55
55
  Provides-Extra: hdf5
56
56
  Requires-Dist: h5py; extra == "hdf5"
57
- Provides-Extra: influxdb
58
- Requires-Dist: influxdb-client; extra == "influxdb"
57
+ Provides-Extra: influx
58
+ Requires-Dist: influxdb-client; extra == "influx"
59
59
  Provides-Extra: keithley
60
60
  Requires-Dist: pyserial; extra == "keithley"
61
+ Provides-Extra: visa
62
+ Requires-Dist: pyvisa; extra == "visa"
63
+ Requires-Dist: pyvisa-py; extra == "visa"
64
+ Requires-Dist: pyserial; extra == "visa"
65
+ Requires-Dist: zeroconf; extra == "visa"
61
66
  Description-Content-Type: text/markdown
62
67
 
63
68
  <!--
@@ -26,9 +26,7 @@
26
26
  #include <string_view>
27
27
  #include <utility>
28
28
  #include <variant>
29
- #include <vector>
30
29
 
31
- #include <magic_enum.hpp>
32
30
  #include <msgpack.hpp>
33
31
  #include <zmq.hpp>
34
32
  #include <zmq_addon.hpp>
@@ -39,14 +37,17 @@
39
37
  #include "constellation/core/log/log.hpp"
40
38
  #include "constellation/core/message/CHP1Message.hpp"
41
39
  #include "constellation/core/message/CSCP1Message.hpp"
40
+ #include "constellation/core/networking/exceptions.hpp"
41
+ #include "constellation/core/networking/zmq_helpers.hpp"
42
42
  #include "constellation/core/protocol/CHP_definitions.hpp"
43
43
  #include "constellation/core/protocol/CSCP_definitions.hpp"
44
- #include "constellation/core/utils/networking.hpp"
44
+ #include "constellation/core/utils/enum.hpp"
45
45
  #include "constellation/core/utils/string.hpp"
46
46
 
47
47
  using namespace constellation::config;
48
48
  using namespace constellation::controller;
49
49
  using namespace constellation::message;
50
+ using namespace constellation::networking;
50
51
  using namespace constellation::protocol;
51
52
  using namespace constellation::utils;
52
53
  using namespace std::chrono_literals;
@@ -79,8 +80,12 @@ void Controller::stop() {
79
80
 
80
81
  // Close all open connections
81
82
  const std::lock_guard connection_lock {connection_mutex_};
82
- for(auto& conn : connections_) {
83
- conn.second.req.close();
83
+ try {
84
+ for(auto& conn : connections_) {
85
+ conn.second.req.close();
86
+ }
87
+ } catch(const zmq::error_t& e) {
88
+ LOG(logger_, WARNING) << "Error closing socket: " << e.what();
84
89
  }
85
90
  connections_.clear();
86
91
  connection_count_.store(connections_.size());
@@ -108,7 +113,11 @@ void Controller::callback_impl(const constellation::chirp::DiscoveredService& se
108
113
  // Note the position of the removed item:
109
114
  const auto position = std::distance(connections_.begin(), it);
110
115
 
111
- it->second.req.close();
116
+ try {
117
+ it->second.req.close();
118
+ } catch(const zmq::error_t& e) {
119
+ LOG(logger_, WARNING) << "Error closing socket" << it->second.uri << ": " << e.what();
120
+ }
112
121
  LOG(logger_, DEBUG) << "Satellite " << std::quoted(it->first) << " at " << uri << " departed";
113
122
  connections_.erase(it);
114
123
  connection_count_.store(connections_.size());
@@ -121,41 +130,52 @@ void Controller::callback_impl(const constellation::chirp::DiscoveredService& se
121
130
  reached_state(getLowestState(), isInGlobalState());
122
131
  }
123
132
  } else if(status == chirp::ServiceStatus::DISCOVERED) {
124
- // New satellite connection
125
- Connection conn = {{*utils::global_zmq_context(), zmq::socket_type::req}, service.host_id, uri};
126
- conn.req.connect(uri);
127
-
128
- // Obtain canonical name:
129
- auto send_msg_name = CSCP1Message({controller_name_}, {CSCP1Message::Type::REQUEST, "get_name"});
130
- const auto recv_msg_name = send_receive(conn, send_msg_name);
131
- const auto name = recv_msg_name.getVerb().second;
132
-
133
- // Obtain current state
134
- auto send_msg_state = CSCP1Message({controller_name_}, {CSCP1Message::Type::REQUEST, "get_state"});
135
- const auto recv_msg_state = send_receive(conn, send_msg_state);
136
- conn.state = magic_enum::enum_cast<CSCP::State>(recv_msg_state.getVerb().second).value_or(CSCP::State::NEW);
137
-
138
- // Get list of commands
139
- auto send_msg_cmd = CSCP1Message({controller_name_}, {CSCP1Message::Type::REQUEST, "get_commands"});
140
- const auto recv_msg_cmd = send_receive(conn, send_msg_cmd);
141
- conn.commands = Dictionary::disassemble(recv_msg_cmd.getPayload());
142
-
143
- // Add to map of open connections
144
- const auto [it, success] = connections_.emplace(name, std::move(conn));
145
- connection_count_.store(connections_.size());
146
-
147
- if(!success) {
148
- LOG(logger_, WARNING) << "Not adding remote satellite " << std::quoted(name) << " at " << uri
149
- << ", a satellite with the same canonical name was already registered";
150
- } else {
151
- LOG(logger_, DEBUG) << "Registered remote satellite " << std::quoted(name) << " at " << uri;
133
+ try {
134
+ // New satellite connection
135
+ Connection conn = {{*global_zmq_context(), zmq::socket_type::req}, service.host_id, uri};
152
136
 
153
- // Trigger method for propagation of connection list updates in derived controller classes
154
- propagate_update(UpdateType::ADDED, std::distance(connections_.begin(), it), connections_.size());
137
+ // Set response reception timeout in milliseconds:
138
+ conn.req.set(zmq::sockopt::rcvtimeo, static_cast<int>(cmd_timeout_.count()));
155
139
 
156
- lock.unlock();
157
- // Propagate state change of the constellation
158
- reached_state(getLowestState(), isInGlobalState());
140
+ // Connect the socket:
141
+ conn.req.connect(uri);
142
+
143
+ // Obtain canonical name:
144
+ auto send_msg_name = CSCP1Message({controller_name_}, {CSCP1Message::Type::REQUEST, "get_name"});
145
+ const auto recv_msg_name = send_receive(conn, send_msg_name);
146
+ const auto name = recv_msg_name.getVerb().second;
147
+
148
+ // Obtain current state
149
+ auto send_msg_state = CSCP1Message({controller_name_}, {CSCP1Message::Type::REQUEST, "get_state"});
150
+ const auto recv_msg_state = send_receive(conn, send_msg_state);
151
+ conn.state = enum_cast<CSCP::State>(recv_msg_state.getVerb().second).value_or(CSCP::State::NEW);
152
+
153
+ // Get list of commands
154
+ auto send_msg_cmd = CSCP1Message({controller_name_}, {CSCP1Message::Type::REQUEST, "get_commands"});
155
+ const auto recv_msg_cmd = send_receive(conn, send_msg_cmd);
156
+ conn.commands = Dictionary::disassemble(recv_msg_cmd.getPayload());
157
+
158
+ // Add to map of open connections
159
+ const auto [it, success] = connections_.emplace(name, std::move(conn));
160
+ connection_count_.store(connections_.size());
161
+
162
+ if(!success) {
163
+ LOG(logger_, WARNING) << "Not adding remote satellite " << std::quoted(name) << " at " << uri
164
+ << ", a satellite with the same canonical name was already registered";
165
+ } else {
166
+ LOG(logger_, DEBUG) << "Registered remote satellite " << std::quoted(name) << " at " << uri;
167
+
168
+ // Trigger method for propagation of connection list updates in derived controller classes
169
+ propagate_update(UpdateType::ADDED, std::distance(connections_.begin(), it), connections_.size());
170
+
171
+ lock.unlock();
172
+ // Propagate state change of the constellation
173
+ reached_state(getLowestState(), isInGlobalState());
174
+ }
175
+ } catch(const zmq::error_t& e) {
176
+ LOG(CRITICAL) << "ZeroMQ error: " << e.what();
177
+ } catch(const NetworkError& e) {
178
+ LOG(CRITICAL) << e.what();
159
179
  }
160
180
  }
161
181
  }
@@ -168,8 +188,8 @@ void Controller::process_heartbeat(const message::CHP1Message& msg) {
168
188
  // Find satellite from connection list based in the heartbeat sender name
169
189
  const auto sat = connections_.find(msg.getSender());
170
190
  if(sat != connections_.end()) {
171
- LOG(logger_, TRACE) << msg.getSender() << " reports state " << magic_enum::enum_name(msg.getState())
172
- << ", next message in " << msg.getInterval().count();
191
+ LOG(logger_, TRACE) << msg.getSender() << " reports state " << msg.getState() << ", next message in "
192
+ << msg.getInterval().count();
173
193
 
174
194
  const auto deviation = std::chrono::duration_cast<std::chrono::seconds>(now - msg.getTime());
175
195
  if(std::chrono::abs(deviation) > 3s) [[unlikely]] {
@@ -215,12 +235,17 @@ std::set<std::string> Controller::getConnections() const {
215
235
  std::string Controller::getRunIdentifier() {
216
236
  const std::lock_guard connection_lock {connection_mutex_};
217
237
  for(auto& [name, sat] : connections_) {
218
- // Obtain run identifier:
219
- auto send_msg = CSCP1Message({controller_name_}, {CSCP1Message::Type::REQUEST, "get_run_id"});
220
- const auto recv_msg = send_receive(sat, send_msg);
221
- const auto runid = recv_msg.getVerb().second;
222
- if(recv_msg.getVerb().first == CSCP1Message::Type::SUCCESS && !runid.empty()) {
223
- return to_string(runid);
238
+
239
+ try {
240
+ // Obtain run identifier:
241
+ auto send_msg = CSCP1Message({controller_name_}, {CSCP1Message::Type::REQUEST, "get_run_id"});
242
+ const auto recv_msg = send_receive(sat, send_msg);
243
+ const auto runid = recv_msg.getVerb().second;
244
+ if(recv_msg.getVerb().first == CSCP1Message::Type::SUCCESS && !runid.empty()) {
245
+ return to_string(runid);
246
+ }
247
+ } catch(const NetworkError& e) {
248
+ LOG(CRITICAL) << e.what();
224
249
  }
225
250
  }
226
251
  return {};
@@ -231,21 +256,26 @@ std::optional<std::chrono::system_clock::time_point> Controller::getRunStartTime
231
256
 
232
257
  std::optional<std::chrono::system_clock::time_point> time {};
233
258
  for(auto& [name, sat] : connections_) {
234
- // Obtain run starting time from get_state command metadata:
235
- auto send_msg = CSCP1Message({controller_name_}, {CSCP1Message::Type::REQUEST, "get_state"});
236
- const auto recv_msg = send_receive(sat, send_msg);
237
-
238
259
  try {
239
- const auto state = magic_enum::enum_cast<CSCP::State>(recv_msg.getVerb().second).value_or(CSCP::State::NEW);
240
- const auto& header = recv_msg.getHeader();
241
- if(state == CSCP::State::RUN && header.hasTag("last_changed")) {
242
- const auto timestamp = header.getTag<std::chrono::system_clock::time_point>("last_changed");
243
- LOG(logger_, DEBUG) << "Run started for " << std::quoted(header.getSender()) << " at "
244
- << utils::to_string(timestamp);
245
- // Use latest available timestamp:
246
- time = std::max(timestamp, time.value_or(timestamp));
260
+ // Obtain run starting time from get_state command metadata:
261
+ auto send_msg = CSCP1Message({controller_name_}, {CSCP1Message::Type::REQUEST, "get_state"});
262
+ const auto recv_msg = send_receive(sat, send_msg);
263
+
264
+ try {
265
+ const auto state = enum_cast<CSCP::State>(recv_msg.getVerb().second).value_or(CSCP::State::NEW);
266
+ const auto& header = recv_msg.getHeader();
267
+ if(state == CSCP::State::RUN && header.hasTag("last_changed")) {
268
+ const auto timestamp = header.getTag<std::chrono::system_clock::time_point>("last_changed");
269
+ LOG(logger_, DEBUG) << "Run started for " << std::quoted(header.getSender()) << " at "
270
+ << to_string(timestamp);
271
+ // Use latest available timestamp:
272
+ time = std::max(timestamp, time.value_or(timestamp));
273
+ }
274
+ } catch(const msgpack::unpack_error&) {
275
+ continue;
247
276
  }
248
- } catch(const msgpack::unpack_error&) {
277
+ } catch(const NetworkError& e) {
278
+ LOG(CRITICAL) << e.what();
249
279
  continue;
250
280
  }
251
281
  }
@@ -288,18 +318,27 @@ CSCP1Message Controller::send_receive(Connection& conn, CSCP1Message& cmd, bool
288
318
  return {{controller_name_}, {CSCP1Message::Type::ERROR, "Can only send command messages of type REQUEST"}};
289
319
  }
290
320
 
291
- // Possible keep payload, we might send multiple command messages:
292
- cmd.assemble(keep_payload).send(conn.req);
293
- zmq::multipart_t recv_zmq_msg {};
294
- recv_zmq_msg.recv(conn.req);
295
-
296
- // Disassemble message and update connection information:
297
- auto reply = CSCP1Message::disassemble(recv_zmq_msg);
298
- const auto verb = reply.getVerb();
299
- conn.last_cmd_type = verb.first;
300
- conn.last_cmd_verb = verb.second;
321
+ try {
322
+ // Possible keep payload, we might send multiple command messages:
323
+ cmd.assemble(keep_payload).send(conn.req);
324
+ zmq::multipart_t recv_zmq_msg {};
325
+ const auto responded = recv_zmq_msg.recv(conn.req);
326
+
327
+ if(responded) {
328
+ // Disassemble message and update connection information:
329
+ auto reply = CSCP1Message::disassemble(recv_zmq_msg);
330
+ const auto verb = reply.getVerb();
331
+ conn.last_cmd_type = verb.first;
332
+ conn.last_cmd_verb = verb.second;
333
+ return reply;
334
+ }
301
335
 
302
- return reply;
336
+ // No response - timed out:
337
+ throw SendTimeoutError("command " + to_string(cmd.getVerb().second) + " to " + conn.uri,
338
+ std::chrono::duration_cast<std::chrono::seconds>(cmd_timeout_));
339
+ } catch(const zmq::error_t& error) {
340
+ throw NetworkError(error.what());
341
+ }
303
342
  }
304
343
 
305
344
  CSCP1Message Controller::build_message(std::string verb, const CommandPayload& payload) const {
@@ -317,16 +356,21 @@ CSCP1Message Controller::build_message(std::string verb, const CommandPayload& p
317
356
  }
318
357
 
319
358
  CSCP1Message Controller::sendCommand(std::string_view satellite_name, CSCP1Message& cmd) {
320
- const std::lock_guard connection_lock {connection_mutex_};
359
+ try {
360
+ const std::lock_guard connection_lock {connection_mutex_};
321
361
 
322
- // Find satellite by canonical name:
323
- const auto sat = connections_.find(satellite_name);
324
- if(sat == connections_.end()) {
325
- return {{controller_name_}, {CSCP1Message::Type::ERROR, "Target satellite is unknown to controller"}};
326
- }
362
+ // Find satellite by canonical name:
363
+ const auto sat = connections_.find(satellite_name);
364
+ if(sat == connections_.end()) {
365
+ return {{controller_name_}, {CSCP1Message::Type::ERROR, "Target satellite is unknown to controller"}};
366
+ }
327
367
 
328
- // Exchange messages
329
- return send_receive(sat->second, cmd);
368
+ // Exchange messages
369
+ return send_receive(sat->second, cmd);
370
+ } catch(const NetworkError& e) {
371
+ LOG(logger_, CRITICAL) << e.what();
372
+ return {{std::string(satellite_name)}, {CSCP1Message::Type::ERROR, e.what()}};
373
+ }
330
374
  }
331
375
 
332
376
  CSCP1Message Controller::sendCommand(std::string_view satellite_name, std::string verb, const CommandPayload& payload) {
@@ -336,23 +380,29 @@ CSCP1Message Controller::sendCommand(std::string_view satellite_name, std::strin
336
380
 
337
381
  std::map<std::string, CSCP1Message> Controller::sendCommands(CSCP1Message& cmd) {
338
382
 
339
- std::vector<std::future<CSCP1Message>> futures {};
383
+ std::map<std::string, std::future<CSCP1Message>> futures {};
340
384
  std::map<std::string, CSCP1Message> replies {};
341
385
 
342
386
  const std::lock_guard connection_lock {connection_mutex_};
343
-
344
- futures.reserve(connections_.size());
345
387
  for(auto& [name, sat] : connections_) {
346
388
  // Start command sending and store future:
347
- futures.emplace_back(std::async(std::launch::async, [&]() { return send_receive(sat, cmd, true); }));
389
+ futures.emplace(name, std::async(std::launch::async, [&]() { return send_receive(sat, cmd, true); }));
348
390
  }
349
391
 
350
- for(auto& future : futures) {
351
- auto reply = future.get();
352
- const auto name = reply.getHeader().getSender();
392
+ for(auto& [sat, future] : futures) {
393
+ try {
394
+ auto reply = future.get();
395
+ const auto name = reply.getHeader().getSender();
396
+
397
+ // Store received reply:
398
+ replies.emplace(name, std::move(reply));
399
+ } catch(const NetworkError& e) {
400
+ LOG(logger_, CRITICAL) << e.what();
353
401
 
354
- // Store received reply:
355
- replies.emplace(name, std::move(reply));
402
+ // Create ERROR reply instead
403
+ CSCP1Message reply {sat, {CSCP1Message::Type::ERROR, e.what()}};
404
+ replies.emplace(sat, std::move(reply));
405
+ }
356
406
  }
357
407
  return replies;
358
408
  }
@@ -365,29 +415,36 @@ std::map<std::string, CSCP1Message> Controller::sendCommands(std::string verb, c
365
415
  std::map<std::string, CSCP1Message> Controller::sendCommands(const std::string& verb,
366
416
  const std::map<std::string, CommandPayload>& payloads) {
367
417
 
368
- std::vector<std::future<CSCP1Message>> futures {};
418
+ std::map<std::string, std::future<CSCP1Message>> futures {};
369
419
  std::map<std::string, CSCP1Message> replies {};
370
420
 
371
421
  const std::lock_guard connection_lock {connection_mutex_};
372
422
 
373
- futures.reserve(connections_.size());
374
423
  for(auto& [name, sat] : connections_) {
375
424
  // Start command sending and store future:
376
- futures.emplace_back(std::async(std::launch::async, [&]() {
377
- // Prepare message:
378
- auto send_msg =
379
- (payloads.contains(name) ? build_message(verb, payloads.at(name))
380
- : CSCP1Message({controller_name_}, {CSCP1Message::Type::REQUEST, verb}));
381
- return send_receive(sat, send_msg);
382
- }));
425
+ futures.emplace(name, std::async(std::launch::async, [&]() {
426
+ // Prepare message:
427
+ auto send_msg = (payloads.contains(name)
428
+ ? build_message(verb, payloads.at(name))
429
+ : CSCP1Message({controller_name_}, {CSCP1Message::Type::REQUEST, verb}));
430
+ return send_receive(sat, send_msg);
431
+ }));
383
432
  }
384
433
 
385
- for(auto& future : futures) {
386
- auto reply = future.get();
387
- const auto name = reply.getHeader().getSender();
434
+ for(auto& [sat, future] : futures) {
435
+ try {
436
+ auto reply = future.get();
437
+ const auto name = reply.getHeader().getSender();
438
+
439
+ // Store received reply:
440
+ replies.emplace(name, std::move(reply));
441
+ } catch(const NetworkError& e) {
442
+ LOG(logger_, CRITICAL) << e.what();
388
443
 
389
- // Store received reply:
390
- replies.emplace(name, std::move(reply));
444
+ // Create ERROR reply instead
445
+ CSCP1Message reply {sat, {CSCP1Message::Type::ERROR, e.what()}};
446
+ replies.emplace(sat, std::move(reply));
447
+ }
391
448
  }
392
449
  return replies;
393
450
  }
@@ -355,6 +355,8 @@ namespace constellation::controller {
355
355
 
356
356
  std::atomic_size_t connection_count_;
357
357
 
358
+ std::chrono::milliseconds cmd_timeout_ {1500};
359
+
358
360
  std::condition_variable_any cv_;
359
361
  std::jthread watchdog_thread_;
360
362
  };
@@ -17,7 +17,9 @@
17
17
  #include <sstream>
18
18
  #include <string>
19
19
  #include <string_view>
20
+ #include <type_traits>
20
21
  #include <utility>
22
+ #include <variant>
21
23
  #include <vector>
22
24
 
23
25
  #include <toml++/toml.hpp>
@@ -54,6 +56,76 @@ ControllerConfiguration::ControllerConfiguration(std::string_view toml) {
54
56
  parse_toml(toml);
55
57
  }
56
58
 
59
+ std::string ControllerConfiguration::getAsTOML() const {
60
+
61
+ auto get_toml_array = [&](auto&& val) -> toml::array {
62
+ toml::array arr;
63
+
64
+ using T = std::decay_t<decltype(val)>::value_type;
65
+ for(const auto& v : val) {
66
+ arr.push_back(static_cast<T>(v));
67
+ }
68
+ return arr;
69
+ };
70
+
71
+ auto get_toml_table = [&](const config::Dictionary& dict) -> toml::table {
72
+ toml::table tbl;
73
+ for(const auto& [key, value] : dict) {
74
+
75
+ LOG(config_parser_logger_, TRACE) << "Parsing key " << key;
76
+
77
+ if(std::holds_alternative<bool>(value)) {
78
+ tbl.emplace(key, toml::value<bool>(value.get<bool>()));
79
+ } else if(std::holds_alternative<std::int64_t>(value)) {
80
+ tbl.emplace(key, toml::value<std::int64_t>(value.get<std::int64_t>()));
81
+ } else if(std::holds_alternative<double>(value)) {
82
+ tbl.emplace(key, toml::value<double>(value.get<double>()));
83
+ } else if(std::holds_alternative<std::string>(value)) {
84
+ tbl.emplace(key, toml::value<std::string>(value.get<std::string>()));
85
+ } else if(std::holds_alternative<std::vector<bool>>(value)) {
86
+ tbl.emplace(key, get_toml_array(value.get<std::vector<bool>>()));
87
+ } else if(std::holds_alternative<std::vector<std::string>>(value)) {
88
+ tbl.emplace(key, get_toml_array(value.get<std::vector<std::string>>()));
89
+ } else if(std::holds_alternative<std::vector<double>>(value)) {
90
+ tbl.emplace(key, get_toml_array(value.get<std::vector<double>>()));
91
+ } else if(std::holds_alternative<std::vector<std::int64_t>>(value)) {
92
+ tbl.emplace(key, get_toml_array(value.get<std::vector<std::int64_t>>()));
93
+ }
94
+
95
+ // FIXME timestamp? char vector?
96
+ }
97
+ return tbl;
98
+ };
99
+
100
+ // The global TOML table
101
+ toml::table tbl;
102
+
103
+ // Add global config:
104
+ tbl.emplace("satellites", get_toml_table(global_config_));
105
+
106
+ // Add type config:
107
+ for(const auto& [type, config] : type_configs_) {
108
+ tbl["satellites"].as_table()->emplace(type, get_toml_table(config));
109
+ }
110
+
111
+ // Add individual satellites sections:
112
+ for(const auto& [canonical_name, config] : satellite_configs_) {
113
+ const auto pos = canonical_name.find_first_of('.', 0);
114
+ const auto type = canonical_name.substr(0, pos);
115
+ const auto name = canonical_name.substr(pos + 1);
116
+ tbl["satellites"].as_table()->emplace(type, toml::table {});
117
+ tbl["satellites"][type].as_table()->emplace(name, get_toml_table(config));
118
+ }
119
+
120
+ // Clean up table a bit:
121
+ tbl.prune();
122
+
123
+ std::stringstream oss;
124
+ oss << tbl;
125
+
126
+ return oss.str();
127
+ }
128
+
57
129
  void ControllerConfiguration::parse_toml(std::string_view toml) {
58
130
  toml::table tbl {};
59
131
  try {
@@ -186,6 +258,18 @@ bool ControllerConfiguration::hasSatelliteConfiguration(std::string_view canonic
186
258
  return satellite_configs_.contains(transform(canonical_name, ::tolower));
187
259
  }
188
260
 
261
+ void ControllerConfiguration::addSatelliteConfiguration(std::string_view canonical_name, config::Dictionary config) {
262
+
263
+ // Check if already there
264
+ auto config_it = satellite_configs_.find(canonical_name);
265
+ if(config_it != satellite_configs_.end()) {
266
+ LOG(config_parser_logger_, WARNING) << "Overwriting existing satellite configuration for " << canonical_name;
267
+ config_it->second = std::move(config);
268
+ } else {
269
+ satellite_configs_.emplace(canonical_name, std::move(config));
270
+ }
271
+ }
272
+
189
273
  Dictionary ControllerConfiguration::getSatelliteConfiguration(std::string_view canonical_name) const {
190
274
  LOG(config_parser_logger_, TRACE) << "Fetching configuration for " << canonical_name;
191
275