gpsd-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gpsd-users] gps_read () message buffer


From: Charles Curley
Subject: Re: [gpsd-users] gps_read () message buffer
Date: Tue, 26 Feb 2019 17:35:50 -0700

On Tue, 26 Feb 2019 15:49:27 -0800
"Gary E. Miller" <address@hidden> wrote:

> Yo Charles!
> 
> On Tue, 26 Feb 2019 16:01:08 -0700
> Charles Curley <address@hidden> wrote:
> 
> > Having done a bit of sleuthing in the gpsd source, I think I have
> > some additional documentation for gps_read. See the attached diff.
> > 
> > Please check it for accuracy!  
> 
> The size of the buffer is not really important.  You just keep reading
> until there is no more to read.

Are we talking about the same buffer? I know that applies to the
contents of the gps_data_t structure. Does it also apply to the raw
data, e.g. JSON, that is delivered to message.

Also, if you read it multiple times to get the entire message, you have
to know a lot about the internal structure of the data. Which you
probably would if you wanted to do more than just display it. So
methinks specifying an optimal is a good idea.

I may play with that.

> 
> So there is not need for "at least 4096 bytes".  Although that is
> a suitable size.
> 
> > One request....
> > 
> > * I found the value for the size of the buffer by reading the source
> > for cgps, and tracking down where GPS_JSON_RESPONSE_MAX was defined,
> > in gps_json.h. That value is likely to grow in the future. Would you
> >   please provide a suitable #define in gps.h?  
> 
> What is wrong with GPS_JSON_RESPONSE_MAX?  You want to be several
> times larger so you emtpy the buffer in one call.

Nothing. I'd just like to bring it out where a) the client developer can
find it easily, and b) so the gpsd developers can change it if they
think it necessary.



-- 
"When we talk of civilization, we are too apt to limit the meaning of
the word to its mere embellishments, such as arts and sciences; but
the true distinction between it and barbarism is, that the one
presents a state of society under the protection of just and
well-administered law, and the other is left to the chance government
of brute force."
- The Rev. James White, Eighteen Christian Centuries, 1889
Key fingerprint = CE5C 6645 A45A 64E4 94C0  809C FFF6 4C48 4ECD DFDB
https://charlescurley.com



reply via email to

[Prev in Thread] Current Thread [Next in Thread]