[Pcsclite-muscle] IFD polling

William Roberts bill.c.roberts
Tue Feb 24 13:42:49 PST 2015


On Tue, Feb 24, 2015 at 11:51 AM, Ludovic Rousseau <
ludovic.rousseau at gmail.com> wrote:

> 2015-02-24 19:13 GMT+01:00 William Roberts <bill.c.roberts at gmail.com>:
> > The worst part to me is the timeout. Which gets us back to polling right?
>
> No.
> The timeout is 10 minutes in normal case or 5 seconds in case of auto
> power off [1] and then 10 minutes.
>
> You also need to support TAG_IFD_STOP_POLLING_THREAD so pcscd can stop
> your polling function either to switch to a 5 seconds timeout or to
> cleanly exit.
>
> > Ideally we would want an event based system for this. Perhaps provide a
> > function pointer to my ifd I can call to trigger this event.
>
> It _is_ event based. Just return from your polling/callback function
> on the event.
> You can whatever event based (or not) you want in your callback function.
>

There is still a timeout, so the thread that is blocking on my function
sleeps for
TIMEOUT, wakes up, and does what? Eventually some thread comed back around
and calls my fn again, and the process repeats. So doesn't that constitute
polling?
While 10m is a long time, it should
just block indefinitley until some other thread calls stop().


>
> > I'm assuming that the interface describes is compliant with pcsc spec?
> Is it
> > missing anything?
>
> PC/SC does not describe the IFDHandler API [2], only the PC/SC API [3].
>
> Bye
>
> [1]
> http://ludovicrousseau.blogspot.fr/2010/10/card-auto-power-on-and-off.html
> [2] http://pcsclite.alioth.debian.org/api/group__IFDHandler.html
> [3] http://pcsclite.alioth.debian.org/api/group__API.html
>
> --
>  Dr. Ludovic Rousseau
>
> _______________________________________________
> Pcsclite-muscle mailing list
> Pcsclite-muscle at lists.alioth.debian.org
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pcsclite-muscle
>



-- 
Respectfully,

William C Roberts
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pcsclite-muscle/attachments/20150224/b24b80f2/attachment-0001.html>



More information about the pcsclite-muscle mailing list