| | |
| | | package com.dayu.recharge.card; |
| | | |
| | | import com.dayu.recharge.tools.HexUtil; |
| | | import com.dayu.recharge.utils.MyCommon; |
| | | import com.tencent.bugly.crashreport.CrashReport; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | |
| | | public class ConfigurationPowerCard implements Serializable { |
| | | |
| | | |
| | | public String cardType = "BD";//卡类型 |
| | | public String cardType = MyCommon.CONFIGURATION_POWER_CARD_TYPE;//卡类型 |
| | | public String cardData = "A0B1C289";//标识码 |
| | | |
| | | public String power;//功率 |
| | |
| | | this.power = power; |
| | | } |
| | | |
| | | |
| | | public static ConfigurationPowerCard toBean(byte[] data) { |
| | | try { |
| | | ConfigurationPowerCard powerCard = new ConfigurationPowerCard(); |
| | | int intPower = HexUtil.get16to10(HexUtil.byteToHex(data[5])); |
| | | powerCard.setPower(String.valueOf(intPower)); |
| | | return powerCard; |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | CrashReport.postCatchedException(e); |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | public byte[] toByte() { |
| | | Zero zero = new Zero(); |
| | | return zero.toByte(); |