[Interop-dev] Network Topology JSON [was: OLSRd2 JSON APIs]

Nemesis (spam-protected)
Sun Nov 23 16:35:35 CET 2014


On 11/23/2014 04:28 PM, Henning Rogge wrote:
> On Sun, Nov 23, 2014 at 4:26 PM, Mitar <(spam-protected)> wrote:
>> > Hi!
>> >
>>>> >>> Should it be string, int, or float?
>>> >>
>>> >> Cost should be "int" in my opinion, makes post-processing easier.
>> >
>> > I think it is easier to cast to int on the consumer side where you can
>> > decide in various ways what you want to do with the value. I think this
>> > is just a transport format.
>> >
>> > How you map ETX to int?
> Multiplying it by a factor of X... for example multiplying by 1000.
>
> OLSR (both v1 and v2) doesn't use floating point numbers internally anyways.

JSON doesn't make a distinction between int or float, any valid number
is fine.

the jsoninfo plugin of olsr1 has this structure:

{
    "destinationIP": "10.150.0.3",
    "lastHopIP": "10.150.0.4",
    "linkQuality": 1.0,
    "neighborLinkQuality": 1.0,
    "tcEdgeCost": 1024,
    "validityTime": 284572
}

If i'm not wrong, tcEdgeCost is equal to linkQuality * 1024
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.funkfeuer.at/pipermail/interop-dev/attachments/20141123/f07fda6b/attachment.html>


More information about the Interop-dev mailing list