[dss-developer] DS485 API: response callbacks don't fire

Hitz, Christian christian.hitz at aizo.com
Fri May 31 10:45:26 CEST 2013


Hi Dimitri,

Dimitri Janssens wrote:
> I ran into some problems while implementing an asynchronous interface towards the ds485 stack.
> First I register some callbacks.
> When they all return OK, I start scanning the bus for available devices.
>
> Some problems using the following example code:
> - the localBusStateCallback is used.
> - the localZoneDeviceCountAll is not used, yet I always receive synchronous answers (log sattements)
> - localDeviceInfoByIndex is not used, yet I always receive synchronous answers (log statements)
>
> Does anybody have some more experience with the asynchronous calls?

By default response callbacks are not triggered in the client doing the request. This is to avoid receiving
double responses (synchronous and by callback).

You can enable all callbacks by passing the PROMISCUOUS_MODE [1] flag to DsmApiOpen() (3rd argument).

Regards,
Christian

[1] https://gitorious.digitalstrom.org/ds485-stack/ds485-client/blobs/master/include/ds485-client-interface.h#line64

--
Christian Hitz                           aizo ag, Schlieren, Switzerland
Software Development                                 http://www.aizo.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://forum.digitalstrom.org/pipermail/dss-developer/attachments/20130531/861192a4/attachment.html>


More information about the dss-developer mailing list