001/*
002 * ===========================================================================================
003 * = COPYRIGHT
004 *          PAX Computer Technology (Shenzhen) Co., Ltd. PROPRIETARY INFORMATION
005 *   This software is supplied under the terms of a license agreement or nondisclosure
006 *   agreement with PAX Computer Technology (Shenzhen) Co., Ltd. and may not be copied or
007 *   disclosed except in accordance with the terms in that agreement.
008 *     Copyright (C) 2017-2023 PAX Computer Technology (Shenzhen) Co., Ltd. All rights reserved.
009 * Description: // Detail description about the function of this module,
010 *             // interfaces with the other modules, and dependencies.
011 * Revision History:
012 * Date                         Author                        Action
013 * 2017/04/01                   PAX                     Create/Add/Modify/Delete
014 * ===========================================================================================
015 */
016package com.pax.dal;
017
018/**
019 * <div class="zh">支付设备类。</div>
020 * <div class="en">Payment device class.</div>
021 */
022public interface IPaymentDevice {
023    /**
024     * <div class="zh">给支付设备上电或者下电。</div> <div class="en">Power up or down the payment device.</div>
025     *
026     * @param isOn <div class="zh">
027     *              <ul>
028     *                  <li>false:下电。</li>
029     *                  <li>true:上电。</li>
030     *              </ul>
031     *             </div>
032     *             <div class="en">
033     *              <ul>
034     *                  <li>false:Power down.</li>
035     *                  <li>true:Power up.</li>
036     *              </ul>
037     *             </div>
038     * @throws Exception
039     * @since V3.20.00
040     */
041    void controlPower(boolean isOn) throws Exception;
042
043    /**
044     * <div class="zh">唤醒支付设备。</div> <div class="en">Wake up the payment device.</div>
045     *
046     * @throws Exception
047     * @since V3.20.00
048     */
049    void wakeup() throws Exception;
050    
051    /**
052     * <div class="zh">获取支付模块状态。</div> <div class="en">Get the status of the payment device.</div>
053     *
054     * @return <div class="zh">
055     *          <ul>
056     *              <li>1:未上电。</li>
057     *              <li>2:上电但未就绪。 </li>
058     *              <li>3:就绪。</li>
059     *              <li>4:休眠。</li>
060     *          </ul>
061     *         </div>
062     *         <div class="en">
063     *          <ul>
064     *             <li>1:No power on.</li>
065     *             <li>2:Power on but not ready. </li>
066     *             <li>3:Be ready.</li>
067     *             <li>4:Dormancy.</li>
068     *          </ul>
069     *         </div>
070     * @throws Exception
071     * @since V3.20.00
072     */
073    int getStatus() throws Exception;
074
075    /**
076     * <div class="zh">获取设备状态。</div> <div class="en">Get the status of the payment device.</div>
077     *
078     * @param exDev <div class="zh">设备名</div> <div class="en">device name</div>
079     *
080     * @return <div class="zh">
081     *          <ul>
082     *              <li>1:未上电。</li>
083     *              <li>2:上电但未就绪。 </li>
084     *              <li>3:就绪。</li>
085     *              <li>4:休眠。</li>
086     *          </ul>
087     *         </div>
088     *         <div class="en">
089     *          <ul>
090     *             <li>1:No power on.</li>
091     *             <li>2:Power on but not ready. </li>
092     *             <li>3:Be ready.</li>
093     *             <li>4:Dormancy.</li>
094     *          </ul>
095     *         </div>
096     * @throws Exception
097     * @since V3.28.00
098     */
099    int getStatus(String exDev) throws Exception;
100
101    /**
102     * <div class="zh">给支付设备上电或者下电。</div> <div class="en">Power up or down the payment device.</div>
103     *
104     * @param exDev <div class="zh">设备名</div> <div class="en">device name</div>
105     * @param isOn <div class="zh">
106     *              <ul>
107     *                  <li>false:下电。</li>
108     *                  <li>true:上电。</li>
109     *              </ul>
110     *             </div>
111     *             <div class="en">
112     *              <ul>
113     *                  <li>false:Power down.</li>
114     *                  <li>true:Power up.</li>
115     *              </ul>
116     *             </div>
117     * @throws Exception
118     * @since V3.28.00
119     */
120    void controlPower(String exDev, boolean isOn) throws Exception;
121
122    /**
123     * <div class="zh">唤醒支付设备。</div> <div class="en">Wake up the payment device.</div>
124     *
125     * @param exDev <div class="zh">设备名</div> <div class="en">device name</div>
126     * @throws Exception
127     * @since V3.28.00
128     */
129    void wakeup(String exDev) throws Exception;
130
131    /**
132     * <div class="zh">获取当前系统支持的设备。</div> <div class="en">Get the devices supported by the current system.</div>
133     *
134     * @return <div class="zh">设备名称数组</div> <div class="en">Device name array</div>
135     * @throws Exception
136     * @since V3.28.00
137     */
138    String[] getExDeviceInfos() throws Exception;
139
140    /**
141     * <div class="zh">是否支持多外接设备(机型:M8)。</div> <div class="en">Whether to support multiple external devices(Model: M8).</div>
142     *
143     * @return <div class="zh">true: 支持, false: 不支持</div> <div class="en">true: support, false: not support</div>
144     * @throws Exception
145     * @since V3.28.00
146     */
147    boolean mutiExDevSupport() throws  Exception;
148
149}