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 017/** 018 * 019 */ 020package com.pax.dal.memorycard; 021 022import com.pax.dal.exceptions.Sle4442DevException; 023 024/** 025 * @author Steven.W 026 */ 027public interface ICardSle4442 extends IMemoryCard { 028 /** 029 * <div class="zh"> 上电并复位SLE4442模块、检查模块的初始状态是否正常 </div> <div class="en"> Power on and reset Sle4442 module, and 030 * check whether initial staus of the module is normal. </div> 031 * 032 * @throws Sle4442Exception 033 */ 034 public void open() throws Sle4442DevException; 035 036 /** 037 * <div class="zh"> 下电SLE4442模块,并设置其为停止态 </div> <div class="en"> Close Sle4442 module, and make it in stop status. 038 * </div> 039 * 040 * @throws Sle4442DevException 041 */ 042 public void close() throws Sle4442DevException; 043 044 /** 045 * <div class="zh"> 复位 IC卡,并返回卡的ATR </div> <div class="en"> Reset IC card and return ATR of the card. </div> 046 * 047 * @return <div class="zh"> 返回的卡的重置信息的ATR应答 </div> <div class="en"> ATR Answer To Reset information of the card. 048 * </div> 049 * @throws Sle4442DevException 050 */ 051 public byte[] reset() throws Sle4442DevException; 052 053 /** 054 * <div class="zh"> 读取数据 </div> <div class="en"> Read data. </div> 055 * 056 * @param Addr 057 * <div class="zh"> 读取的起始位置,合理取值区间为0-255. </div> <div class="en"> the start address to read, its valid 058 * range is 0~255. </div> 059 * @param length 060 * <div class="zh"> 要读取的数据的长度,合法取值区间为1-256. </div> <div class="en"> the length of the data to be read, 061 * its valid range is 1~256. </div> 062 * @return <div class="zh"> 读取的数据 </div> <div class="en"> the data has been read </div> 063 * @throws Sle4442DevException 064 */ 065 public byte[] readMMem(int Addr, int length) throws Sle4442DevException; 066 067 /** 068 * <div class="zh"> 写入的数据 </div> <div class="en"> Write data. </div> 069 * 070 * @param Addr 071 * <div class="zh"> 写入的起始地址,合法取值区间为:0-255 </div> <div class="en"> the start address to write, its valid 072 * range is 0~255. </div> 073 * @param length 074 * <div class="zh"> 写入数据的长度,合法取值区间为:0-255 </div> <div class="en"> the length of the data to be writen, 075 * its valid range is 0~255. </div> 076 * @param dataIn 077 * <div class="zh"> 数据字节长度 </div> <div class="en"> number bytes of data </div> 078 * @throws Sle4442DevException 079 */ 080 public void writeMMem(int Addr, int length, byte[] dataIn) throws Sle4442DevException; 081 082 /** 083 * <div class="zh"> 读取受保护数据 </div> <div class="en"> Read proteceted data. </div> 084 * 085 * @return <div class="zh"> 已经被读取的数据 </div> <div class="en"> the data has been read </div> 086 * @throws Sle4442DevException 087 */ 088 public byte[] readProMMem() throws Sle4442DevException; 089 090 /** 091 * <div class="zh"> 写入受保护数据 </div> <div class="en"> Write proteceted data. </div> 092 * 093 * @param Addr 094 * <div class="zh"> 写入的起始地址,合法区间为:0~31 </div> <div class="en"> the start address to write, its valid 095 * range is 0~31. </div> 096 * @param length 097 * <div class="zh"> 要写入的数据长度,合法区间:1-32. </div> <div class="en"> the length of the data to be writen, its 098 * valid range is 1~32. </div> 099 * @param dataIn 100 * <div class="zh"> 数据字节数 </div> <div class="en"> number bytes of data </div> 101 * @throws Sle4442DevException 102 */ 103 public void writeProMMem(int Addr, int length, byte[] dataIn) throws Sle4442DevException; 104 105 /** 106 * <div class="zh"> 验证密码 </div> <div class="en"> Verify password. </div> 107 * 108 * @param pwd 109 * <div class="zh"> 密码字节数,应该为3字节 </div> <div class="en"> number bytes of password, should be 3 bytes 110 * </div> 111 * @throws Sle4442DevException 112 */ 113 public void verifySc(byte[] pwd) throws Sle4442DevException; 114 115 /** 116 * <div class="zh"> 更新密码 </div> <div class="en"> Update password. </div> 117 * 118 * @param newPwd 119 * <div class="zh"> 120 * 121 * </div> <div class="en"> 密码字节数,应该为3字节 </div> 122 * @throws Sle4442DevException 123 */ 124 public void updateSc(byte[] newPwd) throws Sle4442DevException; 125}