python-can doesn't appear to be using hardware timestamps with socketcan
還沒有人認領這個 Issue。
評估
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 新手友好度
- 35/100
- Issue 類型
- 缺陷
- 描述清晰度
- 基本清楚
- 活躍度
- 停滯
- 技術堆疊
- linux, python
研究方向
首先,在使用標準核心驅動程式的 Debian 12 上重現 candump -ta -H can1 與 python -m can.logger -c can1 之間的比較。檢查 SocketCAN 接收路徑和 logger 進入點,以確定時間戳記是如何取得的。完成標準是:在可用時使用硬體時間戳記,且擷取到的時序符合文件所述的行為;如果現有測試結構支援,還應包含回歸測試覆蓋。
由索引模型根據 Issue 內容生成。
描述
Describe the bug
To Reproduce
Run two captures at the same time, one using candump with hardware timestamps :
candump -ta -H can1
The other utilising python-can e.g. logger :
python -m can.logger -c can1
If you then dump the output into a spreadsheet and compare frames, the output is quite different. For example, on a cyclic message on our hardware, I can see the cycle with candump -H is stable +/- 5 microseconds. With the timestamps from python-can the variance seems to be +/- 900 microseconds.
Expected behavior
The python can docs say :
The timestamp field in a CAN message is a floating point number representing when the message was received since the epoch in seconds. Where possible this will be timestamped in hardware.
So I'd have expected the hardware timestamps to have been enabled as with candump -H.
Additional context
OS and version: Debian 12 (6.1.112-1)
Python version: 3.11
python-can version: 4.4.2
python-can interface/s (if applicable): Peak PCAN-USB X6
We're using the standard kernel drivers not peak's custom drivers.
Traceback and logs
- 主要語言
- Python
- 星號
- 1.6k
- 分支
- 700
- PR 合併指標
- 30 天內沒有已合併 PR
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
hardbyte/python-can 的其他 Issue
-
難度 2/5 1-3 小時 新手友好度 88/100
hardbyte/python-can#2103 ·
-
Unhashable type for Systec interface errors可能已有人在做 @giri256 於 84 天前認領。 未關閉bug
難度 1/5 1 小時以內 新手友好度 78/100
hardbyte/python-can#2077 · 1 則留言 · 1 個 reaction ·
-
bug
難度 1/5 1 小時以內 新手友好度 68/100
hardbyte/python-can#1922 · 1 個 reaction ·
-
Make socket binding exceptions more debugable可能已有人在做 @vonpanda 於 12 天前認領。 未關閉enhancement
難度 3/5 1-2 天 新手友好度 75/100
hardbyte/python-can#2104 ·
-
enhancement
難度 5/5 一週以上 新手友好度 30/100
hardbyte/python-can#2102 ·
查看 hardbyte/python-can 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 79/100
SACGF/variantgrid#2341 · 1 則留言 ·
維護者通常 1 天內回覆
-
難度 1/5 1 小時以內 新手友好度 88/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 78/100
維護者通常 2 天內回覆
-
comp/cli P3 type/security
難度 2/5 1-3 小時 新手友好度 68/100
NousResearch/hermes-agent#141420 · 1 則留言 ·
維護者通常 1 天內回覆
-
CKV_GCP_18 (GKEPublicControlPlane) passes when master_authorized_networks_config is absent, control plane is internet-reachable可能已有人在做 @Varshith-Kali 今天認領。 未關閉
難度 2/5 1-3 小時 新手友好度 76/100
bridgecrewio/checkov#7753 ·
維護者通常 1 天內回覆