pyxcp 0.22.27__tar.gz → 0.22.29__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of pyxcp might be problematic. Click here for more details.

Files changed (122) hide show
  1. {pyxcp-0.22.27 → pyxcp-0.22.29}/PKG-INFO +1 -1
  2. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyproject.toml +4 -8
  3. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/__init__.py +1 -1
  4. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/checksum.py +14 -4
  5. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/examples/run_daq.py +8 -1
  6. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/master/master.py +1 -2
  7. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/scripts/xcp_info.py +42 -8
  8. {pyxcp-0.22.27 → pyxcp-0.22.29}/CMakeLists.txt +0 -0
  9. {pyxcp-0.22.27 → pyxcp-0.22.29}/LICENSE +0 -0
  10. {pyxcp-0.22.27 → pyxcp-0.22.29}/README.md +0 -0
  11. {pyxcp-0.22.27 → pyxcp-0.22.29}/build_ext.py +0 -0
  12. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/aml/EtasCANMonitoring.a2l +0 -0
  13. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/aml/EtasCANMonitoring.aml +0 -0
  14. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/aml/XCP_Common.aml +0 -0
  15. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/aml/XCPonCAN.aml +0 -0
  16. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/aml/XCPonEth.aml +0 -0
  17. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/aml/XCPonFlx.aml +0 -0
  18. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/aml/XCPonSxI.aml +0 -0
  19. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/aml/XCPonUSB.aml +0 -0
  20. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/aml/ifdata_CAN.a2l +0 -0
  21. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/aml/ifdata_Eth.a2l +0 -0
  22. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/aml/ifdata_Flx.a2l +0 -0
  23. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/aml/ifdata_SxI.a2l +0 -0
  24. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/aml/ifdata_USB.a2l +0 -0
  25. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/asam/__init__.py +0 -0
  26. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/asam/types.py +0 -0
  27. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/asamkeydll.c +0 -0
  28. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/asamkeydll.sh +0 -0
  29. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/cmdline.py +0 -0
  30. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/config/__init__.py +0 -0
  31. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/config/legacy.py +0 -0
  32. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/constants.py +0 -0
  33. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/cpp_ext/__init__.py +0 -0
  34. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/cpp_ext/bin.hpp +0 -0
  35. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/cpp_ext/blockmem.hpp +0 -0
  36. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/cpp_ext/daqlist.hpp +0 -0
  37. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/cpp_ext/event.hpp +0 -0
  38. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/cpp_ext/extension_wrapper.cpp +0 -0
  39. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/cpp_ext/helper.hpp +0 -0
  40. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/cpp_ext/mcobject.hpp +0 -0
  41. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/cpp_ext/tsqueue.hpp +0 -0
  42. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/daq_stim/__init__.py +0 -0
  43. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/daq_stim/optimize/__init__.py +0 -0
  44. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/daq_stim/optimize/binpacking.py +0 -0
  45. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/daq_stim/scheduler.cpp +0 -0
  46. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/daq_stim/scheduler.hpp +0 -0
  47. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/daq_stim/stim.cpp +0 -0
  48. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/daq_stim/stim.hpp +0 -0
  49. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/daq_stim/stim_wrapper.cpp +0 -0
  50. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/dllif.py +0 -0
  51. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/errormatrix.py +0 -0
  52. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/examples/conf_can.toml +0 -0
  53. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/examples/conf_can_user.toml +0 -0
  54. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/examples/conf_can_vector.json +0 -0
  55. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/examples/conf_can_vector.toml +0 -0
  56. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/examples/conf_eth.toml +0 -0
  57. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/examples/conf_nixnet.json +0 -0
  58. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/examples/conf_socket_can.toml +0 -0
  59. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/examples/conf_sxi.json +0 -0
  60. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/examples/conf_sxi.toml +0 -0
  61. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/examples/xcp_policy.py +0 -0
  62. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/examples/xcp_read_benchmark.py +0 -0
  63. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/examples/xcp_skel.py +0 -0
  64. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/examples/xcp_unlock.py +0 -0
  65. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/examples/xcp_user_supplied_driver.py +0 -0
  66. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/examples/xcphello.py +0 -0
  67. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/examples/xcphello_recorder.py +0 -0
  68. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/master/__init__.py +0 -0
  69. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/master/errorhandler.py +0 -0
  70. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/py.typed +0 -0
  71. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/recorder/__init__.py +0 -0
  72. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/recorder/build_clang.cmd +0 -0
  73. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/recorder/build_clang.sh +0 -0
  74. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/recorder/build_gcc.cmd +0 -0
  75. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/recorder/build_gcc.sh +0 -0
  76. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/recorder/build_gcc_arm.sh +0 -0
  77. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/recorder/converter/__init__.py +0 -0
  78. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/recorder/lz4.c +0 -0
  79. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/recorder/lz4.h +0 -0
  80. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/recorder/lz4hc.c +0 -0
  81. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/recorder/lz4hc.h +0 -0
  82. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/recorder/mio.hpp +0 -0
  83. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/recorder/reader.hpp +0 -0
  84. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/recorder/reco.py +0 -0
  85. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/recorder/recorder.rst +0 -0
  86. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/recorder/rekorder.cpp +0 -0
  87. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/recorder/rekorder.hpp +0 -0
  88. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/recorder/setup.py +0 -0
  89. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/recorder/test_reko.py +0 -0
  90. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/recorder/unfolder.hpp +0 -0
  91. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/recorder/wrap.cpp +0 -0
  92. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/recorder/writer.hpp +0 -0
  93. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/scripts/__init__.py +0 -0
  94. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/scripts/pyxcp_probe_can_drivers.py +0 -0
  95. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/scripts/xcp_examples.py +0 -0
  96. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/scripts/xcp_fetch_a2l.py +0 -0
  97. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/scripts/xcp_id_scanner.py +0 -0
  98. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/scripts/xcp_profile.py +0 -0
  99. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/scripts/xmraw_converter.py +0 -0
  100. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/stim/__init__.py +0 -0
  101. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/tests/test_asam_types.py +0 -0
  102. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/tests/test_binpacking.py +0 -0
  103. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/tests/test_can.py +0 -0
  104. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/tests/test_checksum.py +0 -0
  105. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/tests/test_daq.py +0 -0
  106. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/tests/test_frame_padding.py +0 -0
  107. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/tests/test_master.py +0 -0
  108. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/tests/test_transport.py +0 -0
  109. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/tests/test_utils.py +0 -0
  110. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/timing.py +0 -0
  111. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/transport/__init__.py +0 -0
  112. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/transport/base.py +0 -0
  113. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/transport/base_transport.hpp +0 -0
  114. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/transport/can.py +0 -0
  115. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/transport/eth.py +0 -0
  116. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/transport/sxi.py +0 -0
  117. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/transport/transport_wrapper.cpp +0 -0
  118. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/transport/usb_transport.py +0 -0
  119. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/types.py +0 -0
  120. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/utils.py +0 -0
  121. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/vector/__init__.py +0 -0
  122. {pyxcp-0.22.27 → pyxcp-0.22.29}/pyxcp/vector/map.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: pyxcp
