ekfsm 0.13.0a168.post1__tar.gz → 0.13.0a183.post1__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.

Potentially problematic release.


This version of ekfsm might be problematic. Click here for more details.

Files changed (170) hide show
  1. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/PKG-INFO +1 -1
  2. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/docs/source/boards/ekf/ccu.rst +13 -1
  3. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/docs/source/boards/ekf/sc9-toccata.rst +5 -5
  4. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/docs/source/index.rst +1 -1
  5. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/docs/source/intro.rst +12 -2
  6. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/docs/source/reference/ekfsm.rst +3 -3
  7. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/docs/source/reference/systemconfig.rst +24 -0
  8. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/ekfsm/__init__.py +3 -0
  9. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/ekfsm/boards/oem/hitron/hdrc-300s.yaml +1 -1
  10. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/ekfsm/devices/ekf_ccu_uc.py +34 -41
  11. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/ekfsm/devices/pmbus.py +3 -1
  12. ekfsm-0.13.0a183.post1/ekfsm/lock.py +94 -0
  13. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/pyproject.toml +1 -1
  14. ekfsm-0.13.0a183.post1/tests/locking/lock_tester.py +35 -0
  15. ekfsm-0.13.0a183.post1/tests/locking/test_lock.py +30 -0
  16. ekfsm-0.13.0a183.post1/tests/sim/sys/devices/virtual/dmi/id/board_version +1 -0
  17. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/tests/zip2-ccu-only.yaml +1 -1
  18. ekfsm-0.13.0a168.post1/tests/zip2-smoke.yaml → ekfsm-0.13.0a183.post1/tests/zip2-comp1.yaml +29 -15
  19. ekfsm-0.13.0a183.post1/tests/zip2-comp1_smoke.py +76 -0
  20. ekfsm-0.13.0a183.post1/tests/zip2-comp2.yaml +59 -0
  21. ekfsm-0.13.0a183.post1/tests/zip2-comp2_smoke.py +67 -0
  22. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/tests/zip2_ccu_exp.py +9 -5
  23. ekfsm-0.13.0a168.post1/tests/zip2_smoke.py +0 -56
  24. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/.env +0 -0
  25. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/.envrc +0 -0
  26. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/.flake8 +0 -0
  27. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/.gitignore +0 -0
  28. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/.gitlab-ci.yml +0 -0
  29. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/.readthedocs.yaml +0 -0
  30. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/.vscode/launch.json +0 -0
  31. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/.vscode/settings.json +0 -0
  32. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/LICENSE.md +0 -0
  33. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/README.md +0 -0
  34. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/devenv.lock +0 -0
  35. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/devenv.nix +0 -0
  36. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/devenv.yaml +0 -0
  37. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/docs/.gitignore +0 -0
  38. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/docs/Makefile +0 -0
  39. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/docs/requirements.txt +0 -0
  40. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/docs/source/_static/devices.drawio.png +0 -0
  41. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/docs/source/_static/devices.drawio.svg +0 -0
  42. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/docs/source/_static/ekfsm_system.drawio.png +0 -0
  43. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/docs/source/_static/ekfsm_system.drawio.svg +0 -0
  44. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/docs/source/boards/ekf/se5-club.rst +0 -0
  45. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/docs/source/boards/ekf/sn4-djembe.rst +0 -0
  46. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/docs/source/boards/ekf/snippets/cpci_inventory.rst +0 -0
  47. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/docs/source/boards/ekf/spv-mystic.rst +0 -0
  48. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/docs/source/boards/ekf/sq1-track.rst +0 -0
  49. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/docs/source/boards/ekf/sq3-quartet.rst +0 -0
  50. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/docs/source/boards/ekf/sur-uart.rst +0 -0
  51. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/docs/source/boards/hitron/hdrc-300s.rst +0 -0
  52. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/docs/source/boards.rst +0 -0
  53. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/docs/source/conf.py +0 -0
  54. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/docs/source/reference/index.rst +0 -0
  55. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/ekfsm/boards/oem/ekf/ccu.yaml +0 -0
  56. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/ekfsm/boards/oem/ekf/sc5-festival.yaml +0 -0
  57. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/ekfsm/boards/oem/ekf/sc9-toccata.yaml +0 -0
  58. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/ekfsm/boards/oem/ekf/se5-club.yaml +0 -0
  59. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/ekfsm/boards/oem/ekf/sn4-djembe.yaml +0 -0
  60. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/ekfsm/boards/oem/ekf/spv-mystic.yaml +0 -0
  61. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/ekfsm/boards/oem/ekf/sq1-track.yaml +0 -0
  62. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/ekfsm/boards/oem/ekf/sq3-quartet.yaml +0 -0
  63. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/ekfsm/boards/oem/ekf/srf-fan.yaml +0 -0
  64. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/ekfsm/boards/oem/ekf/sur-uart.yaml +0 -0
  65. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/ekfsm/cli.py +0 -0
  66. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/ekfsm/config.py +0 -0
  67. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/ekfsm/core/__init__.py +0 -0
  68. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/ekfsm/core/components.py +0 -0
  69. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/ekfsm/core/probe.py +0 -0
  70. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/ekfsm/core/slots.py +0 -0
  71. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/ekfsm/core/sysfs.py +0 -0
  72. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/ekfsm/core/utils.py +0 -0
  73. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/ekfsm/devices/__init__.py +0 -0
  74. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/ekfsm/devices/coretemp.py +0 -0
  75. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/ekfsm/devices/eeprom.py +0 -0
  76. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/ekfsm/devices/ekf_sur_led.py +0 -0
  77. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/ekfsm/devices/generic.py +0 -0
  78. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/ekfsm/devices/gpio.py +0 -0
  79. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/ekfsm/devices/iio.py +0 -0
  80. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/ekfsm/devices/iio_thermal_humidity.py +0 -0
  81. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/ekfsm/devices/imu.py +0 -0
  82. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/ekfsm/devices/mux.py +0 -0
  83. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/ekfsm/devices/smbios.py +0 -0
  84. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/ekfsm/devices/smbus.py +0 -0
  85. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/ekfsm/devices/utils.py +0 -0
  86. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/ekfsm/exceptions.py +0 -0
  87. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/ekfsm/log.py +0 -0
  88. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/ekfsm/py.typed +0 -0
  89. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/ekfsm/simctrl.py +0 -0
  90. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/ekfsm/system.py +0 -0
  91. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/hack/bringup_zip_i2c_devs.sh +0 -0
  92. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/scripts/modify-acpi-table.sh +0 -0
  93. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/tests/__init__.py +0 -0
  94. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/tests/basic_sim.py +0 -0
  95. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/tests/ccu-test.py +0 -0
  96. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/tests/ccu_wokwi_sim.py +0 -0
  97. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/tests/props.py +0 -0
  98. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/tests/run.py +0 -0
  99. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/tests/sc5-hitron-only.yaml +0 -0
  100. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/tests/sim/__init__.py +0 -0
  101. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/tests/sim/sys/class/hwmon/hwmon2/name +0 -0
  102. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/tests/sim/sys/class/hwmon/hwmon2/temp1_input +0 -0
  103. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-10/firmware_node/adr +0 -0
  104. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-10/name +0 -0
  105. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-10/new_device +0 -0
  106. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-11/firmware_node/adr +0 -0
  107. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-11/name +0 -0
  108. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-11/new_device +0 -0
  109. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-12/firmware_node/adr +0 -0
  110. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-12/name +0 -0
  111. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-12/new_device +0 -0
  112. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-14/firmware_node/adr +0 -0
  113. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-14/i2c-PRP0002:01/firmware_node/description +0 -0
  114. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-14/i2c-PRP0002:01/gpiochip1/dev +0 -0
  115. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-14/i2c-PRP0002:01/name +0 -0
  116. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-14/i2c-PRP0002:02/eeprom +0 -0
  117. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-14/i2c-PRP0002:02/firmware_node/description +0 -0
  118. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-14/i2c-PRP0002:02/name +0 -0
  119. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-14/name +0 -0
  120. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-14/new_device +0 -0
  121. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-15/firmware_node/adr +0 -0
  122. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-15/name +0 -0
  123. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-15/new_device +0 -0
  124. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-16/firmware_node/adr +0 -0
  125. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-16/name +0 -0
  126. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-16/new_device +0 -0
  127. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-17/firmware_node/adr +0 -0
  128. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-17/name +0 -0
  129. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-17/new_device +0 -0
  130. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-9/firmware_node/adr +0 -0
  131. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-9/i2c-PRP0001:01/firmware_node/description +0 -0
  132. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-9/i2c-PRP0001:01/gpiochip1/dev +0 -0
  133. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-9/i2c-PRP0001:01/name +0 -0
  134. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-9/i2c-PRP0001:02/eeprom +0 -0
  135. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-9/i2c-PRP0001:02/firmware_node/description +0 -0
  136. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-9/i2c-PRP0001:02/name +0 -0
  137. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-9/name +0 -0
  138. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-9/new_device +0 -0
  139. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-PRP0001:00/firmware_node/description +0 -0
  140. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-PRP0001:00/name +0 -0
  141. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-PRP0001:03/firmware_node/description +0 -0
  142. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-PRP0001:03/hwmon/hwmon99/curr1_input +0 -0
  143. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-PRP0001:03/hwmon/hwmon99/curr2_input +0 -0
  144. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-PRP0001:03/hwmon/hwmon99/in1_input +0 -0
  145. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-PRP0001:03/hwmon/hwmon99/in2_input +0 -0
  146. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-PRP0001:03/hwmon/hwmon99/model +0 -0
  147. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-PRP0001:03/hwmon/hwmon99/revision +0 -0
  148. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-PRP0001:03/hwmon/hwmon99/serial +0 -0
  149. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-PRP0001:03/hwmon/hwmon99/temp1_input +0 -0
  150. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-PRP0001:03/hwmon/hwmon99/vendor +0 -0
  151. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-PRP0001:03/name +0 -0
  152. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-PRP0002:00/firmware_node/description +0 -0
  153. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/i2c-PRP0002:00/name +0 -0
  154. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/tests/sim/sys/devices/pci0000:00/0000:00:15.1/i2c_designware.2/i2c-1/new_device +0 -0
  155. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/tests/sim/sys/devices/pci0000:00/0000:00:1f.4/i2c-7/7-0057/eeprom +0 -0
  156. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/tests/sim/sys/devices/pci0000:00/0000:00:1f.4/i2c-7/7-0057/name +0 -0
  157. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/tests/sim/sys/kernel/debug/pmbus/hwmon99/status0_input +0 -0
  158. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/tests/sim/sys/kernel/debug/pmbus/hwmon99/status1_input +0 -0
  159. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/tests/sim/test_system.yaml +0 -0
  160. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/tests/sim/test_system_inconsistent.yaml +0 -0
  161. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/tests/srf-fan-test.py +0 -0
  162. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/tests/srf-fan-test.yaml +0 -0
  163. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/tests/test_config.py +0 -0
  164. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/tests/test_sim-ccu-eeprom.py +0 -0
  165. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/tests/test_sim1.py +0 -0
  166. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/tests/test_sim2.py +0 -0
  167. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/tests/testdata/cfg_simple.yaml +0 -0
  168. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/tests/zip2_ccu_imu.py +0 -0
  169. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/tests/zip2_psu.py +0 -0
  170. {ekfsm-0.13.0a168.post1 → ekfsm-0.13.0a183.post1}/uv.lock +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ekfsm
