Hi Lauro, Aloisio, Samuel, all,
It seems that when targets are found (via NFC_EVENT_TARGETS_FOUND), there is no way to know (in user space) how many targets were found in advance.
I suggest we add a new attribute NFC_ATTR_NUM_TARGETS_FOUND to the event NFC_EVENT_TARGETS_FOUND.
Otherwise, the user would have to wait until a timeut expires in order to decide that no more targets will arrive.
Please note that the knowledge of how many targets were found can be found in the variable dev->n_targets.
I'll appreciate your comments on this issue.
If you agree, I'll send out a patch for this.
Thanks & BR,
Ilan
Hi Samuel,
> > I suggest we add a new attribute NFC_ATTR_NUM_TARGETS_FOUND
> to the event NFC_EVENT_TARGETS_FOUND.
> > Otherwise, the user would have to wait until a timeut
> expires in order to decide that no more targets will arrive.
> You mean a timeout from NFC_CMD_GET_TARGET ? You could guess
> the number
> of targets from the dumped message size, couldn't you ?
As you said (in the NFC IRC room), the last dump message should be marked with NLMSG_DONE.
I'll check it out.
Thanks & BR,
Ilan
Hi Ilan,
On Thu, 2011-12-08 at 17:13 +0000, Elias, Ilan wrote:
> I suggest we add a new attribute NFC_ATTR_NUM_TARGETS_FOUND to the event NFC_EVENT_TARGETS_FOUND.
> Otherwise, the user would have to wait until a timeut expires in order to decide that no more targets will arrive.
You mean a timeout from NFC_CMD_GET_TARGET ? You could guess the number
of targets from the dumped message size, couldn't you ?
Cheers,
Samuel.