py-neuromodulation 0.0.2__py3-none-any.whl → 0.0.3__py3-none-any.whl

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 (204) hide show
  1. docs/build/_downloads/09df217f95985497f45d69e2d4bdc5b1/plot_2_example_add_feature.py +68 -0
  2. docs/build/_downloads/3b4900a2b2818ff30362215b76f7d5eb/plot_1_example_BIDS.py +233 -0
  3. docs/build/_downloads/7e92dd2e6cc86b239d14cafad972ae4f/plot_3_example_sharpwave_analysis.py +219 -0
  4. docs/build/_downloads/c2db0bf2b334d541b00662b991682256/plot_6_real_time_demo.py +97 -0
  5. docs/build/_downloads/ce3914826f782cbd1ea8fd024eaf0ac3/plot_5_example_rmap_computing.py +64 -0
  6. docs/build/_downloads/da36848a41e6a3235d91fb7cfb6d59b4/plot_0_first_demo.py +192 -0
  7. docs/build/_downloads/eaa4305c75b19a1e2eea941f742a6331/plot_4_example_gridPointProjection.py +210 -0
  8. docs/build/html/_downloads/09df217f95985497f45d69e2d4bdc5b1/plot_2_example_add_feature.py +68 -0
  9. docs/build/html/_downloads/3b4900a2b2818ff30362215b76f7d5eb/plot_1_example_BIDS.py +239 -0
  10. docs/build/html/_downloads/7e92dd2e6cc86b239d14cafad972ae4f/plot_3_example_sharpwave_analysis.py +219 -0
  11. docs/build/html/_downloads/c2db0bf2b334d541b00662b991682256/plot_6_real_time_demo.py +97 -0
  12. docs/build/html/_downloads/ce3914826f782cbd1ea8fd024eaf0ac3/plot_5_example_rmap_computing.py +64 -0
  13. docs/build/html/_downloads/da36848a41e6a3235d91fb7cfb6d59b4/plot_0_first_demo.py +192 -0
  14. docs/build/html/_downloads/eaa4305c75b19a1e2eea941f742a6331/plot_4_example_gridPointProjection.py +210 -0
  15. docs/source/_build/html/_downloads/09df217f95985497f45d69e2d4bdc5b1/plot_2_example_add_feature.py +76 -0
  16. docs/source/_build/html/_downloads/0d0d0a76e8f648d5d3cbc47da6351932/plot_real_time_demo.py +97 -0
  17. docs/source/_build/html/_downloads/3b4900a2b2818ff30362215b76f7d5eb/plot_1_example_BIDS.py +240 -0
  18. docs/source/_build/html/_downloads/5d73cadc59a8805c47e3b84063afc157/plot_example_BIDS.py +233 -0
  19. docs/source/_build/html/_downloads/7660317fa5a6bfbd12fcca9961457fc4/plot_example_rmap_computing.py +63 -0
  20. docs/source/_build/html/_downloads/7e92dd2e6cc86b239d14cafad972ae4f/plot_3_example_sharpwave_analysis.py +219 -0
  21. docs/source/_build/html/_downloads/839e5b319379f7fd9e867deb00fd797f/plot_example_gridPointProjection.py +210 -0
  22. docs/source/_build/html/_downloads/ae8be19afe5e559f011fc9b138968ba0/plot_first_demo.py +192 -0
  23. docs/source/_build/html/_downloads/b8b06cacc17969d3725a0b6f1d7741c5/plot_example_sharpwave_analysis.py +219 -0
  24. docs/source/_build/html/_downloads/c2db0bf2b334d541b00662b991682256/plot_6_real_time_demo.py +121 -0
  25. docs/source/_build/html/_downloads/c31a86c0b68cb4167d968091ace8080d/plot_example_add_feature.py +68 -0
  26. docs/source/_build/html/_downloads/ce3914826f782cbd1ea8fd024eaf0ac3/plot_5_example_rmap_computing.py +64 -0
  27. docs/source/_build/html/_downloads/da36848a41e6a3235d91fb7cfb6d59b4/plot_0_first_demo.py +189 -0
  28. docs/source/_build/html/_downloads/eaa4305c75b19a1e2eea941f742a6331/plot_4_example_gridPointProjection.py +210 -0
  29. docs/source/auto_examples/plot_0_first_demo.py +189 -0
  30. docs/source/auto_examples/plot_1_example_BIDS.py +240 -0
  31. docs/source/auto_examples/plot_2_example_add_feature.py +76 -0
  32. docs/source/auto_examples/plot_3_example_sharpwave_analysis.py +219 -0
  33. docs/source/auto_examples/plot_4_example_gridPointProjection.py +210 -0
  34. docs/source/auto_examples/plot_5_example_rmap_computing.py +64 -0
  35. docs/source/auto_examples/plot_6_real_time_demo.py +121 -0
  36. docs/source/conf.py +105 -0
  37. examples/plot_0_first_demo.py +189 -0
  38. examples/plot_1_example_BIDS.py +240 -0
  39. examples/plot_2_example_add_feature.py +76 -0
  40. examples/plot_3_example_sharpwave_analysis.py +219 -0
  41. examples/plot_4_example_gridPointProjection.py +210 -0
  42. examples/plot_5_example_rmap_computing.py +64 -0
  43. examples/plot_6_real_time_demo.py +121 -0
  44. packages/realtime_decoding/build/lib/realtime_decoding/__init__.py +4 -0
  45. packages/realtime_decoding/build/lib/realtime_decoding/decoder.py +104 -0
  46. packages/realtime_decoding/build/lib/realtime_decoding/features.py +163 -0
  47. packages/realtime_decoding/build/lib/realtime_decoding/helpers.py +15 -0
  48. packages/realtime_decoding/build/lib/realtime_decoding/run_decoding.py +345 -0
  49. packages/realtime_decoding/build/lib/realtime_decoding/trainer.py +54 -0
  50. packages/tmsi/build/lib/TMSiFileFormats/__init__.py +37 -0
  51. packages/tmsi/build/lib/TMSiFileFormats/file_formats/__init__.py +36 -0
  52. packages/tmsi/build/lib/TMSiFileFormats/file_formats/lsl_stream_writer.py +200 -0
  53. packages/tmsi/build/lib/TMSiFileFormats/file_formats/poly5_file_writer.py +496 -0
  54. packages/tmsi/build/lib/TMSiFileFormats/file_formats/poly5_to_edf_converter.py +236 -0
  55. packages/tmsi/build/lib/TMSiFileFormats/file_formats/xdf_file_writer.py +977 -0
  56. packages/tmsi/build/lib/TMSiFileFormats/file_readers/__init__.py +35 -0
  57. packages/tmsi/build/lib/TMSiFileFormats/file_readers/edf_reader.py +116 -0
  58. packages/tmsi/build/lib/TMSiFileFormats/file_readers/poly5reader.py +294 -0
  59. packages/tmsi/build/lib/TMSiFileFormats/file_readers/xdf_reader.py +229 -0
  60. packages/tmsi/build/lib/TMSiFileFormats/file_writer.py +102 -0
  61. packages/tmsi/build/lib/TMSiPlotters/__init__.py +2 -0
  62. packages/tmsi/build/lib/TMSiPlotters/gui/__init__.py +39 -0
  63. packages/tmsi/build/lib/TMSiPlotters/gui/_plotter_gui.py +234 -0
  64. packages/tmsi/build/lib/TMSiPlotters/gui/plotting_gui.py +440 -0
  65. packages/tmsi/build/lib/TMSiPlotters/plotters/__init__.py +44 -0
  66. packages/tmsi/build/lib/TMSiPlotters/plotters/hd_emg_plotter.py +446 -0
  67. packages/tmsi/build/lib/TMSiPlotters/plotters/impedance_plotter.py +589 -0
  68. packages/tmsi/build/lib/TMSiPlotters/plotters/signal_plotter.py +1326 -0
  69. packages/tmsi/build/lib/TMSiSDK/__init__.py +54 -0
  70. packages/tmsi/build/lib/TMSiSDK/device.py +588 -0
  71. packages/tmsi/build/lib/TMSiSDK/devices/__init__.py +34 -0
  72. packages/tmsi/build/lib/TMSiSDK/devices/saga/TMSi_Device_API.py +1764 -0
  73. packages/tmsi/build/lib/TMSiSDK/devices/saga/__init__.py +34 -0
  74. packages/tmsi/build/lib/TMSiSDK/devices/saga/saga_device.py +1366 -0
  75. packages/tmsi/build/lib/TMSiSDK/devices/saga/saga_types.py +520 -0
  76. packages/tmsi/build/lib/TMSiSDK/devices/saga/xml_saga_config.py +165 -0
  77. packages/tmsi/build/lib/TMSiSDK/error.py +95 -0
  78. packages/tmsi/build/lib/TMSiSDK/sample_data.py +63 -0
  79. packages/tmsi/build/lib/TMSiSDK/sample_data_server.py +99 -0
  80. packages/tmsi/build/lib/TMSiSDK/settings.py +45 -0
  81. packages/tmsi/build/lib/TMSiSDK/tmsi_device.py +111 -0
  82. packages/tmsi/build/lib/__init__.py +4 -0
  83. packages/tmsi/build/lib/apex_sdk/__init__.py +34 -0
  84. packages/tmsi/build/lib/apex_sdk/device/__init__.py +41 -0
  85. packages/tmsi/build/lib/apex_sdk/device/devices/apex/apex_API.py +1009 -0
  86. packages/tmsi/build/lib/apex_sdk/device/devices/apex/apex_API_enums.py +239 -0
  87. packages/tmsi/build/lib/apex_sdk/device/devices/apex/apex_API_structures.py +668 -0
  88. packages/tmsi/build/lib/apex_sdk/device/devices/apex/apex_device.py +1611 -0
  89. packages/tmsi/build/lib/apex_sdk/device/devices/apex/apex_dongle.py +38 -0
  90. packages/tmsi/build/lib/apex_sdk/device/devices/apex/apex_event_reader.py +57 -0
  91. packages/tmsi/build/lib/apex_sdk/device/devices/apex/apex_structures/apex_channel.py +44 -0
  92. packages/tmsi/build/lib/apex_sdk/device/devices/apex/apex_structures/apex_config.py +150 -0
  93. packages/tmsi/build/lib/apex_sdk/device/devices/apex/apex_structures/apex_const.py +36 -0
  94. packages/tmsi/build/lib/apex_sdk/device/devices/apex/apex_structures/apex_impedance_channel.py +48 -0
  95. packages/tmsi/build/lib/apex_sdk/device/devices/apex/apex_structures/apex_info.py +108 -0
  96. packages/tmsi/build/lib/apex_sdk/device/devices/apex/apex_structures/dongle_info.py +39 -0
  97. packages/tmsi/build/lib/apex_sdk/device/devices/apex/measurements/download_measurement.py +77 -0
  98. packages/tmsi/build/lib/apex_sdk/device/devices/apex/measurements/eeg_measurement.py +150 -0
  99. packages/tmsi/build/lib/apex_sdk/device/devices/apex/measurements/impedance_measurement.py +129 -0
  100. packages/tmsi/build/lib/apex_sdk/device/threads/conversion_thread.py +59 -0
  101. packages/tmsi/build/lib/apex_sdk/device/threads/sampling_thread.py +57 -0
  102. packages/tmsi/build/lib/apex_sdk/device/tmsi_channel.py +83 -0
  103. packages/tmsi/build/lib/apex_sdk/device/tmsi_device.py +201 -0
  104. packages/tmsi/build/lib/apex_sdk/device/tmsi_device_enums.py +103 -0
  105. packages/tmsi/build/lib/apex_sdk/device/tmsi_dongle.py +43 -0
  106. packages/tmsi/build/lib/apex_sdk/device/tmsi_event_reader.py +50 -0
  107. packages/tmsi/build/lib/apex_sdk/device/tmsi_measurement.py +118 -0
  108. packages/tmsi/build/lib/apex_sdk/sample_data_server/__init__.py +33 -0
  109. packages/tmsi/build/lib/apex_sdk/sample_data_server/event_data.py +44 -0
  110. packages/tmsi/build/lib/apex_sdk/sample_data_server/sample_data.py +50 -0
  111. packages/tmsi/build/lib/apex_sdk/sample_data_server/sample_data_server.py +136 -0
  112. packages/tmsi/build/lib/apex_sdk/tmsi_errors/error.py +126 -0
  113. packages/tmsi/build/lib/apex_sdk/tmsi_sdk.py +113 -0
  114. packages/tmsi/build/lib/apex_sdk/tmsi_utilities/apex/apex_structure_generator.py +134 -0
  115. packages/tmsi/build/lib/apex_sdk/tmsi_utilities/decorators.py +60 -0
  116. packages/tmsi/build/lib/apex_sdk/tmsi_utilities/logger_filter.py +42 -0
  117. packages/tmsi/build/lib/apex_sdk/tmsi_utilities/singleton.py +42 -0
  118. packages/tmsi/build/lib/apex_sdk/tmsi_utilities/support_functions.py +72 -0
  119. packages/tmsi/build/lib/apex_sdk/tmsi_utilities/tmsi_logger.py +98 -0
  120. py_neuromodulation/{helper.py → _write_example_dataset_helper.py} +1 -1
  121. py_neuromodulation/nm_EpochStream.py +2 -3
  122. py_neuromodulation/nm_IO.py +43 -70
  123. py_neuromodulation/nm_RMAP.py +308 -11
  124. py_neuromodulation/nm_analysis.py +1 -1
  125. py_neuromodulation/nm_artifacts.py +25 -0
  126. py_neuromodulation/nm_bispectra.py +64 -29
  127. py_neuromodulation/nm_bursts.py +44 -30
  128. py_neuromodulation/nm_coherence.py +2 -1
  129. py_neuromodulation/nm_features.py +4 -2
  130. py_neuromodulation/nm_filter.py +63 -32
  131. py_neuromodulation/nm_filter_preprocessing.py +91 -0
  132. py_neuromodulation/nm_fooof.py +47 -29
  133. py_neuromodulation/nm_mne_connectivity.py +1 -1
  134. py_neuromodulation/nm_normalization.py +50 -74
  135. py_neuromodulation/nm_oscillatory.py +151 -31
  136. py_neuromodulation/nm_plots.py +13 -10
  137. py_neuromodulation/nm_rereference.py +10 -8
  138. py_neuromodulation/nm_run_analysis.py +28 -13
  139. py_neuromodulation/nm_sharpwaves.py +103 -136
  140. py_neuromodulation/nm_stats.py +44 -30
  141. py_neuromodulation/nm_stream_abc.py +18 -10
  142. py_neuromodulation/nm_stream_offline.py +181 -40
  143. py_neuromodulation/utils/_logging.py +24 -0
  144. {py_neuromodulation-0.0.2.dist-info → py_neuromodulation-0.0.3.dist-info}/METADATA +182 -142
  145. py_neuromodulation-0.0.3.dist-info/RECORD +188 -0
  146. {py_neuromodulation-0.0.2.dist-info → py_neuromodulation-0.0.3.dist-info}/WHEEL +2 -1
  147. py_neuromodulation-0.0.3.dist-info/top_level.txt +5 -0
  148. tests/__init__.py +0 -0
  149. tests/conftest.py +117 -0
  150. tests/test_all_examples.py +10 -0
  151. tests/test_all_features.py +63 -0
  152. tests/test_bispectra.py +70 -0
  153. tests/test_bursts.py +105 -0
  154. tests/test_feature_sampling_rates.py +143 -0
  155. tests/test_fooof.py +16 -0
  156. tests/test_initalization_offline_stream.py +41 -0
  157. tests/test_multiprocessing.py +58 -0
  158. tests/test_nan_values.py +29 -0
  159. tests/test_nm_filter.py +95 -0
  160. tests/test_nm_resample.py +63 -0
  161. tests/test_normalization_settings.py +146 -0
  162. tests/test_notch_filter.py +31 -0
  163. tests/test_osc_features.py +424 -0
  164. tests/test_preprocessing_filter.py +151 -0
  165. tests/test_rereference.py +171 -0
  166. tests/test_sampling.py +57 -0
  167. tests/test_settings_change_after_init.py +76 -0
  168. tests/test_sharpwave.py +165 -0
  169. tests/test_target_channel_add.py +100 -0
  170. tests/test_timing.py +80 -0
  171. py_neuromodulation/data/README +0 -6
  172. py_neuromodulation/data/dataset_description.json +0 -8
  173. py_neuromodulation/data/derivatives/sub-testsub_ses-EphysMedOff_task-gripforce_run-0/MOV_aligned_features_ch_ECOG_RIGHT_0_all.png +0 -0
  174. py_neuromodulation/data/derivatives/sub-testsub_ses-EphysMedOff_task-gripforce_run-0/all_feature_plt.pdf +0 -0
  175. py_neuromodulation/data/derivatives/sub-testsub_ses-EphysMedOff_task-gripforce_run-0/sub-testsub_ses-EphysMedOff_task-gripforce_run-0_FEATURES.csv +0 -182
  176. py_neuromodulation/data/derivatives/sub-testsub_ses-EphysMedOff_task-gripforce_run-0/sub-testsub_ses-EphysMedOff_task-gripforce_run-0_LM_ML_RES.p +0 -0
  177. py_neuromodulation/data/derivatives/sub-testsub_ses-EphysMedOff_task-gripforce_run-0/sub-testsub_ses-EphysMedOff_task-gripforce_run-0_SETTINGS.json +0 -273
  178. py_neuromodulation/data/derivatives/sub-testsub_ses-EphysMedOff_task-gripforce_run-0/sub-testsub_ses-EphysMedOff_task-gripforce_run-0_SIDECAR.json +0 -6
  179. py_neuromodulation/data/derivatives/sub-testsub_ses-EphysMedOff_task-gripforce_run-0/sub-testsub_ses-EphysMedOff_task-gripforce_run-0_decoding_performance.png +0 -0
  180. py_neuromodulation/data/derivatives/sub-testsub_ses-EphysMedOff_task-gripforce_run-0/sub-testsub_ses-EphysMedOff_task-gripforce_run-0_nm_channels.csv +0 -11
  181. py_neuromodulation/data/participants.json +0 -32
  182. py_neuromodulation/data/participants.tsv +0 -2
  183. py_neuromodulation/data/sub-testsub/ses-EphysMedOff/ieeg/sub-testsub_ses-EphysMedOff_space-mni_coordsystem.json +0 -5
  184. py_neuromodulation/data/sub-testsub/ses-EphysMedOff/ieeg/sub-testsub_ses-EphysMedOff_space-mni_electrodes.tsv +0 -11
  185. py_neuromodulation/data/sub-testsub/ses-EphysMedOff/ieeg/sub-testsub_ses-EphysMedOff_task-gripforce_run-0_channels.tsv +0 -11
  186. py_neuromodulation/data/sub-testsub/ses-EphysMedOff/ieeg/sub-testsub_ses-EphysMedOff_task-gripforce_run-0_ieeg.eeg +0 -0
  187. py_neuromodulation/data/sub-testsub/ses-EphysMedOff/ieeg/sub-testsub_ses-EphysMedOff_task-gripforce_run-0_ieeg.json +0 -18
  188. py_neuromodulation/data/sub-testsub/ses-EphysMedOff/ieeg/sub-testsub_ses-EphysMedOff_task-gripforce_run-0_ieeg.vhdr +0 -35
  189. py_neuromodulation/data/sub-testsub/ses-EphysMedOff/ieeg/sub-testsub_ses-EphysMedOff_task-gripforce_run-0_ieeg.vmrk +0 -13
  190. py_neuromodulation/data/sub-testsub/ses-EphysMedOff/sub-testsub_ses-EphysMedOff_scans.tsv +0 -2
  191. py_neuromodulation/grid_cortex.tsv +0 -40
  192. py_neuromodulation/grid_subcortex.tsv +0 -1429
  193. py_neuromodulation/nm_settings.json +0 -290
  194. py_neuromodulation/plots/STN_surf.mat +0 -0
  195. py_neuromodulation/plots/Vertices.mat +0 -0
  196. py_neuromodulation/plots/faces.mat +0 -0
  197. py_neuromodulation/plots/grid.mat +0 -0
  198. py_neuromodulation/py_neuromodulation.egg-info/PKG-INFO +0 -104
  199. py_neuromodulation/py_neuromodulation.egg-info/dependency_links.txt +0 -1
  200. py_neuromodulation/py_neuromodulation.egg-info/requires.txt +0 -26
  201. py_neuromodulation/py_neuromodulation.egg-info/top_level.txt +0 -1
  202. py_neuromodulation-0.0.2.dist-info/RECORD +0 -73
  203. /py_neuromodulation/{py_neuromodulation.egg-info/SOURCES.txt → utils/__init__.py} +0 -0
  204. {py_neuromodulation-0.0.2.dist-info → py_neuromodulation-0.0.3.dist-info}/LICENSE +0 -0