3
- Version: 0.13.0a168.post1
3
+ Version: 0.13.0a183.post1
4
4
  Summary: The EKF System Management Library (ekfsm) is a sensor monitoring suite for Compact PCI Serial devices.
5
5
  Author-email: Klaus Popp <klaus.popp@ci4rail.com>, Jan Jansen <jan@ekf.de>, Felix Päßler <fp@ekf.de>
6
6
  Requires-Python: >=3.10
@@ -5,11 +5,23 @@ EKF CCU
5
5
  ===========
6
6
 
7
7
 
8
- Chassis Inventory (Object: `system_inventory`)
8
+ Chassis Inventory (Object: `chassis_inventory`)
9
9
  ===============================================
10
10
 
11
11
  The system inventory provides access to the chassis inventory, such as the vendor, model, serial number, and revision.
12
12
 
13
+ You can access the chassis inventory from the ccu object via the `chassis_inventory` attribute.
14
+
15
+ Alternatively, if your system configuration has the following snippet:
16
+
17
+ .. code-block:: yaml
18
+
19
+ system_config:
20
+ name: "MySystem"
21
+ aggregates:
22
+ chassis_inventory: inventory
23
+
24
+ you can access the chassis inventory via the system object's `inventory` attribute.
13
25
 
14
26
  +--------------------------------------------------------------------+-------------------------------+--------------------+
