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
@@ -0,0 +1,29 @@
1
+ from typing import Union
2
+ from py_canoe.core.child_elements.variable import Variable
3
+
4
+
5
+ class Variables:
6
+ def __init__(self, com_object):
7
+ self.com_object = com_object
8
+
9
+ @property
10
+ def count(self):
11
+ return self.com_object.Count
12
+
13
+ def item(self, index: int) -> 'Variable':
14
+ return Variable(self.com_object.Item(index))
15
+
16
+ def add(self, name: str):
17
+ return self.com_object.Add(name)
18
+
19
+ def add_ex(self, name: str, initial_value: Union[int, float], min_value: Union[int, float], max_value: Union[int, float]):
20
+ return self.com_object.AddEx(name, initial_value, min_value, max_value)
21
+
22
+ def add_writeable(self, name: str, initial_value: Union[int, float]):
23
+ return self.com_object.AddWriteable(name, initial_value)
24
+
25
+ def add_writable_ex(self, name: str, initial_value: Union[int, float], min_value: Union[int, float] = None, max_value: Union[int, float] = None):
26
+ return self.com_object.AddWritableEx(name, initial_value, min_value, max_value)
27
+
28
+ def remove(self, variable):
29
+ return self.com_object.Remove(variable)
@@ -0,0 +1,15 @@
1
+ class VariablesFile:
2
+ def __init__(self, com_object):
3
+ self.com_object = com_object
4
+
5
+ @property
6
+ def full_name(self) -> str:
7
+ return self.com_object.FullName
8
+
9
+ @property
10
+ def name(self) -> str:
11
+ return self.com_object.Name
12
+
13
+ @property
14
+ def path(self) -> str:
15
+ return self.com_object.Path
@@ -0,0 +1,19 @@
1
+ from py_canoe.core.child_elements.variables_file import VariablesFile
2
+
3
+
4
+ class VariablesFiles:
5
+ def __init__(self, com_object):
6
+ self.com_object = com_object
7
+
8
+ @property
9
+ def count(self):
10
+ return self.com_object.Count
11
+
12
+ def item(self, index: int) -> VariablesFile:
13
+ return VariablesFile(self.com_object.Item(index))
14
+
15
+ def add(self, name: str):
16
+ return self.com_object.Add(name)
17
+
18
+ def remove(self, variable_file):
19
+ return self.com_object.Remove(variable_file)
@@ -0,0 +1,46 @@
1
+ import win32com.client
2
+
3
+
4
+ class VisualSequenceSetup:
5
+ def __init__(self, com_object):
6
+ self.com_object = com_object
7
+
8
+ @property
9
+ def visual_sequences(self) -> 'VisualSequences':
10
+ return VisualSequences(self.com_object.VisualSequences)
11
+
12
+
13
+ class VisualSequences:
14
+ def __init__(self, com_object):
15
+ self.com_object = com_object
16
+
17
+ @property
18
+ def count(self) -> int:
19
+ return self.com_object.Count
20
+
21
+ def item(self, index: int) -> 'VisualSequence':
22
+ return VisualSequence(self.com_object.Item(index))
23
+
24
+ def import_visual_sequence(self, name: str, file_name: str):
25
+ return self.com_object.Import(name, file_name)
26
+
27
+ def remove(self, index: int):
28
+ self.com_object.Remove(index)
29
+
30
+
31
+ class VisualSequence:
32
+ def __init__(self, com_object):
33
+ self.com_object = win32com.client.Dispatch(com_object)
34
+
35
+ @property
36
+ def name(self) -> str:
37
+ return self.com_object.Name
38
+
39
+ def is_running(self) -> bool:
40
+ return self.com_object.IsRunning()
41
+
42
+ def start(self):
43
+ self.com_object.Start()
44
+
45
+ def stop(self):
46
+ self.com_object.Stop()
@@ -0,0 +1,83 @@
1
+
2
+ import win32com.client
3
+ from .available_modules import AvailableModules
4
+ from .configured_modules import ConfiguredModules, ConfiguredChannel, ConfiguredModule
5
+ from .connected_modules import ConnectedModules
6
+ from .network_adapters import NetworkAdapters
7
+
8
+ class VTSystem:
9
+ """
10
+ Represents the VT System configuration in CANoe.
11
+ """
12
+ def __init__(self, vt_system_com_object) -> None:
13
+ self.com_object = win32com.client.Dispatch(vt_system_com_object)
14
+
15
+ @property
16
+ def available_modules(self) -> AvailableModules:
17
+ """Collection of known module types which can be added to VT System."""
18
+ return AvailableModules(self.com_object.AvailableModules)
19
+
20
+ @property
21
+ def configured_modules(self) -> ConfiguredModules:
22
+ """Collection of VT System modules currently configured in CANoe."""
23
+ return ConfiguredModules(self.com_object.ConfiguredModules)
24
+
25
+ @property
26
+ def connected_modules(self) -> ConnectedModules:
27
+ """Collection of VT System modules currently connected to the computer."""
28
+ return ConnectedModules(self.com_object.ConnectedModules)
29
+
30
+ @property
31
+ def module_description_folder(self) -> str:
32
+ """Absolute path to the folder where CANoe stores VT System module description files."""
33
+ return self.com_object.ModuleDescriptionFolder
34
+
35
+ @property
36
+ def network_adapters(self) -> NetworkAdapters:
37
+ """Collection of available network adapters for VT System communication."""
38
+ return NetworkAdapters(self.com_object.NetworkAdapters)
39
+
40
+ @property
41
+ def selected_network_adapter_id(self) -> int:
42
+ """ID of the network adapter used for VT System communication."""
43
+ return self.com_object.SelectedNetworkAdapterID
44
+
45
+ @selected_network_adapter_id.setter
46
+ def selected_network_adapter_id(self, value: int):
47
+ self.com_object.SelectedNetworkAdapterID = value
48
+
49
+ def adapt_to_hardware(self):
50
+ """Adapts the VT System configuration to the actually connected modules."""
51
+ self.com_object.AdaptToHardware()
52
+
53
+ def export_configuration(self, file_name: str):
54
+ """Exports the current VT System configuration to a VTCFG file."""
55
+ self.com_object.ExportConfiguration(file_name)
56
+
57
+ def import_configuration(self, file_name: str, mode: int):
58
+ """Imports a previously exported VTCFG file. Mode: 0=Merge, 1=Replace."""
59
+ self.com_object.ImportConfiguration(file_name, mode)
60
+
61
+ def import_module_description(self, file_name: str):
62
+ """Imports a module description XML file into CANoe."""
63
+ self.com_object.ImportModuleDescription(file_name)
64
+
65
+ def new_configuration_from_hardware(self):
66
+ """Creates a new configuration matching the currently connected VT System modules."""
67
+ self.com_object.NewConfigurationFromHardware()
68
+
69
+ def set_all_modules_offline(self):
70
+ """Switches all configured modules to offline mode."""
71
+ self.com_object.SetAllModulesOffline()
72
+
73
+ def set_all_modules_online(self):
74
+ """Switches all configured modules to online mode."""
75
+ self.com_object.SetAllModulesOnline()
76
+
77
+ def get_channel_by_name(self, channel_name: str) -> ConfiguredChannel:
78
+ """Returns a ConfiguredChannel object for the given channel name."""
79
+ return ConfiguredChannel(self.com_object.GetChannelByName(channel_name))
80
+
81
+ def get_module_by_name(self, module_name: str) -> ConfiguredModule:
82
+ """Returns a ConfiguredModule object for the given module name."""
83
+ return ConfiguredModule(self.com_object.GetModuleByName(module_name))
@@ -0,0 +1,21 @@
1
+ from py_canoe.core.child_elements.application_models import ApplicationModels
2
+ from py_canoe.core.child_elements.data_source import DataSource
3
+
4
+
5
+ class VttSutImportResult:
6
+ """
7
+ The VttSutImportResult object encapsulates the results of the import vVIRTUALtarget SUTs.
8
+ """
9
+ def __init__(self, com_object) -> None:
10
+ self.com_object = com_object
11
+
12
+ @property
13
+ def created_application_models(self) -> 'ApplicationModels':
14
+ return ApplicationModels(self.com_object.CreatedApplicationModels)
15
+
16
+ @property
17
+ def created_data_source(self) -> 'DataSource':
18
+ return DataSource(self.com_object.CreatedDataSource)
19
+
20
+ def success(self) -> bool:
21
+ return self.com_object.Success
@@ -0,0 +1,71 @@
1
+ from typing import Union
2
+
3
+ from py_canoe.helpers.common import logger
4
+
5
+
6
+ class Write:
7
+ def __init__(self, com_object):
8
+ self.com_object = com_object
9
+
10
+ @property
11
+ def text(self) -> Union[str, None]:
12
+ try:
13
+ text_data: str = self.com_object.Text
14
+ logger.info("๐Ÿ“– Text read successfully from write window")
15
+ for line in text_data.splitlines():
16
+ logger.info(f" {line}")
17
+ return text_data
18
+ except Exception as e:
19
+ logger.error(f"โŒ Error getting text from write window: {e}")
20
+ return None
21
+
22
+ def clear(self) -> bool:
23
+ try:
24
+ self.com_object.Clear()
25
+ logger.info("๐Ÿงน Write window cleared successfully")
26
+ return True
27
+ except Exception as e:
28
+ logger.error(f"โŒ Error clearing write window: {e}")
29
+ return False
30
+
31
+ def copy(self) -> bool:
32
+ try:
33
+ self.com_object.Copy()
34
+ logger.info("๐Ÿ“ท Write Window content copied to clipboard successfully")
35
+ return True
36
+ except Exception as e:
37
+ logger.error(f"โŒ Error copying write window content: {e}")
38
+ return False
39
+
40
+ def enable_output_file(self, output_file: str, tab_index=None) -> bool:
41
+ try:
42
+ if tab_index is not None:
43
+ self.com_object.EnableOutputFile(output_file, tab_index)
44
+ else:
45
+ self.com_object.EnableOutputFile(output_file)
46
+ logger.info(f"โœ”๏ธ Enabled write window output file: {output_file}")
47
+ return True
48
+ except Exception as e:
49
+ logger.error(f"โŒ Error enabling write window output file '{output_file}': {e}")
50
+ return False
51
+
52
+ def disable_output_file(self, tab_index=None) -> bool:
53
+ try:
54
+ if tab_index is not None:
55
+ self.com_object.DisableOutputFile(tab_index)
56
+ else:
57
+ self.com_object.DisableOutputFile()
58
+ logger.info("โน๏ธ Disabled write window output file")
59
+ return True
60
+ except Exception as e:
61
+ logger.error(f"โŒ Error disabling write window output file: {e}")
62
+ return False
63
+
64
+ def output(self, text: str) -> bool:
65
+ try:
66
+ self.com_object.Output(text)
67
+ logger.info(f"โœ๏ธ Text written in write window: {text}")
68
+ return True
69
+ except Exception as e:
70
+ logger.error(f"โŒ Error writing text in write window: {e}")
71
+ return False
@@ -0,0 +1,12 @@
1
+ import win32com.client
2
+
3
+ from py_canoe.core.child_elements.mc_ecus import McECUs
4
+
5
+
6
+ class XCPSetup:
7
+ def __init__(self, com_object) -> None:
8
+ self.com_object = com_object
9
+
10
+ @property
11
+ def mcus(self) -> 'McECUs':
12
+ return McECUs(self.com_object.MCUs)