<p dir="ltr">The worst part to me is the timeout. Which gets us back to polling right?</p>
<p dir="ltr">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.</p>
<p dir="ltr">I'm assuming that the interface describes is compliant with pcsc spec? Is it missing anything?</p>
<div class="gmail_quote">On Feb 24, 2015 9:40 AM, "Ludovic Rousseau" <<a href="mailto:ludovic.rousseau@gmail.com">ludovic.rousseau@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">2015-02-24 15:49 GMT+01:00 William Roberts <<a href="mailto:bill.c.roberts@gmail.com">bill.c.roberts@gmail.com</a>>:<br>
><br>
> ---------- Forwarded message ----------<br>
> From: "William Roberts" <<a href="mailto:bill.c.roberts@gmail.com">bill.c.roberts@gmail.com</a>><br>
> Date: Feb 23, 2015 6:51 PM<br>
> Subject: IFD polling<br>
> To: "OpenSC-devel" <<a href="mailto:opensc-devel@lists.sourceforge.net">opensc-devel@lists.sourceforge.net</a>><br>
> Cc:<br>
><br>
>> I am working on an IFD, and it looks like it just polls the presence API.<br>
>> I have some logging turned on to trace the calls in my IFD, and I see:<br>
>><br>
>> 00000022 ifd_entry.c-IFDHICCPresence()-98: Exit: 616<br>
>> 00400112 ifd_entry.c-IFDHICCPresence()-95: Enter: Lun: 0<br>
>> 00000022 ifd_entry.c-IFDHICCPresence()-98: Exit: 616<br>
>> 00400141 ifd_entry.c-IFDHICCPresence()-95: Enter: Lun: 0<br>
>> 00000022 ifd_entry.c-IFDHICCPresence()-98: Exit: 616<br>
>> 00400124 ifd_entry.c-IFDHICCPresence()-95: Enter: Lun: 0<br>
>> 00000023 ifd_entry.c-IFDHICCPresence()-98: Exit: 616<br>
>><br>
>> This is less than ideal. Reading the docs<br>
>> here:<br>
>> <a href="http://pcsclite.alioth.debian.org/api/group__IFDHandler.html#gabb9fe35a68fa080ce9397f0b830b1e7e" target="_blank">http://pcsclite.alioth.debian.org/api/group__IFDHandler.html#gabb9fe35a68fa080ce9397f0b830b1e7e</a><br>
>><br>
>> Shows the IFDHGetCapabilities() function. It mentions things about polling<br>
>> threads. I can essentally event trigger off of a card insert in my<br>
>> architecture, is their a way to minimize the polling and go to an event<br>
>> driven system?<br>
<br>
Your driver need to support TAG_IFD_POLLING_THREAD_WITH_TIMEOUT so<br>
that the "polling" is done by your driver.<br>
See <a href="http://pcsclite.alioth.debian.org/api/group__IFDHandler.html#ga799aa26945bbd3f61aaa57107f63ae0b" target="_blank">http://pcsclite.alioth.debian.org/api/group__IFDHandler.html#ga799aa26945bbd3f61aaa57107f63ae0b</a><br>
<br>
The idea is that pcscd will call your provided polling function. Your<br>
function should return on card events or timeout.<br>
<br>
Maybe I should document this part in more details.<br>
Please try to use the feature and propose a change to the<br>
documentation. You have a new eye on the subject so you know best what<br>
is missing in the documentation.<br>
<br>
Do not hesitate to ask for more details.<br>
<br>
Bye<br>
<br>
--<br>
Dr. Ludovic Rousseau<br>
<br>
_______________________________________________<br>
Pcsclite-muscle mailing list<br>
<a href="mailto:Pcsclite-muscle@lists.alioth.debian.org">Pcsclite-muscle@lists.alioth.debian.org</a><br>
<a href="http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pcsclite-muscle" target="_blank">http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pcsclite-muscle</a><br>
</blockquote></div>