15
27
  | Method | Description | Example Value |
@@ -33,8 +33,8 @@ The CPU temperature object provides the current CPU Die temperature in degrees C
33
33
 
34
34
 
35
35
 
36
- +--------------------------------------------+------------------+---------------+
37
- | Method | Description | Example Value |
38
- +--------------------------------------------+------------------+---------------+
39
- | :meth:`~ekfsm.devices.hwmon.HWMON.cputemp` | Get the CPU temp | ``65`` |
40
- +--------------------------------------------+------------------+---------------+
36
+ +--------------------------------------------------+------------------+---------------+
37
+ | Method | Description | Example Value |
38
+ +--------------------------------------------------+------------------+---------------+
39
+ | :meth:`~ekfsm.devices.coretemp.CoreTemp.cputemp` | Get the CPU temp | ``65`` |
40
+ +--------------------------------------------------+------------------+---------------+
@@ -4,7 +4,7 @@
4
4
  contain the root `toctree` directive.
5
5
 
6
6
  Welcome to EKF System Management Library documentation!
7
- ======================================================
7
+ ========================================================
8
8
 
9
9
 
10
10
  .. toctree::
@@ -180,12 +180,22 @@ ensures that the relevant linux sysfs entries and devices are protected from con
180
180
  However, there are some exceptions due to the nature of some devices. For example, the
