简体   繁体   English

启用S​​IU事件时出现WFS_ERR_SIU_INVALID_PORT(-801)错误

[英]WFS_ERR_SIU_INVALID_PORT (-801) error when enabling events for SIU

I am trying to enable events for SIU device like this: 我正在尝试为SIU设备启用事件,如下所示:

    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. 这在其中一个测试ATM中按预期方式工作(hResult = 0)。 However on another test ATM, this returns WFS_ERR_SIU_INVALID_PORT (-801). 但是,在另一个测试ATM上,这将返回WFS_ERR_SIU_INVALID_PORT(-801)。

As per the XFS doc , this means: 根据XFS doc ,这意味着:

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. 谢谢。

I think you need to initialize WFSSIUENABLE struct before WFSExecute. 我认为您需要在WFSExecute之前初始化WFSSIUENABLE结构。 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来将所有其他设置为零(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. 另一件事是要知道该自动柜员机中有哪些端口可用,首先询问SIU功能。 If you try to enable a Port not available in the ATM you have this error. 如果尝试启用ATM中不可用的端口,则会出现此错误。 Not all AMTs have the same ports available. 并非所有AMT都具有相同的端口。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM