<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 11/23/2014 04:28 PM, Henning Rogge
wrote:<br>
</div>
<blockquote
cite="mid:CAGnRvupw8O334V+12VyMJXD8K__jTqh6tyeV4zV4b-+DhL6Y_w@mail.gmail.com"
type="cite">
<pre wrap="">On Sun, Nov 23, 2014 at 4:26 PM, Mitar <a moz-do-not-send="true" class="moz-txt-link-rfc2396E" href="mailto:mitar@tnode.com"><mitar@tnode.com></a> wrote:
</pre>
<blockquote type="cite" style="color: #000000;">
<pre wrap=""><span class="moz-txt-citetags">> </span>Hi!
<span class="moz-txt-citetags">></span>
</pre>
<blockquote type="cite" style="color: #000000;">
<blockquote type="cite" style="color: #000000;">
<pre wrap=""><span class="moz-txt-citetags">>>> </span>Should it be string, int, or float?
</pre>
</blockquote>
<pre wrap=""><span class="moz-txt-citetags">>></span>
<span class="moz-txt-citetags">>> </span>Cost should be "int" in my opinion, makes post-processing easier.
</pre>
</blockquote>
<pre wrap=""><span class="moz-txt-citetags">></span>
<span class="moz-txt-citetags">> </span>I think it is easier to cast to int on the consumer side where you can
<span class="moz-txt-citetags">> </span>decide in various ways what you want to do with the value. I think this
<span class="moz-txt-citetags">> </span>is just a transport format.
<span class="moz-txt-citetags">></span>
<span class="moz-txt-citetags">> </span>How you map ETX to int?
</pre>
</blockquote>
<pre wrap="">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.</pre>
</blockquote>
<br>
<font face="Helvetica, Arial, sans-serif">JSON <font
face="Helvetica, Arial, sans-serif">doesn't make a dis<font
face="Helvetica, Arial, sans-serif">tinction between int or
float, any <font face="Helvetica, Arial, sans-serif">valid
number is fine.<font face="Helvetica, Arial, sans-serif"><font
face="Helvetica, Arial, sans-serif"><font
face="Helvetica, Arial, sans-serif"><font
face="Helvetica, Arial, sans-serif"><font
face="Helvetica, Arial, sans-serif"><br>
<br>
<font face="Helvetica, Arial, sans-serif">the
jsoninfo plugin of olsr1 <font face="Helvetica,
Arial, sans-serif">has this structure</font>:<br>
<br>
</font></font></font></font></font></font></font></font></font></font>{<br>
"destinationIP": "10.150.0.3",<br>
"lastHopIP": "10.150.0.4",<br>
"linkQuality": 1.0,<br>
"neighborLinkQuality": 1.0,<br>
"tcEdgeCost": 1024,<br>
"validityTime": 284572<br>
}<br>
<br>
If i'm not wrong, tcEdgeCost is equal to linkQuality * 1024<br>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</body>
</html>