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.
Files changed (123) hide show
  1. py_canoe/__init__.py +2 -1
  2. py_canoe/canoe.py +911 -0
  3. py_canoe/core/__init__.py +0 -0
  4. py_canoe/core/application.py +170 -0
  5. py_canoe/core/bus.py +301 -0
  6. py_canoe/core/capl.py +59 -0
  7. py_canoe/core/child_elements/__init__.py +0 -0
  8. py_canoe/core/child_elements/application_model.py +24 -0
  9. py_canoe/core/child_elements/application_model_file.py +21 -0
  10. py_canoe/core/child_elements/application_model_files.py +22 -0
  11. py_canoe/core/child_elements/application_model_setup.py +15 -0
  12. py_canoe/core/child_elements/application_models.py +22 -0
  13. py_canoe/core/child_elements/application_socket.py +11 -0
  14. py_canoe/core/child_elements/application_specific_module.py +24 -0
  15. py_canoe/core/child_elements/application_specific_modules.py +16 -0
  16. py_canoe/core/child_elements/audio_interface.py +28 -0
  17. py_canoe/core/child_elements/available_modules.py +22 -0
  18. py_canoe/core/child_elements/basic_module.py +19 -0
  19. py_canoe/core/child_elements/basic_modules.py +16 -0
  20. py_canoe/core/child_elements/c_libraries.py +28 -0
  21. py_canoe/core/child_elements/c_library.py +33 -0
  22. py_canoe/core/child_elements/can_controller.py +74 -0
  23. py_canoe/core/child_elements/capl_function.py +17 -0
  24. py_canoe/core/child_elements/ccp_setup.py +15 -0
  25. py_canoe/core/child_elements/channel.py +20 -0
  26. py_canoe/core/child_elements/channels.py +19 -0
  27. py_canoe/core/child_elements/communication_setup.py +23 -0
  28. py_canoe/core/child_elements/compile_result.py +22 -0
  29. py_canoe/core/child_elements/configured_channel.py +48 -0
  30. py_canoe/core/child_elements/configured_channels.py +21 -0
  31. py_canoe/core/child_elements/configured_module.py +82 -0
  32. py_canoe/core/child_elements/configured_modules.py +61 -0
  33. py_canoe/core/child_elements/connected_modules.py +14 -0
  34. py_canoe/core/child_elements/data_source.py +42 -0
  35. py_canoe/core/child_elements/data_source_file.py +21 -0
  36. py_canoe/core/child_elements/data_source_files.py +22 -0
  37. py_canoe/core/child_elements/data_source_issue.py +22 -0
  38. py_canoe/core/child_elements/data_source_issues.py +16 -0
  39. py_canoe/core/child_elements/data_source_setup.py +17 -0
  40. py_canoe/core/child_elements/data_sources.py +27 -0
  41. py_canoe/core/child_elements/database_setup.py +62 -0
  42. py_canoe/core/child_elements/device.py +34 -0
  43. py_canoe/core/child_elements/devices.py +13 -0
  44. py_canoe/core/child_elements/diagnostic.py +22 -0
  45. py_canoe/core/child_elements/diagnostic_request.py +59 -0
  46. py_canoe/core/child_elements/diagnostic_response.py +34 -0
  47. py_canoe/core/child_elements/diagnostic_responses.py +13 -0
  48. py_canoe/core/child_elements/diagnostics_setup.py +254 -0
  49. py_canoe/core/child_elements/distributed_mode.py +74 -0
  50. py_canoe/core/child_elements/encoding.py +27 -0
  51. py_canoe/core/child_elements/encodings.py +13 -0
  52. py_canoe/core/child_elements/environment_array.py +13 -0
  53. py_canoe/core/child_elements/environment_group.py +22 -0
  54. py_canoe/core/child_elements/environment_info.py +14 -0
  55. py_canoe/core/child_elements/environment_variable.py +55 -0
  56. py_canoe/core/child_elements/fdx_files.py +50 -0
  57. py_canoe/core/child_elements/file_group_data_source.py +17 -0
  58. py_canoe/core/child_elements/general_setup.py +66 -0
  59. py_canoe/core/child_elements/macros_setup.py +52 -0
  60. py_canoe/core/child_elements/mc_ecus.py +428 -0
  61. py_canoe/core/child_elements/measurement_setup.py +269 -0
  62. py_canoe/core/child_elements/modules.py +87 -0
  63. py_canoe/core/child_elements/most_disassembler.py +21 -0
  64. py_canoe/core/child_elements/most_network_interface.py +4 -0
  65. py_canoe/core/child_elements/namespace.py +21 -0
  66. py_canoe/core/child_elements/namespaces.py +19 -0
  67. py_canoe/core/child_elements/network.py +18 -0
  68. py_canoe/core/child_elements/network_adapters.py +13 -0
  69. py_canoe/core/child_elements/nodes.py +119 -0
  70. py_canoe/core/child_elements/open_configuration_result.py +0 -0
  71. py_canoe/core/child_elements/panel_setup.py +97 -0
  72. py_canoe/core/child_elements/participant.py +17 -0
  73. py_canoe/core/child_elements/participants.py +22 -0
  74. py_canoe/core/child_elements/ports.py +81 -0
  75. py_canoe/core/child_elements/replay_collection.py +56 -0
  76. py_canoe/core/child_elements/security_configuration.py +20 -0
  77. py_canoe/core/child_elements/security_setup.py +31 -0
  78. py_canoe/core/child_elements/signals.py +39 -0
  79. py_canoe/core/child_elements/simulation_setup.py +0 -0
  80. py_canoe/core/child_elements/single_file_data_source.py +13 -0
  81. py_canoe/core/child_elements/snippet_setup.py +68 -0
  82. py_canoe/core/child_elements/standalone_mode.py +0 -0
  83. py_canoe/core/child_elements/start_value_list.py +0 -0
  84. py_canoe/core/child_elements/symbol_mappings.py +0 -0
  85. py_canoe/core/child_elements/tcp_ip_stack_setting.py +0 -0
  86. py_canoe/core/child_elements/test_configurations.py +0 -0
  87. py_canoe/core/child_elements/test_environment.py +64 -0
  88. py_canoe/core/child_elements/test_environments.py +26 -0
  89. py_canoe/core/child_elements/test_module.py +213 -0
  90. py_canoe/core/child_elements/test_modules.py +23 -0
  91. py_canoe/core/child_elements/test_setup.py +16 -0
  92. py_canoe/core/child_elements/test_setup_folder_ext.py +36 -0
  93. py_canoe/core/child_elements/test_setup_folders.py +25 -0
  94. py_canoe/core/child_elements/user_files.py +0 -0
  95. py_canoe/core/child_elements/variable.py +144 -0
  96. py_canoe/core/child_elements/variable_events.py +14 -0
  97. py_canoe/core/child_elements/variables.py +29 -0
  98. py_canoe/core/child_elements/variables_file.py +15 -0
  99. py_canoe/core/child_elements/variables_files.py +19 -0
  100. py_canoe/core/child_elements/visual_sequence_setup.py +46 -0
  101. py_canoe/core/child_elements/vt_system.py +83 -0
  102. py_canoe/core/child_elements/vtt_sut_import_result.py +21 -0
  103. py_canoe/core/child_elements/write.py +71 -0
  104. py_canoe/core/child_elements/xcp_setup.py +12 -0
  105. py_canoe/core/configuration.py +509 -0
  106. py_canoe/core/environment.py +59 -0
  107. py_canoe/core/measurement.py +149 -0
  108. py_canoe/core/networks.py +103 -0
  109. py_canoe/core/performance.py +21 -0
  110. py_canoe/core/simulation.py +53 -0
  111. py_canoe/core/system.py +164 -0
  112. py_canoe/core/ui.py +53 -0
  113. py_canoe/core/version.py +54 -0
  114. py_canoe/helpers/__init__.py +0 -0
  115. py_canoe/helpers/common.py +78 -0
  116. {py_canoe-3.0.4.dist-info → py_canoe-26.0.2.dist-info}/METADATA +332 -322
  117. py_canoe-26.0.2.dist-info/RECORD +118 -0
  118. {py_canoe-3.0.4.dist-info → py_canoe-26.0.2.dist-info}/WHEEL +1 -1
  119. py_canoe/py_canoe.py +0 -2586
  120. py_canoe/py_canoe_utils/logging_collection.py +0 -345
  121. py_canoe/py_canoe_utils/py_canoe_logger.py +0 -29
  122. py_canoe-3.0.4.dist-info/LICENSE +0 -21
  123. py_canoe-3.0.4.dist-info/RECORD +0 -8
