isis-streaming-data-types 0.0.4__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 (118) hide show
  1. isis_streaming_data_types-0.0.4/PKG-INFO +25 -0
  2. isis_streaming_data_types-0.0.4/pyproject.toml +99 -0
  3. isis_streaming_data_types-0.0.4/setup.cfg +4 -0
  4. isis_streaming_data_types-0.0.4/src/isis_streaming_data_types.egg-info/PKG-INFO +25 -0
  5. isis_streaming_data_types-0.0.4/src/isis_streaming_data_types.egg-info/SOURCES.txt +116 -0
  6. isis_streaming_data_types-0.0.4/src/isis_streaming_data_types.egg-info/dependency_links.txt +1 -0
  7. isis_streaming_data_types-0.0.4/src/isis_streaming_data_types.egg-info/requires.txt +8 -0
  8. isis_streaming_data_types-0.0.4/src/isis_streaming_data_types.egg-info/top_level.txt +1 -0
  9. isis_streaming_data_types-0.0.4/src/streaming_data_types/__init__.py +59 -0
  10. isis_streaming_data_types-0.0.4/src/streaming_data_types/_version.py +34 -0
  11. isis_streaming_data_types-0.0.4/src/streaming_data_types/action_response_answ.py +81 -0
  12. isis_streaming_data_types-0.0.4/src/streaming_data_types/alarm_al00.py +65 -0
  13. isis_streaming_data_types-0.0.4/src/streaming_data_types/area_detector_ad00.py +200 -0
  14. isis_streaming_data_types-0.0.4/src/streaming_data_types/dataarray_da00.py +229 -0
  15. isis_streaming_data_types-0.0.4/src/streaming_data_types/epics_connection_ep01.py +105 -0
  16. isis_streaming_data_types-0.0.4/src/streaming_data_types/eventdata_ev44.py +89 -0
  17. isis_streaming_data_types-0.0.4/src/streaming_data_types/exceptions.py +10 -0
  18. isis_streaming_data_types-0.0.4/src/streaming_data_types/fbschemas/__init__.py +0 -0
  19. isis_streaming_data_types-0.0.4/src/streaming_data_types/fbschemas/action_response_answ/ActionOutcome.py +8 -0
  20. isis_streaming_data_types-0.0.4/src/streaming_data_types/fbschemas/action_response_answ/ActionResponse.py +135 -0
  21. isis_streaming_data_types-0.0.4/src/streaming_data_types/fbschemas/action_response_answ/ActionType.py +8 -0
  22. isis_streaming_data_types-0.0.4/src/streaming_data_types/fbschemas/action_response_answ/__init__.py +0 -0
  23. isis_streaming_data_types-0.0.4/src/streaming_data_types/fbschemas/alarm_al00/Alarm.py +76 -0
  24. isis_streaming_data_types-0.0.4/src/streaming_data_types/fbschemas/alarm_al00/Severity.py +10 -0
  25. isis_streaming_data_types-0.0.4/src/streaming_data_types/fbschemas/alarm_al00/__init__.py +0 -0
  26. isis_streaming_data_types-0.0.4/src/streaming_data_types/fbschemas/area_detector_ad00/Attribute.py +164 -0
  27. isis_streaming_data_types-0.0.4/src/streaming_data_types/fbschemas/area_detector_ad00/DType.py +17 -0
  28. isis_streaming_data_types-0.0.4/src/streaming_data_types/fbschemas/area_detector_ad00/__init__.py +0 -0
  29. isis_streaming_data_types-0.0.4/src/streaming_data_types/fbschemas/area_detector_ad00/ad00_ADArray.py +252 -0
  30. isis_streaming_data_types-0.0.4/src/streaming_data_types/fbschemas/dataarray_da00/__init__.py +0 -0
  31. isis_streaming_data_types-0.0.4/src/streaming_data_types/fbschemas/dataarray_da00/da00_DataArray.py +128 -0
  32. isis_streaming_data_types-0.0.4/src/streaming_data_types/fbschemas/dataarray_da00/da00_Variable.py +269 -0
  33. isis_streaming_data_types-0.0.4/src/streaming_data_types/fbschemas/dataarray_da00/da00_dtype.py +18 -0
  34. isis_streaming_data_types-0.0.4/src/streaming_data_types/fbschemas/epics_connection_ep01/ConnectionInfo.py +14 -0
  35. isis_streaming_data_types-0.0.4/src/streaming_data_types/fbschemas/epics_connection_ep01/EpicsPVConnectionInfo.py +114 -0
  36. isis_streaming_data_types-0.0.4/src/streaming_data_types/fbschemas/epics_connection_ep01/__init__.py +0 -0
  37. isis_streaming_data_types-0.0.4/src/streaming_data_types/fbschemas/eventdata_ev44/Event44Message.py +274 -0
  38. isis_streaming_data_types-0.0.4/src/streaming_data_types/fbschemas/eventdata_ev44/__init__.py +0 -0
  39. isis_streaming_data_types-0.0.4/src/streaming_data_types/fbschemas/finished_writing_wrdn/FinishedWriting.py +115 -0
  40. isis_streaming_data_types-0.0.4/src/streaming_data_types/fbschemas/finished_writing_wrdn/__init__.py +0 -0
  41. isis_streaming_data_types-0.0.4/src/streaming_data_types/fbschemas/forwarder_config_update_fc00/Protocol.py +8 -0
  42. isis_streaming_data_types-0.0.4/src/streaming_data_types/fbschemas/forwarder_config_update_fc00/Stream.py +86 -0
  43. isis_streaming_data_types-0.0.4/src/streaming_data_types/fbschemas/forwarder_config_update_fc00/UpdateType.py +9 -0
  44. isis_streaming_data_types-0.0.4/src/streaming_data_types/fbschemas/forwarder_config_update_fc00/__init__.py +0 -0
  45. isis_streaming_data_types-0.0.4/src/streaming_data_types/fbschemas/forwarder_config_update_fc00/fc00_ConfigUpdate.py +77 -0
  46. isis_streaming_data_types-0.0.4/src/streaming_data_types/fbschemas/histogram_hs01/Array.py +11 -0
  47. isis_streaming_data_types-0.0.4/src/streaming_data_types/fbschemas/histogram_hs01/ArrayDouble.py +77 -0
  48. isis_streaming_data_types-0.0.4/src/streaming_data_types/fbschemas/histogram_hs01/ArrayFloat.py +77 -0
  49. isis_streaming_data_types-0.0.4/src/streaming_data_types/fbschemas/histogram_hs01/ArrayInt.py +77 -0
  50. isis_streaming_data_types-0.0.4/src/streaming_data_types/fbschemas/histogram_hs01/ArrayLong.py +77 -0
  51. isis_streaming_data_types-0.0.4/src/streaming_data_types/fbschemas/histogram_hs01/DimensionMetaData.py +102 -0
  52. isis_streaming_data_types-0.0.4/src/streaming_data_types/fbschemas/histogram_hs01/EventHistogram.py +257 -0
  53. isis_streaming_data_types-0.0.4/src/streaming_data_types/fbschemas/histogram_hs01/__init__.py +0 -0
  54. isis_streaming_data_types-0.0.4/src/streaming_data_types/fbschemas/json_json/JsonData.py +67 -0
  55. isis_streaming_data_types-0.0.4/src/streaming_data_types/fbschemas/json_json/__init__.py +0 -0
  56. isis_streaming_data_types-0.0.4/src/streaming_data_types/fbschemas/logdata_f144/ArrayByte.py +46 -0
  57. isis_streaming_data_types-0.0.4/src/streaming_data_types/fbschemas/logdata_f144/ArrayDouble.py +46 -0
  58. isis_streaming_data_types-0.0.4/src/streaming_data_types/fbschemas/logdata_f144/ArrayFloat.py +46 -0
  59. isis_streaming_data_types-0.0.4/src/streaming_data_types/fbschemas/logdata_f144/ArrayInt.py +46 -0
  60. isis_streaming_data_types-0.0.4/src/streaming_data_types/fbschemas/logdata_f144/ArrayLong.py +46 -0
  61. isis_streaming_data_types-0.0.4/src/streaming_data_types/fbschemas/logdata_f144/ArrayShort.py +46 -0
  62. isis_streaming_data_types-0.0.4/src/streaming_data_types/fbschemas/logdata_f144/ArrayUByte.py +46 -0
  63. isis_streaming_data_types-0.0.4/src/streaming_data_types/fbschemas/logdata_f144/ArrayUInt.py +46 -0
  64. isis_streaming_data_types-0.0.4/src/streaming_data_types/fbschemas/logdata_f144/ArrayULong.py +46 -0
  65. isis_streaming_data_types-0.0.4/src/streaming_data_types/fbschemas/logdata_f144/ArrayUShort.py +46 -0
  66. isis_streaming_data_types-0.0.4/src/streaming_data_types/fbschemas/logdata_f144/Byte.py +30 -0
  67. isis_streaming_data_types-0.0.4/src/streaming_data_types/fbschemas/logdata_f144/Double.py +30 -0
  68. isis_streaming_data_types-0.0.4/src/streaming_data_types/fbschemas/logdata_f144/Float.py +30 -0
  69. isis_streaming_data_types-0.0.4/src/streaming_data_types/fbschemas/logdata_f144/Int.py +30 -0
  70. isis_streaming_data_types-0.0.4/src/streaming_data_types/fbschemas/logdata_f144/Long.py +30 -0
  71. isis_streaming_data_types-0.0.4/src/streaming_data_types/fbschemas/logdata_f144/Short.py +30 -0
  72. isis_streaming_data_types-0.0.4/src/streaming_data_types/fbschemas/logdata_f144/UByte.py +30 -0
  73. isis_streaming_data_types-0.0.4/src/streaming_data_types/fbschemas/logdata_f144/UInt.py +30 -0
  74. isis_streaming_data_types-0.0.4/src/streaming_data_types/fbschemas/logdata_f144/ULong.py +30 -0
  75. isis_streaming_data_types-0.0.4/src/streaming_data_types/fbschemas/logdata_f144/UShort.py +30 -0
  76. isis_streaming_data_types-0.0.4/src/streaming_data_types/fbschemas/logdata_f144/Value.py +27 -0
  77. isis_streaming_data_types-0.0.4/src/streaming_data_types/fbschemas/logdata_f144/__init__.py +0 -0
  78. isis_streaming_data_types-0.0.4/src/streaming_data_types/fbschemas/logdata_f144/f144_LogData.py +57 -0
  79. isis_streaming_data_types-0.0.4/src/streaming_data_types/fbschemas/run_start_pl72/RunStart.py +211 -0
  80. isis_streaming_data_types-0.0.4/src/streaming_data_types/fbschemas/run_start_pl72/SpectraDetectorMapping.py +109 -0
  81. isis_streaming_data_types-0.0.4/src/streaming_data_types/fbschemas/run_start_pl72/__init__.py +0 -0
  82. isis_streaming_data_types-0.0.4/src/streaming_data_types/fbschemas/run_stop_6s4t/RunStop.py +102 -0
  83. isis_streaming_data_types-0.0.4/src/streaming_data_types/fbschemas/run_stop_6s4t/__init__.py +0 -0
  84. isis_streaming_data_types-0.0.4/src/streaming_data_types/fbschemas/status_x5f2/Status.py +128 -0
  85. isis_streaming_data_types-0.0.4/src/streaming_data_types/fbschemas/status_x5f2/__init__.py +0 -0
  86. isis_streaming_data_types-0.0.4/src/streaming_data_types/fbschemas/units_un00/Units.py +80 -0
  87. isis_streaming_data_types-0.0.4/src/streaming_data_types/fbschemas/units_un00/__init__.py +0 -0
  88. isis_streaming_data_types-0.0.4/src/streaming_data_types/finished_writing_wrdn.py +84 -0
  89. isis_streaming_data_types-0.0.4/src/streaming_data_types/forwarder_config_update_fc00.py +125 -0
  90. isis_streaming_data_types-0.0.4/src/streaming_data_types/histogram_hs01.py +231 -0
  91. isis_streaming_data_types-0.0.4/src/streaming_data_types/json_json.py +24 -0
  92. isis_streaming_data_types-0.0.4/src/streaming_data_types/logdata_f144.py +300 -0
  93. isis_streaming_data_types-0.0.4/src/streaming_data_types/run_start_pl72.py +162 -0
  94. isis_streaming_data_types-0.0.4/src/streaming_data_types/run_stop_6s4t.py +76 -0
  95. isis_streaming_data_types-0.0.4/src/streaming_data_types/status_x5f2.py +91 -0
  96. isis_streaming_data_types-0.0.4/src/streaming_data_types/units_un00.py +41 -0
  97. isis_streaming_data_types-0.0.4/src/streaming_data_types/utils.py +26 -0
  98. isis_streaming_data_types-0.0.4/tests/__init__.py +0 -0
  99. isis_streaming_data_types-0.0.4/tests/example_buffers/al00.bin +0 -0
  100. isis_streaming_data_types-0.0.4/tests/example_buffers/ev42.bin +0 -0
  101. isis_streaming_data_types-0.0.4/tests/example_buffers/f144.bin +0 -0
  102. isis_streaming_data_types-0.0.4/tests/example_buffers/hs01.bin +0 -0
  103. isis_streaming_data_types-0.0.4/tests/test_6s4t.py +39 -0
  104. isis_streaming_data_types-0.0.4/tests/test_ad00.py +105 -0
  105. isis_streaming_data_types-0.0.4/tests/test_al00.py +46 -0
  106. isis_streaming_data_types-0.0.4/tests/test_answ.py +82 -0
  107. isis_streaming_data_types-0.0.4/tests/test_da00.py +182 -0
  108. isis_streaming_data_types-0.0.4/tests/test_ep01.py +41 -0
  109. isis_streaming_data_types-0.0.4/tests/test_ev44.py +114 -0
  110. isis_streaming_data_types-0.0.4/tests/test_f144.py +169 -0
  111. isis_streaming_data_types-0.0.4/tests/test_fc00.py +62 -0
  112. isis_streaming_data_types-0.0.4/tests/test_hs01.py +384 -0
  113. isis_streaming_data_types-0.0.4/tests/test_json.py +34 -0
  114. isis_streaming_data_types-0.0.4/tests/test_pl72.py +76 -0
  115. isis_streaming_data_types-0.0.4/tests/test_un00.py +43 -0
  116. isis_streaming_data_types-0.0.4/tests/test_utils.py +10 -0
  117. isis_streaming_data_types-0.0.4/tests/test_wrdn.py +54 -0
  118. isis_streaming_data_types-0.0.4/tests/test_x52f.py +46 -0
