I am trying to develop an ATM cash transaction monitoring application. I am using the CEN-XFS APIs to listen to events generated by the Cash Dispenser Device Class (CWA1574-8) interface. I read through the WFS_CMD_CDM_DISPENSE command documentation and I find that none of the events that this command generates clearly signifies that a cash transaction has failed due to cash jam.
Will WFS_EXEE_CDM_CASHUNITERROR be generated when a cash jam happens? There is another event WFS_EXEE_CDM_NOTEERROR which says it will be generated on an item detection error, so it is clearly not anything about cash jam.
Similarly, one more question related to this is that "items taken" is indicated by WFS_SRVE_CDM_ITEMSTAKEN event, so, I can listen to that event, but "items not taken" has no event and it is returned as error code "WFS_ERR_CDM_ITEMSNOTTAKEN". My program is only a monitoring application and my program listens to these events, how do I now know that customer has not taken the presented cash? Looks like a poor design.
Like @SuperG280 said this is really not possible without modifying the main application. CEN XFS is not really made for observers in mind.
So if you want to create an all purpose monitoring application then the only way is to create shallow XFS Manager for the main application to use. It can simply wrap the real XFS Manager and just provide all command completion events to your monitoring application as well as the main application.
I know that some devices from certain manufacturer do provide configuration settings that can be used to create a situation where that device will post all command execution completing events to all listeners. This though is restricting support for certain ATM manufacturers and to only those devices that has this setting provided.