pyxcp 0.23.3__cp310-cp310-win_arm64.whl → 0.23.4__cp310-cp310-win_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.3"
20
+ __version__ = "0.23.4"
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.3
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
@@ -1,4 +1,4 @@
1
- pyxcp/__init__.py,sha256=fVDaHDWZ31NkogpcyWKgMLiQBK356XczUnYPRUcrLAo,547
1
+ pyxcp/__init__.py,sha256=nzCciT2JSkYRVu-ITGnrOCESqGDQ3fgG6KnZxWKCqxc,547
2
2
  pyxcp/aml/EtasCANMonitoring.a2l,sha256=EJYwe3Z3H24vyWAa6lUgcdKnQY8pwFxjyCN6ZU1ST8w,1509
3
3
  pyxcp/aml/EtasCANMonitoring.aml,sha256=xl0DdyeiIaLW0mmmJNAyJS0CQdOLSxt9dxfgrdSlU8Y,2405
4
4
  pyxcp/aml/ifdata_CAN.a2l,sha256=NCUnCUEEgRbZYSLGtUGwL2e7zJ8hrp0SbmLHGv8uY58,612
@@ -24,19 +24,19 @@ pyxcp/constants.py,sha256=9yGfujC0ImTYQWfn41wyw8pluJTSrhMGWIVeIZTgsLg,1160
24
24
  pyxcp/cpp_ext/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
25
25
  pyxcp/cpp_ext/bin.hpp,sha256=PwJloZek21la-RBSda2Hc0u_6gID0sfTduPeplaAyR4,2561
26
26
  pyxcp/cpp_ext/blockmem.hpp,sha256=ysaJwmTWGTfE54Outk3gJYOfAVFd_QaonBMtXLcXwCc,1242
27
- pyxcp/cpp_ext/cpp_ext.cp310-win_arm64.pyd,sha256=8u_vLF_AbuYuRTkgxzcmkjDZP6rRfDdEnaP1z9REzpc,317440
27
+ pyxcp/cpp_ext/cpp_ext.cp310-win_arm64.pyd,sha256=7QxRN3JPIItrgePfnhJhy2b6FUzqo7xWxWCOkUYoB3o,317440
28
28
  pyxcp/cpp_ext/daqlist.hpp,sha256=g2hlxgoQorAGKHedZFZ0c2FQh1APMIA9sVB6M6hD_n8,7277
29
29
  pyxcp/cpp_ext/event.hpp,sha256=Z-1yxsEKsr81NnLVEWJ2ANA8FV7YsM7EbNxaw-elheE,1200
30
30
  pyxcp/cpp_ext/extension_wrapper.cpp,sha256=xFs3IcrvHPHA82-n11WPzt8HATGqcks02p84SjQ2BKM,4855
31
31
  pyxcp/cpp_ext/helper.hpp,sha256=ONAsVupIqqmNDp8bgGWS0TfSYeCFkk3kwwZbbqsh0HQ,7813
32
32
  pyxcp/cpp_ext/mcobject.hpp,sha256=A5GKcfjYMcfm3hfTQfFuS4JYNFTvfmzAcMXCe01GOs4,6429
33
33
  pyxcp/cpp_ext/tsqueue.hpp,sha256=FWMemzXNgV5dQ7gYmTCzC0QYfgl0VI9JCybYelBcCHU,1026
34
- pyxcp/daq_stim/__init__.py,sha256=2KsvP9RUV5gwFKTA1BBgsppAegR13ykrqjRtgY0zAx4,9560
34
+ pyxcp/daq_stim/__init__.py,sha256=Z4xyEko7VVCmzyRCHrtikN_Kcu905q3wD_3jYEm7qCQ,9530
35
35
  pyxcp/daq_stim/optimize/__init__.py,sha256=FUWK0GkNpNT-sUlhibp7xa2aSYpm6Flh5yA2w2IOJqg,2520
36
36
  pyxcp/daq_stim/optimize/binpacking.py,sha256=Iltho5diKlJG-ltbmx053U2vOFRlCISolXK61T14l_I,1257
37
37
  pyxcp/daq_stim/scheduler.cpp,sha256=NuNkAz3Dv849f51_T36YPck2dl-YsdDdG-cozc7XN9U,1504
38
38
  pyxcp/daq_stim/scheduler.hpp,sha256=U_6tUbebmzX5vVZS0EFSgTaPsyxMg6yRXHG_aPWA0x4,1884
39
- pyxcp/daq_stim/stim.cp310-win_arm64.pyd,sha256=ooOwgdYXKf49qaJDsAoRDyiiVyhp_wW5mXDFRdS57rA,215552
39
+ pyxcp/daq_stim/stim.cp310-win_arm64.pyd,sha256=qhkeXI3qXw29Le5BSqMjfNdVnJXZUuHdx0rjqyYgKB0,215552
40
40
  pyxcp/daq_stim/stim.cpp,sha256=F2OG67W4KKwTTiUCxm-9egIv3TLFdOkRunX6xf7YOtc,177
41
41
  pyxcp/daq_stim/stim.hpp,sha256=U-uInRrA6OCdMl1l1SWbQ_KEPpnNYrWut924IvbW6R0,18508
42
42
  pyxcp/daq_stim/stim_wrapper.cpp,sha256=iT2yxJ3LRG7HoYC1bwhM3tCAxF9X_HHierBNsLRmTJg,1995
