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 */ 016 017package com.pax.dal; 018 019import com.pax.dal.entity.EKeyCode; 020import com.pax.dal.entity.EKeyBoardType; 021 022public interface IKeyBoard { 023 /** 024 * @deprecated 025 * <div class="zh"> 检测键盘缓冲区中是否有尚未被取走的按键值 </div> <div class="en"> Check whether there are unread key values in 026 * keyboard buffer. </div> 027 * 028 * @return <div class="zh"> 029 * <ul> 030 * <li>true -- 键盘缓存区中仍然有键值</li> 031 * <li>false -- 键盘缓存区中无键值</li> 032 * </ul> 033 * </div> <div class="en"> 034 * <ul> 035 * <li>true -- There are still key values in buffer</li> 036 * <li>false -- No key values in buffer</li> 037 * </ul> 038 * </div> 039 * 040 */ 041 @Deprecated 042 public boolean isHit(); 043 044 /** 045 * @deprecated 046 * <div class="zh"> 清除当前键盘缓冲区中的所有未读取的按键 </div> <div class="en"> Clear all the key values which have not been read in 047 * current keyboard buffer. </div> 048 */ 049 @Deprecated 050 public void clear(); 051 052 /** 053 * @deprecated 054 * <div class="zh"> 读取键盘缓冲区中最早输入的一个键值。如果缓冲区为空,则等待按键输入 </div> <div class="en"> Read the first input key value 055 * from keyboard buffer. If the buffer is NULL, then waiting for the key pressing. </div> 056 * 057 * @return {@link EKeyCode} 058 */ 059 @Deprecated 060 public EKeyCode getKey(); 061 062 /** 063 * @deprecated 064 * <div class="zh"> 设置按键板在按键时是否发声 </div> <div class="en"> Set whether the keypad should make a sound when the key is 065 * being pressed. </div> 066 * 067 * @param isMute 068 * <div class="zh"> 069 * <ul> 070 * <li>true-不发声</li> 071 * <li>false-发声</li> 072 * </ul> 073 * </div> <div class="en"> 074 * <ul> 075 * <li>true -- Mute</li> 076 * <li>false -- make a sound</li> 077 * </ul> 078 * </div> 079 * 080 */ 081 @Deprecated 082 public void setMute(boolean isMute); 083 084 /** 085 * <div class="zh">设置按键背光。</div> <div class="en">Set keyboard backlight.</div> 086 * 087 * @param mode <div class="zh"> 088 * <ul> 089 * <li>0:关闭背光。</li> 090 * <li>1:默认模式。背光保持亮1分钟,1分钟后自动关闭。</li> 091 * <li>2:背光常亮。</li> 092 * <li>3:背光常暗。不会被刷卡,插卡,按键等事件激活背光。</li> 093 * </ul> 094 * </div> 095 * <div class="en"> 096 * <ul> 097 * <li>0:Turn off the backlight.</li> 098 * <li>1:Default mode.Keep the backlight on for 1 minute, then turn it off automatically after 1 minute.</li> 099 * <li>2:The backlight is always bright.</li> 100 * <li>3:The backlight is always dark.Backlight will not be activated by card swiping, card inserting, keystrokes, etc.</li> 101 * </ul> 102 * </div> 103 * @param volume <div class="zh">范围是1~3。默认3最亮。</div> <div class="en">The range is 1 to 3.Default 3 is brightest.</div> 104 * @throws Exception 105 * @since V3.19.00 106 */ 107 void setLight(byte mode, byte volume) throws Exception; 108 109 /** 110 * @deprecated 111 * <div class="zh">设置键盘按键音量值。</div> <div class="en">Set keyboard key volume value.</div> 112 * 113 * @param volumes <div class="zh">音量值(0~50)</div> 114 * <div class="en">Volume value (0~50)</div> 115 * @throws Exception 116 * @since V3.29.00 117 */ 118 void setVolume(int volumes) throws Exception; 119 120 /** 121 * <div class="zh">获取按键是否静音。</div> <div class="en">Gets whether a key is silent.</div> 122 * 123 * @return <div class="zh">true:静音,false:非静音</div> 124 * <div class="en">true: muted, false: not muted </div> 125 * @throws Exception 126 * @since V4.09.00 127 */ 128 boolean getMute() throws Exception; 129 130 /** 131 * <div class="zh">获取按键音量。</div> <div class="en">Get key volume.</div> 132 * 133 * @return <div class="zh">音量值(0~50)</div> 134 * <div class="en">Volume value (0~50)</div> 135 * @throws Exception 136 * @since V4.09.00 137 */ 138 int getVolume() throws Exception; 139 140 /** 141 * <div class="zh">设置按键静音。</div> <div class="en">Mute keys.</div> 142 * 143 * @param type <div class="zh">EKeyBoardType.AP_DRIVER_KEYBOARD: AP驱动键盘 ; 144 * EKeyBoardType.SP_DRIVER_KEYBOARD: SP驱动键盘</div> 145 * <div class="en">EKeyBoardType.AP_DRIVER_KEYBOARD: AP driver keyboard 146 * EKeyBoardType.SP_DRIVER_KEYBOARD: SP driver keyboard</div> 147 * 148 * @param mute <div class="zh">mute - true: 静音, false: 非静音 </div> 149 * <div class="en">Mute-true: mute, false: not mute</div> 150 * @throws Exception 151 * @since V4.09.00 152 */ 153 void setMute(EKeyBoardType type,boolean mute) throws Exception; 154 155 /** 156 * <div class="zh">设置按键音量。</div> <div class="en">Set key volume.</div> 157 * 158 * @param type <div class="zh">EKeyBoardType.AP_DRIVER_KEYBOARD: AP驱动键盘 ; 159 * EKeyBoardType.SP_DRIVER_KEYBOARD: SP驱动键盘</div> 160 * <div class="en">EKeyBoardType.AP_DRIVER_KEYBOARD: AP driver keyboard 161 * EKeyBoardType.SP_DRIVER_KEYBOARD: SP driver keyboard</div> 162 * 163 * @param volume <div class="zh">volume - 0~50 </div> 164 * <div class="en">volume - 0~50</div> 165 * @throws Exception 166 * @since V4.09.00 167 */ 168 void setVolume(EKeyBoardType type, int volume) throws Exception; 169}