mirror of
https://gitee.com/js-yhsec/energy_storage.git
synced 2026-05-28 03:09:24 +08:00
南瑞意见修改:前端页面和后端接口
This commit is contained in:
@@ -119,13 +119,16 @@ public:
|
||||
string getGatewayParam();
|
||||
|
||||
void readAlert(std::shared_ptr<Device> device, std::string addr, int v, std::string text);
|
||||
void readRuntimeData(int deviceNo, string addr, int val);
|
||||
void readEnergyData(int deviceNo, string addr, int val);
|
||||
void readChargeData(int deviceNo, string addr, int val);
|
||||
void readTHData(int deviceNo, string addr, int val);
|
||||
void readFire40Data(int deviceNo, string addr, int val);
|
||||
void readCoolingData(int deviceNo, string addr, int val);
|
||||
void readGatewayMode(int deviceNo, int mode, string p1, string p2, string p3);
|
||||
void readGatewayStatus(int deviceNo, int cdzStatus, int emuStatus);
|
||||
|
||||
void readTDData(int deviceNo);
|
||||
|
||||
void setCache(int datatype, std::vector<float>& vd);
|
||||
void cache();
|
||||
int posCache {0};
|
||||
@@ -135,6 +138,8 @@ public:
|
||||
|
||||
void predict();
|
||||
|
||||
void writeDeviceData();
|
||||
|
||||
public:
|
||||
int stationId {};
|
||||
std::string name;
|
||||
@@ -147,7 +152,6 @@ public:
|
||||
int err = 0;
|
||||
int online = 0;
|
||||
int running = 0;
|
||||
|
||||
bool isConnected {false};
|
||||
|
||||
int workMode {}; // 运行模式
|
||||
@@ -172,6 +176,83 @@ public:
|
||||
int overload {}; // 防过载回差 40059(1KW 10-300)
|
||||
} gatewayParam;
|
||||
|
||||
int cdzStatus{ -1 }; // 充电桩 1:在线,0:离线
|
||||
int emuStatus{ -1 }; // 储能 1:在线,0:离线
|
||||
int pvStatus{ -1 };
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||
/// === 储能相关数据 ===
|
||||
struct {
|
||||
int ts; // 数据更新时间戳(通讯)
|
||||
int num = 1; // 储能设备的数量(储能仓的个数)
|
||||
|
||||
int status = 0; // 储能设备状态: 0:离线,1:空闲,2:充电,3:放电,9:故障
|
||||
|
||||
int voltage = 0;
|
||||
int current = 0;
|
||||
int power = 0;
|
||||
float powerFactor = 0;
|
||||
|
||||
vector<int> U; // 电压曲线(144个点位)
|
||||
vector<int> I; // 电流曲线(144个点位)
|
||||
vector<int> P; // 功率曲线(144个点位)
|
||||
|
||||
} storage;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||
/// === 充电相关数据 ===
|
||||
struct {
|
||||
int ts; // 数据更新时间戳(通讯)
|
||||
int num = 1; // 充电设备的数量
|
||||
int status = 0; // 充电设备状态: 0:离线,1:空闲,2:充电,9:故障
|
||||
|
||||
struct {
|
||||
int isCharge = 0;
|
||||
int voltage = 0;
|
||||
int current = 0;
|
||||
int power = 0;
|
||||
int powerLimit = 0;
|
||||
} connector1;
|
||||
|
||||
struct {
|
||||
int isCharge = 0;
|
||||
int voltage = 0;
|
||||
int current = 0;
|
||||
int power = 0;
|
||||
int powerLimit = 0;
|
||||
} connector2;
|
||||
|
||||
vector<int> U; // 电压曲线(144个点位)
|
||||
vector<int> I; // 电流曲线(144个点位)
|
||||
vector<int> P; // 功率曲线(144个点位)
|
||||
} charge;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||
/// === 光伏相关数据 ===
|
||||
struct {
|
||||
int ts; // 数据更新时间戳(通讯)
|
||||
int status = 0; // 充电设备状态: 0:离线,1:空闲,2:发电,9:故障
|
||||
int voltage = 0;
|
||||
int current = 0;
|
||||
int power = 0;
|
||||
vector<int> U; // 电压曲线(144个点位)
|
||||
vector<int> I; // 电流曲线(144个点位)
|
||||
vector<int> P; // 功率曲线(144个点位)
|
||||
} pv;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||
/// === 电网相关数据 ===
|
||||
struct {
|
||||
int status = 0; // 充电设备状态: 0:离线,1:空闲,2:发电,9:故障
|
||||
|
||||
int voltage = 0;
|
||||
int current = 0;
|
||||
int power = 0;
|
||||
float powerFactor = 0;
|
||||
//vector<int> U; // 电压曲线(144个点位)
|
||||
//vector<int> I; // 电流曲线(144个点位)
|
||||
vector<int> P; // 功率曲线(144个点位)
|
||||
} grid;
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||
/// === 系统统计 ===
|
||||
// 累计发电量,单位:kWh
|
||||
@@ -202,10 +283,10 @@ public:
|
||||
double humidity {};
|
||||
int aircStatus {0};
|
||||
int coolingStatus {0};
|
||||
double voltage {0};
|
||||
double current {0};
|
||||
double power {0};
|
||||
double powerFactor {0};
|
||||
//double voltage {0};
|
||||
//double current {0};
|
||||
//double power {0};
|
||||
//double powerFactor {0};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||
/// === 设备信息 ===
|
||||
@@ -272,12 +353,8 @@ public:
|
||||
} runtimeData;
|
||||
|
||||
|
||||
int cdzStatus {-1}; // 充电桩 1:在线,0:离线
|
||||
int emuStatus {-1}; // 储能 1:在线,0:离线
|
||||
|
||||
std::map<std::string, int64_t> mapAlertCache;
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||
/// 说明:从电表中读取对应数据:每间隔600秒(10分钟)缓存一个点位,存储到数据库,用于绘制一天的电曲线
|
||||
// 储能充电量缓存,key:位置索引(0->144),val:电量
|
||||
|
||||
Reference in New Issue
Block a user