181
181
  :ref:`ccu` has some methods that cannot be simultaneously accessed by multiple processes.
182
182
 
183
+ This is why the ekfsm package provides a locking mechanism for these devices. The locking mechanism is
184
+ implemented using a file lock. Application can choose to use the locking mechanism or not.
185
+ By default, the locking mechanism is enabled and uses the default lockfile directory ``/var/lock/ekfsm``.
186
+ The :meth:`~ekfsm.locking_configure` method can be used to enable or disable the locking mechanism and
187
+ to configure the lockfile directory.
188
+
189
+ To ensure that file locks are properly released, the application should
190
+ call the :meth:`~ekfsm.locking_cleanup` whenever the program exits. This can be done
191
+ using the `atexit` module.
192
+
183
193
 
184
194
  Usage from within a container
185
195
  -----------------------------
186
196
 
187
- The ekfsm package can be used from within a container, but the container must have access to the `/sys` and `/dev`
188
- directories of the host system.
197
+ The ekfsm package can be used from within a container, but the container must have access to the `/sys`, `/dev` #
198
+ and - if locking is enabled - `/var/lock` directories of the host system.
189
199
 
190
200
  This can be achieved by mounting the host's `/sys` and `/dev` directories into the container, e.g.
191
201
 
@@ -53,9 +53,9 @@ EKF CCU Microcontroller
53
53
  Devices using SysFs
54
54
  -------------------
55
55
 
56
- HWMON
57
- ~~~~~
58
- .. automodule:: ekfsm.devices.hwmon
56
+ CoreTemp
57
+ ~~~~~~~~
58
+ .. automodule:: ekfsm.devices.coretemp
59
59
 
60
60
  SMBIOS
61
61
  ~~~~~~
@@ -62,3 +62,27 @@ currently not used, but you can access it via the `System` object's `name` attri
62
62
  - For CompactPCI slots, `slot_coding` defines the geographical address of the slot, i.e.
63
63
  the setting of the GA[3:0] pins on the backplane.
64
64
  - The `is_master` attribute is used to designate the master slot.
65
+
66
+
67
+ Making board objects accessible from the system object
68
+ ------------------------------------------------------
69
+
70
+ Some hardware modules provide functions that belong to the whole system, such as the
71
+ :ref:`ccu`, which provides a `chassis_inventory` function that returns the serial number etc.
72
+ of the complete system. You can make this function accessible from the system object like so:
73
+
74
+ .. code-block:: yaml
75
+
76
+ system_config:
77
+ name: "Simple System"
78
+ aggregates:
79
+ chassis_inventory: inventory
80
+
81
+ Then, you can access the function like this:
82
+
83
+ .. code-block:: python
84
+
85
+ import ekfsm
86
+
87
+ system = ekfsm.System("system.yaml")
88
+ serial = system.inventory.serial()
@@ -3,6 +3,7 @@ from .system import System
3
3
  from .core import HwModule
4
4
  from .core.slots import SlotType
5
5
  from .exceptions import ConfigError
6
+ from .lock import locking_cleanup, locking_configure
6
7
 
