Package com.zebra.rfid.api3
Class Events
- java.lang.Object
-
- com.zebra.rfid.api3.Events
-
public class Events extends java.lang.Object
This class contains registration/de-registration of events on the reader. It processes different events and fires appropriate the event handlers
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
Events.InfoData
Contains Info event Data like cause
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addEventsListener(RfidEventsListener rfidEventListener)
Adds the Event Listener for reporting Tag Read and status notificationvoid
addWifiScanDataEventsListener(WifiScanDataEventsListener wifiScanDataListener)
Adds the Event Listeners for reporting Wifi Scan Data notificationjava.lang.String
getHostName()
com.zebra.rfid.api3.RfidConnectionState
getRfidConnectionState()
IEvents.StatusEventData
GetStatusEventData(RFID_EVENT_TYPE eventType)
boolean
isAntennaEventSet()
Checks if Antenna Event Notification is enabled/disabled.boolean
isAttachTagDataWithReadEventSet()
Checks whether Attach Tag Data with Read Event is enabled/disabledboolean
isBatchModeEventSet()
Supported only in RFD8500.boolean
isBatterySet()
Checks if Battery Event Notification is enabled/disabled.boolean
isBufferFullEventSet()
Checks if Buffer Full Event is enabled or notboolean
isBufferFullWarningEventSet()
Checks if Buffer full warning Event Notification is enabled/disabled.boolean
isCradleEventset()
Checks if Cradle Event Notification is enabled/disabled.boolean
isGPIEventSet()
Checks if GPI Event Notification is enabled/disabled.boolean
isHandheldEventSet()
Checks Hand held Gun/Button event is enabled/disabledboolean
isInfoEventSet()
Checks if Info Event Notification is enabled/disabled.boolean
isInventoryStartEventSet()
Checks if Inventory Start Event Notification is enabled/disabled.boolean
isInventoryStopEventSet()
Checks if Inventory Stop Event Notification is enabled/disabled.boolean
isOperationEndSummaryEvenSet()
Checks if Operation End Summary Event Notification is enabled/disabled.boolean
isPowerEventSet()
Checks if Power Event Notification is enabled/disabled.boolean
isReaderDisconnectEventSet()
Checks if Reader Disconnection Event Notification is enabled/disabled.boolean
isReaderExceptionEventSet()
Event notifying that an exception has occurred in the Reader.boolean
isScanDataEventSet()
Checks if WPA Event Notification is enabled/disabled.boolean
isTagReadEventSet()
Checks Tag Read Event is enabled/disabledboolean
isTemperatureAlarmEventSet()
Checks if Temperature Event Notification is enabled/disabled.boolean
isWPAEventSet()
Checks if WPA Event Notification is enabled/disabled.protected void
notifyReadEventSchedule()
protected void
notifyWifiScanEventSchedule()
void
removeEventsListener(RfidEventsListener rfidEventListener)
Removes the Event Listener.void
removeWifiScanDataEventsListener(WifiScanDataEventsListener wifiScanDataListener)
Removes the Event Listener.void
setAntennaEvent(boolean notifyAntennaEvent)
To enable/disable Antenna Event Notification.void
setAttachTagDataWithReadEvent(boolean attachTagDataWithReadEvent)
Specified whether TagData should be reported along with the eventReadNotify method of RfidEventsListener interface.void
setBatchModeEvent(boolean notifyBatchMode)
Supported only in RFD8500.void
setBatteryEvent(boolean notifyBatteryEvent)
To enable/disable Battery Event Notification.void
setBufferFullEvent(boolean notifyBufferFullEvent)
To Enable Buffer full Event Notification.void
setBufferFullWarningEvent(boolean notifyBufferFullWarningEvent)
To enable/disable Buffer full warning Event Notification.void
setCradleEvent(boolean notifyCradleEvent)
To enable/disable Battery Event Notification.void
setFirmwareUpdateEvent(boolean notifyScanDataEvent)
void
setGPIEvent(boolean notifyGPIEvent)
Not supported in Android RFID SDK To enable/disable GPI Event Notification.void
setHandheldEvent(boolean notifyHandheldEvent)
To enable/disable A Hand held Gun/Button event - Pull/Release Notificationvoid
setHeartBeatEvent(boolean notifyHeartbeatDataEvent)
void
setInfoEvent(boolean notifyInfoEvent)
To enable/disable Info Event Notification.void
setInventoryStartEvent(boolean notifyInventoryStartEvent)
To enable/disable Inventory Start Event Notification.void
setInventoryStopEvent(boolean notifyInventoryStopEvent)
To enable/disable Inventory Stop Event Notification.void
setOperationEndSummaryEvent(boolean notifyOperationEndSummary)
To enable/disable Operation End Summary Event Notification.void
setPowerEvent(boolean notifyPowerEvent)
To enable/disable Power Event Notification.void
setReaderDisconnectEvent(boolean notifyReaderDisconnectEvent)
To enable/disable Reader Disconnection Event Notification.void
setReaderExceptionEvent(boolean notifyReaderExceptionEvent)
Event notifying that an exception has occurred in the Reader.void
setRfidConnectionState(com.zebra.rfid.api3.RfidConnectionState rfidConnectionState)
protected java.lang.Boolean
setRfidReConnectionStateEvents()
set events again on reader in case of reconnectionvoid
setScanDataEvent(boolean notifyScanDataEvent)
To enable/disable Power Event Notification.void
setTagReadEvent(boolean notifyTagReadEvent)
Enables/Disables the Tag Read Notification If enabled, the eventReadNotify method of RfidEventsListener interface will be called to signal tag the notification.void
setTemperatureAlarmEvent(boolean notifyTemperatureAlarmEvent)
To enable/disable Temperature Alarm Notification.void
setWPAEvent(boolean notifyWPAEvent)
To enable/disable Power Event Notification.
-
-
-
Field Detail
-
m_Actions
public Actions m_Actions
-
LOGGER
public static final IRFIDLogger LOGGER
-
iEvents
public IEvents iEvents
-
-
Method Detail
-
isBufferFullEventSet
public boolean isBufferFullEventSet()
Checks if Buffer Full Event is enabled or not
-
setBufferFullEvent
public void setBufferFullEvent(boolean notifyBufferFullEvent)
To Enable Buffer full Event Notification.- Parameters:
notifyBufferFullEvent
- When the internal buffers are 100% full, BUFFER_FULL_EVENT will be notified every time a new tag report is received. The oldest TagData reports will be replaced by the newest in a circular FIFO manner.
-
isTagReadEventSet
public boolean isTagReadEventSet()
Checks Tag Read Event is enabled/disabled
-
setTagReadEvent
public void setTagReadEvent(boolean notifyTagReadEvent)
Enables/Disables the Tag Read Notification If enabled, the eventReadNotify method of RfidEventsListener interface will be called to signal tag the notification. If setAttachTagDataWithReadEvent is set to true, the tag data will be reported in the RfidReadEvents else user needs to call Actions.getReadTags method for getting the bulk tags by providing number of tags to fetch.
-
isInfoEventSet
public boolean isInfoEventSet()
Checks if Info Event Notification is enabled/disabled.
-
setInfoEvent
public void setInfoEvent(boolean notifyInfoEvent)
To enable/disable Info Event Notification.
-
isHandheldEventSet
public boolean isHandheldEventSet()
Checks Hand held Gun/Button event is enabled/disabled
-
setHandheldEvent
public void setHandheldEvent(boolean notifyHandheldEvent)
To enable/disable A Hand held Gun/Button event - Pull/Release Notification
-
isReaderExceptionEventSet
public boolean isReaderExceptionEventSet()
Event notifying that an exception has occurred in the Reader.- Returns:
- Checks the Reader Exception Event Set state
-
setReaderExceptionEvent
public void setReaderExceptionEvent(boolean notifyReaderExceptionEvent)
Event notifying that an exception has occurred in the Reader. The Application can continue to use the connection if the reader renders is usable.- Parameters:
notifyReaderExceptionEvent
- To enable/disabled Reader Exception Event in the reader.
-
getRfidConnectionState
public com.zebra.rfid.api3.RfidConnectionState getRfidConnectionState()
- Returns:
-
setRfidConnectionState
public void setRfidConnectionState(com.zebra.rfid.api3.RfidConnectionState rfidConnectionState)
- Parameters:
rfidConnectionState
-
-
setRfidReConnectionStateEvents
protected java.lang.Boolean setRfidReConnectionStateEvents()
set events again on reader in case of reconnection
-
isAntennaEventSet
public boolean isAntennaEventSet()
Checks if Antenna Event Notification is enabled/disabled. This event is generated when the Reader detects that an antenna is connected or disconnected
-
setAntennaEvent
public void setAntennaEvent(boolean notifyAntennaEvent)
To enable/disable Antenna Event Notification. This event is generated when the Reader detects that an antenna is connected or disconnected
-
isBufferFullWarningEventSet
public boolean isBufferFullWarningEventSet()
Checks if Buffer full warning Event Notification is enabled/disabled. When the internal buffers are 90% full, BUFFER_FULL_WARNING_EVENT will be notified. When the buffers are 100% full, no more Tags can be stored in Dll or in the Reader, and further tags are discarded.
-
setBufferFullWarningEvent
public void setBufferFullWarningEvent(boolean notifyBufferFullWarningEvent)
To enable/disable Buffer full warning Event Notification. When the internal buffers are 90% full, BUFFER_FULL_WARNING_EVENT will be notified. When the buffers are 100% full, no more Tags can be stored in Dll or in the Reader, and further tags are discarded.
-
isGPIEventSet
public boolean isGPIEventSet()
Checks if GPI Event Notification is enabled/disabled. GPI_EVENT will be signaled every time an enabled GPI changes state.
-
setGPIEvent
public void setGPIEvent(boolean notifyGPIEvent)
Not supported in Android RFID SDK To enable/disable GPI Event Notification. GPI_EVENT will be signaled every time an enabled GPI changes state.
-
isInventoryStartEventSet
public boolean isInventoryStartEventSet()
Checks if Inventory Start Event Notification is enabled/disabled.
-
setInventoryStartEvent
public void setInventoryStartEvent(boolean notifyInventoryStartEvent)
To enable/disable Inventory Start Event Notification.
-
isInventoryStopEventSet
public boolean isInventoryStopEventSet()
Checks if Inventory Stop Event Notification is enabled/disabled.
-
setInventoryStopEvent
public void setInventoryStopEvent(boolean notifyInventoryStopEvent)
To enable/disable Inventory Stop Event Notification.
-
isTemperatureAlarmEventSet
public boolean isTemperatureAlarmEventSet()
Checks if Temperature Event Notification is enabled/disabled. This event is generated when the Reader reaches Temperature Threshold
-
setTemperatureAlarmEvent
public void setTemperatureAlarmEvent(boolean notifyTemperatureAlarmEvent)
To enable/disable Temperature Alarm Notification. This event is generated when the Reader reaches Temperature Threshold
-
isReaderDisconnectEventSet
public boolean isReaderDisconnectEventSet()
Checks if Reader Disconnection Event Notification is enabled/disabled. The Application can call Reconnect() to manually reconnect to the Reader Or opt for auto-reconnection. To cleanup and exit the application can call Disconnect().
-
setReaderDisconnectEvent
public void setReaderDisconnectEvent(boolean notifyReaderDisconnectEvent)
To enable/disable Reader Disconnection Event Notification. The Application can call Reconnect() to manually reconnect to the Reader Or opt for auto-reconnection. To cleanup and exit the application can call Disconnect().
-
isAttachTagDataWithReadEventSet
public boolean isAttachTagDataWithReadEventSet()
Checks whether Attach Tag Data with Read Event is enabled/disabled
-
setAttachTagDataWithReadEvent
public void setAttachTagDataWithReadEvent(boolean attachTagDataWithReadEvent)
Specified whether TagData should be reported along with the eventReadNotify method of RfidEventsListener interface. If the Tag population is less, the application can fetch the tags with the attachTagDataWithReadEvent set to true. But when there is a huge tag population or when the speed of processing tags is critical it is advisable to set attachTagDataWithReadEvent to false and fetch the tags using getReadTags() method from another thread (and not directly from the registered tag read handler)
-
isOperationEndSummaryEvenSet
public boolean isOperationEndSummaryEvenSet()
Checks if Operation End Summary Event Notification is enabled/disabled.
-
setOperationEndSummaryEvent
public void setOperationEndSummaryEvent(boolean notifyOperationEndSummary)
To enable/disable Operation End Summary Event Notification.
-
isBatchModeEventSet
public boolean isBatchModeEventSet()
Supported only in RFD8500. Checks if Batch Mode Event Notification is enabled/disabled.
-
setBatchModeEvent
public void setBatchModeEvent(boolean notifyBatchMode)
Supported only in RFD8500. To enable/disable Batch Mode Event Notification.
-
isPowerEventSet
public boolean isPowerEventSet()
Checks if Power Event Notification is enabled/disabled.
-
setPowerEvent
public void setPowerEvent(boolean notifyPowerEvent)
To enable/disable Power Event Notification.
-
isBatterySet
public boolean isBatterySet()
Checks if Battery Event Notification is enabled/disabled.
-
setBatteryEvent
public void setBatteryEvent(boolean notifyBatteryEvent)
To enable/disable Battery Event Notification.
-
isCradleEventset
public boolean isCradleEventset()
Checks if Cradle Event Notification is enabled/disabled.
-
setCradleEvent
public void setCradleEvent(boolean notifyCradleEvent)
To enable/disable Battery Event Notification.
-
isWPAEventSet
public boolean isWPAEventSet()
Checks if WPA Event Notification is enabled/disabled.
-
setWPAEvent
public void setWPAEvent(boolean notifyWPAEvent)
To enable/disable Power Event Notification.
-
isScanDataEventSet
public boolean isScanDataEventSet()
Checks if WPA Event Notification is enabled/disabled.
-
setScanDataEvent
public void setScanDataEvent(boolean notifyScanDataEvent)
To enable/disable Power Event Notification.
-
setFirmwareUpdateEvent
public void setFirmwareUpdateEvent(boolean notifyScanDataEvent)
-
setHeartBeatEvent
public void setHeartBeatEvent(boolean notifyHeartbeatDataEvent)
-
getHostName
public java.lang.String getHostName()
-
addEventsListener
public void addEventsListener(RfidEventsListener rfidEventListener) throws InvalidUsageException, OperationFailureException
Adds the Event Listener for reporting Tag Read and status notification
-
removeEventsListener
public void removeEventsListener(RfidEventsListener rfidEventListener) throws InvalidUsageException, OperationFailureException
Removes the Event Listener. Reporting of Tag Read and status notifications will be stopped- Parameters:
rfidEventListener
-- Throws:
InvalidUsageException
OperationFailureException
-
addWifiScanDataEventsListener
public void addWifiScanDataEventsListener(WifiScanDataEventsListener wifiScanDataListener) throws InvalidUsageException, OperationFailureException
Adds the Event Listeners for reporting Wifi Scan Data notification
-
removeWifiScanDataEventsListener
public void removeWifiScanDataEventsListener(WifiScanDataEventsListener wifiScanDataListener) throws InvalidUsageException, OperationFailureException
Removes the Event Listener. Reporting of Wifi Scan Data notifications will be stopped
-
notifyReadEventSchedule
protected void notifyReadEventSchedule()
-
notifyWifiScanEventSchedule
protected void notifyWifiScanEventSchedule()
-
GetStatusEventData
public IEvents.StatusEventData GetStatusEventData(RFID_EVENT_TYPE eventType)
-
-