OK, I've the ideas much more clear.
Thanks for your answer.
Joaquim Duran
2014/1/6 Tim Roberts <t...@probo.com>
> Joaquim Duran wrote:
> >
> > I'm new to this e-mail list. In the current project, I would like use
> > a 3rd party library to monitor the IO events on file descriptors,
> > including libusb library (I would like to use the reactor patter).
> >
> > To do the integration, I've the following questions:
> >
> > 1 - It is possible to get de file descriptor of a device handle
> > without calling to libusb_get_pollfds? I would like to get the FD for
> > a device handle and avoid to allocate dynamic memory.
>
> No. The whole FD list is an internal implementation detail. As the
> documentation tells you, there is not necessarily a single FD per
> device. You might get a set of FDs, and you need to poll for them all.
>
>
> > 2 - After calling polling/select system calls, it is possible to call
> > synchronous transfer functions to read or send data to the USB device?
>
> Not exactly. Remember that USB traffic never happens unless there is a
> pending request. A USB device cannot send data on its own, and it
> cannot signal that it is ready to receive. Everything starts with the
> host application/driver. What the poll lets you do is learn when a
> previously-submitted asynchronous request has completed.
>
> --
> Tim Roberts, t...@probo.com
> Providenza & Boekelheide, Inc.
>
>
>
> ------------------------------------------------------------------------------
> Rapidly troubleshoot problems before they affect your business. Most IT
> organizations don't have a clear picture of how application performance
> affects their revenue. With AppDynamics, you get 100% visibility into your
> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics
> Pro!
> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
> _______________________________________________
> libusbx-devel mailing list
> libusbx-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/libusbx-devel
>
------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
libusbx-devel mailing list
libusbx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libusbx-devel