@@ -0,0 +1,1009 @@
1
+ """
2
+ (c) 2022 Twente Medical Systems International B.V., Oldenzaal The Netherlands
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
+
16
+ ####### # # ##### #
17
+ # ## ## #
18
+ # # # # # # #
19
+ # # # # ##### #
20
+ # # # # #
21
+ # # # # #
22
+ # # # ##### #
23
+
24
+ /**
25
+ * @file apex_API.py
26
+ * @brief
27
+ * API calls to communication library.
28
+ */
29
+
30
+
31
+ """
32
+
33
+ from ctypes import *
34
+ from sys import platform
35
+ import os
36
+ from array import *
37
+
38
+ from .apex_API_enums import *
39
+ from .apex_API_structures import *
40
+ from ....tmsi_utilities.tmsi_logger import TMSiLogger
41
+
42
+ DeviceHandle = c_void_p
43
+ TMSiDeviceHandle = DeviceHandle(0)
44
+ ApexDllAvailable = False
45
+ ApexDllLocked = True
46
+
47
+ if platform == "win32": # Windows
48
+ search_path = "C:/Program files/TMSi/APEX"
49
+ name = "TMSiApexDeviceLib.dll"
50
+ result = os.path.join(search_path, name)
51
+ so_name = os.path.abspath(result)
52
+ if os.path.exists(so_name):
53
+ TMSiLogger().debug("{} available.".format(so_name))
54
+ ApexDllAvailable = True
55
+ try:
56
+ ApexSDK = CDLL(so_name)
57
+ ApexDllLocked = False
58
+ sdk_handle = ApexSDK._handle
59
+ TMSiLogger().debug(
60
+ "Successfully loaded Apex device library, handle: "
61
+ + hex(sdk_handle)
62
+ )
63
+ except OSError as e:
64
+ if ApexDllAvailable:
65
+ TMSiLogger().warning("{} already in use.".format(so_name))
66
+ else:
67
+ TMSiLogger().warning("Unsupported platform.")
68
+
69
+ if ApexDllAvailable and not ApexDllLocked:
70
+ # DLL interface
71
+
72
+ # ---
73
+ # @details This command is used to retrieve a list of available TMSi devices
74
+ # connected to the PC. This query is performed on the "DRInterfaceType" specified
75
+ # by the user. All other interface types are ignored.
76
+ #
77
+ # @Pre \ref No device should have been opened. Device is in Close state.
78
+ #
79
+ # @Post No device change.
80
+ #
81
+ # @param[out] TMSiDeviceList List of found devices.
82
+ # @param[out] NrOfFoundDevices Number of found devices.
83
+ # @param[in] DRInterfaceType See <TMSiInterface>
84
+ #
85
+ # @return
86
+ # @li TMSI_OK Ok, if response received successful.
87
+ # @li Any TMSI_DR*, TMSI_DLL error received.
88
+ # ---
89
+ TMSiGetDeviceList = ApexSDK.TMSiGetDeviceList
90
+ TMSiGetDeviceList.restype = TMSiDeviceRetVal
91
+ TMSiGetDeviceList.argtype = [
92
+ POINTER(TMSiDevList),
93
+ c_uint,
94
+ c_uint,
95
+ POINTER(c_uint),
96
+ ]
97
+
98
+ # ---
99
+ # @details This command is used to open a interface. This will create a connection
100
+ # between API and DR and "lock" the interface.
101
+ #
102
+ # @Pre @li No interface should have been openend.
103
+ # @li TMSiGetDeviceList should have been called to obtain valid
104
+ # TMSiDeviceID
105
+ #
106
+ # @Post After TMSI_OK device is in "Device_Open".
107
+ #
108
+ # @param[out] TMSiDeviceHandle Handle to device use for further API calls.
109
+ # @param[in] DongleID Dongle to use in case of the bluetooth interface, retrieved by "TMSiGetDongleList".
110
+ # @param[in] DeviceID Device to open, retrieved by "TMSiGetDeviceList".
111
+ # @param[in] DRInterfaceType See <TMSiInterface>
112
+ #
113
+ # @return
114
+ # @li TMSI_OK Ok, if response received successful.
115
+ # @li Any TMSI_DR*, TMSI_DLL error received.
116
+ # ---
117
+ TMSiOpenInterface = ApexSDK.TMSiOpenInterface
118
+ TMSiOpenInterface.restype = TMSiDeviceRetVal
119
+ TMSiOpenInterface.argtype = [POINTER(c_void_p), c_ushort, c_ushort, c_uint]
120
+
121
+ # ---
122
+ # @details This command is used to close an interface.
123
+ #
124
+ # @Pre \ref TMSiOpenInterface should have been called and returned a valid
125
+ # TMSIDeviceHandle.
126
+ # @li The device STATEMACHINE shall be in "Device_Open".
127
+ #
128
+ # @Post After TMSI_OK the device STATEMACHINE is in "Device_Close" state.
129
+ #
130
+ # @param[in] TMSiDeviceHandle Handle of device to close.
131
+ #
132
+ # @return
133
+ # @li TMSI_OK Ok, if response received successful.
134
+ # @li Any TMSI_DR*, TMSI_DLL error received.
135
+ # ---
136
+ TMSiCloseInterface = ApexSDK.TMSiCloseInterface
137
+ TMSiCloseInterface.restype = TMSiDeviceRetVal
138
+ TMSiCloseInterface.argtype = [c_void_p]
139
+
140
+ # ---
141
+ # @details This command is used to retrieve a list of bluetooth-dongles
142
+ # connected to the PC.
143
+ #
144
+ # @Post No device change.
145
+ #
146
+ # @param[out] DongleList List of found bluetooth dongles.
147
+ # @param[in] DongleListLen Max num of items in <DongleList>
148
+ # @param[out] RetDongleListLen Number of found dongles.
149
+ #
150
+ # @return
151
+ # @li TMSiStatusOK Ok, if dongles have been found.
152
+ # @li Any TMSI_DR*, TMSI_DLL error received.
153
+ # ---
154
+ TMSiGetDongleList = ApexSDK.TMSiGetDongleList
155
+ TMSiGetDongleList.restype = TMSiDeviceRetVal
156
+ TMSiGetDongleList.argtype = [
157
+ POINTER(TMSiDongleList),
158
+ c_uint,
159
+ POINTER(c_uint),
160
+ ]
161
+
162
+ # ---
163
+ # @details This command is used to pair a PC-BT-dongle with a Apex recorder.
164
+ #
165
+ # @param[in] DongleID, retrieved by "TMSiGetDongleList".
166
+ # @param[in] DeviceID, retrieved by "TMSiGetDeviceList".
167
+ #
168
+ # @return
169
+ # @li TMSiStatusOK Ok, if pairing successful.
170
+ # @li Any TMSI_DR*, TMSI_DLL error received.
171
+ # ---
172
+ TMSiPairDevice = ApexSDK.TMSiPairDevice
173
+ TMSiPairDevice.restype = TMSiDeviceRetVal
174
+ TMSiPairDevice.argtype = [c_ushort, c_ushort]
175
+
176
+ # ---
177
+ # @details This command is used to retrieve an info report from a TMSi device.
178
+ #
179
+ # @Pre \ref TMSiOpenInterface should have been called and returned a valid
180
+ # TMSIDeviceHandle.
181
+ # @li The device STATEMACHINE shall be in "Device_Open".
182
+ # @Post No device change.
183
+ #
184
+ # @param[in] TMSiDeviceHandle Handle to the current open device.
185
+ # @param[out] DeviceInfo Status report of the connected device.
186
+ #
187
+ # @return
188
+ # @li TMSI_OK Ok, if response received successful.
189
+ # @li Any TMSI_DS*, TMSI_DR*, TMSI_DLL error received.
190
+ # ---
191
+ TMSiGetDeviceInfo = ApexSDK.TMSiGetDeviceInfo
192
+ TMSiGetDeviceInfo.restype = TMSiDeviceRetVal
193
+ TMSiGetDeviceInfo.argtype = [c_void_p, POINTER(TMSiDevInfoReport)]
194
+
195
+ # ---
196
+ # @details This command is used to retrieve an power status report from a TMSi
197
+ # device.
198
+ #
199
+ # @Pre \ref TMSiOpenInterface should have been called and returned a valid
200
+ # TMSIDeviceHandle.
201
+ # @li The device STATEMACHINE shall be in "Device_Open".
202
+ # @Post No device change.
203
+ #
204
+ # @param[in] TMSiDeviceHandle Handle to the current open interface.
205
+ # @param[out] DevicePowerStatus Power Status report of the connected device.
206
+ #
207
+ # @return
208
+ # @li TMSiStatusOK Ok, if response received successful.
209
+ # @li Any TMSI_DR*, TMSI_DLL error received.
210
+ # ---
211
+ TMSiGetDevicePowerStatus = ApexSDK.TMSiGetDevicePowerStatus
212
+ TMSiGetDevicePowerStatus.restype = TMSiDeviceRetVal
213
+ TMSiGetDevicePowerStatus.argtype = [c_void_p, POINTER(TMSiDevInfoReport)]
214
+
215
+ # ---
216
+ # @details This command is used to get the device interface status.
217
+ #
218
+ # @Pre @li \ref TMSiOpenInterface should have been called and returned a valid
219
+ # TMSIDeviceHandle.
220
+ # @li device STATEMACHINE shall be in "Device_Open".
221
+ # @Post No change in device state.
222
+ #
223
+ # @param[in] TMSiDeviceHandle Handle to the current open device.
224
+ # @param[in] InterfaceType See <TMSiInterfaceType>.
225
+ # @param[out] InterfaceStatus Holds the returned device interface status.
226
+ #
227
+ # @return
228
+ # @li TMSiStatusOK Ok, if response received successful.
229
+ # @li Any TMSI_DR*, TMSI_DLL error received.
230
+ # ---
231
+ TMSiGetDeviceInterfaceStatus = ApexSDK.TMSiGetDeviceInterfaceStatus
232
+ TMSiGetDeviceInterfaceStatus.restype = TMSiDeviceRetVal
233
+ TMSiGetDeviceInterfaceStatus.argtype = [
234
+ c_void_p,
235
+ c_uint,
236
+ POINTER(TMSiInterfaceStatus),
237
+ ]
238
+
239
+ # ---
240
+ # @details This command is used to set the device interface configuration.
241
+ #
242
+ # @Pre @li \ref TMSiOpenInterface should have been called and returned a valid
243
+ # TMSIDeviceHandle.
244
+ # @li device STATEMACHINE shall be in "Device_Open".
245
+ # @Post No change in device state.
246
+ #
247
+ # @param[in] TMSiDeviceHandle Handle to the current open device.
248
+ # @param[in] InterfaceType See <TMSiInterfaceType>.
249
+ # @param[in] InterfaceControl See <TMSiControlType>.
250
+ #
251
+ # @return
252
+ # @li TMSiStatusOK Ok, if response received successful.
253
+ # @li Any TMSI_DR*, TMSI_DLL error received.
254
+ # ---
255
+ TMSiSetDeviceInterfaceConfig = ApexSDK.TMSiSetDeviceInterfaceConfig
256
+ TMSiSetDeviceInterfaceConfig.restype = TMSiDeviceRetVal
257
+ TMSiSetDeviceInterfaceConfig.argtype = [c_void_p, c_uint, c_byte]
258
+
259
+ # ---
260
+ # @details This command is used to retrieve the actual sampling configuration from a TMSi
261
+ # device.
262
+ #
263
+ # @Pre \ref TMSiOpenInterface should have been called and returned a valid
264
+ # TMSIDeviceHandle.
265
+ # @li The device STATEMACHINE shall be in "Device_Open".
266
+ #
267
+ # @Post No device change.
268
+ #
269
+ # @param[in] TMSiDeviceHandle Handle to the current open device.
270
+ # @param[out] DevSamplingCfg Actual sampling configuration.
271
+ #
272
+ # @return
273
+ # @li TMSI_OK Ok, if response received successful.
274
+ # @li Any TMSI_DR*, TMSI_DLL error received.
275
+ # ---
276
+ TMSiGetDeviceSamplingConfig = ApexSDK.TMSiGetDeviceSamplingConfig
277
+ TMSiGetDeviceSamplingConfig.restype = TMSiDeviceRetVal
278
+ TMSiGetDeviceSamplingConfig.argtype = [
279
+ c_void_p,
280
+ POINTER(TMSiDevSamplingCfg),
281
+ ]
282
+
283
+ # ---
284
+ # @details This command is used to set the actual sampling configuration from a TMSi
285
+ # device.
286
+ #
287
+ # @Pre \ref TMSiOpenInterface should have been called and returned a valid
288
+ # TMSIDeviceHandle.
289
+ # @li The device STATEMACHINE shall be in "Device_Open".
290
+ #
291
+ # @Post No device change.
292
+ #
293
+ # @param[in] TMSiDeviceHandle Handle to the current open device.
294
+ # @param[out] DevSamplingCfg Sampling configuration to set.
295
+ #
296
+ # @return
297
+ # @li TMSI_OK Ok, if response received successful.
298
+ # @li Any TMSI_DR*, TMSI_DLL error received.
299
+ # ---
300
+ TMSiSetDeviceSamplingConfig = ApexSDK.TMSiSetDeviceSamplingConfig
301
+ TMSiSetDeviceSamplingConfig.restype = TMSiDeviceRetVal
302
+ TMSiSetDeviceSamplingConfig.argtype = [
303
+ c_void_p,
304
+ POINTER(TMSiDevSamplingCfg),
305
+ ]
306
+
307
+ # ---
308
+ # @details This command is used to get the channel configuration data from a device. All
309
+ # available channels will be returned.
310
+ #
311
+ # @Pre @li \ref TMSiOpenInterface should have been called and returned a valid
312
+ # TMSIDeviceHandle.
313
+ # @li device STATEMACHINE shall be in "Device_Open".
314
+ # @Post No change in device state.
315
+ #
316
+ # @param[in] TMSiDeviceHandle Handle to the current open device.
317
+ # @param[out] DevChNameList The list of fixed channel names.
318
+ # @param[out] DevAltChNameList The list of alternate channel names.
319
+ # @param[in] ChannelListLen The amount of allocated channel list items for both lists.
320
+ # @param[out] RetChannelListLen Holds the number channels in the returned lists.
321
+ #
322
+ # @return
323
+ # @li TMSiStatusOK Ok, if response received successful.
324
+ # @li Any TMSI_DR*, TMSI_DLL error received.
325
+ # ---
326
+ TMSiGetDeviceChannelConfig = ApexSDK.TMSiGetDeviceChannelConfig
327
+ TMSiGetDeviceChannelConfig.restype = TMSiDeviceRetVal
328
+ TMSiGetDeviceChannelConfig.argtype = [
329
+ c_void_p,
330
+ POINTER(TMSiDevChName),
331
+ POINTER(TMSiDevAltChName),
332
+ c_uint,
333
+ POINTER(c_uint),
334
+ ]
335
+
336
+ # ---
337
+ # @details This command is used to update alternate channel names.
338
+ #
339
+ # @Pre @li \ref TMSiOpenInterface should have been called and returned a valid
340
+ # TMSIDeviceHandle.
341
+ # @li device STATEMACHINE shall be in "Device_Open".
342
+ # @Post No change in device state.
343
+ #
344
+ # @param[in] TMSiDeviceHandle Handle to the current open device.
345
+ # @param[in] DevAltChNameList The list of alternate channel names.
346
+ # @param[in] ChannelListLen Max num of items in <DevAltChNameList>.
347
+ #
348
+ # @return
349
+ # @li TMSiStatusOK Ok, if response received successful.
350
+ # @li Any TMSI_DR*, TMSI_DLL error received.
351
+ # ---
352
+ TMSiSetDeviceChannelConfig = ApexSDK.TMSiSetDeviceChannelConfig
353
+ TMSiSetDeviceChannelConfig.restype = TMSiDeviceRetVal
354
+ TMSiSetDeviceChannelConfig.argtype = [
355
+ c_void_p,
356
+ POINTER(TMSiDevAltChName),
357
+ c_uint,
358
+ ]
359
+
360
+ # ---
361
+ # @details This command is used to get reference status of the channels.
362
+ #
363
+ # @Pre @li \ref TMSiOpenInterface should have been called and returned a valid
364
+ # TMSIDeviceHandle.
365
+ # @li device STATEMACHINE shall be in "Device_Open".
366
+ # @Post No change in device state.
367
+ #
368
+ # @param[in] TMSiDeviceHandle Handle to the current open device.
369
+ # @param[out] DevChanRefList The channel reference list.
370
+ # @param[in] DevChanRefListLength Max num of items in <DevChanRefList>.
371
+ # @param[out] RetDevChanRefListLength Holds the number channels in the returned list.
372
+ #
373
+ # @return
374
+ # @li TMSiStatusOK Ok, if response received successful.
375
+ # @li Any TMSI_DR*, TMSI_DLL error received.
376
+ # ---
377
+ TMSiGetDeviceReferenceConfig = ApexSDK.TMSiGetDeviceReferenceConfig
378
+ TMSiGetDeviceReferenceConfig.restype = TMSiDeviceRetVal
379
+ TMSiGetDeviceReferenceConfig.argtype = [
380
+ c_void_p,
381
+ POINTER(TMSiDevChanRef),
382
+ c_uint,
383
+ POINTER(c_uint),
384
+ ]
385
+
386
+ # ---
387
+ # @details This command is used to set reference status of the channels.
388
+ #
389
+ # @Pre @li \ref TMSiOpenInterface should have been called and returned a valid
390
+ # TMSIDeviceHandle.
391
+ # @li device STATEMACHINE shall be in "Device_Open".
392
+ # @Post No change in device state.
393
+ #
394
+ # @param[in] TMSiDeviceHandle Handle to the current open device.
395
+ # @param[out] DevChanRefList The channel list with the references to set.
396
+ # @param[in] DevChanRefListLength Max num of items in <DevChanRefList>.
397
+ #
398
+ # @return
399
+ # @li TMSiStatusOK Ok, if response received successful.
400
+ # @li Any TMSI_DR*, TMSI_DLL error received.
401
+ # ---
402
+ TMSiSetDeviceReferenceConfig = ApexSDK.TMSiSetDeviceReferenceConfig
403
+ TMSiSetDeviceReferenceConfig.restype = TMSiDeviceRetVal
404
+ TMSiSetDeviceReferenceConfig.argtype = [
405
+ c_void_p,
406
+ POINTER(TMSiDevChanRef),
407
+ c_uint,
408
+ ]
409
+
410
+ # ---
411
+ # @details This command is used to get the time off a TMSi device.
412
+ #
413
+ # @Pre \ref TMSiOpenInterface should have been called and returned a valid
414
+ # TMSIDeviceHandle.
415
+ # @li The device STATEMACHINE shall be in "Device_Open".
416
+ #
417
+ # @Post When a TMSI_OK is returned the internal time has been updated.
418
+ #
419
+ # @depends Low level call 0x0205.
420
+ #
421
+ # @param[in] TMSiDeviceHandle Handle to the current open device.
422
+ # @param[in] Time Buffer for storing time information.
423
+ #
424
+ # @return
425
+ # @li TMSI_OK Ok, if response received successful.
426
+ # @li Any TMSI_DR*, TMSI_DLL error received.
427
+ # ---
428
+ TMSiGetDeviceRTC = ApexSDK.TMSiGetDeviceRTC
429
+ TMSiGetDeviceRTC.restype = TMSiDeviceRetVal
430
+ TMSiGetDeviceRTC.argtype = [c_void_p, POINTER(TMSiTime)]
431
+
432
+ # ---
433
+ # @details This command is used to set the time on a TMSi device.
434
+ #
435
+ # @Pre \ref TMSiOpenInterface should have been called and returned a valid
436
+ # TMSIDeviceHandle.
437
+ # @li The device STATEMACHINE shall be in "Device_Open".
438
+ #
439
+ # @Post When a TMSI_OK is returned the internal time has been updated.
440
+ #
441
+ # @depends Low level call 0x0205.
442
+ #
443
+ # @param[in] TMSiDeviceHandle Handle to the current open device.
444
+ # @param[in] NewTime Buffer with new time information.
445
+ #
446
+ # @return
447
+ # @li TMSI_OK Ok, if response received successful.
448
+ # @li Any TMSI_DR*, TMSI_DLL error received.
449
+ # ---
450
+ TMSiSetDeviceRTC = ApexSDK.TMSiSetDeviceRTC
451
+ TMSiSetDeviceRTC.restype = TMSiDeviceRetVal
452
+ TMSiSetDeviceRTC.argtype = [c_void_p, POINTER(TMSiTime)]
453
+
454
+ # ---
455
+ # @details This command is used to get the card recording configuration from
456
+ # the data recorder.
457
+ #
458
+ # @Pre @li \ref TMSiOpenInterface should have been called and returned a valid
459
+ # TMSIDeviceHandle.
460
+ # @li The device STATEMACHINE shall be in "Device_Open".
461
+ #
462
+ # @Post No change in device state.
463
+ #
464
+ # @param[in] TMSiDeviceHandle Handle to the current open device.
465
+ # @param[out] DevCardRecCfg The current card recording configuration.
466
+ #
467
+ # @return
468
+ # @li TMSiStatusOK Ok, if response received successful.
469
+ # @li Any TMSI_DR*, TMSI_DLL error received.
470
+ # ---
471
+ TMSiGetDeviceCardRecordingConfig = ApexSDK.TMSiGetDeviceCardRecordingConfig
472
+ TMSiGetDeviceCardRecordingConfig.restype = TMSiDeviceRetVal
473
+ TMSiGetDeviceCardRecordingConfig.argtype = [
474
+ c_void_p,
475
+ POINTER(TMSiDevCardRecCfg),
476
+ ]
477
+
478
+ # ---
479
+ # @details This command is used to set a new card recording configuration
480
+ # to the data recorder.
481
+ #
482
+ # @Pre @li \ref TMSiOpenInterface should have been called and returned a valid
483
+ # TMSIDeviceHandle.
484
+ # @li device STATEMACHINE shall be in "Device_Open".
485
+ #
486
+ # @Post No change in device state.
487
+ #
488
+ # @param[in] TMSiDeviceHandle Handle to the current open device.
489
+ # @param[out] DevCardRecCfg The new card recording configuration.
490
+ #
491
+ # @return
492
+ # @li TMSiStatusOK Ok, if response received successful.
493
+ # @li Any TMSI_DR*, TMSI_DLL error received.
494
+ # ---
495
+ TMSiSetDeviceCardRecordingConfig = ApexSDK.TMSiSetDeviceCardRecordingConfig
496
+ TMSiSetDeviceCardRecordingConfig.restype = TMSiDeviceRetVal
497
+ TMSiSetDeviceCardRecordingConfig.argtype = [
498
+ c_void_p,
499
+ POINTER(TMSiDevCardRecCfg),
500
+ ]
501
+
502
+ # ---
503
+ # @details This command is used to clear the contents of the memory card of the device.
504
+ #
505
+ # @Pre @li \ref TMSiOpenInterface should have been called and returned a valid
506
+ # TMSIDeviceHandle.
507
+ # @li device STATEMACHINE shall be in "Device_Open".
508
+ #
509
+ # @Post No change in device state.
510
+ #
511
+ # @param[in] TMSiDeviceHandle Handle to the current open device.
512
+ #
513
+ # @return
514
+ # @li TMSiStatusOK Ok, if factory defaults were set successful.
515
+ # @li Any TMSI_DR*, TMSI_DLL error otherwise.
516
+ # ---
517
+ TMSiResetDeviceCard = ApexSDK.TMSiResetDeviceCard
518
+ TMSiResetDeviceCard.restype = TMSiDeviceRetVal
519
+ TMSiResetDeviceCard.argtype = [c_void_p]
520
+
521
+ # ---
522
+ # @details This command is used to set the device back to its factory defaults.
523
+ #
524
+ # @Pre @li \ref TMSiOpenInterface should have been called and returned a valid
525
+ # TMSIDeviceHandle.
526
+ # @li device STATEMACHINE shall be in "Device_Open".
527
+ #
528
+ # @Post No change in device state.
529
+ #
530
+ # @param[in] TMSiDeviceHandle Handle to the current open device.
531
+ #
532
+ # @return
533
+ # @li TMSiStatusOK Ok, if factory defaults were set successful.
534
+ # @li Any TMSI_DR*, TMSI_DLL error otherwise.
535
+ # ---
536
+ TMSiSetDeviceFactoryDefaults = ApexSDK.TMSiSetDeviceFactoryDefaults
537
+ TMSiSetDeviceFactoryDefaults.restype = TMSiDeviceRetVal
538
+ TMSiSetDeviceFactoryDefaults.argtype = [c_void_p]
539
+
540
+ # ---
541
+ # @details This command is used to get the sample metadata-header from a device.
542
+ #
543
+ # @Pre @li \ref TMSiOpenInterface should have been called and returned a valid
544
+ # TMSIDeviceHandle.
545
+ # @li device STATEMACHINE shall be in "Device_Open".
546
+ # @Post No change in device state.
547
+ #
548
+ # @param[in] TMSiDeviceHandle Handle to the current open device.
549
+ # @param[out] DRInterfaceType Interface type (USB or bluetooth) to retrieve the sample
550
+ # metadata header from.
551
+ # @param[out] SampleMetadataHeader Sample metadata header.
552
+ #
553
+ # @return
554
+ # @li TMSiStatusOK Ok, if response received successful.
555
+ # @li Any TMSI_DR*, TMSI_DLL error received.
556
+ # ---
557
+ TMSiGetDeviceSampleMetadataHeader = (
558
+ ApexSDK.TMSiGetDeviceSampleMetadataHeader
559
+ )
560
+ TMSiGetDeviceSampleMetadataHeader.restype = TMSiDeviceRetVal
561
+ TMSiGetDeviceSampleMetadataHeader.argtype = [
562
+ c_void_p,
563
+ c_uint,
564
+ POINTER(TMSiSampleMetadataHeader),
565
+ ]
566
+
567
+ # ---
568
+ # @details This command is used to get the channel meta data from a device.
569
+ # The metadata of available channels will be returned.
570
+ #
571
+ # @Pre @li \ref TMSiOpenInterface should have been called and returned a valid
572
+ # TMSIDeviceHandle.
573
+ # @li device STATEMACHINE shall be in "Device_Open".
574
+ # @Post No change in device state.
575
+ #
576
+ # @param[in] TMSiDeviceHandle Handle to the current open device.
577
+ # @param[out] DRInterfaceType Interface type (USB or bluetooth) to retrieve the channel
578
+ # meta data from.
579
+ # @param[out] ChannelMetadataList The allocated channel metadata list.
580
+ # @param[in] ChannelListLen The amount of allocated channel list items.
581
+ # @param[out] RetChannelListLen The returned nr of channel list items.
582
+ # @param[out] CyclingStateMetadataList The allocated Cycling-State metadata list.
583
+ # @param[in] CyclingStateMetadataListLen The amount of allocated Cycling-State list items.
584
+ # @param[out] RetCyclingStatMetadataListLen The returned nr of Cycling-State list items.
585
+ #
586
+ # @return
587
+ # @li TMSiStatusOK Ok, if response received successful.
588
+ # @li Any TMSI_DR*, TMSI_DLL error received.
589
+ # ---
590
+ TMSiGetDeviceSampleMetadata = ApexSDK.TMSiGetDeviceSampleMetadata
591
+ TMSiGetDeviceSampleMetadata.restype = TMSiDeviceRetVal
592
+ TMSiGetDeviceSampleMetadata.argtype = [
593
+ c_void_p,
594
+ c_uint,
595
+ POINTER(TMSiChannelMetadata),
596
+ c_uint,
597
+ POINTER(c_uint),
598
+ POINTER(TMSiCyclingStateMetadata),
599
+ c_uint,
600
+ POINTER(c_uint),
601
+ ]
602
+
603
+ # ---
604
+ # @details This command is used to get the impedance meta data from a device.
605
+ #
606
+ # @Pre @li \ref TMSiOpenInterface should have been called and returned a valid
607
+ # TMSIDeviceHandle.
608
+ # @li device STATEMACHINE shall be in "Device_Open".
609
+ # @Post No change in device state.
610
+ #
611
+ # @param[in] TMSiDeviceHandle Handle to the current open device.
612
+ # @param[out] ImpedanceMetadata The allocated impedance metadata structs
613
+ # @param[in] ImpedanceListLen The amount of allocated impedance-channel list items.
614
+ # @param[out] RetImpedanceListLen The returned nr of impdance-channel list items.
615
+ #
616
+ # @return
617
+ # @li TMSiStatusOK Ok, if response received successful.
618
+ # @li Any TMSI_DR*, TMSI_DLL error received.
619
+ # ---
620
+ TMSiGetDeviceImpedanceMetadata = ApexSDK.TMSiGetDeviceImpedanceMetadata
621
+ TMSiGetDeviceImpedanceMetadata.restype = TMSiDeviceRetVal
622
+ TMSiGetDeviceImpedanceMetadata.argtype = [
623
+ c_void_p,
624
+ POINTER(TMSiImpedanceMetadata),
625
+ c_uint,
626
+ POINTER(c_uint),
627
+ ]
628
+
629
+ # ---
630
+ # @details This command is used to control the sampling mode on a TMSi
631
+ # device.
632
+ #
633
+ # @Pre @li \ref TMSiOpenInterface should have been called and returned a valid
634
+ # TMSIDeviceHandle.
635
+ # @li The device STATEMACHINE shall be in "Device_Open" or "Device_Sampling".
636
+ #
637
+ # @Post When TMSiStatusOK is returned the device is in the "Device_Sampling" or
638
+ # "Device_Open" state depending on the requested StartStop flag.
639
+ # Sampling data should be retrieved by calling TMSiGetDeviceData.
640
+ #
641
+ # @param[in] TMSiDeviceHandle Handle to the current open device.
642
+ # @param[in] DevSampleRequest New device sampling request.
643
+ # @return
644
+ # @li TMSiStatusOK Ok, if response received successful.
645
+ # @li Any TMSI_DR*, TMSI_DLL error received.
646
+ # ---
647
+ TMSiSetDeviceSamplingRequest = ApexSDK.TMSiSetDeviceSamplingRequest
648
+ TMSiSetDeviceSamplingRequest.restype = TMSiDeviceRetVal
649
+ TMSiSetDeviceSamplingRequest.argtype = [
650
+ c_void_p,
651
+ POINTER(TMSiDevSampleRequest),
652
+ ]
653
+
654
+ # ---
655
+ # @details This command is used to control the impedance mode on a TMSi
656
+ # device.
657
+ #
658
+ # @Pre @li \ref TMSiOpenInterface should have been called and returned a valid
659
+ # TMSIDeviceHandle.
660
+ # @li The device STATEMACHINE shall be in "Device_Open" or "Device_Impedance".
661
+ #
662
+ # @Post When TMSiStatusOK is returned the device is in the "Device_Impedance" or
663
+ # "Device_Open" state depending on the requested StartStop flag.
664
+ # Impedance data should be retrieved by calling TMSiGetDeviceData.
665
+ #
666
+ # @param[in] TMSiDeviceHandle Handle to the current open device.
667
+ # @param[in] DevImpedanceRequest New device impedance request.
668
+ # @return
669
+ # @li TMSiStatusOK Ok, if response received successful.
670
+ # @li Any TMSI_DR*, TMSI_DLL error received.
671
+ # ---
672
+ TMSiSetDeviceImpedanceRequest = ApexSDK.TMSiSetDeviceImpedanceRequest
673
+ TMSiSetDeviceImpedanceRequest.restype = TMSiDeviceRetVal
674
+ TMSiSetDeviceImpedanceRequest.argtype = [
675
+ c_void_p,
676
+ POINTER(TMSiDevImpedanceRequest),
677
+ ]
678
+
679
+ # ---
680
+ # @details This command is used to get the device streaming data. The
681
+ # application can retrieve sampledata/impdata from the device. It returns data
682
+ # as 32-bit float values, all data is already processed, meaning it is converted
683
+ # from bits to units (as specified in the channel descriptor). The function will # return a buffer with a NrOfSets of samples, for each ENABLED channel one
684
+ # sample per set. The application should match each sample with the
685
+ # corresponding channel. All samples are in order of enabled channels starting
686
+ # at the first channel.
687
+ # The DataType indicates if the data is Sampledata DataType = 1, ImpedanceData
688
+ # DataType = 2, Sampledata Recording = 3.
689
+ # In case of impedance data only Channels with "ImpDivider" > -1 are transmitted.
690
+ # The buffer retured is a multiple of Samplesets.
691
+ #
692
+ #
693
+ # @Pre @li \ref TMSiOpenDevice should have been called and returned a valid
694
+ # TMSIDeviceHandle. The device shall be in "Device_Sampling" or
695
+ # "Device_Impedance" state.
696
+ #
697
+ # @Post No change in device state.
698
+ #
699
+ # @depends Low level call 0x0303.
700
+ #
701
+ # @param[in] TMSiDeviceHandle Handle to the current open device.
702
+ # @param[out] DeviceData Received device Data.
703
+ # @param[in] DeviceDataBufferSize Buffersize for device Data;
704
+ # @param[out] NrOfSets The returned samplesets in this buffer
705
+ # @param[out] DataType The returned data type.
706
+ #
707
+ # @return
708
+ # @li TMSI_OK Ok, if response received successful.
709
+ # @li Any TMSI_DS*, TMSI_DR*, TMSI_DLL error received.
710
+ # ---
711
+ TMSiGetDeviceData = ApexSDK.TMSiGetDeviceData
712
+ TMSiGetDeviceData.restype = TMSiDeviceRetVal
713
+ TMSiGetDeviceData.argtype = [
714
+ c_void_p,
715
+ POINTER(c_float),
716
+ c_uint,
717
+ POINTER(c_uint),
718
+ POINTER(c_int),
719
+ ]
720
+
721
+ # ---
722
+ # @details This command is used to get the current status of the streaming
723
+ # databuffer. It returns the current value of the amount of data waiting in the
724
+ # buffer.
725
+ # @Pre @li \ref TMSiOpenDevice should have been called and returned a valid
726
+ # TMSIDeviceHandle. The device shall be in "Device_Sampling" or
727
+ # "Device_Impedance" state.
728
+ #
729
+ # @Post No change in device state.
730
+ #
731
+ # @depends None, API call only.
732
+ #
733
+ # @param[in] TMSiDeviceHandle Handle to the current open device.
734
+ # @param[out] DeviceDataBuffered The amount of data buffered for this device in
735
+ # Bytes.
736
+ #
737
+ # @return
738
+ # @li TMSI_OK Ok, if response received successful.
739
+ # @li Any TMSI_DLL error received.
740
+ # ---
741
+ # TMSIDEVICEDLL_API TMSiDeviceRetVal TMSiGetDeviceDataBuffered(void* TMSiDeviceHandle, int32_t* DeviceDataBuffered);
742
+
743
+ # ---
744
+ # @details This command is used to reset the internal data buffer thread for the
745
+ # specified device after it has been stopped sampling.
746
+ #
747
+ # @Pre @li \ref TMSiOpenDevice should have been called and returned a valid
748
+ # TMSIDeviceHandle.
749
+ # @li The device STATEMACHINE shall be in "Device_Open".
750
+ #
751
+ # @Post No change in device state.
752
+ #
753
+ # @depends None, API call only.
754
+ #
755
+ # @param[in] TMSiDeviceHandle Handle to the current open device.
756
+ #
757
+ # @return
758
+ # @li TMSI_OK Ok, if response received successful.
759
+ # @li Any TMSI_DLL error received.
760
+ # ---
761
+ TMSiResetDeviceDataBuffer = ApexSDK.TMSiResetDeviceDataBuffer
762
+ TMSiResetDeviceDataBuffer.restype = TMSiDeviceRetVal
763
+ TMSiResetDeviceDataBuffer.argtype = [c_void_p]
764
+
765
+ # ---
766
+ # @details This command is used to get the device streaming impedance data. The
767
+ # application can retrieve impedance sample data from the device.
768
+ # The function will return a buffer with a NrOfSets of impedance samples, for each channel one
769
+ # impedance-sample per set. The application should match each sample with the
770
+ # corresponding channel. All samples are in order of enabled channels starting
771
+ # at the first channel.
772
+ # The buffer retured is a multiple of Samplesets.
773
+ #
774
+ # @Pre @li \ref TMSiOpenInterface should have been called and returned a valid
775
+ # TMSIDeviceHandle. The device shall be in "Device_Impedance" state.
776
+ #
777
+ # @Post No change in device state.
778
+ #
779
+ # @param[in] TMSiDeviceHandle Handle to the current open device.
780
+ # @param[out] ImpedanceSampleBuffer Received impedance-sample data.
781
+ # @param[in] DeviceDataBufferSize Buffersize for impedance-sample data;
782
+ # @param[out] NrOfSets The returned samplesets in this buffer
783
+ #
784
+ # @return
785
+ # @li TMSiStatusOK Ok, if response received successful.
786
+ # @li Any TMSI_DR*, TMSI_DLL error received.
787
+ # ---
788
+
789
+ TMSiGetDeviceImpedanceData = ApexSDK.TMSiGetDeviceImpedanceData
790
+ TMSiGetDeviceImpedanceData.restype = TMSiDeviceRetVal
791
+ TMSiGetDeviceImpedanceData.argtype = [
792
+ c_void_p,
793
+ POINTER(TMSiImpedanceSample),
794
+ c_uint,
795
+ POINTER(c_uint),
796
+ ]
797
+
798
+ # ---
799
+ # @details This command is used to get the card status.
800
+ #
801
+ # @Pre @li \ref TMSiOpenInterface should have been called and returned a valid
802
+ # TMSIDeviceHandle.
803
+ # @li The device STATEMACHINE shall be in "Device_Open".
804
+ #
805
+ # @Post No change in device state.
806
+ #
807
+ # @param[in] TMSiDeviceHandle Handle to the current open device.
808
+ # @param[out] CardStatus Status of the card on the data recorder.
809
+ #
810
+ # @return
811
+ # @li TMSiStatusOK Ok, if response received successful.
812
+ # @li Any TMSI_DR*, TMSI_DLL error received.
813
+ # ---
814
+ TMSiGetDeviceCardStatus = ApexSDK.TMSiGetDeviceCardStatus
815
+ TMSiGetDeviceCardStatus.restype = TMSiDeviceRetVal
816
+ TMSiGetDeviceCardStatus.argtype = [c_void_p, POINTER(TMSiDevCardStatus)]
817
+
818
+ # ---
819
+ # @details This command is used to get the card recording list.
820
+ #
821
+ # @Pre @li \ref TMSiOpenInterface should have been called and returned a valid
822
+ # TMSIDeviceHandle.
823
+ # @li The device STATEMACHINE shall be in "Device_Open".
824
+ #
825
+ # @Post No change in device state.
826
+ #
827
+ # @param[in] TMSiDeviceHandle Handle to the current open device.
828
+ # @param[out] CardFileList List of available card recordings on data recorder.
829
+ # @param[in] CardFileListListLen Buffersize for CardRecordingsList
830
+ # @param[out] RetCardFileListListLen The amount of returned card recordings in the list.
831
+ #
832
+ # @return
833
+ # @li TMSiStatusOK Ok, if response received successful.
834
+ # @li Any TMSI_DR*, TMSI_DLL error received.
835
+ # ---
836
+ TMSiGetDeviceCardFileList = ApexSDK.TMSiGetDeviceCardFileList
837
+ TMSiGetDeviceCardFileList.restype = TMSiDeviceRetVal
838
+ TMSiGetDeviceCardFileList.argtype = [
839
+ c_void_p,
840
+ POINTER(TMSiDevCardFileInfo),
841
+ c_uint,
842
+ POINTER(c_uint),
843
+ ]
844
+
845
+ # ---
846
+ # @details This command is used to get the file metadata-header from a file.
847
+ #
848
+ # @Pre @li \ref TMSiOpenInterface should have been called and returned a valid
849
+ # TMSIDeviceHandle.
850
+ # @li device STATEMACHINE shall be in "Device_Open".
851
+ # @Post No change in device state.
852
+ #
853
+ # @param[in] TMSiDeviceHandle Handle to the current open device.
854
+ # @param[out] FileMetadataHeader File metadata header.
855
+ #
856
+ # @return
857
+ # @li TMSiStatusOK Ok, if response received successful.
858
+ # @li Any TMSI_DR*, TMSI_DLL error received.
859
+ # ---
860
+ TMSiGetDeviceCardFileMetadataHeader = (
861
+ ApexSDK.TMSiGetDeviceCardFileMetadataHeader
862
+ )
863
+ TMSiGetDeviceCardFileMetadataHeader.restype = TMSiDeviceRetVal
864
+ TMSiGetDeviceCardFileMetadataHeader.argtype = [
865
+ c_void_p,
866
+ c_ushort,
867
+ POINTER(TMSiFileMetadataHeader),
868
+ ]
869
+
870
+ # ---
871
+ # @details This command is used to get the sample meta data from a specific card recording.
872
+ # The metadata of available channels within the card recording will be returned.
873
+ #
874
+ # @Pre @li \ref TMSiOpenInterface should have been called and returned a valid
875
+ # TMSIDeviceHandle.
876
+ # @li device STATEMACHINE shall be in "Device_Open".
877
+ # @Post No change in device state.
878
+ #
879
+ # @param[in] TMSiDeviceHandle Handle to the current open device.
880
+ # @param[in] RecFileID Unique ID of the card recording retrieved with TMSiGetDeviceCardRecordingList().
881
+ # @param[out] DevCardFileDetails Holds the returned card recording details.
882
+ # meta data from.
883
+ # @param[out] ChannelMetadataList The allocated channel metadata list.
884
+ # @param[in] ChannelMetadataListLen The amount of allocated channel list items.
885
+ # @param[out] RetChannelMetadataListLen Holds the number channels in the returned list.
886
+ # @param[out] CyclingStateMetadataList The allocated Cycling-State metadata list.
887
+ # @param[in] CyclingStateMetadataListLen The amount of allocated Cycling-State list items.
888
+ # @param[out] RetCyclingStatMetadataListLen The returned nr of Cycling-State list items.
889
+ # @param[out] ImpedanceReportList The allocated impedance report list.
890
+ # @param[in] ImpedanceReportListLen The amount of allocated impedance report list items.
891
+ # @param[out] RetImpedanceReportListLen Holds the number of impedance report in the returned list.
892
+ #
893
+ # @return
894
+ # @li TMSiStatusOK Ok, if response received successful.
895
+ # @li Any TMSI_DR*, TMSI_DLL error received.
896
+ # ---
897
+ TMSiGetDeviceCardFileMetadata = ApexSDK.TMSiGetDeviceCardFileMetadata
898
+ TMSiGetDeviceCardFileMetadata.restype = TMSiDeviceRetVal
899
+ TMSiGetDeviceCardFileMetadata.argtype = [
900
+ c_void_p,
901
+ c_ushort,
902
+ POINTER(TMSiDevCardFileDetails),
903
+ POINTER(TMSiChannelMetadata),
904
+ c_uint,
905
+ POINTER(c_uint),
906
+ POINTER(TMSiCyclingStateMetadata),
907
+ c_uint,
908
+ POINTER(c_uint),
909
+ POINTER(TMSiDevImpReportMetadata),
910
+ POINTER(TMSiDevImpReport),
911
+ c_uint,
912
+ POINTER(c_uint),
913
+ ]
914
+
915
+ # ---
916
+ # @details This command is used to control the download of a card recording from a TMSi
917
+ # device.
918
+ #
919
+ # @Pre @li \ref TMSiOpenInterface should have been called and returned a valid
920
+ # TMSIDeviceHandle.
921
+ # @li The device STATEMACHINE shall be in "Device_Open" or "Device_Card_Recording_Data.
922
+ #
923
+ # @Post When TMSiStatusOK is returned the device is in the "Device_Card_Recording_Data" or
924
+ # "Device_Open" state depending on the requested StartStop flag.
925
+ # Sampling data should be retrieved by calling TMSiGetDeviceData.
926
+ #
927
+ # @param[in] TMSiDeviceHandle Handle to the current open device.
928
+ # @param[in] DevSetCardFileReq New card recording download request.
929
+ # @return
930
+ # @li TMSiStatusOK Ok, if response received successful.
931
+ # @li Any TMSI_DR*, TMSI_DLL error received.
932
+ # ---
933
+ TMSiSetDeviceCardFileRequest = ApexSDK.TMSiSetDeviceCardFileRequest
934
+ TMSiSetDeviceCardFileRequest.restype = TMSiDeviceRetVal
935
+ TMSiSetDeviceCardFileRequest.argtype = [
936
+ c_void_p,
937
+ POINTER(TMSiDevSetCardFileReq),
938
+ ]
939
+
940
+ # ---
941
+ # @details This command is used to get the first event fom the event buffer thread.
942
+ #
943
+ # @Pre @li \ref None.
944
+ #
945
+ # @Post No change in device state.
946
+ #
947
+ # @depends None, API call only.
948
+ #
949
+ # @param[out] Event Event details when event was present.
950
+ #
951
+ # @return
952
+ # @li TMSiStatusOK Ok, if event is present.
953
+ # @li TMSiStatusDllBufferError if no event present.
954
+ # ---
955
+ TMSiGetEvent = ApexSDK.TMSiGetEvent
956
+ TMSiGetEvent.restype = TMSiDeviceRetVal
957
+ TMSiGetEvent.argtype = [POINTER(TMSiEvent)]
958
+
959
+ # ---
960
+ # @details This command is used to get the number of events present in the internal event buffer thread.
961
+ #
962
+ # @Pre @li \ref None.
963
+ #
964
+ # @Post No change in device state.
965
+ #
966
+ # @depends None, API call only.
967
+ #
968
+ # @param[out] NumOfEvents Number of events present in the internal event buffer.
969
+ #
970
+ # @return
971
+ # @li TMSiStatusOK.
972
+ # ---
973
+ TMSiGetEventBuffered = ApexSDK.TMSiGetEventBuffered
974
+ TMSiGetEventBuffered.restype = TMSiDeviceRetVal
975
+ TMSiGetEventBuffered.argtype = [POINTER(c_ushort)]
976
+
977
+ # ---
978
+ # @details This command is used to reset the internal event buffer thread.
979
+ #
980
+ # @Pre @li \ref None.
981
+ #
982
+ # @Post No change in device state.
983
+ #
984
+ # @depends None, API call only.
985
+ #
986
+ # @param[in] None
987
+ #
988
+ # @return
989
+ # @li TMSiStatusOK.
990
+ # ---
991
+ TMSiResetEventBuffer = ApexSDK.TMSiResetEventBuffer
992
+ TMSiResetEventBuffer.restype = TMSiDeviceRetVal
993
+ TMSiResetEventBuffer.argtype = []
994
+
995
+ # ---
996
+ # @details This command is used to retrieve the device driver version info report.
997
+ #
998
+ # @param[out] DevDrvInfoReport device driver version info report.
999
+ #
1000
+ # @return
1001
+ # @li TMSiStatusOK Ok, if response received successful.
1002
+ # @li Any TMSI_DR*, TMSI_DLL error received.
1003
+ # ---
1004
+
1005
+ TMSiGetDeviceDriverVersionInfo = ApexSDK.TMSiGetDeviceDriverVersionInfo
1006
+ TMSiGetDeviceDriverVersionInfo.restype = TMSiDeviceRetVal
1007
+ TMSiGetDeviceDriverVersionInfo.argtype = [
1008
+ POINTER(TMSiDeviceDriverVersionInfo)
1009
+ ]