@@ -0,0 +1,25 @@
1
+ Metadata-Version: 2.4
2
+ Name: isis_streaming_data_types
3
+ Version: 0.0.4
4
+ Summary: Python utilities for handling ISIS streamed data
5
+ Author-email: ISIS Experiment Controls <ISISExperimentControls@stfc.ac.uk>
6
+ Maintainer-email: ISIS Experiment Controls <ISISExperimentControls@stfc.ac.uk>
7
+ Project-URL: Homepage, https://github.com/isiscomputinggroup/isis_streaming_data_types
8
+ Project-URL: Bug Reports, https://github.com/isiscomputinggroup/isis_streaming_data_types/issues
9
+ Project-URL: Source, https://github.com/isiscomputinggroup/isis_streaming_data_types
10
+ Classifier: Development Status :: 3 - Alpha
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Programming Language :: Python :: 3.12
14
+ Classifier: Programming Language :: Python :: 3.13
15
+ Classifier: Programming Language :: Python :: 3.14
16
+ Classifier: Programming Language :: Python :: 3 :: Only
17
+ Requires-Python: >=3.12
18
+ Description-Content-Type: text/markdown
19
+ Requires-Dist: flatbuffers
20
+ Requires-Dist: numpy>2
21
+ Provides-Extra: dev
22
+ Requires-Dist: ruff>=0.8; extra == "dev"
23
+ Requires-Dist: pyright; extra == "dev"
24
+ Requires-Dist: pytest; extra == "dev"
25
+ Requires-Dist: pytest-cov; extra == "dev"
@@ -0,0 +1,99 @@
1
+ [build-system]
2
+ requires = ["setuptools", "setuptools_scm>=8"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "isis_streaming_data_types"
7
+ dynamic = ["version"]
8
+ description = "Python utilities for handling ISIS streamed data"
9
+ readme = "README.md"
10
+ requires-python = ">=3.12"
11
+ license-files = ["LICENSE"]
12
+
13
+ authors = [
14
+ {name = "ISIS Experiment Controls", email = "ISISExperimentControls@stfc.ac.uk" }
15
+ ]
16
+ maintainers = [
17
+ {name = "ISIS Experiment Controls", email = "ISISExperimentControls@stfc.ac.uk" }
18
+ ]
19
+
20
+ # Classifiers help users find your project by categorizing it.
21
+ #
22
+ # For a list of valid classifiers, see https://pypi.org/classifiers/
23
+ classifiers = [
24
+ # How mature is this project? Common values are
25
+ # 3 - Alpha
26
+ # 4 - Beta
27
+ # 5 - Production/Stable
28
+ "Development Status :: 3 - Alpha",
29
+ "Intended Audience :: Developers",
30
+
31
+ # Specify the Python versions you support here. In particular, ensure
32
+ # that you indicate you support Python 3. These classifiers are *not*
33
+ # checked by "pip install". See instead "requires-python" key in this file.
34
+ "Programming Language :: Python :: 3",
35
+ "Programming Language :: Python :: 3.12",
36
+ "Programming Language :: Python :: 3.13",
37
+ "Programming Language :: Python :: 3.14",
38
+ "Programming Language :: Python :: 3 :: Only",
39
+ ]
40
+
41
+ dependencies = [
42
+ "flatbuffers",
43
+ "numpy>2"
44
+ ]
45
+
46
+ [project.optional-dependencies]
47
+ dev = [
48
+ "ruff>=0.8",
49
+ "pyright",
50
+ "pytest",
51
+ "pytest-cov",
52
+ ]
53
+
54
+ [project.urls]
55
+ "Homepage" = "https://github.com/isiscomputinggroup/isis_streaming_data_types"
56
+ "Bug Reports" = "https://github.com/isiscomputinggroup/isis_streaming_data_types/issues"
57
+ "Source" = "https://github.com/isiscomputinggroup/isis_streaming_data_types"
58
+
59
+ [tool.pytest.ini_options]
60
+ testpaths = "tests"
61
+ asyncio_mode = "auto"
62
+ addopts = "--cov --cov-report=html -vv"
63
+
64
+ [tool.coverage.run]
65
+ branch = true
66
+ source = ["src"]
67
+
68
+ [tool.coverage.report]
69
+ exclude_lines = [
70
+ "pragma: no cover",
71
+ "if TYPE_CHECKING:",
72
+ "if typing.TYPE_CHECKING:",
73
+ "@abstractmethod",
74
+ ]
75
+
76
+ [tool.coverage.html]
77
+ directory = "coverage_html_report"
78
+
79
+ [tool.pyright]
80
+ include = ["src", "tests"]
81
+ reportConstantRedefinition = true
82
+ reportDeprecated = true
83
+ reportInconsistentConstructor = true
84
+ reportMissingParameterType = true
85
+ reportMissingTypeArgument = true
86
+ reportUnnecessaryCast = true
87
+ reportUnnecessaryComparison = true
88
+ reportUnnecessaryContains = true
89
+ reportUnnecessaryIsInstance = true
90
+ reportUntypedBaseClass = true
91
+ reportUntypedClassDecorator = true
92
+ reportUntypedFunctionDecorator = true
93
+
94
+ [tool.setuptools_scm]
95
+ version_file = "src/streaming_data_types/_version.py"
96
+ relative_to = "pyproject.toml"
97
+ root = ".."
98
+
99
+
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,25 @@
1
+ Metadata-Version: 2.4
2
+ Name: isis_streaming_data_types
3
+ Version: 0.0.4
4
+ Summary: Python utilities for handling ISIS streamed data
5
+ Author-email: ISIS Experiment Controls <ISISExperimentControls@stfc.ac.uk>
6
+ Maintainer-email: ISIS Experiment Controls <ISISExperimentControls@stfc.ac.uk>
7
+ Project-URL: Homepage, https://github.com/isiscomputinggroup/isis_streaming_data_types
8
+ Project-URL: Bug Reports, https://github.com/isiscomputinggroup/isis_streaming_data_types/issues
9
+ Project-URL: Source, https://github.com/isiscomputinggroup/isis_streaming_data_types
10
+ Classifier: Development Status :: 3 - Alpha
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Programming Language :: Python :: 3.12
14
+ Classifier: Programming Language :: Python :: 3.13
15
+ Classifier: Programming Language :: Python :: 3.14
16
+ Classifier: Programming Language :: Python :: 3 :: Only
17
+ Requires-Python: >=3.12
18
+ Description-Content-Type: text/markdown
19
+ Requires-Dist: flatbuffers
20
+ Requires-Dist: numpy>2
21
+ Provides-Extra: dev
22
+ Requires-Dist: ruff>=0.8; extra == "dev"
23
+ Requires-Dist: pyright; extra == "dev"
24
+ Requires-Dist: pytest; extra == "dev"
25
+ Requires-Dist: pytest-cov; extra == "dev"
@@ -0,0 +1,116 @@
1
+ pyproject.toml
2
+ src/isis_streaming_data_types.egg-info/PKG-INFO
3
+ src/isis_streaming_data_types.egg-info/SOURCES.txt
4
+ src/isis_streaming_data_types.egg-info/dependency_links.txt
5
+ src/isis_streaming_data_types.egg-info/requires.txt
6
+ src/isis_streaming_data_types.egg-info/top_level.txt
7
+ src/streaming_data_types/__init__.py
8
+ src/streaming_data_types/_version.py
9
+ src/streaming_data_types/action_response_answ.py
10
+ src/streaming_data_types/alarm_al00.py
11
+ src/streaming_data_types/area_detector_ad00.py
12
+ src/streaming_data_types/dataarray_da00.py
13
+ src/streaming_data_types/epics_connection_ep01.py
14
+ src/streaming_data_types/eventdata_ev44.py
15
+ src/streaming_data_types/exceptions.py
16
+ src/streaming_data_types/finished_writing_wrdn.py
17
+ src/streaming_data_types/forwarder_config_update_fc00.py
18
+ src/streaming_data_types/histogram_hs01.py
19
+ src/streaming_data_types/json_json.py
20
+ src/streaming_data_types/logdata_f144.py
21
+ src/streaming_data_types/run_start_pl72.py
22
+ src/streaming_data_types/run_stop_6s4t.py
23
+ src/streaming_data_types/status_x5f2.py
24
+ src/streaming_data_types/units_un00.py
25
+ src/streaming_data_types/utils.py
26
+ src/streaming_data_types/fbschemas/__init__.py
27
+ src/streaming_data_types/fbschemas/action_response_answ/ActionOutcome.py
28
+ src/streaming_data_types/fbschemas/action_response_answ/ActionResponse.py
29
+ src/streaming_data_types/fbschemas/action_response_answ/ActionType.py
30
+ src/streaming_data_types/fbschemas/action_response_answ/__init__.py
31
+ src/streaming_data_types/fbschemas/alarm_al00/Alarm.py
32
+ src/streaming_data_types/fbschemas/alarm_al00/Severity.py
33
+ src/streaming_data_types/fbschemas/alarm_al00/__init__.py
34
+ src/streaming_data_types/fbschemas/area_detector_ad00/Attribute.py
35
+ src/streaming_data_types/fbschemas/area_detector_ad00/DType.py
36
+ src/streaming_data_types/fbschemas/area_detector_ad00/__init__.py
37
+ src/streaming_data_types/fbschemas/area_detector_ad00/ad00_ADArray.py
38
+ src/streaming_data_types/fbschemas/dataarray_da00/__init__.py
39
+ src/streaming_data_types/fbschemas/dataarray_da00/da00_DataArray.py
40
+ src/streaming_data_types/fbschemas/dataarray_da00/da00_Variable.py
41
+ src/streaming_data_types/fbschemas/dataarray_da00/da00_dtype.py
42
+ src/streaming_data_types/fbschemas/epics_connection_ep01/ConnectionInfo.py
43
+ src/streaming_data_types/fbschemas/epics_connection_ep01/EpicsPVConnectionInfo.py
44
+ src/streaming_data_types/fbschemas/epics_connection_ep01/__init__.py
45
+ src/streaming_data_types/fbschemas/eventdata_ev44/Event44Message.py
46
+ src/streaming_data_types/fbschemas/eventdata_ev44/__init__.py
47
+ src/streaming_data_types/fbschemas/finished_writing_wrdn/FinishedWriting.py
48
+ src/streaming_data_types/fbschemas/finished_writing_wrdn/__init__.py
49
+ src/streaming_data_types/fbschemas/forwarder_config_update_fc00/Protocol.py
50
+ src/streaming_data_types/fbschemas/forwarder_config_update_fc00/Stream.py
51
+ src/streaming_data_types/fbschemas/forwarder_config_update_fc00/UpdateType.py
52
+ src/streaming_data_types/fbschemas/forwarder_config_update_fc00/__init__.py
53
+ src/streaming_data_types/fbschemas/forwarder_config_update_fc00/fc00_ConfigUpdate.py
54
+ src/streaming_data_types/fbschemas/histogram_hs01/Array.py
55
+ src/streaming_data_types/fbschemas/histogram_hs01/ArrayDouble.py
56
+ src/streaming_data_types/fbschemas/histogram_hs01/ArrayFloat.py
57
+ src/streaming_data_types/fbschemas/histogram_hs01/ArrayInt.py
58
+ src/streaming_data_types/fbschemas/histogram_hs01/ArrayLong.py
59
+ src/streaming_data_types/fbschemas/histogram_hs01/DimensionMetaData.py
60
+ src/streaming_data_types/fbschemas/histogram_hs01/EventHistogram.py
61
+ src/streaming_data_types/fbschemas/histogram_hs01/__init__.py
62
+ src/streaming_data_types/fbschemas/json_json/JsonData.py
63
+ src/streaming_data_types/fbschemas/json_json/__init__.py
64
+ src/streaming_data_types/fbschemas/logdata_f144/ArrayByte.py
65
+ src/streaming_data_types/fbschemas/logdata_f144/ArrayDouble.py
66
+ src/streaming_data_types/fbschemas/logdata_f144/ArrayFloat.py
67
+ src/streaming_data_types/fbschemas/logdata_f144/ArrayInt.py
68
+ src/streaming_data_types/fbschemas/logdata_f144/ArrayLong.py
69
+ src/streaming_data_types/fbschemas/logdata_f144/ArrayShort.py
70
+ src/streaming_data_types/fbschemas/logdata_f144/ArrayUByte.py
71
+ src/streaming_data_types/fbschemas/logdata_f144/ArrayUInt.py
72
+ src/streaming_data_types/fbschemas/logdata_f144/ArrayULong.py
73
+ src/streaming_data_types/fbschemas/logdata_f144/ArrayUShort.py
74
+ src/streaming_data_types/fbschemas/logdata_f144/Byte.py
75
+ src/streaming_data_types/fbschemas/logdata_f144/Double.py
76
+ src/streaming_data_types/fbschemas/logdata_f144/Float.py
77
+ src/streaming_data_types/fbschemas/logdata_f144/Int.py
78
+ src/streaming_data_types/fbschemas/logdata_f144/Long.py
79
+ src/streaming_data_types/fbschemas/logdata_f144/Short.py
80
+ src/streaming_data_types/fbschemas/logdata_f144/UByte.py
81
+ src/streaming_data_types/fbschemas/logdata_f144/UInt.py
82
+ src/streaming_data_types/fbschemas/logdata_f144/ULong.py
83
+ src/streaming_data_types/fbschemas/logdata_f144/UShort.py
84
+ src/streaming_data_types/fbschemas/logdata_f144/Value.py
85
+ src/streaming_data_types/fbschemas/logdata_f144/__init__.py
86
+ src/streaming_data_types/fbschemas/logdata_f144/f144_LogData.py
87
+ src/streaming_data_types/fbschemas/run_start_pl72/RunStart.py
88
+ src/streaming_data_types/fbschemas/run_start_pl72/SpectraDetectorMapping.py
89
+ src/streaming_data_types/fbschemas/run_start_pl72/__init__.py
90
+ src/streaming_data_types/fbschemas/run_stop_6s4t/RunStop.py
91
+ src/streaming_data_types/fbschemas/run_stop_6s4t/__init__.py
92
+ src/streaming_data_types/fbschemas/status_x5f2/Status.py
93
+ src/streaming_data_types/fbschemas/status_x5f2/__init__.py
94
+ src/streaming_data_types/fbschemas/units_un00/Units.py
95
+ src/streaming_data_types/fbschemas/units_un00/__init__.py
96
+ tests/__init__.py
97
+ tests/test_6s4t.py
98
+ tests/test_ad00.py
99
+ tests/test_al00.py
100
+ tests/test_answ.py
101
+ tests/test_da00.py
102
+ tests/test_ep01.py
103
+ tests/test_ev44.py
104
+ tests/test_f144.py
105
+ tests/test_fc00.py
106
+ tests/test_hs01.py
107
+ tests/test_json.py
108
+ tests/test_pl72.py
109
+ tests/test_un00.py
110
+ tests/test_utils.py
111
+ tests/test_wrdn.py
112
+ tests/test_x52f.py
113
+ tests/example_buffers/al00.bin
114
+ tests/example_buffers/ev42.bin
115
+ tests/example_buffers/f144.bin
116
+ tests/example_buffers/hs01.bin
@@ -0,0 +1,8 @@
1
+ flatbuffers
2
+ numpy>2
3
+
4
+ [dev]
5
+ ruff>=0.8
6
+ pyright
7
+ pytest
8
+ pytest-cov
@@ -0,0 +1,59 @@
1
+ from streaming_data_types._version import version
2
+ from streaming_data_types.action_response_answ import deserialise_answ, serialise_answ
3
+ from streaming_data_types.alarm_al00 import deserialise_al00, serialise_al00
4
+ from streaming_data_types.area_detector_ad00 import deserialise_ad00, serialise_ad00
5
+ from streaming_data_types.dataarray_da00 import deserialise_da00, serialise_da00
6
+ from streaming_data_types.epics_connection_ep01 import deserialise_ep01, serialise_ep01
7
+ from streaming_data_types.eventdata_ev44 import deserialise_ev44, serialise_ev44
8
+ from streaming_data_types.finished_writing_wrdn import deserialise_wrdn, serialise_wrdn
9
+ from streaming_data_types.forwarder_config_update_fc00 import (
10
+ deserialise_fc00,
11
+ serialise_fc00,
12
+ )
13
+ from streaming_data_types.histogram_hs01 import deserialise_hs01, serialise_hs01
14
+ from streaming_data_types.json_json import deserialise_json, serialise_json
15
+ from streaming_data_types.logdata_f144 import deserialise_f144, serialise_f144
16
+ from streaming_data_types.run_start_pl72 import deserialise_pl72, serialise_pl72
17
+ from streaming_data_types.run_stop_6s4t import deserialise_6s4t, serialise_6s4t
18
+ from streaming_data_types.status_x5f2 import deserialise_x5f2, serialise_x5f2
19
+ from streaming_data_types.units_un00 import serialise_un00, deserialise_un00
20
+
21
+ __version__ = version
22
+
23
+
24
+ SERIALISERS = {
25
+ "ev44": serialise_ev44,
26
+ "hs01": serialise_hs01,
27
+ "f144": serialise_f144,
28
+ "pl72": serialise_pl72,
29
+ "6s4t": serialise_6s4t,
30
+ "x5f2": serialise_x5f2,
31
+ "ep01": serialise_ep01,
32
+ "fc00": serialise_fc00,
33
+ "answ": serialise_answ,
34
+ "wrdn": serialise_wrdn,
35
+ "al00": serialise_al00,
36
+ "json": serialise_json,
37
+ "ad00": serialise_ad00,
38
+ "da00": serialise_da00,
39
+ "un00": serialise_un00,
40
+ }
41
+
42
+
43
+ DESERIALISERS = {
44
+ "ev44": deserialise_ev44,
45
+ "hs01": deserialise_hs01,
46
+ "f144": deserialise_f144,
47
+ "pl72": deserialise_pl72,
48
+ "6s4t": deserialise_6s4t,
49
+ "x5f2": deserialise_x5f2,
50
+ "ep01": deserialise_ep01,
51
+ "fc00": deserialise_fc00,
52
+ "answ": deserialise_answ,
53
+ "wrdn": deserialise_wrdn,
54
+ "al00": deserialise_al00,
55
+ "json": deserialise_json,
56
+ "ad00": deserialise_ad00,
57
+ "da00": deserialise_da00,
58
+ "un00": deserialise_un00,
59
+ }
@@ -0,0 +1,34 @@
1
+ # file generated by setuptools-scm
2
+ # don't change, don't track in version control
3
+
4
+ __all__ = [
5
+ "__version__",
6
+ "__version_tuple__",
7
+ "version",
8
+ "version_tuple",
9
+ "__commit_id__",
10
+ "commit_id",
11
+ ]
12
+
13
+ TYPE_CHECKING = False
14
+ if TYPE_CHECKING:
15
+ from typing import Tuple
16
+ from typing import Union
17
+
18
+ VERSION_TUPLE = Tuple[Union[int, str], ...]
19
+ COMMIT_ID = Union[str, None]
20
+ else:
21
+ VERSION_TUPLE = object
22
+ COMMIT_ID = object
23
+
24
+ version: str
25
+ __version__: str
26
+ __version_tuple__: VERSION_TUPLE
27
+ version_tuple: VERSION_TUPLE
28
+ commit_id: COMMIT_ID
29
+ __commit_id__: COMMIT_ID
30
+
31
+ __version__ = version = '0.0.4'
32
+ __version_tuple__ = version_tuple = (0, 0, 4)
33
+
34
+ __commit_id__ = commit_id = 'gf53483d8d'
@@ -0,0 +1,81 @@
1
+ from datetime import datetime, timezone
2
+ from typing import NamedTuple, Union
3
+
4
+ import flatbuffers
5
+
6
+ import streaming_data_types.fbschemas.action_response_answ.ActionResponse as ActionResponse
7
+ from streaming_data_types.fbschemas.action_response_answ.ActionOutcome import (
8
+ ActionOutcome,
9
+ )
10
+ from streaming_data_types.fbschemas.action_response_answ.ActionType import ActionType
11
+ from streaming_data_types.utils import check_schema_identifier
12
+
13
+ FILE_IDENTIFIER = b"answ"
14
+
15
+
16
+ def serialise_answ(
17
+ service_id: str,
18
+ job_id: str,
19
+ command_id: str,
20
+ action: ActionType,
21
+ outcome: ActionOutcome,
22
+ message: str,
23
+ status_code: int,
24
+ stop_time: datetime,
25
+ ) -> bytes:
26
+ builder = flatbuffers.Builder(500)
27
+ builder.ForceDefaults(True)
28
+ service_id_offset = builder.CreateString(service_id)
29
+ job_id_offset = builder.CreateString(job_id)
30
+ message_offset = builder.CreateString(message)
31
+ command_id_offset = builder.CreateString(command_id)
32
+
33
+ ActionResponse.ActionResponseStart(builder)
34
+ ActionResponse.ActionResponseAddServiceId(builder, service_id_offset)
35
+ ActionResponse.ActionResponseAddJobId(builder, job_id_offset)
36
+ ActionResponse.ActionResponseAddAction(builder, action)
37
+ ActionResponse.ActionResponseAddOutcome(builder, outcome)
38
+ ActionResponse.ActionResponseAddMessage(builder, message_offset)
39
+ ActionResponse.ActionResponseAddCommandId(builder, command_id_offset)
40
+ ActionResponse.ActionResponseAddStatusCode(builder, status_code)
41
+ ActionResponse.ActionResponseAddStopTime(builder, int(stop_time.timestamp() * 1000))
42
+
43
+ out_message = ActionResponse.ActionResponseEnd(builder)
44
+ builder.Finish(out_message, file_identifier=FILE_IDENTIFIER)
45
+ return bytes(builder.Output())
46
+
47
+
48
+ Response = NamedTuple(
49
+ "Response",
50
+ (
51
+ ("service_id", str),
52
+ ("job_id", str),
53
+ ("command_id", str),
54
+ ("action", ActionType),
55
+ ("outcome", ActionOutcome),
56
+ ("message", str),
57
+ ("status_code", int),
58
+ ("stop_time", datetime),
59
+ ),
60
+ )
61
+
62
+
63
+ def deserialise_answ(buffer: Union[bytearray, bytes]):
64
+ check_schema_identifier(buffer, FILE_IDENTIFIER)
65
+ answ_message = ActionResponse.ActionResponse.GetRootAsActionResponse(buffer, 0)
66
+ max_time = datetime(
67
+ year=3001, month=1, day=1, hour=0, minute=0, second=0
68
+ ).timestamp()
69
+ used_timestamp = answ_message.StopTime() / 1000
70
+ if used_timestamp > max_time:
71
+ used_timestamp = max_time
72
+ return Response(
73
+ service_id=answ_message.ServiceId().decode("utf-8"),
74
+ job_id=answ_message.JobId().decode("utf-8"),
75
+ command_id=answ_message.CommandId().decode("utf-8"),
76
+ action=answ_message.Action(),
77
+ outcome=answ_message.Outcome(),
78
+ message=answ_message.Message().decode("utf-8"),
79
+ status_code=answ_message.StatusCode(),
80
+ stop_time=datetime.fromtimestamp(used_timestamp, tz=timezone.utc),
81
+ )
@@ -0,0 +1,65 @@
1
+ from collections import namedtuple
2
+ from enum import Enum
3
+
4
+ import flatbuffers
5
+
6
+ import streaming_data_types.fbschemas.alarm_al00.Alarm as Alarm
7
+ import streaming_data_types.fbschemas.alarm_al00.Severity as FBSeverity
8
+ from streaming_data_types.utils import check_schema_identifier
9
+
10
+ FILE_IDENTIFIER = b"al00"
11
+
12
+ AlarmInfo = namedtuple("AlarmInfo", ("source", "timestamp_ns", "severity", "message"))
13
+
14
+
15
+ class Severity(Enum):
16
+ OK = 0
17
+ MINOR = 1
18
+ MAJOR = 2
19
+ INVALID = 3
20
+
21
+
22
+ _enum_to_severity = {
23
+ Severity.OK: FBSeverity.Severity.OK,
24
+ Severity.MINOR: FBSeverity.Severity.MINOR,
25
+ Severity.MAJOR: FBSeverity.Severity.MAJOR,
26
+ Severity.INVALID: FBSeverity.Severity.INVALID,
27
+ }
28
+
29
+ _severity_to_enum = {
30
+ FBSeverity.Severity.OK: Severity.OK,
31
+ FBSeverity.Severity.MINOR: Severity.MINOR,
32
+ FBSeverity.Severity.MAJOR: Severity.MAJOR,
33
+ FBSeverity.Severity.INVALID: Severity.INVALID,
34
+ }
35
+
36
+
37
+ def deserialise_al00(buffer) -> AlarmInfo:
38
+ check_schema_identifier(buffer, FILE_IDENTIFIER)
39
+ alarm = Alarm.Alarm.GetRootAsAlarm(buffer, 0)
40
+
41
+ return AlarmInfo(
42
+ alarm.SourceName().decode("utf-8") if alarm.SourceName() else "",
43
+ alarm.Timestamp(),
44
+ _severity_to_enum[alarm.Severity()],
45
+ alarm.Message().decode("utf-8") if alarm.Message() else "",
46
+ )
47
+
48
+
49
+ def serialise_al00(
50
+ source: str, timestamp_ns: int, severity: Severity, message: str
51
+ ) -> bytes:
52
+ builder = flatbuffers.Builder(128)
53
+
54
+ message_offset = builder.CreateString(message)
55
+ source_offset = builder.CreateString(source)
56
+
57
+ Alarm.AlarmStart(builder)
58
+ Alarm.AlarmAddSourceName(builder, source_offset)
59
+ Alarm.AlarmAddTimestamp(builder, timestamp_ns)
60
+ Alarm.AlarmAddSeverity(builder, _enum_to_severity[severity])
61
+ Alarm.AlarmAddMessage(builder, message_offset)
62
+ alarm = Alarm.AlarmEnd(builder)
63
+
64
+ builder.Finish(alarm, file_identifier=FILE_IDENTIFIER)
65
+ return bytes(builder.Output())