Siemens SIMATIC RF310M Function Manual page 35

Rfid systems mobile reader
Hide thumbs Also See for SIMATIC RF310M:
Table of Contents

Advertisement

We store incoming tag events in a list of tag events for later delivery
public void NotificationHandler(object sender, RfNotificationArgs
notificationArgs)
{
...
if (null != notificationArgs.TagEvents)
{
}
...
}
// This is our internal list to store tag events
private List<RfTagEvent> bufferedTagEvents = new List<RfTagEvent>();
Remember that as long as we are scanning, all acquired data is only stored locally on your
RF610M device. A connected RF-MANAGER runtime will not see a single one of the
scanned tags.
Now we can present the buffered tags to an end user such as Molly. If she confirms that all
shown tag events are valid, we can forward them to the RF-MANAGER runtime by calling
the SetTagEvents function as shown below:
public void ConfirmTagEvents()
{
...
if (this.bufferedTagEvents.Count > 0)
{
}
...
}
Notice that the second parameter for the SetTagEvents function is just a list of tag events. In
the code above, simply all buffered tag event items are passed on to the function. The only
other information needed is the name of the data source within our reader service that will
receive the tag events. Again, we can safely rely on the system's default component names
and use the given constant RfReaderApi.NC_RFID.
Contrary to subscribing for tag event notifications – where we simply used NC_ALL – we are
not allowed to use a generic name such as 'all' here but we have to address a specific data
source.
Running the code above now passes on the read tag events to the connected RF-
MANAGER runtime.
As said in our case the whole list of tag events. However, nothing prevents you from
selecting only some of the tag events, deleting events, adding your own tag events or
changing the values of a tag event before handing it over to the SetTagEvents function.
That way you can allow 'Molly-like' filtering for example by providing all tag events in a list
and letting the user select those events to be passed on.
And voila! We are able to make both Jerry and Molly happy again.
Mobile Reader
Function Manual, 02/2009, J31069-D0198-U001-A1-0076
foreach (RfTagEvent tagEvent in notificationArgs.TagEvents)
{
// Remember this tag event when filtering for later
// confirmation
this.bufferedTagEvents.Add(tagEvent);
}
RfReaderApi.Current.SetTagEvents(RfReaderApi.NC_RFID,
this.bufferedTagEvents.ToArray());
RFID Reader Interface User's Guide
2.3 Extending the Reach
35

Advertisement

Table of Contents
loading

This manual is also suitable for:

Simatic rf610m

Table of Contents