py_canoe 3.0.4__py3-none-any.whl → 26.0.2__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.
- py_canoe/__init__.py +2 -1
- py_canoe/canoe.py +911 -0
- py_canoe/core/__init__.py +0 -0
- py_canoe/core/application.py +170 -0
- py_canoe/core/bus.py +301 -0
- py_canoe/core/capl.py +59 -0
- py_canoe/core/child_elements/__init__.py +0 -0
- py_canoe/core/child_elements/application_model.py +24 -0
- py_canoe/core/child_elements/application_model_file.py +21 -0
- py_canoe/core/child_elements/application_model_files.py +22 -0
- py_canoe/core/child_elements/application_model_setup.py +15 -0
- py_canoe/core/child_elements/application_models.py +22 -0
- py_canoe/core/child_elements/application_socket.py +11 -0
- py_canoe/core/child_elements/application_specific_module.py +24 -0
- py_canoe/core/child_elements/application_specific_modules.py +16 -0
- py_canoe/core/child_elements/audio_interface.py +28 -0
- py_canoe/core/child_elements/available_modules.py +22 -0
- py_canoe/core/child_elements/basic_module.py +19 -0
- py_canoe/core/child_elements/basic_modules.py +16 -0
- py_canoe/core/child_elements/c_libraries.py +28 -0
- py_canoe/core/child_elements/c_library.py +33 -0
- py_canoe/core/child_elements/can_controller.py +74 -0
- py_canoe/core/child_elements/capl_function.py +17 -0
- py_canoe/core/child_elements/ccp_setup.py +15 -0
- py_canoe/core/child_elements/channel.py +20 -0
- py_canoe/core/child_elements/channels.py +19 -0
- py_canoe/core/child_elements/communication_setup.py +23 -0
- py_canoe/core/child_elements/compile_result.py +22 -0
- py_canoe/core/child_elements/configured_channel.py +48 -0
- py_canoe/core/child_elements/configured_channels.py +21 -0
- py_canoe/core/child_elements/configured_module.py +82 -0
- py_canoe/core/child_elements/configured_modules.py +61 -0
- py_canoe/core/child_elements/connected_modules.py +14 -0
- py_canoe/core/child_elements/data_source.py +42 -0
- py_canoe/core/child_elements/data_source_file.py +21 -0
- py_canoe/core/child_elements/data_source_files.py +22 -0
- py_canoe/core/child_elements/data_source_issue.py +22 -0
- py_canoe/core/child_elements/data_source_issues.py +16 -0
- py_canoe/core/child_elements/data_source_setup.py +17 -0
- py_canoe/core/child_elements/data_sources.py +27 -0
- py_canoe/core/child_elements/database_setup.py +62 -0
- py_canoe/core/child_elements/device.py +34 -0
- py_canoe/core/child_elements/devices.py +13 -0
- py_canoe/core/child_elements/diagnostic.py +22 -0
- py_canoe/core/child_elements/diagnostic_request.py +59 -0
- py_canoe/core/child_elements/diagnostic_response.py +34 -0
- py_canoe/core/child_elements/diagnostic_responses.py +13 -0
- py_canoe/core/child_elements/diagnostics_setup.py +254 -0
- py_canoe/core/child_elements/distributed_mode.py +74 -0
- py_canoe/core/child_elements/encoding.py +27 -0
- py_canoe/core/child_elements/encodings.py +13 -0
- py_canoe/core/child_elements/environment_array.py +13 -0
- py_canoe/core/child_elements/environment_group.py +22 -0
- py_canoe/core/child_elements/environment_info.py +14 -0
- py_canoe/core/child_elements/environment_variable.py +55 -0
- py_canoe/core/child_elements/fdx_files.py +50 -0
- py_canoe/core/child_elements/file_group_data_source.py +17 -0
- py_canoe/core/child_elements/general_setup.py +66 -0
- py_canoe/core/child_elements/macros_setup.py +52 -0
- py_canoe/core/child_elements/mc_ecus.py +428 -0
- py_canoe/core/child_elements/measurement_setup.py +269 -0
- py_canoe/core/child_elements/modules.py +87 -0
- py_canoe/core/child_elements/most_disassembler.py +21 -0
- py_canoe/core/child_elements/most_network_interface.py +4 -0
- py_canoe/core/child_elements/namespace.py +21 -0
- py_canoe/core/child_elements/namespaces.py +19 -0
- py_canoe/core/child_elements/network.py +18 -0
- py_canoe/core/child_elements/network_adapters.py +13 -0
- py_canoe/core/child_elements/nodes.py +119 -0
- py_canoe/core/child_elements/open_configuration_result.py +0 -0
- py_canoe/core/child_elements/panel_setup.py +97 -0
- py_canoe/core/child_elements/participant.py +17 -0
- py_canoe/core/child_elements/participants.py +22 -0
- py_canoe/core/child_elements/ports.py +81 -0
- py_canoe/core/child_elements/replay_collection.py +56 -0
- py_canoe/core/child_elements/security_configuration.py +20 -0
- py_canoe/core/child_elements/security_setup.py +31 -0
- py_canoe/core/child_elements/signals.py +39 -0
- py_canoe/core/child_elements/simulation_setup.py +0 -0
- py_canoe/core/child_elements/single_file_data_source.py +13 -0
- py_canoe/core/child_elements/snippet_setup.py +68 -0
- py_canoe/core/child_elements/standalone_mode.py +0 -0
- py_canoe/core/child_elements/start_value_list.py +0 -0
- py_canoe/core/child_elements/symbol_mappings.py +0 -0
- py_canoe/core/child_elements/tcp_ip_stack_setting.py +0 -0
- py_canoe/core/child_elements/test_configurations.py +0 -0
- py_canoe/core/child_elements/test_environment.py +64 -0
- py_canoe/core/child_elements/test_environments.py +26 -0
- py_canoe/core/child_elements/test_module.py +213 -0
- py_canoe/core/child_elements/test_modules.py +23 -0
- py_canoe/core/child_elements/test_setup.py +16 -0
- py_canoe/core/child_elements/test_setup_folder_ext.py +36 -0
- py_canoe/core/child_elements/test_setup_folders.py +25 -0
- py_canoe/core/child_elements/user_files.py +0 -0
- py_canoe/core/child_elements/variable.py +144 -0
- py_canoe/core/child_elements/variable_events.py +14 -0
- py_canoe/core/child_elements/variables.py +29 -0
- py_canoe/core/child_elements/variables_file.py +15 -0
- py_canoe/core/child_elements/variables_files.py +19 -0
- py_canoe/core/child_elements/visual_sequence_setup.py +46 -0
- py_canoe/core/child_elements/vt_system.py +83 -0
- py_canoe/core/child_elements/vtt_sut_import_result.py +21 -0
- py_canoe/core/child_elements/write.py +71 -0
- py_canoe/core/child_elements/xcp_setup.py +12 -0
- py_canoe/core/configuration.py +509 -0
- py_canoe/core/environment.py +59 -0
- py_canoe/core/measurement.py +149 -0
- py_canoe/core/networks.py +103 -0
- py_canoe/core/performance.py +21 -0
- py_canoe/core/simulation.py +53 -0
- py_canoe/core/system.py +164 -0
- py_canoe/core/ui.py +53 -0
- py_canoe/core/version.py +54 -0
- py_canoe/helpers/__init__.py +0 -0
- py_canoe/helpers/common.py +78 -0
- {py_canoe-3.0.4.dist-info → py_canoe-26.0.2.dist-info}/METADATA +332 -322
- py_canoe-26.0.2.dist-info/RECORD +118 -0
- {py_canoe-3.0.4.dist-info → py_canoe-26.0.2.dist-info}/WHEEL +1 -1
- py_canoe/py_canoe.py +0 -2586
- py_canoe/py_canoe_utils/logging_collection.py +0 -345
- py_canoe/py_canoe_utils/py_canoe_logger.py +0 -29
- py_canoe-3.0.4.dist-info/LICENSE +0 -21
- py_canoe-3.0.4.dist-info/RECORD +0 -8
|
@@ -0,0 +1,428 @@
|
|
|
1
|
+
import win32com.client
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class McECUs:
|
|
5
|
+
"""
|
|
6
|
+
The McECUs object represents the collection of all configured CCP/XCP ECUs.
|
|
7
|
+
"""
|
|
8
|
+
def __init__(self, com_object) -> None:
|
|
9
|
+
self.com_object = com_object
|
|
10
|
+
|
|
11
|
+
@property
|
|
12
|
+
def count(self) -> int:
|
|
13
|
+
return self.com_object.Count
|
|
14
|
+
|
|
15
|
+
def item(self, index: int) -> 'McECU':
|
|
16
|
+
return McECU(self.com_object.Item(index))
|
|
17
|
+
|
|
18
|
+
def add(self, db_path: str, transport_layer: int) -> 'McECU':
|
|
19
|
+
return McECU(self.com_object.Add(db_path, transport_layer))
|
|
20
|
+
|
|
21
|
+
def add_configuration(self, cfg_path: str):
|
|
22
|
+
return self.com_object.AddConfiguration(cfg_path)
|
|
23
|
+
|
|
24
|
+
def remove(self, index: int):
|
|
25
|
+
self.com_object.Remove(index)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class McECU:
|
|
29
|
+
"""
|
|
30
|
+
The McECU object represents a CCP / an XCP ECU.
|
|
31
|
+
"""
|
|
32
|
+
def __init__(self, com_object) -> None:
|
|
33
|
+
self.com_object = win32com.client.Dispatch(com_object)
|
|
34
|
+
|
|
35
|
+
@property
|
|
36
|
+
def active(self) -> bool:
|
|
37
|
+
return self.com_object.Active
|
|
38
|
+
|
|
39
|
+
@active.setter
|
|
40
|
+
def active(self, value: bool):
|
|
41
|
+
self.com_object.Active = value
|
|
42
|
+
|
|
43
|
+
@property
|
|
44
|
+
def bus_type(self) -> int:
|
|
45
|
+
return self.com_object.BusType
|
|
46
|
+
|
|
47
|
+
@bus_type.setter
|
|
48
|
+
def bus_type(self, value: int):
|
|
49
|
+
self.com_object.BusType = value
|
|
50
|
+
|
|
51
|
+
@property
|
|
52
|
+
def can_settings(self) -> 'McCANSettings':
|
|
53
|
+
return McCANSettings(self.com_object.CANSettings)
|
|
54
|
+
|
|
55
|
+
@property
|
|
56
|
+
def check_eprom_identifier(self) -> bool:
|
|
57
|
+
return self.com_object.CheckEPROMIdentifier
|
|
58
|
+
|
|
59
|
+
@property
|
|
60
|
+
def connect_mode(self) -> int:
|
|
61
|
+
return self.com_object.ConnectMode
|
|
62
|
+
|
|
63
|
+
@connect_mode.setter
|
|
64
|
+
def connect_mode(self, value: int):
|
|
65
|
+
self.com_object.ConnectMode = value
|
|
66
|
+
|
|
67
|
+
@property
|
|
68
|
+
def connect_on_measurement_start(self) -> bool:
|
|
69
|
+
return self.com_object.ConnectOnMeasurementStart
|
|
70
|
+
|
|
71
|
+
@connect_on_measurement_start.setter
|
|
72
|
+
def connect_on_measurement_start(self, value: bool):
|
|
73
|
+
self.com_object.ConnectOnMeasurementStart = value
|
|
74
|
+
|
|
75
|
+
@property
|
|
76
|
+
def daq_timeout(self) -> int:
|
|
77
|
+
return self.com_object.DAQTimeout
|
|
78
|
+
|
|
79
|
+
@daq_timeout.setter
|
|
80
|
+
def daq_timeout(self, value: int):
|
|
81
|
+
self.com_object.DAQTimeout = value
|
|
82
|
+
|
|
83
|
+
@property
|
|
84
|
+
def disable_variable_updates(self) -> bool:
|
|
85
|
+
return self.com_object.DisableVariableUpdates
|
|
86
|
+
|
|
87
|
+
@disable_variable_updates.setter
|
|
88
|
+
def disable_variable_updates(self, value: bool):
|
|
89
|
+
self.com_object.DisableVariableUpdates = value
|
|
90
|
+
|
|
91
|
+
@property
|
|
92
|
+
def disconnect_on_measurement_stop(self) -> bool:
|
|
93
|
+
return self.com_object.DisconnectOnMeasurementStop
|
|
94
|
+
|
|
95
|
+
@disconnect_on_measurement_stop.setter
|
|
96
|
+
def disconnect_on_measurement_stop(self, value: bool):
|
|
97
|
+
self.com_object.DisconnectOnMeasurementStop = value
|
|
98
|
+
|
|
99
|
+
@property
|
|
100
|
+
def ethernet_settings(self) -> 'McEthernetSettings':
|
|
101
|
+
return McEthernetSettings(self.com_object.EthernetSettings)
|
|
102
|
+
|
|
103
|
+
@property
|
|
104
|
+
def flexray_settings(self) -> 'McFlexRaySettings':
|
|
105
|
+
return McFlexRaySettings(self.com_object.FlexRaySettings)
|
|
106
|
+
|
|
107
|
+
@property
|
|
108
|
+
def master_id(self) -> int:
|
|
109
|
+
return self.com_object.MasterID
|
|
110
|
+
|
|
111
|
+
@master_id.setter
|
|
112
|
+
def master_id(self, value: int):
|
|
113
|
+
self.com_object.MasterID = value
|
|
114
|
+
|
|
115
|
+
@property
|
|
116
|
+
def measurement_groups(self) -> str:
|
|
117
|
+
return self.com_object.MeasurementGroups
|
|
118
|
+
|
|
119
|
+
@property
|
|
120
|
+
def name(self) -> str:
|
|
121
|
+
return self.com_object.Name
|
|
122
|
+
|
|
123
|
+
@property
|
|
124
|
+
def number_of_connection_attempts(self) -> int:
|
|
125
|
+
return self.com_object.NumberOfConnectionAttempts
|
|
126
|
+
|
|
127
|
+
@property
|
|
128
|
+
def observer_active(self) -> bool:
|
|
129
|
+
return self.com_object.ObserverActive
|
|
130
|
+
|
|
131
|
+
@property
|
|
132
|
+
def page_switching_active(self) -> bool:
|
|
133
|
+
return self.com_object.PageSwitchingActive
|
|
134
|
+
|
|
135
|
+
@property
|
|
136
|
+
def protocol(self) -> int:
|
|
137
|
+
return self.com_object.Protocol
|
|
138
|
+
|
|
139
|
+
@property
|
|
140
|
+
def ram_page(self) -> int:
|
|
141
|
+
return self.com_object.RAMPage
|
|
142
|
+
|
|
143
|
+
@property
|
|
144
|
+
def reconnect_allowed_after_error(self) -> bool:
|
|
145
|
+
return self.com_object.ReconnectAllowedAfterError
|
|
146
|
+
|
|
147
|
+
@reconnect_allowed_after_error.setter
|
|
148
|
+
def reconnect_allowed_after_error(self, value: bool):
|
|
149
|
+
self.com_object.ReconnectAllowedAfterError = value
|
|
150
|
+
|
|
151
|
+
@property
|
|
152
|
+
def reset_variables_after_disconnect(self) -> bool:
|
|
153
|
+
return self.com_object.ResetVariablesAfterDisconnect
|
|
154
|
+
|
|
155
|
+
@reset_variables_after_disconnect.setter
|
|
156
|
+
def reset_variables_after_disconnect(self, value: bool):
|
|
157
|
+
self.com_object.ResetVariablesAfterDisconnect = value
|
|
158
|
+
|
|
159
|
+
@property
|
|
160
|
+
def response_timeout(self) -> int:
|
|
161
|
+
return self.com_object.ResponseTimeout
|
|
162
|
+
|
|
163
|
+
@response_timeout.setter
|
|
164
|
+
def response_timeout(self, value: int):
|
|
165
|
+
self.com_object.ResponseTimeout = value
|
|
166
|
+
|
|
167
|
+
@property
|
|
168
|
+
def seed_and_key_active(self) -> bool:
|
|
169
|
+
return self.com_object.SeedAndKeyActive
|
|
170
|
+
|
|
171
|
+
@seed_and_key_active.setter
|
|
172
|
+
def seed_and_key_active(self, value: bool):
|
|
173
|
+
self.com_object.SeedAndKeyActive = value
|
|
174
|
+
|
|
175
|
+
@property
|
|
176
|
+
def seed_and_key_active_cal(self) -> bool:
|
|
177
|
+
return self.com_object.SeedAndKeyActiveCAL
|
|
178
|
+
|
|
179
|
+
@seed_and_key_active_cal.setter
|
|
180
|
+
def seed_and_key_active_cal(self, value: bool):
|
|
181
|
+
self.com_object.SeedAndKeyActiveCAL = value
|
|
182
|
+
|
|
183
|
+
@property
|
|
184
|
+
def seed_and_key_file_name(self) -> str:
|
|
185
|
+
return self.com_object.SeedAndKeyFileName
|
|
186
|
+
|
|
187
|
+
@seed_and_key_file_name.setter
|
|
188
|
+
def seed_and_key_file_name(self, value: str):
|
|
189
|
+
self.com_object.SeedAndKeyFileName = value
|
|
190
|
+
|
|
191
|
+
@property
|
|
192
|
+
def seed_and_key_file_name_cal(self) -> str:
|
|
193
|
+
return self.com_object.SeedAndKeyFileNameCAL
|
|
194
|
+
|
|
195
|
+
@seed_and_key_file_name_cal.setter
|
|
196
|
+
def seed_and_key_file_name_cal(self, value: str):
|
|
197
|
+
self.com_object.SeedAndKeyFileNameCAL = value
|
|
198
|
+
|
|
199
|
+
@property
|
|
200
|
+
def seed_and_key_on_demand(self) -> bool:
|
|
201
|
+
return self.com_object.SeedAndKeyOnDemand
|
|
202
|
+
|
|
203
|
+
@seed_and_key_on_demand.setter
|
|
204
|
+
def seed_and_key_on_demand(self, value: bool):
|
|
205
|
+
self.com_object.SeedAndKeyOnDemand = value
|
|
206
|
+
|
|
207
|
+
@property
|
|
208
|
+
def use_ccp_v2_0(self) -> bool:
|
|
209
|
+
return self.com_object.UseCCP_V2_0
|
|
210
|
+
|
|
211
|
+
@use_ccp_v2_0.setter
|
|
212
|
+
def use_ccp_v2_0(self, value: bool):
|
|
213
|
+
self.com_object.UseCCP_V2_0 = value
|
|
214
|
+
|
|
215
|
+
@property
|
|
216
|
+
def use_daq_timestamps_of_ecu(self) -> bool:
|
|
217
|
+
return self.com_object.UseDAQTimestampsOfECU
|
|
218
|
+
|
|
219
|
+
@use_daq_timestamps_of_ecu.setter
|
|
220
|
+
def use_daq_timestamps_of_ecu(self, value: bool):
|
|
221
|
+
self.com_object.UseDAQTimestampsOfECU = value
|
|
222
|
+
|
|
223
|
+
@property
|
|
224
|
+
def use_daq_timestamps_of_ecu_div_operator(self) -> bool:
|
|
225
|
+
return self.com_object.UseDAQTimestampsOfECUDivOperator
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
class McCANSettings:
|
|
231
|
+
"""
|
|
232
|
+
The McCANSettings object contains all CAN related XCP/CCP settings.
|
|
233
|
+
"""
|
|
234
|
+
def __init__(self, com_object) -> None:
|
|
235
|
+
self.com_object = win32com.client.Dispatch(com_object)
|
|
236
|
+
|
|
237
|
+
@property
|
|
238
|
+
def app_channel(self) -> int:
|
|
239
|
+
return self.com_object.AppChannel
|
|
240
|
+
|
|
241
|
+
@property
|
|
242
|
+
def request_id(self) -> int:
|
|
243
|
+
return self.com_object.RequestID
|
|
244
|
+
|
|
245
|
+
@property
|
|
246
|
+
def response_id(self) -> int:
|
|
247
|
+
return self.com_object.ResponseID
|
|
248
|
+
|
|
249
|
+
@property
|
|
250
|
+
def use_bitrate_switc(self) -> bool:
|
|
251
|
+
return self.com_object.UseBitrateSwitch
|
|
252
|
+
|
|
253
|
+
@use_bitrate_switc.setter
|
|
254
|
+
def use_bitrate_switc(self, value: bool):
|
|
255
|
+
self.com_object.UseBitrateSwitch = value
|
|
256
|
+
|
|
257
|
+
@property
|
|
258
|
+
def use_can_fd(self) -> bool:
|
|
259
|
+
return self.com_object.UseCanFD
|
|
260
|
+
|
|
261
|
+
@use_can_fd.setter
|
|
262
|
+
def use_can_fd(self, value: bool):
|
|
263
|
+
self.com_object.UseCanFD = value
|
|
264
|
+
|
|
265
|
+
@property
|
|
266
|
+
def use_max_dlc(self) -> bool:
|
|
267
|
+
return self.com_object.UseMaxDLC
|
|
268
|
+
|
|
269
|
+
|
|
270
|
+
class McEthernetSettings:
|
|
271
|
+
"""
|
|
272
|
+
The McEthernetSettings object contains all Ethernet related XCP/CCP settings.
|
|
273
|
+
"""
|
|
274
|
+
def __init__(self, com_object) -> None:
|
|
275
|
+
self.com_object = win32com.client.Dispatch(com_object)
|
|
276
|
+
|
|
277
|
+
@property
|
|
278
|
+
def host(self) -> str:
|
|
279
|
+
return self.com_object.Host
|
|
280
|
+
|
|
281
|
+
@property
|
|
282
|
+
def port(self) -> int:
|
|
283
|
+
return self.com_object.Port
|
|
284
|
+
|
|
285
|
+
@property
|
|
286
|
+
def tcp(self) -> bool:
|
|
287
|
+
return self.com_object.Tcp
|
|
288
|
+
|
|
289
|
+
|
|
290
|
+
class McFlexRaySettings:
|
|
291
|
+
"""
|
|
292
|
+
The McFlexRaySettings object contains all FlexRay related XCP/CCP settings.
|
|
293
|
+
"""
|
|
294
|
+
def __init__(self, com_object) -> None:
|
|
295
|
+
self.com_object = win32com.client.Dispatch(com_object)
|
|
296
|
+
|
|
297
|
+
@property
|
|
298
|
+
def additional_buffer_count(self) -> int:
|
|
299
|
+
return self.com_object.AdditionalBufferCount
|
|
300
|
+
|
|
301
|
+
@property
|
|
302
|
+
def app_channel(self) -> int:
|
|
303
|
+
return self.com_object.AppChannel
|
|
304
|
+
|
|
305
|
+
@property
|
|
306
|
+
def dto_buffer(self) -> int:
|
|
307
|
+
return self.com_object.DtoBuffer
|
|
308
|
+
|
|
309
|
+
@property
|
|
310
|
+
def min_buffer_count(self) -> int:
|
|
311
|
+
return self.com_object.MinBufferCount
|
|
312
|
+
|
|
313
|
+
@property
|
|
314
|
+
def node_address(self) -> bool:
|
|
315
|
+
return self.com_object.NodeAddress
|
|
316
|
+
|
|
317
|
+
|
|
318
|
+
class McMeasurementGroups:
|
|
319
|
+
"""
|
|
320
|
+
The McMeasurementGroups object represents all sets of parameters and their measurement settings that can be activated for CCP/XCP measurements.
|
|
321
|
+
"""
|
|
322
|
+
def __init__(self, com_object) -> None:
|
|
323
|
+
self.com_object = win32com.client.Dispatch(com_object)
|
|
324
|
+
|
|
325
|
+
@property
|
|
326
|
+
def count(self) -> int:
|
|
327
|
+
return self.com_object.Count
|
|
328
|
+
|
|
329
|
+
def item(self, index: int) -> 'McMeasurementGroup':
|
|
330
|
+
return McMeasurementGroup(self.com_object.Item(index))
|
|
331
|
+
|
|
332
|
+
def add(self, name: str) -> 'McMeasurementGroup':
|
|
333
|
+
return McMeasurementGroup(self.com_object.Add(name))
|
|
334
|
+
|
|
335
|
+
def remove(self, index: int):
|
|
336
|
+
self.com_object.Remove(index)
|
|
337
|
+
|
|
338
|
+
|
|
339
|
+
class McMeasurementGroup:
|
|
340
|
+
"""
|
|
341
|
+
The McMeasurementGroup object represents a set of parameters and their measurement settings that can be activated for CCP/XCP measurements.
|
|
342
|
+
"""
|
|
343
|
+
def __init__(self, com_object) -> None:
|
|
344
|
+
self.com_object = win32com.client.Dispatch(com_object)
|
|
345
|
+
|
|
346
|
+
@property
|
|
347
|
+
def active(self) -> bool:
|
|
348
|
+
return self.com_object.Active
|
|
349
|
+
|
|
350
|
+
@property
|
|
351
|
+
def name(self) -> str:
|
|
352
|
+
return self.com_object.Name
|
|
353
|
+
|
|
354
|
+
@name.setter
|
|
355
|
+
def name(self, value: str):
|
|
356
|
+
self.com_object.Name = value
|
|
357
|
+
|
|
358
|
+
@property
|
|
359
|
+
def parameters(self) -> 'McParameters':
|
|
360
|
+
return McParameters(self.com_object.Parameters)
|
|
361
|
+
|
|
362
|
+
def activate(self):
|
|
363
|
+
self.com_object.Activate()
|
|
364
|
+
|
|
365
|
+
def begin_update(self):
|
|
366
|
+
self.com_object.BeginUpdate()
|
|
367
|
+
|
|
368
|
+
def end_update(self):
|
|
369
|
+
self.com_object.EndUpdate()
|
|
370
|
+
|
|
371
|
+
|
|
372
|
+
class McParameters:
|
|
373
|
+
"""
|
|
374
|
+
The McParameters object represents all parameters of the database.
|
|
375
|
+
"""
|
|
376
|
+
def __init__(self, com_object) -> None:
|
|
377
|
+
self.com_object = win32com.client.Dispatch(com_object)
|
|
378
|
+
|
|
379
|
+
@property
|
|
380
|
+
def count(self) -> int:
|
|
381
|
+
return self.com_object.Count
|
|
382
|
+
|
|
383
|
+
def item(self, index: int) -> 'McParameter':
|
|
384
|
+
return McParameter(self.com_object.Item(index))
|
|
385
|
+
|
|
386
|
+
|
|
387
|
+
class McParameter:
|
|
388
|
+
"""
|
|
389
|
+
The McParameter object represents a parameter of the database.
|
|
390
|
+
"""
|
|
391
|
+
def __init__(self, com_object) -> None:
|
|
392
|
+
self.com_object = win32com.client.Dispatch(com_object)
|
|
393
|
+
|
|
394
|
+
@property
|
|
395
|
+
def auto_read(self) -> bool:
|
|
396
|
+
return self.com_object.AutoRead
|
|
397
|
+
|
|
398
|
+
@auto_read.setter
|
|
399
|
+
def auto_read(self, value: bool):
|
|
400
|
+
self.com_object.AutoRead = value
|
|
401
|
+
|
|
402
|
+
@property
|
|
403
|
+
def configured(self) -> bool:
|
|
404
|
+
return self.com_object.Configured
|
|
405
|
+
|
|
406
|
+
@configured.setter
|
|
407
|
+
def configured(self, value: bool):
|
|
408
|
+
self.com_object.Configured = value
|
|
409
|
+
|
|
410
|
+
@property
|
|
411
|
+
def event_cycle(self) -> int:
|
|
412
|
+
return self.com_object.EventCycle
|
|
413
|
+
|
|
414
|
+
@event_cycle.setter
|
|
415
|
+
def event_cycle(self, value: int):
|
|
416
|
+
self.com_object.EventCycle = value
|
|
417
|
+
|
|
418
|
+
@property
|
|
419
|
+
def name(self) -> str:
|
|
420
|
+
return McECU(self.com_object.Name)
|
|
421
|
+
|
|
422
|
+
@property
|
|
423
|
+
def read_mode(self) -> int:
|
|
424
|
+
return self.com_object.ReadMode
|
|
425
|
+
|
|
426
|
+
@read_mode.setter
|
|
427
|
+
def read_mode(self, mode: int):
|
|
428
|
+
self.com_object.ReadMode = mode
|
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
from typing import TYPE_CHECKING
|
|
2
|
+
if TYPE_CHECKING:
|
|
3
|
+
from py_canoe.core.configuration import Configuration
|
|
4
|
+
|
|
5
|
+
import os
|
|
6
|
+
import win32com.client
|
|
7
|
+
|
|
8
|
+
from py_canoe.helpers.common import DoEventsUntil, logger, wait
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class MeasurementSetup:
|
|
12
|
+
"""
|
|
13
|
+
The MeasurementSetup object represents the Measurement Setup in CANoe.
|
|
14
|
+
"""
|
|
15
|
+
def __init__(self, meas_com_object) -> None:
|
|
16
|
+
self.com_object = win32com.client.Dispatch(meas_com_object)
|
|
17
|
+
|
|
18
|
+
@property
|
|
19
|
+
def animation_factor(self):
|
|
20
|
+
return self.com_object.AnimationFactor
|
|
21
|
+
|
|
22
|
+
@animation_factor.setter
|
|
23
|
+
def animation_factor(self, value: int):
|
|
24
|
+
self.com_object.AnimationFactor = value
|
|
25
|
+
|
|
26
|
+
@property
|
|
27
|
+
def bus_statistics(self):
|
|
28
|
+
return self.com_object.BusStatistics
|
|
29
|
+
|
|
30
|
+
@property
|
|
31
|
+
def logging_collection(self):
|
|
32
|
+
return LoggingCollection(self.com_object.LoggingCollection)
|
|
33
|
+
|
|
34
|
+
@property
|
|
35
|
+
def offline_source_root(self):
|
|
36
|
+
return self.com_object.OfflineSourceRoot
|
|
37
|
+
|
|
38
|
+
@property
|
|
39
|
+
def parallelization_level(self) -> int:
|
|
40
|
+
return self.com_object.ParallelizationLevel
|
|
41
|
+
|
|
42
|
+
@parallelization_level.setter
|
|
43
|
+
def parallelization_level(self, level: int):
|
|
44
|
+
self.com_object.ParallelizationLevel = level
|
|
45
|
+
|
|
46
|
+
@property
|
|
47
|
+
def source(self):
|
|
48
|
+
return self.com_object.Source
|
|
49
|
+
|
|
50
|
+
@property
|
|
51
|
+
def video_windows(self):
|
|
52
|
+
return self.com_object.VideoWindows
|
|
53
|
+
|
|
54
|
+
@property
|
|
55
|
+
def view_synchronization(self):
|
|
56
|
+
return self.com_object.ViewSynchronization
|
|
57
|
+
|
|
58
|
+
@property
|
|
59
|
+
def working_mode(self) -> int:
|
|
60
|
+
return self.com_object.WorkingMode
|
|
61
|
+
|
|
62
|
+
@working_mode.setter
|
|
63
|
+
def working_mode(self, mode: int):
|
|
64
|
+
self.com_object.WorkingMode = mode
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
class LoggingCollection:
|
|
68
|
+
"""
|
|
69
|
+
The LoggingCollection object is a collection of all Logging Blocks belonging to a Measurement Setup
|
|
70
|
+
"""
|
|
71
|
+
def __init__(self, logging_collection_com):
|
|
72
|
+
self.com_object = win32com.client.Dispatch(logging_collection_com)
|
|
73
|
+
|
|
74
|
+
@property
|
|
75
|
+
def count(self) -> int:
|
|
76
|
+
return int(self.com_object.Count)
|
|
77
|
+
|
|
78
|
+
def item(self, index: int) -> 'Logging':
|
|
79
|
+
return Logging(self.com_object.Item(index))
|
|
80
|
+
|
|
81
|
+
def add(self, full_name: str) -> 'Logging':
|
|
82
|
+
return Logging(self.com_object.Add(full_name))
|
|
83
|
+
|
|
84
|
+
def remove(self, index: int):
|
|
85
|
+
self.com_object.Remove(index)
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
class Logging:
|
|
89
|
+
"""
|
|
90
|
+
The Logging object represents a Logging Block in the Measurement Setup.
|
|
91
|
+
"""
|
|
92
|
+
def __init__(self, logging_com):
|
|
93
|
+
self.com_object = win32com.client.Dispatch(logging_com)
|
|
94
|
+
|
|
95
|
+
@property
|
|
96
|
+
def exporter(self) -> 'Exporter':
|
|
97
|
+
return Exporter(self.com_object.Exporter)
|
|
98
|
+
|
|
99
|
+
def file_name_options(self):
|
|
100
|
+
raise NotImplementedError("FileNameOptions access is not implemented yet.")
|
|
101
|
+
|
|
102
|
+
def filter(self):
|
|
103
|
+
raise NotImplementedError("FileNameOptions access is not implemented yet.")
|
|
104
|
+
|
|
105
|
+
@property
|
|
106
|
+
def full_name(self) -> str:
|
|
107
|
+
return self.com_object.FullName
|
|
108
|
+
|
|
109
|
+
@full_name.setter
|
|
110
|
+
def full_name(self, fullname: str):
|
|
111
|
+
self.com_object.FullName = fullname
|
|
112
|
+
|
|
113
|
+
@property
|
|
114
|
+
def trigger(self) -> "Trigger":
|
|
115
|
+
return Trigger(self.com_object.Trigger)
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
class Exporter:
|
|
119
|
+
"""
|
|
120
|
+
The Exporter object represents an export dialog, as it can be used in CANoe e.g. in a Logging Block in the Measurement Setup.
|
|
121
|
+
"""
|
|
122
|
+
def __init__(self, exporter_com):
|
|
123
|
+
self.com_object = win32com.client.Dispatch(exporter_com)
|
|
124
|
+
|
|
125
|
+
def destinations(self):
|
|
126
|
+
raise NotImplementedError("Destinations access is not implemented yet.")
|
|
127
|
+
|
|
128
|
+
@property
|
|
129
|
+
def filter(self) -> 'Filter':
|
|
130
|
+
return Filter(self.com_object.Filter)
|
|
131
|
+
|
|
132
|
+
@property
|
|
133
|
+
def messages(self) -> list['Message']:
|
|
134
|
+
messages_collection = Messages(self.com_object.Symbols)
|
|
135
|
+
messages = []
|
|
136
|
+
for i in range(1, messages_collection.count + 1):
|
|
137
|
+
messages.append(messages_collection.item(i))
|
|
138
|
+
return messages
|
|
139
|
+
|
|
140
|
+
def settings(self):
|
|
141
|
+
raise NotImplementedError("FileNameOptions access is not implemented yet.")
|
|
142
|
+
|
|
143
|
+
def sources(self):
|
|
144
|
+
raise NotImplementedError("FileNameOptions access is not implemented yet.")
|
|
145
|
+
|
|
146
|
+
@property
|
|
147
|
+
def symbols(self) -> list['ExporterSymbol']:
|
|
148
|
+
symbols_collection = ExporterSymbols(self.com_object.Symbols)
|
|
149
|
+
symbols = []
|
|
150
|
+
for i in range(1, symbols_collection.count + 1):
|
|
151
|
+
symbols.append(symbols_collection.item(i))
|
|
152
|
+
return symbols
|
|
153
|
+
|
|
154
|
+
def time_section(self):
|
|
155
|
+
raise NotImplementedError("TimeSection access is not implemented yet.")
|
|
156
|
+
|
|
157
|
+
def load(self):
|
|
158
|
+
self.com_object.Load()
|
|
159
|
+
|
|
160
|
+
def save(self, no_prompt_user: bool = True):
|
|
161
|
+
self.com_object.Save(noPromptUser=no_prompt_user)
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
class Messages:
|
|
165
|
+
"""
|
|
166
|
+
The Messages object represents a collection of messages.
|
|
167
|
+
"""
|
|
168
|
+
def __init__(self, messages_com):
|
|
169
|
+
self.com_object = win32com.client.Dispatch(messages_com)
|
|
170
|
+
|
|
171
|
+
@property
|
|
172
|
+
def count(self) -> int:
|
|
173
|
+
return int(self.com_object.Count)
|
|
174
|
+
|
|
175
|
+
def item(self, index: int) -> 'Message':
|
|
176
|
+
return Message(self.com_object.Item(index))
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
class Message:
|
|
180
|
+
"""
|
|
181
|
+
The Message object represents a single message
|
|
182
|
+
"""
|
|
183
|
+
def __init__(self, message_com):
|
|
184
|
+
self.com_object = win32com.client.Dispatch(message_com)
|
|
185
|
+
|
|
186
|
+
@property
|
|
187
|
+
def full_name(self) -> str:
|
|
188
|
+
return self.com_object.FullName
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
class ExporterSymbols:
|
|
192
|
+
"""
|
|
193
|
+
The ExporterSymbols object represents a collection of signals, system variables and bus statistics information, found in source files, loaded by the Exporter.
|
|
194
|
+
"""
|
|
195
|
+
def __init__(self, symbols_com):
|
|
196
|
+
self.com_object = win32com.client.Dispatch(symbols_com)
|
|
197
|
+
|
|
198
|
+
@property
|
|
199
|
+
def count(self) -> int:
|
|
200
|
+
return int(self.com_object.Count)
|
|
201
|
+
|
|
202
|
+
def item(self, index: int) -> 'ExporterSymbol':
|
|
203
|
+
return ExporterSymbol(self.com_object.Item(index))
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
class ExporterSymbol:
|
|
207
|
+
"""
|
|
208
|
+
The ExporterSymbol object represents a symbol (signal, system variable or bus statistics information), found in a source file, loaded by the Exporter.
|
|
209
|
+
"""
|
|
210
|
+
def __init__(self, message_com):
|
|
211
|
+
self.com_object = win32com.client.Dispatch(message_com)
|
|
212
|
+
|
|
213
|
+
@property
|
|
214
|
+
def full_name(self) -> str:
|
|
215
|
+
return self.com_object.FullName
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
class Filter:
|
|
219
|
+
"""
|
|
220
|
+
The Filter object represents a Pass Filter for messages and signals in usage with an exporter.
|
|
221
|
+
"""
|
|
222
|
+
def __init__(self, filter_com):
|
|
223
|
+
self.com_object = win32com.client.Dispatch(filter_com)
|
|
224
|
+
|
|
225
|
+
@property
|
|
226
|
+
def count(self) -> int:
|
|
227
|
+
return int(self.com_object.Count)
|
|
228
|
+
|
|
229
|
+
@property
|
|
230
|
+
def enabled(self) -> bool:
|
|
231
|
+
return self.com_object.Enabled
|
|
232
|
+
|
|
233
|
+
@enabled.setter
|
|
234
|
+
def enabled(self, enabled: bool):
|
|
235
|
+
self.com_object.Enabled = enabled
|
|
236
|
+
|
|
237
|
+
def item(self, index):
|
|
238
|
+
raise NotImplementedError("Item access is not implemented yet.")
|
|
239
|
+
|
|
240
|
+
def add(self, fullname: str):
|
|
241
|
+
self.com_object.Add(fullname)
|
|
242
|
+
|
|
243
|
+
def clear(self):
|
|
244
|
+
self.com_object.Clear()
|
|
245
|
+
|
|
246
|
+
def remove(self, index: int):
|
|
247
|
+
self.com_object.Remove(index)
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
class Trigger:
|
|
251
|
+
"""
|
|
252
|
+
The Trigger object represents the trigger block that is located before the Logging Block in the Measurement Setup.
|
|
253
|
+
"""
|
|
254
|
+
def __init__(self, trigger_com):
|
|
255
|
+
self.com_object = win32com.client.Dispatch(trigger_com)
|
|
256
|
+
|
|
257
|
+
@property
|
|
258
|
+
def active(self) -> bool:
|
|
259
|
+
return self.com_object.Active
|
|
260
|
+
|
|
261
|
+
@active.setter
|
|
262
|
+
def active(self, value: bool):
|
|
263
|
+
self.com_object.Active = value
|
|
264
|
+
|
|
265
|
+
def start(self):
|
|
266
|
+
self.com_object.Start()
|
|
267
|
+
|
|
268
|
+
def stop(self):
|
|
269
|
+
self.com_object.Stop()
|