[Olsr-dev] JSON info dump complete

Henning Rogge (spam-protected)
Fri May 11 07:52:48 CEST 2012


On 05/11/2012 04:46 AM, Hans-Christoph Steiner wrote:
> So far, I mostly just remixed the txtinfo and httpinfo code to produce valid
> JSON. Now its time to see what doesn't make sense anymore. Sounds like you found
> something :) Also, I'd really like to have this use key names that make sense
> and are descriptive, and have the data in a format that is standardized and easy
> to use. I don't know enough about these guts to know exactly how to do that, so
> I'm hoping for lots of feedback.
>
> I updated the "cost" data points to use the int directly, and I named the JSON
> keys after the variable names: linkCost, rtpMetricCost, tcEdgeCost, tcPathCost.
> Are these costs directly comparable? If so, then I'd name them all "cost".
>
> As for get_tc_edge_entry_text() and get_link_entry_text(), it seems that each
> lq_plugin implements the guts differently, some using floats, some ints. So I
> can't see how to handle that in a generic way.

As the name suggests, the output of both functions is a human readable 
STRING. Its supposed to be displayed to the user (in a webpage for 
example). That's why it makes sense to deliver both the "raw" integer 
value and the texts.

Henning Rogge

-- 
Diplom-Informatiker Henning Rogge , Fraunhofer-Institut für
Kommunikation, Informationsverarbeitung und Ergonomie FKIE
Kommunikationssysteme (KOM)
Neuenahrer Straße 20, 53343 Wachtberg, Germany
Telefon +49 228 9435-961,   Fax +49 228 9435 685
mailto:(spam-protected) http://www.fkie.fraunhofer.de
GPG: E1C6 0914 490B 3909 D944 F80D 4487 C67C 55EC CFE0

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 6156 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.olsr.org/pipermail/olsr-dev/attachments/20120511/aa0557be/attachment.bin>


More information about the Olsr-dev mailing list