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.memorycard; 018 019import com.pax.dal.exceptions.Sle4428DevException; 020 021public interface ICardSle4428 extends IMemoryCard { 022 023 /** 024 * <div class="zh"> 上电 Sle4428 模块. </div> <div class="en"> Power on Sle4428 module. </div> 025 * 026 * @throws Sle4428DevException 027 */ 028 public void open() throws Sle4428DevException; 029 030 /** 031 * <div class="zh"> 下电 Sle4428 模块. </div> <div class="en"> Power off Sle4428 module. </div> 032 * 033 * @throws Sle4428DevException 034 */ 035 public void close() throws Sle4428DevException; 036 037 /** 038 * <div class="zh"> 复位 Sle4428 模块. </div> <div class="en"> Reset Sle4428 module. </div> 039 * 040 * @return <div class="zh"> 复位信息, 4 bytes </div> <div class="en"> dataOut, 4 bytes </div> 041 * @throws Sle4428DevException 042 */ 043 public byte[] reset() throws Sle4428DevException; 044 045 /** 046 * <div class="zh"> 复位 Sle4428 模块,并阅读卡片信息及确认卡片类型为Sle4428. </div> <div class="en"> Reset Sle4428 module, and read 047 * identity information about the card, and ensure the card type is Sle4428. </div> 048 * 049 * @return <div class="zh"> 卡片身份信息,4字节 </div> <div class="en"> identity information about the card, 4 bytes. </div> 050 * @throws Sle4428DevException 051 */ 052 public byte[] iccInit() throws Sle4428DevException; 053 054 /** 055 * <div class="zh"> 从Sle4428卡片读取数据没有保护位 </div> <div class="en"> Read the data from Sle4428 without protected bit. 056 * </div> 057 * 058 * @param addr 059 * <div class="zh"> 起始字节 </div> <div class="en"> the begin address </div> 060 * @param dataLen 061 * <div class="zh"> 数据长度 </div> <div class="en"> the data length </div> 062 * @return dataOut 063 * @throws Sle4428DevException 064 */ 065 public byte[] readWithoutPB(short addr, short dataLen) throws Sle4428DevException; 066 067 /** 068 * <div class="zh"> 从Sle4428卡片读取数据有保护位 </div> <div class="en"> Read the data from Sle4428 with protected bit. </div> 069 * 070 * @param addr 071 * <div class="zh"> 起始地址 </div> <div class="en"> the begin address </div> 072 * @param dataLen 073 * <div class="zh"> 数据长度 </div> <div class="en"> the data length </div> 074 * @return dataOut <div class="zh"> 返回数据格式: byte+byte_property+byte+byte_property+... 075 * <ul> 076 * <li>byte_property is 0 - 字节受保护</li> 077 * <li>byte_property is 1 - 字节不受保护</li> 078 * </ul> 079 * </div> <div class="en"> dataOut format: byte+byte_property+byte+byte_property+... 080 * <ul> 081 * <li>byte_property is 0 - the byte is protected</li> 082 * <li>byte_property is 1 - the byte isn't protected</li> 083 * </ul> 084 * </div> 085 * @throws Sle4428DevException 086 */ 087 public byte[] readWithPB(short addr, short dataLen) throws Sle4428DevException; 088 089 /** 090 * <div class="zh"> 读取Sle4428密码的重复次数 </div> <div class="en"> Read password of Sle4428 retry counts. </div> 091 * 092 * @return <div class="zh"> 重复次数(0-8) </div> <div class="en"> retry counts(0~8). </div> 093 * @throws Sle4428DevException 094 */ 095 public byte readPinCounter() throws Sle4428DevException; 096 097 /** 098 * <div class="zh"> 修改Sle4428密码重试次数 </div> <div class="en"> Modify password of Sle4428 retry counts. </div> 099 * 100 * @param counter 101 * <div class="zh"> 重试次数(0-8) </div> <div class="en"> retry counts(0~8) </div> 102 * @throws Sle4428DevException 103 */ 104 public void editPinCounter(byte counter) throws Sle4428DevException; 105 106 /** 107 * <div class="zh"> 验证Sle4428密码 </div> <div class="en"> Verify password of Sle4428. </div> 108 * 109 * @param pinBuf 110 * <div class="zh"> 密码,2字节 </div> <div class="en"> passwords buffer, 2 bytes. </div> 111 * @throws Sle4428DevException 112 */ 113 public void verifyPin(byte[] pinBuf) throws Sle4428DevException; 114 115 /** 116 * <div class="zh"> 修改Sle4428密码 </div> <div class="en"> Modify password of Sle4428. </div> 117 * 118 * @param pinBuf 119 * <div class="zh"> 密码,2字节 </div> <div class="en"> passwords buffer, 2 bytes. </div> 120 * @throws Sle4428DevException 121 */ 122 public void editPin(byte[] pinBuf) throws Sle4428DevException; 123 124 /** 125 * <div class="zh"> 写数据,无保护位 </div> <div class="en"> Write data without protected bit. </div> 126 * 127 * @param addr 128 * <div class="zh"> 起始地址 </div> <div class="en"> begin address </div> 129 * @param dataLen 130 * <div class="zh"> 数据长度 </div> <div class="en"> data length </div> 131 * @param dataIn 132 * <div class="zh"> 输入数据 </div> <div class="en"> input data </div> 133 * @throws Sle4428DevException 134 */ 135 public void writeWithoutPB(short addr, short dataLen, byte[] dataIn) throws Sle4428DevException; 136 137 /** 138 * <div class="zh"> 写入数据无保护位 </div> <div class="en"> Write data with protected bit. </div> 139 * 140 * @param addr 141 * <div class="zh"> 起始地址 </div> <div class="en"> begin address </div> 142 * @param dataLen 143 * <div class="zh"> 数据长度 </div> <div class="en"> data length </div> 144 * @param dataIn 145 * <div class="zh"> 输入数据 </div> <div class="en"> input data </div> 146 * @throws Sle4428DevException 147 */ 148 public void writeWithPB(short addr, short dataLen, byte[] dataIn) throws Sle4428DevException; 149 150 /** 151 * <div class="zh"> 设置Sle4428保护位 </div> <div class="en"> Set the Sle4428 protected bit. </div> 152 * 153 * @param addr 154 * <div class="zh"> 起始地址 </div> <div class="en"> begin address </div> 155 * @param dataLen 156 * <div class="zh"> 数据长度 </div> <div class="en"> data length </div> 157 * @param dataIn 158 * <div class="zh"> 输入数据 </div> <div class="en"> input data </div> 159 * @throws Sle4428DevException 160 */ 161 public void setPB(short addr, short dataLen, byte[] dataIn) throws Sle4428DevException; 162 163}