1

I am trying to enable events for SIU device like this:

    LPWFSRESULT lpWfsResult;
    WFSSIUENABLE commandData;
    commandData.fwSensors[WFS_SIU_OPERATORSWITCH] = WFS_SIU_ENABLE_EVENT;
    commandData.fwIndicators[WFS_SIU_OPENCLOSE] = WFS_SIU_ENABLE_EVENT;

    HRESULT hResult = WFSExecute(hService, WFS_CMD_SIU_ENABLE_EVENTS, &commandData, 10000, &lpWfsResult);
    cout << "Events enabled?:" << hResult << endl;
    WFSFreeResult(lpWfsResult);

This works as expected (hResult = 0) in one of the test ATMs. However on another test ATM, this returns WFS_ERR_SIU_INVALID_PORT (-801).

As per the XFS doc, this means:

An attempt to set a port to a new value was invalid because the port does not exist or the port is pre-configured as an input port.

I don't really understand the document's description. Can someone explain why this status is returned and what should be done?

Thank you.

James Selvakumar
  • 2,679
  • 1
  • 23
  • 28

1 Answers1

1

I think you need to initialize WFSSIUENABLE struct before WFSExecute. You are only setting values for Operator Switch and Open/close, but what about the others? Try to do a memset to set all the others to zero (WFS_SIU_NO_CHANGE):

memset( commandData, 0, sizeof( WFSSIUENABLE));

Another thing to do is to know whitch of the ports are available in this ATM asking first the SIU Capabilities. If you try to enable a Port not available in the ATM you have this error. Not all AMTs have the same ports available.

SuperG280
  • 271
  • 3
  • 9
  • Hi @SuperG280, I thought the OperatorSwitch and Open/Close Indicator are some basic ports that might be available in every ATM. However, it'll be good to check the SIU capabilities. Thank you very much for your suggestions. I'll try your suggestions. – James Selvakumar Jul 09 '19 at 02:09
  • Not allways are present. In some basic models of some famous manufacturers, thinking in the final cost, they remove OperatorSwitch button and you can change to supervisor mode when the cabinet door is open. – SuperG280 Jul 09 '19 at 06:44