兴趣是坚持一件事永不衰竭的动力
发布时间:2016-01-18 00:47:18
package com.dd.model.protocol;import java.nio.ByteBuffer;public class ValueDecoder{private String serialData;private DataTypeEnum type;private byte []serialByte;public ValueDecoder(DataTypeEnum type,byte []serialByte){StringBuffer sb = new StringBuffer();for (int i = 0; i < serialByt.........【阅读全文】
发布时间:2016-01-18 00:46:37
package com.dd.model.protocol;public class Value<T> implements IProtocolBase{String valueString;T value;DataTypeEnum valueType;public Value(){ }public Value(T value){this.value = value;valueString = value.toString();}private DataTypeEnum getValueType(T value){DataTypeEn.........【阅读全文】
发布时间:2016-01-18 00:46:07
package com.dd.model.protocol;import java.util.HashMap;public class TypeLentMap{private static HashMap<DataTypeEnum, Integer> mapTable = new HashMap<DataTypeEnum, Integer>();public TypeLentMap(){mapTable.put(DataTypeEnum.BOOL, 1);mapTable.put(DataTypeEnum.INT8, 1);mapTable.put(Dat.........【阅读全文】
发布时间:2016-01-18 00:45:38
package com.dd.model.protocol;public class TTLDecoder{private TTL ttl;private DataTypeEnum type;private short len;String serialData;byte serialByte[];public TTLDecoder(byte serialByte[]){StringBuffer sb = new StringBuffer();for (int i = 0; i < serialByte.length; i++){sb.append(Strin.........【阅读全文】
发布时间:2016-01-18 00:45:16
package com.dd.model.protocol;public class TTL implements IProtocolBase{private short tag;private DataTypeEnum type;private short len;public TTL(){}public TTL(short tag, DataTypeEnum type){this.tag = tag;this.type = type;this.len = getLenByType(type);}private short getLenByType(D.........【阅读全文】