[LinuxPPS] PPS next steps...
Rodolfo Giometti
giometti at enneenne.com
Mon Feb 9 10:55:49 CET 2009
On Fri, Feb 06, 2009 at 05:53:26PM -0500, George Spelvin wrote:
> >> Let me turn it around... what do you think "cat /dev/pps0" should do?
> >
> > It, eventually, should return pps0 raw data as byte stream.
>
> Great! Would you care to propose the byte stream so I can implement it?
> What is the word size and byte order? Is there any kind of inter-event
> marker, or does the reader just have to count bytes?
I don't need such byte stream, _you_ are the one which wish to use
read() method. :)
> >> Currently it returns -EINVAL.
> >
> > Which not break read(2) semantic at all. :)
>
> Well, given that I currently have poll(2) indicating that the fd is
> readable, I thought it would be nice if it were...
By ioctl().
> >> I'd like it to print something that cound be fed into perl or gnuplot.
> >
> > f you wish doing something like this, you can do a userland filter
> > which interprets PPS data and print out them into human readable form,
> > but you cannot ask the kernel to it for you since doing like this you
> > are implementing policies and not mechanism as old UNIX school
> > teach. :)
>
> Huh? I understand the distinction, but the details of a data format
> are not policy; what data is available is policy.
>
> For example, by changing the API so that timestamp fetching depends on
> read access and global parameter setting depends on write access, that
> provides a mechanism which allows the policy decision of who's allowed to
> use the PPS system ot be made in user space using familiar file permission
> settings.
Please, propose your patch but keep in mind read(2) semantic.
> The format can be translated. I just think that read(2) is a more
> convenient (although less portable) mechanism than the PPS API.
> The intent is for it to be equivalent.
I don't understand you: are telling to me that you wish to replace PPS
API in some way? =:-o
Ciao,
Rodolfo
--
GNU/Linux Solutions e-mail: giometti at enneenne.com
Linux Device Driver giometti at linux.it
Embedded Systems phone: +39 349 2432127
UNIX programming skype: rodolfo.giometti
More information about the LinuxPPS
mailing list