3
- Version: 0.22.27
3
+ Version: 0.22.29
4
4
  Summary: Universal Calibration Protocol for Python
5
5
  License: LGPLv3
6
6
  Keywords: automotive,ecu,xcp,asam,autosar
@@ -4,7 +4,7 @@ requires = ["poetry-core>=1.0.0", "pybind11>=2.12.0", "pybind11[global]>=2.12.0
4
4
  build-backend = "poetry.core.masonry.api"
5
5
 
6
6
 
7
- [tool.poetry.dev-dependencies]
7
+ [tool.poetry.group.dev.dependencies]
8
8
  Pygments = ">=2.10.0"
9
9
  bandit = ">=1.7.4"
10
10
  black = ">=21.10b0"
@@ -18,7 +18,6 @@ isort = ">=5.10.1"
18
18
  mypy = ">=0.930"
19
19
  pep8-naming = ">=0.12.1"
20
20
  pre-commit = ">=2.16.0"
21
- pre-commit-hooks = ">=4.1.0"
22
21
  pytest = ">=6.2.5"
23
22
  pyupgrade = ">=2.29.1"
24
23
  safety = ">=1.10.3"
@@ -28,6 +27,8 @@ sphinx-click = ">=3.0.2"
28
27
  typeguard = ">=2.13.3"
29
28
  xdoctest = {extras = ["colors"], version = ">=0.15.10"}
30
29
  myst-parser = {version = ">=0.16.1"}
30
+ ruff = "^0.1.0"
31
+ pre-commit-hooks = "^4.6.0"
31
32
 
32
33
  [project]
33
34
  name = "pyxcp"
@@ -36,7 +37,7 @@ dynamic = ["license", "readme", "authors", "requires-python", "description", "cl
36
37
  [tool.poetry]
37
38
  authors = ["Christoph Schueler <cpu.gems@googlemail.com>"]
38
39
  name = "pyxcp"
39
- version = "0.22.27"
40
+ version = "0.22.29"
40
41
  readme = "README.md"
41
42
  description = "Universal Calibration Protocol for Python"
42
43
  keywords = ["automotive", "ecu", "xcp", "asam", "autosar"]
@@ -85,16 +86,11 @@ rich = "^13.6.0"
85
86
  chardet = "^5.2.0"
86
87
  traitlets = "<=5.11.2"
87
88
  line-profiler-pycharm = "^1.1.0"
88
-
89
89
  toml = "^0.10.2"
90
90
  bandit = "^1.7.8"
91
91
  tomlkit = "^0.12.5"
92
92
  pytz = "^2024.1"
93
- [tool.poetry.group.dev.dependencies]
94
- ruff = "^0.1.0"
95
93
 
96
- pre-commit-hooks = "^4.6.0"
97
- darglint = "^1.8.1"
98
94
  [tool.poetry.scripts]
99
95
  pyxcp-probe-can-drivers = "pyxcp.scripts.pyxcp_probe_can_drivers:main"
100
96
  xcp-id-scanner = "pyxcp.scripts.xcp_id_scanner:main"
@@ -17,4 +17,4 @@ tb_install(show_locals=True, max_frames=3) # Install custom exception handler.
17
17
 
18
18
  # if you update this manually, do not forget to update
19
19
  # .bumpversion.cfg and pyproject.toml.
20
- __version__ = "0.22.27"
20
+ __version__ = "0.22.29"
@@ -3,6 +3,7 @@
3
3
 
4
4
  .. [1] XCP Specification, BUILD_CHECKSUM service.
5
5
  """
6
+
6
7
  import enum
7
8
  import struct
8
9
  import zlib
@@ -641,7 +642,15 @@ def adder(modulus):
641
642
  return add
642
643
 
643
644
 
644
- def wordSum(modulus, step):
645
+ def pad_to_word_size(frame: bytes, word_size: int, padding_value=b"\x00") -> bytes:
646
+ padding_bytes = word_size - (len(frame) % word_size)
647
+ if padding_bytes == word_size:
648
+ return frame
649
+ else:
650
+ return frame + (padding_value * padding_bytes)
651
+
652
+
653
+ def wordSum(modulus: int, step: int) -> int:
645
654
  """Factory function for (double-)word modulus sums
646
655
 
647
656
  Parameters
@@ -657,13 +666,14 @@ def wordSum(modulus, step):
657
666
  summation function
658
667
  """
659
668
 
660
- def add(frame):
669
+ def add(frame: bytes):
661
670
  if step == 2:
662
671
  mask = "<H"
663
672
  elif step == 4:
664
673
  mask = "<I"
665
674
  else:
666
675
  raise NotImplementedError("Only WORDs or DWORDs are supported.")
676
+ frame = pad_to_word_size(frame, step)
667
677
  x = [struct.unpack(mask, frame[x : x + step])[0] for x in range(0, len(frame), step)]
668
678
  return sum(x) % modulus
669
679
 
@@ -680,7 +690,7 @@ CRC16 = Crc16(CRC16, 0x0000, 0x0000, True, True)
680
690
  CRC16_CCITT = Crc16(CRC16_CCITT, 0xFFFF, 0x0000, False, False)
681
691
 
682
692
 
683
- def CRC32(x):
693
+ def CRC32(x) -> int:
684
694
  return zlib.crc32(x) & 0xFFFFFFFF
685
695
 
686
696
 
@@ -703,7 +713,7 @@ ALGO = {
703
713
  }
704
714
 
705
715
 
706
- def check(frame, algo):
716
+ def check(frame: bytes, algo: str):
707
717
  """Calculate checksum using given algorithm
708
718
 
709
719
  Parameters
@@ -1,9 +1,11 @@
1
1
  #!/usr/bin/env python
2
2
 
3
+ import sys
3
4
  import time
4
5
 
5
6
  from pyxcp.cmdline import ArgumentParser
6
7
  from pyxcp.daq_stim import DaqList, DaqRecorder, DaqToCsv # noqa: F401
8
+ from pyxcp.types import XcpTimeoutError
7
9
 
8
10
 
9
11
  ap = ArgumentParser(description="DAQ test")
@@ -131,7 +133,12 @@ daq_parser = DaqToCsv(DAQ_LISTS) # Record to CSV file(s).
131
133
  # daq_parser = DaqRecorder(DAQ_LISTS, "run_daq", 2) # Record to ".xmraw" file.
132
134
 
133
135
  with ap.run(policy=daq_parser) as x:
134
- x.connect()
136
+ try:
137
+ x.connect()
138
+ except XcpTimeoutError:
139
+ print("TO")
140
+ sys.exit(2)
141
+
135
142
  if x.slaveProperties.optionalCommMode:
136
143
  x.getCommModeInfo()
137
144
 
@@ -113,6 +113,7 @@ class Master:
113
113
 
114
114
  def __enter__(self):
115
115
  """Context manager entry part."""
116
+ self.transport.connect()
116
117
  return self
117
118
 
118
119
  def __exit__(self, exc_type, exc_val, exc_tb):
@@ -171,8 +172,6 @@ class Master:
171
172
  more attempts to connect are silently ignored.
172
173
 
173
174
  """
174
- self.transport.connect()
175
-
176
175
  response = self.transport.request(types.Command.CONNECT, mode & 0xFF)
177
176
 
178
177
  # First get byte-order
@@ -9,6 +9,44 @@ from pyxcp.cmdline import ArgumentParser
9
9
  from pyxcp.types import TryCommandResult
10
10
 
11
11
 
12
+ def getPagInfo(x):
13
+ result = {}
14
+ if x.slaveProperties.supportsCalpag:
15
+ status, pag = x.try_command(x.getPagProcessorInfo)
16
+ if status == TryCommandResult.OK:
17
+ result["maxSegments"] = pag.maxSegments
18
+ result["pagProperties"] = {}
19
+ result["pagProperties"]["freezeSupported"] = pag.pagProperties.freezeSupported
20
+ result["segments"] = []
21
+ for i in range(pag.maxSegments):
22
+ segment = {}
23
+ status, std_info = x.try_command(x.getSegmentInfo, 0x01, i, 0, 0)
24
+ std_info = x.getSegmentInfo(0x01, i, 2, 0)
25
+ if status == TryCommandResult.OK:
26
+ segment["maxPages"] = std_info.maxPages
27
+ segment["addressExtension"] = std_info.addressExtension
28
+ segment["maxMapping"] = std_info.maxMapping
29
+ segment["compressionMethod"] = std_info.compressionMethod
30
+ segment["encryptionMethod"] = std_info.encryptionMethod
31
+
32
+ status, seg_address = x.try_command(x.getSegmentInfo, 0x00, i, 0, 0)
33
+ status, seg_length = x.try_command(x.getSegmentInfo, 0x00, i, 1, 0)
34
+
35
+ segment["address"] = seg_address.basicInfo
36
+ segment["length"] = seg_length.basicInfo
37
+
38
+ result["segments"].append(segment)
39
+
40
+ status, pgi = x.try_command(x.getPageInfo, i, 0)
41
+ # print("PAGE:", pgi)
42
+ # for j in range(si.maxPages):
43
+ # pgi = x.getPageInfo(i, j)
44
+ # print(pgi)
45
+ else:
46
+ break
47
+ return result
48
+
49
+
12
50
  def main():
13
51
  ap = ArgumentParser(description="XCP info/exploration tool.")
14
52
 
@@ -66,14 +104,10 @@ def main():
66
104
  print("\nPAG Info:")
67
105
  print("=========")
68
106
  if x.slaveProperties.supportsCalpag:
69
- status, pag = x.try_command(x.getPagProcessorInfo)
70
- if status == TryCommandResult.OK:
71
- print(pag)
72
- # for idx in range(pag.maxSegments):
73
- # x.getSegmentInfo(0x01, idx, 0, 0)
107
+ pgi = getPagInfo(x)
108
+ pprint(pgi)
74
109
  else:
75
110
  print("*** PAGING IS NOT SUPPORTED.")
76
-
77
111
  print("\nPGM Info:")
78
112
  print("=========")
79
113
  if x.slaveProperties.supportsPgm:
@@ -82,7 +116,6 @@ def main():
82
116
  print(pgm)
83
117
  else:
84
118
  print("*** FLASH PROGRAMMING IS NOT SUPPORTED.")
85
-
86
119
  if x.slaveProperties.transport_layer == "CAN":
87
120
  print("\nTransport-Layer CAN:")
88
121
  print("====================")
@@ -90,7 +123,8 @@ def main():
90
123
  if status == TryCommandResult.OK:
91
124
  print("CAN identifier for CMD/STIM:\n", res)
92
125
  else:
93
- print("*** GET_SLAVE_ID() IS NOT SUPPORTED.") # no response from bc address ???
126
+ pass
127
+ # print("*** GET_SLAVE_ID() IS NOT SUPPORTED.") # no response from bc address ???
94
128
 
95
129
  print("\nPer DAQ-list Identifier")
96
130
  print("-----------------------")
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes