Ok, so for exemple, I can create a variable<br><br><span style="font-family: courier new,monospace;">uint32_t mst;</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">....<br>
</span><span style="font-family: courier new,monospace;">//This time is
millisecond, right? for exemple, 2 ms?</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">mst = GETTIMESTAMP(0); </span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">....</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">mst = htols(mst);</span><br style="font-family: courier new,monospace;">
<br>and so sent from socket?<br>
<br><br><div class="gmail_quote">On Fri, Mar 26, 2010 at 11:40, Henning Rogge <span dir="ltr"><<a href="mailto:hrogge@googlemail.com">hrogge@googlemail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Am Freitag 26 März 2010 15:28:54 schrieb Airton Ishimori:<br>
<div class="im">> Hey,<br>
><br>
> In the last times, I have problem with olsrd execution, but this problem is<br>
> solucioned. Thanks the all peoples that help me.<br>
</div>How was the problem resolved ?<br>
<div class="im"><br>
> But now, I am have other challenge. How to serialize and deserialize<br>
> message in C to sent inside the network? Most specifically, int (size 32<br>
> bit and 16 bit) and float type?<br>
</div>For int/short just use "htonl/htons" for serialization and "ntohl/ntohs" for<br>
deserialization. I would NOT try to serialize floating points, that can be a<br>
real pain. OLSRd use a format defined in the RFC to encode vtimes into a<br>
single byte value.<br>
<div class="im"><br>
> Another question, the olsrd works with time in ms or seconds? and both<br>
> works with float type or int type?<br>
</div>Olsrd works with an internal circular time (based on gettimesofday()) measured<br>
in milliseconds. The scheduler makes sure that the time will only step forward<br>
and not backward.<br>
<br>
Henning<br>
<font color="#888888"><br>
--<br>
1) You can't win.<br>
2) You can't break even.<br>
3) You can't leave the game.<br>
— The Laws of Thermodynamics, summarized<br>
</font></blockquote></div><br>