@@ -78,7 +78,7 @@ pyxcp/recorder/mio.hpp,sha256=5ASJLKSEykH0deAQD5uak-_yAgd5p2n8t06315GSGrg,63346
78
78
  pyxcp/recorder/reader.hpp,sha256=rr9XZ_ciL6eF2_xEqyt9XYNqTIze9ytAsnf8uYukO9U,5201
79
79
  pyxcp/recorder/reco.py,sha256=6N6FIwfCEVMpi5dr3eUOQa1lowcg2LCnS_sy_-b-UiQ,8725
80
80
  pyxcp/recorder/recorder.rst,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
81
- pyxcp/recorder/rekorder.cp310-win_arm64.pyd,sha256=Z-A2wHEN9H8Ckfr-W8vJYzuRayrMTrV4F_hr0CjHWNc,415744
81
+ pyxcp/recorder/rekorder.cp310-win_arm64.pyd,sha256=DA8KfwlIVnyy5K8u5Ee0Rb-hrcCCjS0wI5qPENUYKro,415744
82
82
  pyxcp/recorder/rekorder.cpp,sha256=U0LMyk8pZXx9emgS_WPVthvn_9IpgE7JGrh4kg-8CX4,1900
83
83
  pyxcp/recorder/rekorder.hpp,sha256=sWvRch9bVt6mmgrFHp5mwWhap7HoFG4geeb7UqEIzio,7638
84
84
  pyxcp/recorder/setup.py,sha256=_99XFPQAd5V4LcJaSGJwdnbxgxJ7kl8DEXfHsnKO1Yg,998
@@ -107,7 +107,7 @@ pyxcp/tests/test_transport.py,sha256=vv7x7-rHPbmHc7BR8qcXx_Yy8STu1za1OzJmeuUSF14
107
107
  pyxcp/tests/test_utils.py,sha256=SrURAFc_6jtHng3PSZ5gpqXzVBVuPoMPB0YNvOvaIE0,880
108
108
  pyxcp/timing.py,sha256=zE6qPqOuidg6saNt7_zmbQgufxL9Id6akVYhAtpweQc,1705
109
109
  pyxcp/transport/__init__.py,sha256=31PaQLj76n5pXr68aJRWcYfrxEYWWgYoe9f_w3jZxsc,438
110
- pyxcp/transport/base.py,sha256=n_tCkebmpq3WXRZncOP5XWgUnSavaBBm3oGZhpeCF9U,16352
110
+ pyxcp/transport/base.py,sha256=M93HwtaFPHXbWCRLSrDaL987AvPl8AkZT3HSf3cjwtY,17530
111
111
  pyxcp/transport/base_transport.hpp,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
112
112
  pyxcp/transport/can.py,sha256=Sm2qu5JOSZ-f-PdgHVknTm1JTAH_L2DNxTxb5OJUCpI,18806
113
113
  pyxcp/transport/eth.py,sha256=xPzN2oSALoPKJVvZpBljPSV1AxfpjRusOzymO-TD1Rw,8711
@@ -118,8 +118,8 @@ pyxcp/types.py,sha256=mjp3FhsTTbS3D5VuC-dfdbMql0lJwEfbZjf8a2pHi1o,26158
118
118
  pyxcp/utils.py,sha256=_ag2QMt0IxVhiCLG5BIO8JzIGt-rdqYrY7DRAPQ4AtA,3530
119
119
  pyxcp/vector/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
120
120
  pyxcp/vector/map.py,sha256=7Gnhvr79geMeqqGVIJPxODXGwABdNDinnqzhpooN5TE,2306
121
- pyxcp-0.23.3.dist-info/entry_points.txt,sha256=LkHsEwubm30s4oiyCy0cKj6k97ALvQ6KjAVdyEcqu7g,358
122
- pyxcp-0.23.3.dist-info/LICENSE,sha256=fTqV5eBpeAZO0_jit8j4Ref9ikBSlHJ8xwj5TLg7gFk,7817
123
- pyxcp-0.23.3.dist-info/METADATA,sha256=wQmqlFOaiVIYsJGLg5m2M0aHyit3Ofwl7T1FEjWiWNg,11688
124
- pyxcp-0.23.3.dist-info/WHEEL,sha256=YcVHmHb0ucXmSRI9XXX3fw4lUpWDfwTXU94vb0cANsk,98
125
- pyxcp-0.23.3.dist-info/RECORD,,
121
+ pyxcp-0.23.4.dist-info/entry_points.txt,sha256=LkHsEwubm30s4oiyCy0cKj6k97ALvQ6KjAVdyEcqu7g,358
122
+ pyxcp-0.23.4.dist-info/LICENSE,sha256=fTqV5eBpeAZO0_jit8j4Ref9ikBSlHJ8xwj5TLg7gFk,7817
123
+ pyxcp-0.23.4.dist-info/METADATA,sha256=hFSek7Gb_hDy_HhSaLoPqtKp1C8p44CMs9KFdKuge1g,11688
124
+ pyxcp-0.23.4.dist-info/WHEEL,sha256=YcVHmHb0ucXmSRI9XXX3fw4lUpWDfwTXU94vb0cANsk,98
125
+ pyxcp-0.23.4.dist-info/RECORD,,
File without changes