7
8
  __all__ = (
8
9
  "System",
@@ -10,4 +11,6 @@ __all__ = (
10
11
  "HwModule",
11
12
  "Slot",
12
13
  "SlotType",
14
+ "locking_cleanup",
15
+ "locking_configure",
13
16
  )
@@ -1,4 +1,4 @@
1
- id: HDRC300S-110J-D120E(N)
1
+ id: HDRC300S.*
2
2
  name: "Hitron HDRC-300S"
3
3
  slot_type: CPCI_S0_PSU
4
4
  children:
@@ -4,6 +4,7 @@ from enum import Enum
4
4
  from typing import Tuple
5
5
  from ekfsm.core.components import SysTree
6
6
  from ..exceptions import AcquisitionError
7
+ from ..lock import Locker
7
8
  from .imu import ImuSample
8
9
  import struct
9
10
 
@@ -292,21 +293,18 @@ class EKFCcuUc(Device):
292
293
  progress_callback
293
294
  A callback function that is called with the current progress in bytes.
294
295
 
295
- Warning
296
- ---------
297
- Do not call this method at the same time from multiple threads or processes.
298
-
299
296
  """
300
- offset = 0
301
- max_chunk_len = 28
302
- while len(firmware) > 0:
303
- chunk, firmware = firmware[:max_chunk_len], firmware[max_chunk_len:]
304
- self._load_firmware_chunk(offset, len(firmware) == 0, chunk)
305
- offset += len(chunk)
306
- if len(firmware) != 0:
307
- self._nop()
308
- if progress_callback is not None:
309
- progress_callback(offset)
297
+ with Locker(self.name + "-load_firmware").lock():
298
+ offset = 0
299
+ max_chunk_len = 28
300
+ while len(firmware) > 0:
301
+ chunk, firmware = firmware[:max_chunk_len], firmware[max_chunk_len:]
302
+ self._load_firmware_chunk(offset, len(firmware) == 0, chunk)
303
+ offset += len(chunk)
304
+ if len(firmware) != 0:
305
+ self._nop()
306
+ if progress_callback is not None:
307
+ progress_callback(offset)
310
308
 
311
309
  def _load_firmware_chunk(self, offset: int, is_last: bool, data: bytes) -> None:
312
310
  if is_last:
@@ -369,22 +367,20 @@ class EKFCcuUc(Device):
369
367
  str
370
368
  The parameterset in JSON format.
371
369
 
372
- Warning
373
- ---------
374
- Do not call this method at the same time from multiple threads or processes.
375
370
  """
376
- json = b""
377
- begin = True
378
- while True:
379
- chunk = self._get_parameterset_chunk(begin)
380
- if len(chunk) < 32:
381
- break
382
- # if chunk ends with zero byte, remove it (workaround for I2C slave bug)
383
- if chunk[-1] == 0:
384
- chunk = chunk[:-1]
385
- json += chunk
386
- begin = False
387
- return json.decode("utf-8")
371
+ with Locker(self.name + "-parameterset").lock():
372
+ json = b""
373
+ begin = True
374
+ while True:
375
+ chunk = self._get_parameterset_chunk(begin)
376
+ if len(chunk) < 32:
377
+ break
378
+ # if chunk ends with zero byte, remove it (workaround for I2C slave bug)
379
+ if chunk[-1] == 0:
380
+ chunk = chunk[:-1]
381
+ json += chunk
382
+ begin = False
383
+ return json.decode("utf-8")
388
384
 
389
385
  def _get_parameterset_chunk(self, begin: bool) -> bytes:
390
386
  data = self._smbus.read_block_data(
@@ -423,19 +419,16 @@ class EKFCcuUc(Device):
423
419
  _cfg
424
420
  The parameterset in JSON format.
425
421
 
426
- Warning
427
- ---------
428
- Do not call this method at the same time from multiple threads or processes.
429
-
430
422
  """
431
- cfg = _cfg.encode("utf-8")
432
- offset = 0
433
- max_chunk_len = 28
434
- while len(cfg) > 0:
435
- chunk, cfg = cfg[:max_chunk_len], cfg[max_chunk_len:]
436
- self._load_parameterset_chunk(offset, len(cfg) == 0, chunk)
437
- offset += len(chunk)
438
- self._nop()
423
+ with Locker(self.name + "-parameterset").lock():
424
+ cfg = _cfg.encode("utf-8")
425
+ offset = 0
426
+ max_chunk_len = 28
427
+ while len(cfg) > 0:
428
+ chunk, cfg = cfg[:max_chunk_len], cfg[max_chunk_len:]
429
+ self._load_parameterset_chunk(offset, len(cfg) == 0, chunk)
430
+ offset += len(chunk)
431
+ self._nop()
439
432
 
440
433
  def _load_parameterset_chunk(self, offset: int, is_last: bool, data: bytes) -> None:
441
434
  if is_last:
@@ -12,6 +12,7 @@ from time import sleep
12
12
  from functools import wraps
13
13
  from ekfsm.log import ekfsm_logger
14
14
  from threading import Lock
15
+ import re
15
16
 
16
17
  __all__ = ["PsuStatus", "PmBus", "retry"]
17
18
 
@@ -118,7 +119,8 @@ class PmBus(Device, ProbeableDevice):
118
119
  from ekfsm.core import HwModule
119
120
 
120
121
  assert isinstance(self.hw_module, HwModule)
121
- return self.hw_module.id == self.model()
122
+ # compare the regexp from the board yaml file with the model
123
+ return re.match(self.hw_module.id, self.model()) is not None
122
124
 
123
125
  # Voltage and Current Interfaces
124
126
  def _conversion(self, in_file: str) -> float:
@@ -0,0 +1,94 @@
1
+ import fcntl
2
+ import os
3
+ from pathlib import Path
4
+ from contextlib import contextmanager
5
+
6
+ #
7
+ # Some devices or device functions don't allow concurrent access.
8
+ # The locking mechanism is used to ensure that only one process/thread can
9
+ # access the device (function) at a time.
10
+ #
11
+ # Locking granularity is defined by the device.
12
+ # It may be at the device level or function level.
13
+ #
14
+ # Application can choose to use the locking mechanism or not.
15
+ # By default, the locking mechanism is enabled and uses the default
16
+ # lockfile root directory /var/lock/ekfsm.
17
+ #
18
+ # Use locking_configure() to enable or disable the locking mechanism or to change
19
+ # the lockfile root directory.
20
+
21
+ USE_LOCK = True
22
+ LOCKFILE_ROOT = "/var/lock/ekfsm"
23
+ ALL_LOCKERS: list["Locker"] = [] # List of all locker instances
24
+
25
+
26
+ def locking_configure(enable: bool, lockfile_root: str = LOCKFILE_ROOT):
27
+ """
28
+ Configures the locking mechanism.
29
+
30
+ :param enable: Whether to enable or disable locking.
31
+ :param lockfile_root: The root directory for lockfiles. (default: /var/lock/ekfsm)
32
+ """
33
+ global USE_LOCK, LOCKFILE_ROOT
34
+ USE_LOCK = enable
35
+ LOCKFILE_ROOT = lockfile_root
36
+
37
+
38
+ def locking_cleanup():
39
+ """
40
+ Cleans up all lockfiles and closes all lock file descriptors.
41
+ Should be called at the end of the program to ensure all locks are released.
42
+ """
43
+ for locker in ALL_LOCKERS:
44
+ locker.cleanup()
45
+
46
+
47
+ class Locker:
48
+ """
49
+ A class that implements a locking mechanism using file locks.
50
+
51
+ Parameters
52
+ ----------
53
+ module
54
+ The name of the module or resource to lock. This will be used to create a unique lock file.
55
+
56
+ Example
57
+ -------
58
+ with Locker("mysharedresourcename").lock():
59
+ # Access the shared resource here
60
+ pass
61
+ """
62
+
63
+ def __init__(self, module: str):
64
+ if not USE_LOCK:
65
+ return
66
+
67
+ self.lockfile_path = Path(LOCKFILE_ROOT) / module
68
+ self.lock_fd = None
69
+ # Ensure lockfile exists
70
+ os.makedirs(LOCKFILE_ROOT, exist_ok=True)
71
+ open(self.lockfile_path, "a").close()
72
+ ALL_LOCKERS.append(self)
73
+
74
+ def cleanup(self):
75
+ if not USE_LOCK:
76
+ return
77
+ if self.lock_fd is not None:
78
+ try:
79
+ fcntl.flock(self.lock_fd, fcntl.LOCK_UN)
80
+ os.close(self.lock_fd)
81
+ self.lock_fd = None
82
+ except (OSError, AttributeError):
83
+ pass
84
+
85
+ @contextmanager
86
+ def lock(self):
87
+ if not USE_LOCK:
88
+ yield
89
+ self.lock_fd = os.open(self.lockfile_path, os.O_RDWR)
90
+ try:
91
+ fcntl.flock(self.lock_fd, fcntl.LOCK_EX)
92
+ yield
93
+ finally:
94
+ self.cleanup()
@@ -21,7 +21,7 @@ authors = [
21
21
  ]
22
22
  description = "The EKF System Management Library (ekfsm) is a sensor monitoring suite for Compact PCI Serial devices."
23
23
  requires-python = ">=3.10"
24
- version = "0.13.0-alpha.168.post.1"
24
+ version = "0.13.0-alpha.183.post.1"
25
25
 
26
26
  [project.scripts]
27
27
  ekfsm-cli = "ekfsm.cli:main"
@@ -0,0 +1,35 @@
1
+ #!python
2
+ import time
3
+ import random
4
+ import sys
5
+
6
+ from ekfsm.lock import Locker
7
+
8
+
9
+ def use_shared_resource(myid: str):
10
+ with open("shared_resource.txt", "w") as f:
11
+ f.write(f"{myid}\n")
12
+ time.sleep(random.random() * 1) # Simulate some work with the shared resource
13
+ # read the file
14
+ with open("shared_resource.txt", "r") as f:
15
+ data = f.read(len(myid))
16
+ if data != myid:
17
+ raise ValueError(f"file doesn't contain my id, but {data}")
18
+ print("data ok")
19
+
20
+
21
+ def main():
22
+ myid = sys.argv[1]
23
+ print(f"myid is {myid}")
24
+
25
+ lock = Locker("shared_resource.txt")
26
+
27
+ for _ in range(5):
28
+ with lock.lock():
29
+ use_shared_resource(myid)
30
+ time.sleep(0.5)
31
+
32
+ sys.exit(0)
33
+
34
+
35
+ main()
@@ -0,0 +1,30 @@
1
+ import pytest
2
+ import sys
3
+ import subprocess
4
+ import time
5
+
6
+ # start 2 times test_lock.py and wait for them to finish
7
+
8
+
9
+ def test_locking():
10
+ """
11
+ Test the locking mechanism by running two instances of the same script in parallel.
12
+ """
13
+
14
+ # Start the first instance
15
+ proc1 = subprocess.Popen([sys.executable, "tests/locking/lock_tester.py", "1"])
16
+ time.sleep(1) # Give it some time to start
17
+
18
+ # Start the second instance
19
+ proc2 = subprocess.Popen([sys.executable, "tests/locking/lock_tester.py", "2"])
20
+
21
+ # Wait for both processes to finish
22
+ proc1.wait()
23
+ proc2.wait()
24
+
25
+ assert proc1.returncode == 0
26
+ assert proc2.returncode == 0
27
+
28
+
29
+ if __name__ == "__main__":
30
+ pytest.main([__file__])
@@ -1,5 +1,5 @@
1
1
  system_config:
2
- name: "DB ZIP2 Test System"
2
+ name: "Test System"
3
3
  slots:
4
4
  - name: SYSTEM_SLOT
5
5
  slot_type: CPCI_S0_SYS
@@ -1,5 +1,7 @@
1
1
  system_config:
2
- name: "DB ZIP2 Test System"
2
+ name: "ZIP2 Compute1"
3
+ aggregates:
4
+ chassis_inventory: inventory
3
5
  slots:
4
6
  - name: NETZ1
5
7
  slot_type: CPCI_S0_PSU
@@ -7,39 +9,51 @@ system_config:
7
9
  desired_hwmodule_name: psu
8
10
  attributes:
9
11
  slot_coding: 0x0
10
- - name: SYSTEM_SLOT
12
+ - name: CPU1
11
13
  slot_type: CPCI_S0_SYS
12
14
  desired_hwmodule_type: EKF SC9-TOCCATA
13
- desired_hwmodule_name: CPU1
15
+ desired_hwmodule_name: cpu
14
16
  attributes:
15
17
  is_master: true
16
- - name: SLOT3
18
+ - name: LAN1
17
19
  slot_type: CPCI_S0_PER
18
- desired_hwmodule_type: EKF SQ1-TRACK
19
- desired_hwmodule_name: SQ1
20
+ desired_hwmodule_type: EKF SN4-DJEMBE
21
+ desired_hwmodule_name: lan
22
+ attributes:
23
+ slot_coding: 0x5
24
+ - name: SSD1
25
+ slot_type: CPCI_S0_PER
26
+ desired_hwmodule_type: EKF SE5-CLUB
27
+ desired_hwmodule_name: ssd1
20
28
  attributes:
21
29
  slot_coding: 0x4
22
- - name: SLOT4
30
+ - name: KOM1
23
31
  slot_type: CPCI_S0_PER
24
32
  desired_hwmodule_type: EKF SPV-MYSTIC
25
- desired_hwmodule_name: SPV
33
+ desired_hwmodule_name: kom
26
34
  attributes:
27
35
  slot_coding: 0x3
28
- - name: SLOT7
36
+ - name: IO1
37
+ slot_type: CPCI_S0_PER
38
+ desired_hwmodule_type: EKF SQ1-TRACK
39
+ desired_hwmodule_name: io
40
+ attributes:
41
+ slot_coding: 0x2
42
+ - name: SSD2
29
43
  slot_type: CPCI_S0_PER
30
- desired_hwmodule_type: EKF SQ3-QUARTET
31
- desired_hwmodule_name: INFO
44
+ desired_hwmodule_type: EKF SE5-CLUB
45
+ desired_hwmodule_name: ssd2
32
46
  attributes:
33
47
  slot_coding: 0x1
34
- - name: SLOT8
48
+ - name: SER1
35
49
  slot_type: CPCI_S0_PER
36
50
  desired_hwmodule_type: EKF SUR-UART
37
- desired_hwmodule_name: SUR
51
+ desired_hwmodule_name: ser
38
52
  attributes:
39
53
  slot_coding: 0x0
40
- - name: AUX_SLOT
54
+ - name: CCU
41
55
  slot_type: CPCI_S0_UTILITY
42
56
  desired_hwmodule_type: EKF CCU
43
- desired_hwmodule_name: CCU
57
+ desired_hwmodule_name: ccu
44
58
  attributes:
45
59
  slot_coding: 0x7
@@ -0,0 +1,76 @@
1
+ from pathlib import Path
2
+ from ekfsm.system import System, HwModule
3
+ import logging
4
+
5
+ logging.basicConfig(
6
+ level=logging.INFO, format="%(asctime)s - %(name)s - %(levelname)s - %(message)s"
7
+ )
8
+
9
+
10
+ def print_inventory(name, inventory):
11
+ print(f"{name}: {inventory.vendor()} {inventory.model()} {inventory.serial()}")
12
+
13
+
14
+ def probe_and_print_inventory(board: HwModule):
15
+ board.probe()
16
+ print_inventory(board.name, board.inventory)
17
+
18
+
19
+ config = Path(__file__).parent / "zip2-comp1.yaml"
20
+ system = System(config, abort=False)
21
+ print(system)
22
+
23
+ _psu = system.psu
24
+ probe_and_print_inventory(_psu)
25
+
26
+ _cpu = system.cpu
27
+ probe_and_print_inventory(_cpu)
28
+
29
+ _lan = system.lan
30
+ probe_and_print_inventory(_lan)
31
+
32
+ _ssd1 = system.ssd1
33
+ probe_and_print_inventory(_ssd1)
34
+
35
+ _kom = system.kom
36
+ probe_and_print_inventory(_kom)
37
+
38
+ _io = system.io
39
+ board = _io
40
+ board.probe()
41
+ print(f"inventory: {board.inventory.vendor()} {board.inventory.model()} ")
42
+
43
+ probe_and_print_inventory(_io)
44
+
45
+ _ssd2 = system.ssd2
46
+ probe_and_print_inventory(_ssd2)
47
+
48
+ _ser = system.ser
49
+ probe_and_print_inventory(_ser)
50
+
51
+ _ccu = system.ccu
52
+ probe_and_print_inventory(_ccu)
53
+
54
+
55
+ # SUR LED Test
56
+ _ser.led_a.set(0, "red")
57
+ _ser.led_a.set(1, "yellow")
58
+ _ser.led_c.set(0, "white")
59
+ _ser.led_d.set(1, "blue")
60
+
61
+ print(f"SUR TEMP: {_ser.th.temperature()}")
62
+ print(f"SUR HUMIDITY: {_ser.th.humidity()}")
63
+
64
+
65
+ # CCU Test
66
+ # chassis inventory via ccu object
67
+ print_inventory("chassis", _ccu.chassis_inventory)
68
+ # alternative way to get chassis inventory
69
+ print_inventory("chassis", system.inventory)
70
+
71
+ print(f"CCU firmware: {_ccu.management.identify_firmware()}")
72
+
73
+ # SPV Test
74
+ print(f"spv gpio0 control lines {_kom.gpio0.num_lines()}")
75
+ print(f"spv gpio1 control lines {_kom.gpio1.num_lines()}")
76
+ print(f"spv gpio2 control lines {_kom.gpio2.num_lines()}")
@@ -0,0 +1,59 @@
1
+ system_config:
2
+ name: "ZIP2 Compute2"
3
+ aggregates:
4
+ chassis_inventory: inventory
5
+ slots:
6
+ - name: NETZ2
7
+ slot_type: CPCI_S0_PSU
8
+ desired_hwmodule_type: Hitron HDRC-300S
9
+ desired_hwmodule_name: psu
10
+ attributes:
11
+ slot_coding: 0x1
12
+ - name: CPU2
13
+ slot_type: CPCI_S0_SYS
14
+ desired_hwmodule_type: EKF SC9-TOCCATA
15
+ desired_hwmodule_name: cpu
16
+ attributes:
17
+ is_master: true
18
+ - name: LAN2
19
+ slot_type: CPCI_S0_PER
20
+ desired_hwmodule_type: EKF SN4-DJEMBE
21
+ desired_hwmodule_name: lan
22
+ attributes:
23
+ slot_coding: 0x6
24
+ - name: SSD3
25
+ slot_type: CPCI_S0_PER
26
+ desired_hwmodule_type: EKF SE5-CLUB
27
+ desired_hwmodule_name: ssd1
28
+ attributes:
29
+ slot_coding: 0x5
30
+ - name: SER2
31
+ slot_type: CPCI_S0_PER
32
+ desired_hwmodule_type: EKF SUR-UART
33
+ desired_hwmodule_name: ser
34
+ attributes:
35
+ slot_coding: 0x4
36
+ - name: SSD4
37
+ slot_type: CPCI_S0_PER
38
+ desired_hwmodule_type: EKF SE5-CLUB
39
+ desired_hwmodule_name: ssd2
40
+ attributes:
41
+ slot_coding: 0x3
42
+ - name: SSD5
43
+ slot_type: CPCI_S0_PER
44
+ desired_hwmodule_type: EKF SE5-CLUB
45
+ desired_hwmodule_name: ssd3
46
+ attributes:
47
+ slot_coding: 0x2
48
+ - name: INFO
49
+ slot_type: CPCI_S0_PER
50
+ desired_hwmodule_type: EKF SQ3-QUARTET
51
+ desired_hwmodule_name: info
52
+ attributes:
53
+ slot_coding: 0x1
54
+ - name: CCU
55
+ slot_type: CPCI_S0_UTILITY
56
+ desired_hwmodule_type: EKF CCU
57
+ desired_hwmodule_name: ccu
58
+ attributes:
59
+ slot_coding: 0x7