pyxcp 0.23.2__cp311-cp311-macosx_11_0_arm64.whl → 0.23.4__cp311-cp311-macosx_11_0_arm64.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.

Potentially problematic release.


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

pyxcp/__init__.py CHANGED
@@ -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.23.2"
20
+ __version__ = "0.23.4"
Binary file
Binary file
@@ -31,7 +31,6 @@ DAQ_TIMESTAMP_SIZE = {
31
31
 
32
32
  class DaqProcessor:
33
33
  def __init__(self, daq_lists: List[DaqList]):
34
- # super().__init__()
35
34
  self.daq_lists = daq_lists
36
35
  self.log = get_application().log
37
36
 
Binary file
Binary file
pyxcp/transport/base.py CHANGED
@@ -222,6 +222,10 @@ class BaseTransport(metaclass=abc.ABCMeta):
222
222
  self.finish_listener()
223
223
  self.listener.join()
224
224
 
225
+ # Ensure the close event is cleared before starting a new listener thread.
226
+ if hasattr(self, "closeEvent"):
227
+ self.closeEvent.clear()
228
+
225
229
  self.listener = threading.Thread(target=self.listen)
226
230
  self.listener.start()
227
231
 
@@ -368,16 +372,16 @@ class BaseTransport(metaclass=abc.ABCMeta):
368
372
  self.timer_restart_event.set()
369
373
 
370
374
  def process_response(self, response: bytes, length: int, counter: int, recv_timestamp: int) -> None:
371
- if counter == self.counter_received:
372
- self.logger.warning(f"Duplicate message counter {counter} received from the XCP slave")
373
- if self._debug:
374
- self.logger.debug(f"<- L{length} C{counter} {hexDump(response[:512])}")
375
- return
376
- self.counter_received = counter
375
+ # Important: determine PID first so duplicate counter handling can be applied selectively.
377
376
  pid = response[0]
377
+
378
378
  if pid >= 0xFC:
379
+ # Do not drop RESPONSE/EVENT/SERV frames even if the transport counter repeats.
380
+ # Some slaves may reuse the counter while DAQ traffic is active, and we must not lose
381
+ # command responses; otherwise request() can stall until timeout.
379
382
  if self._debug:
380
383
  self.logger.debug(f"<- L{length} C{counter} {hexDump(response)}")
384
+ self.counter_received = counter
381
385
  if pid >= 0xFE:
382
386
  self.resQueue.append(response)
383
387
  with self.policy_lock:
@@ -391,6 +395,15 @@ class BaseTransport(metaclass=abc.ABCMeta):
391
395
  with self.policy_lock:
392
396
  self.policy.feed(types.FrameCategory.SERV, self.counter_received, self.timestamp.value, response)
393
397
  else:
398
+ # DAQ traffic: Some transports reuse or do not advance the counter for DAQ frames.
399
+ # Do not drop DAQ frames on duplicate counters to avoid losing measurements.
400
+ if counter == self.counter_received:
401
+ self.logger.debug(f"Duplicate message counter {counter} received (DAQ) - not dropping")
402
+ # DAQ still flowing – reset request timeout window to avoid false timeouts while
403
+ # the slave is busy but has not yet responded to a command.
404
+ self.timer_restart_event.set()
405
+ # Fall through and process the frame as usual.
406
+ self.counter_received = counter
394
407
  if self._debug:
395
408
  self.logger.debug(f"<- L{length} C{counter} ODT_Data[0:8] {hexDump(response[:8])}")
396
409
  if self.first_daq_timestamp is None:
@@ -399,6 +412,9 @@ class BaseTransport(metaclass=abc.ABCMeta):
399
412
  timestamp = recv_timestamp
400
413
  else:
401
414
  timestamp = 0
415
+ # DAQ activity indicates the slave is alive/busy; keep extending the wait window for any
416
+ # outstanding request, similar to EV_CMD_PENDING behavior on stacks that don't emit it.
417
+ self.timer_restart_event.set()
402
418
  with self.policy_lock:
403
419
  self.policy.feed(types.FrameCategory.DAQ, self.counter_received, timestamp, response)
404
420
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: pyxcp
3
- Version: 0.23.2
3
+ Version: 0.23.4
4
4
  Summary: Universal Calibration Protocol for Python
5
5
  License: LGPLv3
6
6
  Keywords: automotive,ecu,xcp,asam,autosar
@@ -4,7 +4,7 @@ pyxcp/asamkeydll.sh,sha256=iema12sub6qNE0xAuzwGtx0FmkdaaOKoXalhrtWVaa8,57
4
4
  pyxcp/asamkeydll.c,sha256=l5RHYcEPY_Q07G-W5IjCq0xci8YfUR-3uYt84OOkOJI,2836
5
5
  pyxcp/constants.py,sha256=Yemk_Gi_m78EEU0v-sdGCAodb9dv_vqP969IU3izA2M,1113
6
6
  pyxcp/cmdline.py,sha256=EoN-_AJm0lz1egPzNcmIFO2Uqo4c0lBXSAB25Uc6N9Q,2441
7
- pyxcp/__init__.py,sha256=d4MeBvRnnWzPZjWHnab9epZrO1EbEx7BWRrp44wGN6k,527
7
+ pyxcp/__init__.py,sha256=IyyaS5_zWWbL0LDLYQGbYeYSk5m5OF7PdDajHj8cq_E,527
8
8
  pyxcp/types.py,sha256=XJxJUh9bK5Urfia8IHVLJ-NFgQACYBd_n73L-AaeZts,25158
9
9
  pyxcp/timing.py,sha256=hzeQZ3P7ij_bfskoVMi10Iv5S4i_6TQYfnB8PXTX6c4,1645
10
10
  pyxcp/utils.py,sha256=Ax3TNT4OotRdJs_MVz83i7gTinpbOWwPnNVIL9WYTW4,3402
@@ -13,13 +13,13 @@ pyxcp/errormatrix.py,sha256=cYcsJ11Qm39DPuaR4BJ9fMpS3Hkphd_ezIQOKjI-pQE,44586
13
13
  pyxcp/asam/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
14
14
  pyxcp/asam/types.py,sha256=V4wSCGI1pXn0EsBemDyaHTBgY2wkV_BeLShnDIGGgDE,2310
15
15
  pyxcp/daq_stim/stim.cpp,sha256=sABgEfbQlt5kXbzAsndyhaDFWRWTJw3jJlNfanIVrRs,164
16
- pyxcp/daq_stim/__init__.py,sha256=HAfOpn4yeb4DYNZHr6pzpFGHisXbKEytXJ6KUatDMTk,9328
16
+ pyxcp/daq_stim/__init__.py,sha256=Lm-FCoXyY6Y51571nAa4OA4LU50NqCYffj_cnryjir4,9299
17
17
  pyxcp/daq_stim/scheduler.cpp,sha256=2XW9PmxrJR8DfYMVszGwBX-KANVviwPcUNBvnjw5MlM,1443
18
18
  pyxcp/daq_stim/stim.hpp,sha256=1DwAhkY7XJN14aD2BxLJ4O1j4_a6RvpePIbAG1U8iOA,17904
19
- pyxcp/daq_stim/stim.cpython-310-darwin.so,sha256=RqFNsPbyPi8oHidN2ACHa6aPRQadF14q068jvjDhGKE,237576
19
+ pyxcp/daq_stim/stim.cpython-310-darwin.so,sha256=pE7imb11QMYyQv8HTO54EmnJrS5GsocxWJJT5vCPHyw,237784
20
20
  pyxcp/daq_stim/scheduler.hpp,sha256=H-kwyZBV3S8q6YlCq6OLUbaNXskyCOS4z3SRP32ikPY,1809
21
21
  pyxcp/daq_stim/stim_wrapper.cpp,sha256=7iL1-4BPavo5bfrph20Fvicn6HxGEZQqYLvdxniJBYU,1945
22
- pyxcp/daq_stim/stim.cpython-311-darwin.so,sha256=oN-S3od2B7sR4AiyS-Bg0l9gohjT7Ne5ouula-mTGF8,237656
22
+ pyxcp/daq_stim/stim.cpython-311-darwin.so,sha256=BH5vuWJS2JJsD1SBdfDSV-ze1_6YQ0ZHMzlukI4y3iE,237864
23
23
  pyxcp/daq_stim/optimize/__init__.py,sha256=joAKvAvlYQEi7VF2oVftn_ohgRO231wnc3e8fY231L4,2453
24
24
  pyxcp/daq_stim/optimize/binpacking.py,sha256=AZHABtAnzBVJ-MVUGLrxuAp_bAtv3C-gMxrXXXrgi-Y,1216
25
25
  pyxcp/transport/transport_wrapper.cpp,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -29,7 +29,7 @@ pyxcp/transport/base_transport.hpp,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3
29
29
  pyxcp/transport/__init__.py,sha256=wIeYkGygucYdXEzymJcDvimnwZgqJY8KRv7Mk__aUSU,428
30
30
  pyxcp/transport/usb_transport.py,sha256=27c19S67BMq1Eup6ViX-SiYpEq93bMTwe031RsE4Xm0,8130
31
31
  pyxcp/transport/can.py,sha256=uFPG_Caf1BwIo2pKheZLs0VfPth1KoEPxuKtI2qt9as,18250
32
- pyxcp/transport/base.py,sha256=i9VdWqGNqx5LMdFkD8SmmMQSRoDDXAjMRS3p6KD1A8E,15912
32
+ pyxcp/transport/base.py,sha256=_jjoTGEIbzxR5rsBbSmxnlvoUI-Kr4VomWhH58z4RBk,17074
33
33
  pyxcp/config/legacy.py,sha256=Uhu_6bp_W8yGmZ2s3TFzf8-5mGwLdeTss56BMYWpsZY,5100
34
34
  pyxcp/config/__init__.py,sha256=z9bXNb2Hp-h2ZtASCyGk3JWP3OGoOL5Hmvazl-L_ANE,45258
35
35
  pyxcp/tests/test_utils.py,sha256=gqv3bhhWfKKdKDkqnELqsOHCfpRRZwlReEy87Ya4Z2w,850
@@ -88,7 +88,7 @@ pyxcp/recorder/recorder.rst,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
88
88
  pyxcp/recorder/mio.hpp,sha256=emP4qMXTxOe1wRSkB_U0hgOVz4aMUgG5dqcCvNNkAjs,61632
89
89
  pyxcp/recorder/build_gcc.cmd,sha256=A1xt8AS7VZxjJq21VzX8cOT7wl9ap_AIXBWbcIEddCw,237
90
90
  pyxcp/recorder/writer.hpp,sha256=rNjtRTtJes5z-BzKR2K56P_Kvc9MEVQgycu8J0wKf1g,11284
91
- pyxcp/recorder/rekorder.cpython-310-darwin.so,sha256=_9fho09EvAI6zydNN-PFNkRADzMczO4caH0vh76m_pM,529744
91
+ pyxcp/recorder/rekorder.cpython-310-darwin.so,sha256=ibNGz9FIbkRqVm_uypRLTmMYDXk_slTGFX92NGJ_8zo,529952
92
92
  pyxcp/recorder/lz4hc.c,sha256=GhoLtpQF6ViHkhQ_TaLw9UCzSB_MO-fdflgjR_xFFfM,86829
93
93
  pyxcp/recorder/lz4.h,sha256=BkRLAtxukE15Z2yO0Pjrq-n6hw5W6jkGFR5f14MzpEU,45604
94
94
  pyxcp/recorder/rekorder.cpp,sha256=LtN3Ud_pigNZ70gJ5-tyFJZN-3PMDVwqbbH694--TxQ,1841
@@ -98,7 +98,7 @@ pyxcp/recorder/reader.hpp,sha256=rr9XZ_ciL6eF2_xEqyt9XYNqTIze9ytAsnf8uYukO9U,520
98
98
  pyxcp/recorder/__init__.py,sha256=jeTmKvfjIenxHxt7zn6HMjnDpuPQU0d9SdnYK_t3gdE,2850
99
99
  pyxcp/recorder/test_reko.py,sha256=sIM_BBY9sq1ZUTawoxmDzdtd5qHPT9w6eVYZoY4iFik,980
100
100
  pyxcp/recorder/build_clang.cmd,sha256=vIWwC1zF_WChakjfj8VaUCN6X8HwyqvGgFRdUub1TtE,174
101
- pyxcp/recorder/rekorder.cpython-311-darwin.so,sha256=EjeiXD_X-rt9sBfAbxrYnkVZCEMEIktJBaUnIVtgasw,529888
101
+ pyxcp/recorder/rekorder.cpython-311-darwin.so,sha256=yipq_IYZmbl9oZiQl3y2KMVDTwUZaR_eAj49pMO7y2Q,530096
102
102
  pyxcp/recorder/reco.py,sha256=SAO_XMKSBWHhdzxfkmV9ZoPvJjale4BGi8O9p5Sd_iE,8448
103
103
  pyxcp/recorder/setup.py,sha256=piwBqaIX6SY1CyjKlantmd3I_VS6rk56sELvmPguKNM,957
104
104
  pyxcp/recorder/rekorder.hpp,sha256=sWvRch9bVt6mmgrFHp5mwWhap7HoFG4geeb7UqEIzio,7638
@@ -118,11 +118,11 @@ pyxcp/cpp_ext/extension_wrapper.cpp,sha256=XHpMp0e1gNwAiNquAXuyd2fXnlqbEu5V7zCP_
118
118
  pyxcp/cpp_ext/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
119
119
  pyxcp/cpp_ext/helper.hpp,sha256=ONAsVupIqqmNDp8bgGWS0TfSYeCFkk3kwwZbbqsh0HQ,7813
120
120
  pyxcp/cpp_ext/bin.hpp,sha256=0CatarJ7jFewlg9EIxsDPxC4wnORHutx-1PLHpf9iqw,2457
121
- pyxcp/cpp_ext/cpp_ext.cpython-311-darwin.so,sha256=C9qO_m2DNXOuFNFd2gZQ0NnX-wD9geUR1g7fIgESKh0,321456
121
+ pyxcp/cpp_ext/cpp_ext.cpython-311-darwin.so,sha256=fzNGtnJwuLv2Ner1sg8quHySZ5yh4SqjHM0-I8oHqP8,321600
122
122
  pyxcp/cpp_ext/daqlist.hpp,sha256=Q1Gejo8i1rP2PzyUh4UHJ2z-kG0WNnkbBj7N8DAdzaM,7071
123
- pyxcp/cpp_ext/cpp_ext.cpython-310-darwin.so,sha256=qlnVkp7k-ci_gds4AynKJrN8drfwE1wuZwuZhne0cig,321376
124
- pyxcp-0.23.2.dist-info/RECORD,,
125
- pyxcp-0.23.2.dist-info/LICENSE,sha256=46mU2C5kSwOnkqkw9XQAJlhBL2JAf1_uCD8lVcXyMRg,7652
126
- pyxcp-0.23.2.dist-info/WHEEL,sha256=X6-NY9fCWtbM4tHMrme4ihtrUdAQgjDgPOLr1IYsKV8,134
127
- pyxcp-0.23.2.dist-info/entry_points.txt,sha256=LkHsEwubm30s4oiyCy0cKj6k97ALvQ6KjAVdyEcqu7g,358
128
- pyxcp-0.23.2.dist-info/METADATA,sha256=7lmeEiKcHTfPRCDm05kDoshM9ZhI9bRtenKb5pvDc0A,11688
123
+ pyxcp/cpp_ext/cpp_ext.cpython-310-darwin.so,sha256=5sPtzwLXzXBbJ2zI2kGk0gF83xnDHvKbt0XasjPfe1c,321520
124
+ pyxcp-0.23.4.dist-info/RECORD,,
125
+ pyxcp-0.23.4.dist-info/LICENSE,sha256=46mU2C5kSwOnkqkw9XQAJlhBL2JAf1_uCD8lVcXyMRg,7652
126
+ pyxcp-0.23.4.dist-info/WHEEL,sha256=X6-NY9fCWtbM4tHMrme4ihtrUdAQgjDgPOLr1IYsKV8,134
127
+ pyxcp-0.23.4.dist-info/entry_points.txt,sha256=LkHsEwubm30s4oiyCy0cKj6k97ALvQ6KjAVdyEcqu7g,358
128
+ pyxcp-0.23.4.dist-info/METADATA,sha256=hFSek7Gb_hDy_HhSaLoPqtKp1C8p44CMs9KFdKuge1g,11688
File without changes