Bug 28667 - Patch to add time delta to logs and script for replaying via a named pipe.
Summary: Patch to add time delta to logs and script for replaying via a named pipe.
Status: NEW
Alias: None
Product: Gypsy
Classification: Unclassified
Component: General (show other bugs)
Version: unspecified
Hardware: Other Linux (All)
: medium enhancement
Assignee: Ross Burton
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-22 04:44 UTC by Tim Savage
Modified: 2010-06-27 07:56 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Time delta for logs and replay script (6.27 KB, patch)
2010-06-22 04:44 UTC, Tim Savage
Details | Splinter Review
Time delta for logs and replay script 02 (8.12 KB, patch)
2010-06-27 07:56 UTC, Tim Savage
Details | Splinter Review

Description Tim Savage 2010-06-22 04:44:38 UTC
Created attachment 36416 [details] [review]
Time delta for logs and replay script

Patch to support optional time delta for logs (vital to produce a more accurate
replay of a log) and added python script for replaying the logs via a named
pipe.

Testing has been done with a generic USB tty based GPS with the logs replayed.
Comment 1 Ross Burton 2010-06-23 22:09:07 UTC
Thanks Tim.  I'll review this shortly.
Comment 2 Ross Burton 2010-06-24 02:54:27 UTC
+	pipe = open(options.pipe, 'w')

That creates a normal file.  Use os.mkfifo() to create a named pipe on disk and then stream the data through that.  This will avoid what is currently a delayed copy operation.
Comment 3 Tim Savage 2010-06-24 19:34:22 UTC
(In reply to comment #2)
> +    pipe = open(options.pipe, 'w')
> 
> That creates a normal file.  Use os.mkfifo() to create a named pipe on disk and
> then stream the data through that.  This will avoid what is currently a delayed
> copy operation.

The pipe I was using to test was originally created with os.mkfifo(). 

I will extend the script to do check for if a file exists, if so that it is a fifo and if not create the fifo with the os.mkfifo method.
Comment 4 Tim Savage 2010-06-27 07:56:25 UTC
Created attachment 36550 [details] [review]
Time delta for logs and replay script 02

Have attached an improved patch that checks specified fifo is valid.

Note this patch also extends the simple-gps-python.py to allow the baud rate to be set. Since my testing is with a serial over USB based GPS setting the baud rate is necessary.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.