RFID Reader Interface User's Guide
2.2 How Do I Use the Reader Interface?
Mobile Readers
14
Function Manual, 12/2010, J31069-D0198-U001-A2-7618
A last issue we have to consider is that the RFID reader service needs time to initialize his
internal states. The good news is that after initialization the reader service will use its Alarm
event mechanism to notify clients when it is ready to start work. In order to catch this
information, we have to implement an alarm handler.
The alarm handler function has to comply with the following prototype that defines the
special RfAlarmArgs parameters.
public void AlarmHandler(object sender, RfAlarmArgs alarmArgs)
Before starting the reader we add the alarm handler:
RfReaderApi.Current.= new RfAlarmHandler(this.AlarmHandler);
Once installed, our AlarmHandler function gives us a chance to notice a successful startup
or restart by catching the ‘Reconfiguration’ and ‘Initial’ alarms:
public void AlarmHandler(object sender, RfAlarmArgs alarmArgs)
{
if (alarmArgs.InfoItems != null)
{
// Configuration has finished
if (alarmArgs.InfoItems[0].Name == "Reconfiguration" &&
alarmArgs.InfoItems[0].Value == "Initial")
{
// This is the very first startup of the application
// Now we can access RFID reader
…
}
}
}
Summary of Contents for SIMATIC RF610M
Page 2: ......
Page 8: ...Introduction Mobile Readers 8 Function Manual 12 2010 J31069 D0198 U001 A2 7618 ...
Page 79: ......