Provide support for RFID related services. Module to facilitate listening/retrieval of printer unsolicited messaging related to RFID. More...
Public Member Functions | |
RfidReportNotice | GetRfidReportCallback () |
Inherited from IRfidMonitor.RfidReportCallback More... | |
void | SetRfidReportCallback (RfidReportNotice callback) |
Holds the function to call when RFID reports are received. Function must match the signature of RfidReportNotice. More... | |
boolean | GetRfidReportListening () |
Inherited from IRfidMonitor.RfidReportListening. More... | |
void | SetRfidReportListening (boolean listening) |
Enable/disable listening/parsing unsolicited RFID reports sent from the printer. More... | |
RfidMonitor (TcpConnection connection) | |
Must pass an opened comm connection that can remain opened for listening for unsolicited RFID reports. More... | |
RfidMonitor (JsonComm mgmtComm) | |
Constructor called when an mgmt comm object already exists for listening for mgmt msgs. More... | |
RfidMonitor (String commDescriptor) | |
Constructor called when creating a connection managed by the SDK. More... | |
void | Dispose () |
void | close () throws Exception |
Protected Member Functions | |
void | Dispose (boolean disposing) |
void | finalize () throws Throwable |
Private Member Functions | |
void | triggerCallbackForRfidReport (RfidReport report) |
void | MsgListenerCtrlRefresh () |
Map< String, String > | MsgParser_RfidReport (String mgmtReportFrame) |
void | CallbackForRfidReport (RfidReport RfidReport) |
Private Attributes | |
TcpConnection | _ptrComm |
JsonComm | _mgmtComm |
Channel< String > | _msgsFromPtr |
String | _myMgmtId = "" |
AtomicBoolean | _mgmtMsgListening = new AtomicBoolean(false) |
AtomicBoolean | _printerJobReporting = new AtomicBoolean(false) |
AtomicBoolean | _rfidReportListening = new AtomicBoolean(false) |
ExecutorService | _executor = Executors.newSingleThreadExecutor() |
Future<?> | _listenerTask |
ConcurrentLinkedQueue< String > | _mgmtFilteredMsgs = new ConcurrentLinkedQueue<>() |
RfidReportNotice | RfidReportCallback |
boolean | _sdkManagedComm = false |
String | _managedDescriptor = "" |
boolean | _disposed = false |
Static Private Attributes | |
static final int | MAX_MSGS_FROM_PTR = 100 |
static final int | MAX_Rfid_MSGS = 2 |
Provide support for RFID related services. Module to facilitate listening/retrieval of printer unsolicited messaging related to RFID.
Unsolicited messages, if enabled on printer, can be sent at any time. This module requires a constant "status" connection to the printer's management port in order to listen for any messaging sent out by printer.
Result after sending print job with that writes to EPC, USR and reads USR memory.
com.UniPRT.Sdk.Json.RfidMonitor.RfidMonitor | ( | TcpConnection | connection | ) |
Must pass an opened comm connection that can remain opened for listening for unsolicited RFID reports.
A connection is necessary to send/receive msgs.
References com.UniPRT.Sdk.Json.RfidMonitor._mgmtComm, com.UniPRT.Sdk.Json.RfidMonitor._myMgmtId, com.UniPRT.Sdk.Json.RfidMonitor._ptrComm, com.UniPRT.Sdk.Json.JsonStringBuilder.GetRandomObjectId_Json(), and com.UniPRT.Sdk.Json.RfidMonitor.RfidReportCallback.
com.UniPRT.Sdk.Json.RfidMonitor.RfidMonitor | ( | JsonComm | mgmtComm | ) |
Constructor called when an mgmt comm object already exists for listening for mgmt msgs.
JsonComm object per printer that is listening and parsing fully formed mgmt msgs and forwarding to all mgmt msg listeners.
References com.UniPRT.Sdk.Json.RfidMonitor._mgmtComm, com.UniPRT.Sdk.Json.RfidMonitor._myMgmtId, com.UniPRT.Sdk.Json.JsonStringBuilder.GetRandomObjectId_Json(), and com.UniPRT.Sdk.Json.RfidMonitor.RfidReportCallback.
com.UniPRT.Sdk.Json.RfidMonitor.RfidMonitor | ( | String | commDescriptor | ) |
Constructor called when creating a connection managed by the SDK.
commDescriptor is descriptor for the communication used to connect with printer.
TCP descriptor format: "ip" or "ip:port"
e.g. "127.0.0.1" or "127.0.0.1:3007"
If port is not provided, default value is used.
References com.UniPRT.Sdk.Json.RfidMonitor._managedDescriptor, com.UniPRT.Sdk.Json.RfidMonitor._mgmtComm, com.UniPRT.Sdk.Json.RfidMonitor._myMgmtId, com.UniPRT.Sdk.Json.RfidMonitor._sdkManagedComm, com.UniPRT.Sdk.Json.JsonCommController.CreateMgmtComm(), com.UniPRT.Sdk.Json.JsonStringBuilder.GetRandomObjectId_Json(), com.UniPRT.Sdk.Json.JsonCommController.Instance(), and com.UniPRT.Sdk.Json.RfidMonitor.RfidReportCallback.
|
private |
void com.UniPRT.Sdk.Json.RfidMonitor.close | ( | ) | throws Exception |
References com.UniPRT.Sdk.Json.RfidMonitor.Dispose().
Referenced by com.UniPRT.Sdk.Json.RfidMonitor.finalize().
void com.UniPRT.Sdk.Json.RfidMonitor.Dispose | ( | ) |
Referenced by com.UniPRT.Sdk.Json.RfidMonitor.close().
|
protected |
|
protected |
RfidReportNotice com.UniPRT.Sdk.Json.RfidMonitor.GetRfidReportCallback | ( | ) |
Inherited from IRfidMonitor.RfidReportCallback
Implements com.UniPRT.Sdk.Json.IRfidMonitor.
References com.UniPRT.Sdk.Json.RfidMonitor.RfidReportCallback.
boolean com.UniPRT.Sdk.Json.RfidMonitor.GetRfidReportListening | ( | ) |
Inherited from IRfidMonitor.RfidReportListening.
Implements com.UniPRT.Sdk.Json.IRfidMonitor.
References com.UniPRT.Sdk.Json.RfidMonitor._rfidReportListening.
|
private |
References com.UniPRT.Sdk.Json.RfidMonitor._executor, com.UniPRT.Sdk.Json.RfidMonitor._listenerTask, com.UniPRT.Sdk.Json.RfidMonitor._mgmtComm, com.UniPRT.Sdk.Json.RfidMonitor._mgmtFilteredMsgs, com.UniPRT.Sdk.Json.RfidMonitor._mgmtMsgListening, com.UniPRT.Sdk.Json.RfidMonitor._msgsFromPtr, com.UniPRT.Sdk.Json.RfidMonitor._printerJobReporting, com.UniPRT.Sdk.Json.RfidMonitor._rfidReportListening, com.UniPRT.Sdk.Json.JsonComm.ChannelListenerJson(), com.UniPRT.Sdk.Json.JsonStringTokenizer.GetKeyValue(), com.UniPRT.Sdk.Json.JsonStringTokenizer.GetMsgIdExpectedOnResponse_Json(), com.UniPRT.Sdk.Json.RfidReportNotice.handle(), com.UniPRT.Sdk.Json.RfidMonitor.MAX_MSGS_FROM_PTR, com.UniPRT.Sdk.Json.RfidMonitor.MAX_Rfid_MSGS, com.UniPRT.Sdk.Json.RfidMonitor.MsgParser_RfidReport(), com.UniPRT.Sdk.Json.RfidReport.RawReport, com.UniPRT.Sdk.Json.RfidMonitor.RfidReportCallback, com.UniPRT.Sdk.Mgmt.Channel< T >.Take(), and com.UniPRT.Sdk.Mgmt.MgmtChannelFilterType.UNSOLICITED_MSGS_ONLY.
Referenced by com.UniPRT.Sdk.Json.RfidMonitor.SetRfidReportListening().
|
private |
void com.UniPRT.Sdk.Json.RfidMonitor.SetRfidReportCallback | ( | RfidReportNotice | callback | ) |
Holds the function to call when RFID reports are received. Function must match the signature of RfidReportNotice.
The parameter passed into the function is an OdvReport object representing the RFID report received.
Implements com.UniPRT.Sdk.Json.IRfidMonitor.
void com.UniPRT.Sdk.Json.RfidMonitor.SetRfidReportListening | ( | boolean | listening | ) |
Enable/disable listening/parsing unsolicited RFID reports sent from the printer.
Note that this must be enabled in order to receive any notifications, RfidReportCallback, when RFID reports are received.
Implements com.UniPRT.Sdk.Json.IRfidMonitor.
References com.UniPRT.Sdk.Json.RfidMonitor._mgmtComm, com.UniPRT.Sdk.Json.RfidMonitor._myMgmtId, com.UniPRT.Sdk.Json.RfidMonitor._rfidReportListening, com.UniPRT.Sdk.Json.JsonStringBuilder.CreateMsgFrame_Json(), com.UniPRT.Sdk.Json.RfidMonitor.MsgListenerCtrlRefresh(), and com.UniPRT.Sdk.Json.JsonComm.SendAndWaitForResponse().
|
private |
|
private |
Referenced by com.UniPRT.Sdk.Json.RfidMonitor.Dispose(), and com.UniPRT.Sdk.Json.RfidMonitor.finalize().
|
private |
Referenced by com.UniPRT.Sdk.Json.RfidMonitor.MsgListenerCtrlRefresh().
|
private |
Referenced by com.UniPRT.Sdk.Json.RfidMonitor.MsgListenerCtrlRefresh().
|
private |
|
private |
|
private |
Referenced by com.UniPRT.Sdk.Json.RfidMonitor.MsgListenerCtrlRefresh().
|
private |
Referenced by com.UniPRT.Sdk.Json.RfidMonitor.MsgListenerCtrlRefresh().
|
private |
Referenced by com.UniPRT.Sdk.Json.RfidMonitor.MsgListenerCtrlRefresh().
|
private |
|
private |
Referenced by com.UniPRT.Sdk.Json.RfidMonitor.MsgListenerCtrlRefresh().
|
private |
Referenced by com.UniPRT.Sdk.Json.RfidMonitor.RfidMonitor().
|
private |
|
private |
|
staticprivate |
Referenced by com.UniPRT.Sdk.Json.RfidMonitor.MsgListenerCtrlRefresh().
|
staticprivate |
Referenced by com.UniPRT.Sdk.Json.RfidMonitor.MsgListenerCtrlRefresh().
|
private |
Referenced by com.UniPRT.Sdk.Json.RfidMonitor.CallbackForRfidReport(), com.UniPRT.Sdk.Json.RfidMonitor.GetRfidReportCallback(), com.UniPRT.Sdk.Json.RfidMonitor.MsgListenerCtrlRefresh(), com.UniPRT.Sdk.Json.RfidMonitor.RfidMonitor(), and com.UniPRT.Sdk.Json.RfidMonitor.triggerCallbackForRfidReport().