switch params[index].ParameType {case 10: //10=数值(Byte)params[index].ParameByte = []byte{byte(xtools.InterfaceToInt(params[index].ParameValue))}case 15: //15=Bytesparams[index].ParameByte, _ = hex.DecodeString(params[index].ParameValue)case 20: //20=ASCIIparams[index].ParameByte = []byte(params[index].ParameValue)case 30: //30=Uint16var value = make([]byte, 2)valueUint64, _ := strconv.ParseUint(params[index].ParameValue, 10, 16)binary.BigEndian.PutUint16(value, uint16(valueUint64))params[index].ParameByte = value