package com.dev.fbs9009;
|
|
import java.util.ArrayList;
|
import java.util.Date;
|
import java.util.List;
|
|
public class BattStateData {
|
|
private int BattGroupId; //µç³Ø×éid
|
private int dev_id; //É豸id
|
|
private int test_mon_num = 0; //±»²âµ¥Ìå±àºÅ
|
private int last_test_mon_num = 0; //ÉϴβâÊԵĵ¥Ìå±àºÅ
|
private int mon_count; //µ¥ÌåÊýÁ¿
|
private int batt_state = 0; //µç³Ø×´Ì¬ ->ϵͳ״̬
|
private Date updatetime; //Êý¾Ý¸üеÄʱ¼ä
|
private double onlinevol = 0.0; //ÔÚÏßµçѹ
|
private double groupvol = 0.0; //×é¶Ëµçѹ
|
private int record_num = 0; //¼Ç¼µÄ±ÊÊý
|
private int test_record_count = 1; //²âÊÔ´ÎÊý
|
private Date test_starttime; //²âÊÔ¿ªÊ¼Ê±¼ä
|
private double maxmon_vol; //×î´óµ¥Ìåµçѹ
|
private int maxmon_num; //×î´óµ¥Ìåµçѹ±àºÅ
|
private double minmon_vol; //×îµÍµ¥Ìåµçѹ
|
private int minmon_num; //×îµÍµ¥Ìåµçѹ±àºÅ
|
private double batt_tmp; //ζÈ
|
|
private List<LD_mon_states> mon_info;
|
|
//private List<List<LD_mon_states>> history; //±¾´ÎÊý¾ÝµÄÀúÊ·Êý¾Ý
|
|
public BattStateData() {
|
|
}
|
|
|
/**
|
* ÉèÖõ±Ç°µÄÊý¾Ý
|
*/
|
public void recordHistory(){
|
for(int i=0;i<this.mon_info.size() && i<this.mon_count;i++){
|
if(this.mon_info.get(i).getMon_vol() > this.maxmon_vol){
|
this.maxmon_vol = this.mon_info.get(i).getMon_vol();
|
this.maxmon_num = i+1;
|
}
|
if(this.mon_info.get(i).getMon_vol()<this.minmon_vol){
|
this.minmon_vol = this.mon_info.get(i).getMon_vol();
|
this.minmon_num = i+1;
|
}
|
}
|
}
|
|
//³õʼ»¯µç³Ø×éµÄ״̬
|
public BattStateData(int BattGroupId,int dev_id,int mon_count) {
|
this.BattGroupId = BattGroupId;
|
this.dev_id = dev_id;
|
this.mon_count = mon_count;
|
mon_info = new ArrayList<LD_mon_states>();
|
for(int i=0;i<this.mon_count;i++){
|
LD_mon_states mon_state = new LD_mon_states();
|
mon_info.add(mon_state);
|
}
|
}
|
|
/**
|
* »ñÈ¡µ±Ç°²âÊԵĵ¥Ìå±àºÅ
|
* @return
|
*/
|
public int getNowTestMonNum(){
|
int test_mon_num = 0;
|
for(int i=0;i<mon_info.size();i++){
|
LD_mon_states mondata = mon_info.get(i);
|
if(mondata.getMon_states() == MyModBusCom.BATT_DISCHARGE){
|
this.test_mon_num = (i+1);
|
return (i+1);
|
}
|
}
|
return test_mon_num;
|
}
|
|
public int getBattGroupId() {
|
return BattGroupId;
|
}
|
|
public void setBattGroupId(int battGroupId) {
|
BattGroupId = battGroupId;
|
}
|
|
public int getDev_id() {
|
return dev_id;
|
}
|
|
public void setDev_id(int dev_id) {
|
this.dev_id = dev_id;
|
}
|
|
public int getTest_mon_num() {
|
return test_mon_num;
|
}
|
|
public void setTest_mon_num(int test_mon_num) {
|
this.test_mon_num = test_mon_num;
|
}
|
|
public int getLast_test_mon_num() {
|
return last_test_mon_num;
|
}
|
|
public void setLast_test_mon_num(int last_test_mon_num) {
|
this.last_test_mon_num = last_test_mon_num;
|
}
|
|
public int getMon_count() {
|
return mon_count;
|
}
|
|
public void setMon_count(int mon_count) {
|
this.mon_count = mon_count;
|
}
|
|
public int getBatt_state() {
|
return batt_state;
|
}
|
|
public void setBatt_state(int batt_state) {
|
this.batt_state = batt_state;
|
}
|
|
public Date getUpdatetime() {
|
return updatetime;
|
}
|
|
public void setUpdatetime(Date updatetime) {
|
this.updatetime = updatetime;
|
}
|
|
public double getOnlinevol() {
|
return onlinevol;
|
}
|
|
public void setOnlinevol(double onlinevol) {
|
this.onlinevol = onlinevol;
|
}
|
|
public double getGroupvol() {
|
return groupvol;
|
}
|
|
public void setGroupvol(double groupvol) {
|
this.groupvol = groupvol;
|
}
|
|
public List<LD_mon_states> getMon_info() {
|
return mon_info;
|
}
|
|
public void setMon_info(List<LD_mon_states> mon_info) {
|
this.mon_info = mon_info;
|
}
|
|
public int getRecord_num() {
|
return record_num;
|
}
|
|
public void setRecord_num(int record_num) {
|
this.record_num = record_num;
|
}
|
|
public int getTest_record_count() {
|
return test_record_count;
|
}
|
|
public void setTest_record_count(int test_record_count) {
|
this.test_record_count = test_record_count;
|
}
|
|
public double getMaxmon_vol() {
|
return maxmon_vol;
|
}
|
|
public void setMaxmon_vol(double maxmon_vol) {
|
this.maxmon_vol = maxmon_vol;
|
}
|
|
public int getMaxmon_num() {
|
return maxmon_num;
|
}
|
|
public void setMaxmon_num(int maxmon_num) {
|
this.maxmon_num = maxmon_num;
|
}
|
|
public double getMinmon_vol() {
|
return minmon_vol;
|
}
|
|
public void setMinmon_vol(double minmon_vol) {
|
this.minmon_vol = minmon_vol;
|
}
|
|
public int getMinmon_num() {
|
return minmon_num;
|
}
|
|
public void setMinmon_num(int minmon_num) {
|
this.minmon_num = minmon_num;
|
}
|
|
public double getBatt_tmp() {
|
return batt_tmp;
|
}
|
|
public void setBatt_tmp(double batt_tmp) {
|
this.batt_tmp = batt_tmp;
|
}
|
|
public Date getTest_starttime() {
|
return test_starttime;
|
}
|
|
public void setTest_starttime(Date test_starttime) {
|
this.test_starttime = test_starttime;
|
}
|
|
}
|