12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- /////////////////////////////////////////////////////////////////////////////////
- /// Copyright (c) 2017 China Merchants Bank, all rights reserved ///
- /// Adapter Interface for Branch Device. ///
- /// ///
- /// ///
- /////////////////////////////////////////////////////////////////////////////////
- #ifndef __BRANCH_DEVICE_CLASS_H
- #define __BRANCH_DEVICE_CLASS_H
- #include "DeviceBaseClass.h"
- class BranchDeviceClass : public DeviceBaseClass
- {
- public:
- //
- // 打开设备
- // @param1: 配置在root.ini中,打开设备所需的参数字符串,比如说波特率端口,由实现子类进行字符串额分割和解析
- // @param2: 配置在CenterSetting.ini中,分行全行通用的字符串,作用暂未定义,由分行决定其使用功能
- // 参数的配置方式见《可视化柜台分行特色硬件适配器开发说明.doc》
- //
- virtual ErrorCodeEnum DevOpen(const char *param1, const char *param2) = 0;
-
- //
- // 执行操作指令
- // @param: 指令内容
- // @retValue: 存储返回内容的字符串
- // @maxLen: 字符串的缓冲区长度
- //
- virtual ErrorCodeEnum ExecuteCmd(const char *param, char *&retValue, int maxLen) = 0;
-
- //
- // 设备状态检测
- // @status: 在函数返回 Error_Succeed 的前提下定义为有效,其余情况不作任何处理
- // 0:正常
- // 1:警告,提示性信息,上层可不处理,原则上可通过GetLastErr接口可提取具体的原因
- // 2:维护,设备可用,但需要上层发维护信息,分行通用实体将执行Reset接口函数
- // 3:故障,设备不可用,原则上可通过GetLastErr接口可提取具体的原因,分行通道实体将执行适配器加载进程重启操作
- //
- virtual ErrorCodeEnum QueryDevice(unsigned int &status) = 0;
- };
- #endif //__BRANCH_DEVICE_CLASS_H
|