Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

Implement a configurable rate limit

未關閉
#2,048 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

評估

難度
4/5
預估耗時
3-5 天
新手友好度
48/100
Issue 類型
功能
描述清晰度
基本清楚
活躍度
冷清
技術堆疊
python

研究方向

首先追蹤 canopen 使用的 python-can 訊息傳送路徑,並檢查如何在不丟棄框架的情況下排程佇列中的訊息。完成的標誌是定義可設定的每秒訊息數限制,且佇列中的傳輸遵守要求的間隔。

由索引模型根據 Issue 內容生成。

描述

enhancement

I am using python-can (more specifically canopen) to send out messages to a bunch or nodes.

Issues seem to arise when I send a lot of packets at the same time, my assumption is that the recipients can not keep up with the frame stream, and thus packets are dropped.

My Idea is to implement some sort of rate limiting, for example by passing messages to a queue and having the library send out all queued messages with an interval inbetween.

Something like

queue = queue.Queue()

while True:
  msg = queue.get() # blocking
  transmit(msg)
  time.sleep(1 / self.max_messages_per_second)

Cheers!

主要語言
Python
星號
1.6k
分支
701
PR 合併指標
30 天內沒有已合併 PR

環境準備

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

hardbyte/python-can 的其他 Issue

查看 hardbyte/python-can 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。