@@ -1,345 +0,0 @@
1
- """CANoe COM objects related to logging setup"""
2
-
3
- import logging
4
-
5
- import win32com
6
-
7
- logger = logging.getLogger('CANOE_LOG')
8
-
9
-
10
- class LoggingCollection:
11
- """Collection of all Logging Blocks of the current configuration."""
12
-
13
- def __init__(self, logging_collection_com):
14
- self._com = win32com.client.Dispatch(logging_collection_com)
15
-
16
- @property
17
- def count(self) -> int:
18
- """This property returns the number of objects inside the collection."""
19
- return int(self._com.Count)
20
-
21
- def item(self, index: int) -> "Logging":
22
- """This property returns an object from the collection."""
23
- return Logging(self._com.Item(index))
24
-
25
- def add(self, full_name: str) -> "Logging":
26
- """This method adds a logging block to the Measurement Setup.
27
-
28
- :param full_name: full path to log file as "C:/file.(asc|blf|mf4)", may have
29
- field functions like {IncMeasurement} in the file name
30
- """
31
- return Logging(self._com.Add(full_name))
32
-
33
- def remove(self, index: int):
34
- """This method removes a logging block (Logging) from a logging collection."""
35
- self._com.Remove(index)
36
-
37
-
38
- class Logging:
39
-
40
- """The Logging object represents a Logging Block in the current configuration.
41
-
42
- The filename extension of the logging file which is specified with this property
43
- determines the logging format. The full name can now also contain field functions;
44
- e.g. Logging.FullName = "LOGFILE_M{IncMeasurement}.ASC
45
-
46
- """
47
-
48
- def __init__(self, logging_com):
49
- self._com = win32com.client.Dispatch(logging_com)
50
-
51
- @property
52
- def exporter(self) -> "Exporter":
53
- """This property returns an Exporter object."""
54
- return Exporter(self._com.Exporter)
55
-
56
- def file_name_options(self):
57
- """This property returns a LoggingFileNameOptions object."""
58
- raise NotImplementedError("FileNameOptions access is not implemented yet.")
59
-
60
- def filter(self):
61
- """This property returns a LoggingFilter object."""
62
- raise NotImplementedError("FileNameOptions access is not implemented yet.")
63
-
64
- @property
65
- def full_name(self) -> str:
66
- """This property sets or determines the complete path to the logging file."""
67
- return self._com.FullName
68
-
69
- @full_name.setter
70
- def full_name(self, fullname: str):
71
- self._com.FullName = fullname
72
-
73
- @property
74
- def trigger(self) -> "Trigger":
75
- """This property returns a Trigger object."""
76
- return Trigger(self._com.Trigger)
77
-
78
-
79
- class Trigger:
80
-
81
- """Trigger block located before the Logging Block in the Measurement Setup."""
82
-
83
- def __init__(self, trigger_com):
84
- self._com = win32com.client.Dispatch(trigger_com)
85
-
86
- @property
87
- def active(self) -> bool:
88
- """This property sets or returns the status of the trigger."""
89
- return self._com.Active
90
-
91
- @active.setter
92
- def active(self, _active: bool):
93
- self._com.Active = _active
94
-
95
- def start(self):
96
- """This method starts the trigger."""
97
- self._com.Start()
98
-
99
- def stop(self):
100
- """This method stops the trigger."""
101
- self._com.Stop()
102
-
103
-
104
- class Exporter:
105
-
106
- """Export dialog.
107
-
108
- The Exporter object represents an export dialog, as it can
109
- be used e.g. in a Logging Block in the Measurement Setup.
110
-
111
- """
112
-
113
- def __init__(self, exporter_com):
114
- self._com = win32com.client.Dispatch(exporter_com)
115
-
116
- def destinations(self):
117
- """Returns a Files object for the destination files of an exporter.
118
-
119
- On the first access to the destination files of an exporter the Files object
120
- contains the destination file as it is defined in the according Export dialog.
121
-
122
- If no destination file is set a destination file is derived from the source
123
- file. Name and path of this destination file correspond to the name and path
124
- of the source file. The format is CSV. If as many destination files as source
125
- files are given, an according destination file will be generated for each
126
- source file (n to n).
127
-
128
- If the numbers of destination files and source files don't match, the number of
129
- destination files must be 1. All source files will be merged into the
130
- destination file (n to 1).
131
- """
132
- raise NotImplementedError("Destinations access is not implemented yet.")
133
-
134
- @property
135
- def filter(self) -> "Filter":
136
- """Returns a Filter object"""
137
- return Filter(self._com.Filter)
138
-
139
- @property
140
- def messages(self) -> list["Message"]:
141
- """Returns all messages that have been detected during loading.
142
-
143
- Consist of messages that come from the source files of an exporter
144
- and can be exported/converted.
145
-
146
- """
147
- messages_collection = Messages(self._com.Symbols)
148
- messages = []
149
- for i in range(1, messages_collection.count + 1):
150
- messages.append(messages_collection.item(i))
151
- return messages
152
-
153
- def settings(self):
154
- """Returns an ExporterSettings object."""
155
- raise NotImplementedError("FileNameOptions access is not implemented yet.")
156
-
157
- def sources(self):
158
- """Returns Files object for each source file of the exporter or offline source.
159
-
160
- On the first access to the source files of the exporter the Files object
161
- contains the source file as defined in the Export dialog.
162
-
163
- Typically this is the logging file as set in the Logging Block, as long as no
164
- other source file has been defined manually.
165
-
166
- """
167
- raise NotImplementedError("FileNameOptions access is not implemented yet.")
168
-
169
- @property
170
- def symbols(self) -> list["ExporterSymbol"]:
171
- """Returns all symbols that have been detected during loading the source files.
172
-
173
- This includes signals, system variables and bus statistics information
174
- that can be exported/converted.
175
-
176
- """
177
- symbols_collection = ExporterSymbols(self._com.Symbols)
178
- symbols = []
179
- for i in range(1, symbols_collection.count + 1):
180
- symbols.append(symbols_collection.item(i))
181
- return symbols
182
-
183
- def time_section(self):
184
- """Returns the TimeSection object."""
185
- raise NotImplementedError("TimeSection access is not implemented yet.")
186
-
187
- def load(self):
188
- """Loads source files of an exporter and determines the signals and messages.
189
-
190
- If several source files are set, all signals and messages of all
191
- source files are determined.
192
-
193
- """
194
- self._com.Load()
195
-
196
- def save(self, no_prompt_user: bool = True):
197
- """Starts the export/conversion.
198
-
199
- Although the parameter noPromptUser is set to True, the function will fail
200
- if a failure situation occurs and the storage cannot be performed. Possible
201
- failure situations are e.g. write-protection or disk full.
202
-
203
- """
204
- self._com.Save(noPromptUser=no_prompt_user)
205
-
206
-
207
- class Filter:
208
- """Represents a Pass Filter for messages and signals in usage with an exporter."""
209
-
210
- def __init__(self, filter_com):
211
- self._com = win32com.client.Dispatch(filter_com)
212
-
213
- @property
214
- def count(self) -> int:
215
- """This property returns the number of objects inside the collection."""
216
- return int(self._com.Count)
217
-
218
- @property
219
- def enabled(self) -> bool:
220
- """This property activates/deactivates a Filter object or returns its state.
221
-
222
- The initial value of this property is False.
223
-
224
- """
225
- return self._com.Enabled
226
-
227
- @enabled.setter
228
- def enabled(self, enabled: bool):
229
- self._com.Enabled = enabled
230
-
231
- def item(self, index):
232
- """This property returns an object from the collection."""
233
- raise NotImplementedError("Item access is not implemented yet.")
234
-
235
- def add(self, fullname: str):
236
- """This method adds a message or a signal to the explorer's filter.
237
-
238
- The Exporter object needs fully qualified names of all messages and signals
239
- that have to be taken into consideration during export or conversion:
240
-
241
- Messages:
242
- <DatabaseName>::<MessageName>
243
- Signals:
244
- <DatabaseName>::<MessageName>::<SignalName>
245
- System variables:
246
- <Namespace>::<SystemVariable>
247
- Environment variables:
248
- <DatabaseName>::<EnvironmentVariable>
249
-
250
- When performing a message-oriented conversion only messages, system variables
251
- and environment variables are taken into consideration. Any (even specified)
252
- signals will be ignored.
253
-
254
- When performing a signal-orientierted export messages, signals, system variables
255
- and environment variables are taken into consideration. All signals included in
256
- specified messages, system variables and environment variables will be
257
- exported as well.
258
-
259
- Besides using their symbolic name messages can be declared by using their
260
- numeric ID, which either can be decimal or hexadecimal.
261
-
262
- :param fullname: of the signal or message
263
-
264
- """
265
- self._com.Add(fullname)
266
-
267
- def clear(self):
268
- """This method clears all messages and signals of the filter."""
269
- self._com.Clear()
270
-
271
- def remove(self, index: int):
272
- """This method removes a message or a signal from the filter.
273
-
274
- :param index: number
275
-
276
- """
277
- self._com.Remove(index)
278
-
279
-
280
- class Messages:
281
-
282
- """Collection of messages."""
283
-
284
- def __init__(self, messages_com):
285
- self._com = win32com.client.Dispatch(messages_com)
286
-
287
- @property
288
- def count(self) -> int:
289
- """This property returns the number of objects inside the collection."""
290
- return int(self._com.Count)
291
-
292
- def item(self, index: int) -> "Message":
293
- """This property returns an object from the collection."""
294
- return Message(self._com.Item(index))
295
-
296
-
297
- class ExporterSymbols:
298
-
299
- """Collection of signals."""
300
-
301
- def __init__(self, symbols_com):
302
- self._com = win32com.client.Dispatch(symbols_com)
303
-
304
- @property
305
- def count(self) -> int:
306
- """This property returns the number of objects inside the collection."""
307
- return int(self._com.Count)
308
-
309
- def item(self, index: int) -> "ExporterSymbol":
310
- """This property returns an object from the collection."""
311
- return ExporterSymbol(self._com.Item(index))
312
-
313
-
314
- class Message:
315
-
316
- """The Message object represents a single message."""
317
-
318
- def __init__(self, message_com):
319
- self._com = win32com.client.Dispatch(message_com)
320
-
321
- @property
322
- def full_name(self) -> str:
323
- """This property determines the fully qualified name of a message.
324
-
325
- The following format is used: <DatabaseName>::<MessageName>
326
-
327
- """
328
- return self._com.FullName
329
-
330
-
331
- class ExporterSymbol:
332
-
333
- """Symbol (signal, system variable or bus statistics information).
334
-
335
- Found in a source file, loaded by the Exporter.
336
-
337
- """
338
-
339
- def __init__(self, message_com):
340
- self._com = win32com.client.Dispatch(message_com)
341
-
342
- @property
343
- def full_name(self) -> str:
344
- """This property returns the fully qualified symbol name."""
345
- return self._com.FullName
@@ -1,29 +0,0 @@
1
- # Import Python Libraries here
2
- import os
3
- import sys
4
- import logging
5
- from logging import handlers
6
-
7
-
8
- class PyCanoeLogger:
9
- """
10
- PyCanoeLogger is a class that provides logging functionality for the PyCanoe application.
11
- Args:
12
- py_canoe_log_dir (str): The directory path where the log files will be stored. Defaults to an empty string.
13
- """
14
-
15
- def __init__(self, py_canoe_log_dir='') -> None:
16
- self.log = logging.getLogger('CANOE_LOG')
17
- self.log.handlers.clear()
18
- self.log.propagate = False
19
- self.log.setLevel(logging.DEBUG)
20
- self.__log_format = logging.Formatter("%(asctime)s [CANOE_LOG] [%(levelname)-4.8s] %(message)s")
21
- self.__handler = logging.StreamHandler(sys.stdout)
22
- self.__handler.setFormatter(self.__log_format)
23
- self.log.addHandler(self.__handler)
24
- if py_canoe_log_dir != '' and not os.path.exists(py_canoe_log_dir):
25
- os.makedirs(py_canoe_log_dir, exist_ok=True)
26
- if os.path.exists(py_canoe_log_dir):
27
- file_handler = handlers.RotatingFileHandler(fr'{py_canoe_log_dir}\py_canoe.log', maxBytes=0, encoding='utf-8')
28
- file_handler.setFormatter(self.__log_format)
29
- self.log.addHandler(file_handler)
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2024 chaitu-ycr
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
@@ -1,8 +0,0 @@
1
- py_canoe/__init__.py,sha256=TqfIV0I02HGZkv2ArzkXKkpgvmMvAp4jiD81zKM-i34,35
2
- py_canoe/py_canoe.py,sha256=4lgVt4kMuGDMi_GpwPTV0QfwJXN2rdFHazluanTJWp8,115446
3
- py_canoe/py_canoe_utils/logging_collection.py,sha256=8K8e5PO5A9uHWPxWncAPiw_i0D4jFw55f5wKUta5LY0,11500
4
- py_canoe/py_canoe_utils/py_canoe_logger.py,sha256=IvdWZZgaD-KuSPOP6vTajE92WpFEfZGMzgwKdPHbvug,1265
5
- py_canoe-3.0.4.dist-info/LICENSE,sha256=JCIp9hcSQAXxMXuV9QX7nEz2H52MbwyRq0GcQj3CPNE,1086
6
- py_canoe-3.0.4.dist-info/METADATA,sha256=mkZ0CkhX61FJ_CYc9gZkS1TEcibRADTKvUmF-x2818U,10829
7
- py_canoe-3.0.4.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
8
- py_canoe-3.0.4.dist-info/RECORD,,