Bug 28667

Summary: Patch to add time delta to logs and script for replaying via a named pipe.
Product: Gypsy Reporter: Tim Savage <tim.savage>
Component: GeneralAssignee: Ross Burton <ross>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: Time delta for logs and replay script
Time delta for logs and replay script 02

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.