<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style id="owaParaStyle" type="text/css">
<!--
p
        {margin-top:0;
        margin-bottom:0}
-->
</style><style type="text/css"></style><style type="text/css"></style>
</head>
<body style="word-wrap: break-word;" fpstyle="1" ocsi="0">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">
<div style="color: rgb(0, 0, 0); font-family: Calibri, sans-serif; font-size: 14px;">
Hi Dimitri,</div>
<div style="color: rgb(0, 0, 0); font-family: Calibri, sans-serif; font-size: 14px;">
<br>
</div>
<font face="Calibri, sans-serif"><span style="font-size: 14px;">Dimitri Janssens wrote:</span></font><br>
<div>
<div>
<div style="color: rgb(0, 0, 0); font-family: Arial; font-size: 10pt; direction: ltr;">
> I ran into some problems while implementing an asynchronous interface towards the ds485 stack.<br>
> First I register some callbacks.<br>
> When they all return OK, I start scanning the bus for available devices.<br>
> <br>
> Some problems using the following example code:<br>
> - the localBusStateCallback is used.<br>
> - the localZoneDeviceCountAll is not used, yet I always receive synchronous answers (log sattements)<br>
> - localDeviceInfoByIndex is not used, yet I always receive synchronous answers (log statements)<br>
><br>
> Does anybody have some more experience with the asynchronous calls?<br>
<br>
</div>
<div style="color: rgb(0, 0, 0); font-family: Arial; font-size: 10pt; direction: ltr;">
By default response callbacks are not triggered<span style="font-size: 10pt;"> in the client doing the request. This is to avoid receiving </span></div>
<div style="color: rgb(0, 0, 0); font-family: Arial; font-size: 10pt; direction: ltr;">
<span style="font-size: 10pt;">double responses (synchronous and by callback).</span></div>
<div style="color: rgb(0, 0, 0); font-family: Arial; font-size: 10pt; direction: ltr;">
<span style="font-size: 10pt;"><br>
</span></div>
<div style="direction: ltr;"><span style="color: rgb(0, 0, 0); font-family: Arial; font-size: 10pt;">You can enable all callbacks by passing the </span><font face="Arial">PROMISCUOUS_MODE [1] flag to DsmApiOpen() (3rd argument).</font></div>
<div style="direction: ltr;"><font face="Arial"><br>
</font></div>
<div style="direction: ltr;"><font face="Arial">Regards,</font></div>
<div style="direction: ltr;"><font face="Arial">Christian</font></div>
<div style="color: rgb(0, 0, 0); font-family: Arial; font-size: 10pt; direction: ltr;">
<span style="font-size: 10pt;"><br>
</span></div>
<div style="direction: ltr;"><span style="color: rgb(0, 0, 0); font-family: Arial; font-size: 10pt;">[1] </span><a href="https://gitorious.digitalstrom.org/ds485-stack/ds485-client/blobs/master/include/ds485-client-interface.h#line64" target="_blank" style="font-size: 10pt;">https://gitorious.digitalstrom.org/ds485-stack/ds485-client/blobs/master/include/ds485-client-interface.h#line64</a></div>
<div style="direction: ltr;"><br>
</div>
<div style="direction: ltr;">
<div style="direction: ltr;">-- </div>
<div style="direction: ltr;">Christian Hitz                           aizo ag, Schlieren, Switzerland</div>
<div style="direction: ltr;">Software Development                                 http://www.aizo.com</div>
</div>
</div>
</div>
</div>
</body>
</html>