Provide a generalized interface for transport log replay capabilities
@silverv đang làm issue này rồi.
Từ ngày 10/12/2022.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
There may be different means of recording and replaying transport logs for diagnostic purposes. One existing solution is pycyphal.transport.can.media.candump.CandumpMedia. The following requirements are common for all log replay pseudo-transports:
- Report the origin and final timestamps of the log file (min and max timestamp value).
- Report the number of transport frames in the log file.
- Report the current position of the replay cursor as:
- timestamp (origin timestamp initially);
- index of the transport frame (0 initially).
- Position the replay cursor immediately before:
- the specified time point;
- the specified frame index.
- Resume/pause the replay.
- Set the replay speed (1.0 is the default).
- Single-stepping: replay one frame (disregarding the timing) and pause.
- Report the name of the underlying resource (file path).
Note that estimation of the final timestamp and the total number of frames would often require full traversal of the log file, which may be very costly. The API should be designed with that cost in mind.
The existing CandumpMedia should implement this interface.
To facilitate the proper integration of the log replay capability into user-level software, it might be sensible to extend the pycyphal.transport.Transport interface with a new method that checks whether the transport in its current configuration is connected to a log file. If the transport is connected to a live network, the method would return nothing; otherwise, it would return an instance implementing this playback interface. Higher-level software will be able to benefit from it in the following manner:
- Yakut would be able to report the current progress via stderr and automatically exit when the file is fully replayed.
- A GUI tool like Yukon will be able to present the user with a nice UI like this:

One feature not covered here is the ability to scan the log file for all transport frames at once. This will be required by graphical tools to present the user with a high-level analysis of the log file contents (see the screenshot above): which ports are available, how the traffic intensity is distributed across the log file per port, whether there are transport errors or other noteworthy events, etc. There are at least two obvious ways to approach this:
-
Implement a dedicated method that returns an async iterator going over every recorded item frame in the log file. The items will be returned as instances of
pycyphal.transport.Capture. The caller will then handle them the same way captured traffic is handled: by feeding them into apycyphal.transport.Tracerinstance. -
Implement a cloning method that allows the caller to construct an independent copy of the entire transport fully detached from its original owner, then invoke
begin_capture()on that transport instance. The result would be identical to the above.
Relates to https://github.com/OpenCyphal/yakut/issues/1
@silverv @thirtytwobits FYI
- Ngôn ngữ chính
- Python
- Star
- 143
- Fork
- 110
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của OpenCyphal/pycyphal
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 48/100
OpenCyphal/pycyphal#396 ·
-
Add flush() functionalityĐang mởclass-feature domain-core help wanted severity-minor
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 38/100
OpenCyphal/pycyphal#339 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 35/100
OpenCyphal/pycyphal#338 · 3 bình luận ·
-
DiagnosticPublisher attempts to use the main asyncio event loop from worker threads (which fails)Đang mởclass-defect domain-core help wanted severity-major
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
OpenCyphal/pycyphal#336 ·
-
class-defect domain-core help wanted severity-minor
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 38/100
OpenCyphal/pycyphal#334 ·
Tất cả issue của OpenCyphal/pycyphal
Issue tương tự
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 86/100
py-econometrics/pyfixest#2072 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
~planning docs
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
Kromatic-Innovation/athenaeum#3084 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Bosch Room Thermostat II number entities offer -500 to 3000 °C setpoint limits and a -32768 to 32767 °C outdoor temperatureCó thể đã có người làm @zigpy-review-bot đã nhận hôm nay. Đang mởbot: code audit
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
zigpy/zha-device-handlers#5769 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 Nửa ngày Mức phù hợp với người mới 80/100
R0Y00/Xbox2Windows#254 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Kludex/python-multipart#375 ·
Maintainer thường phản hồi trong vòng 1 ngày