| | |
| | | |
| | | return obj; |
| | | } |
| | | |
| | | /** |
| | | * |
| | | * @param monCount 单体数量 |
| | | * @param testGroupNum 被测电池组号 |
| | | * @return |
| | | */ |
| | | public BTS_BattData createBattData(int monCount,int testGroupNum){ |
| | | BTS_BattData battData = new BTS_BattData(monCount); |
| | | if(testGroupNum > 0 && testGroupNum <= BTS_ComBase.BattGroupCountMax){ |
| | | testGroupNum = testGroupNum - 1; |
| | | }else{ |
| | | testGroupNum = 0; |
| | | } |
| | | battData.dataType = this.dataType[0]; //测试类型 |
| | | battData.testTime = this.testTime.clone(); //测试时长 |
| | | battData.monCount = monCount; //单体数量 |
| | | |
| | | battData.onlineVol = this.onlinevol[testGroupNum]; //在线电压 |
| | | battData.groupVol = this.groupvol[testGroupNum]; //组端电压 |
| | | battData.battState = this.battstate[testGroupNum]; //充放电状态 3 5 9 |
| | | battData.battCurr = this.battcurr[testGroupNum]; //电池组电流 |
| | | battData.battCap = this.battcap[testGroupNum]; //电池组容量 |
| | | battData.battTemp = this.batttemp[testGroupNum]; //电池组温度 |
| | | battData.monMAX_num = this.monMAX_num[testGroupNum]; //最大单体编号 |
| | | battData.monMIN_num = this.monMIN_num[testGroupNum]; //最低按单体编号 |
| | | battData.monvolMAX = this.monvolMAX[testGroupNum]; //最大单体电压 |
| | | battData.monvolMIN = this.monvolMIN[testGroupNum]; //最低单体电压 |
| | | |
| | | int idx = 0; |
| | | for (int k = testGroupNum*monCount;k<(testGroupNum+1)*monCount && k < this.vol.length;k++){ |
| | | battData.monVol[idx++] = this.vol[k]; |
| | | } |
| | | return battData; |
| | | } |
| | | |
| | | |
| | | public boolean putByteBuffer(byte[] data, int dev_type, int soft_ver) |
| | | { |