mirror of
https://gitee.com/js-yhsec/energy_storage.git
synced 2026-05-28 03:09:24 +08:00
搭建PVB架构,实现前端的基础布局、菜单、表格、图示等功能
This commit is contained in:
@@ -1,85 +1,10 @@
|
||||
#pragma once
|
||||
|
||||
#include <thread>
|
||||
|
||||
#include "common/Logger.h"
|
||||
|
||||
#include "Operator.h"
|
||||
|
||||
struct AppData
|
||||
{
|
||||
/////////////////////////////////////////////
|
||||
/// === 系统 ===
|
||||
int64_t sysActivationTime {};
|
||||
|
||||
/////////////////////////////////////////////
|
||||
/// === 数据库 ===
|
||||
struct {
|
||||
std::string host;
|
||||
int port;
|
||||
std::string user;
|
||||
std::string passwd;
|
||||
} db;
|
||||
|
||||
/////////////////////////////////////////////
|
||||
/// === 系统统计 ===
|
||||
// 累计发电量,单位:kWh
|
||||
double electGenTatal {};
|
||||
// 累计入网电量,单位:kWh
|
||||
double electInTotal {};
|
||||
// 累计收益,单位:元
|
||||
double incomeTotal {};
|
||||
// 碳减排量, 单位:吨
|
||||
double ccers {};
|
||||
|
||||
/////////////////////////////////////////////
|
||||
/// === 环境 ===
|
||||
// 光照度
|
||||
double illuminance {};
|
||||
// 辐照度
|
||||
double irradiance {};
|
||||
// 风速
|
||||
double windspeed {};
|
||||
// 温度
|
||||
double temperature {};
|
||||
// 湿度
|
||||
double humidity {};
|
||||
|
||||
/////////////////////////////////////////////
|
||||
/// === 日统计 ===
|
||||
struct {
|
||||
// 发电量
|
||||
double electGen {};
|
||||
// 入网电量
|
||||
double electIn {};
|
||||
// 发电收益金额
|
||||
double incomeElect {};
|
||||
// 储能电量
|
||||
double electStorage {};
|
||||
// 储能次数
|
||||
int numStore {};
|
||||
// 放电电量
|
||||
double electDischarge {};
|
||||
// 放电次数
|
||||
int numDischarge {};
|
||||
// 用电电量
|
||||
double electLoad {};
|
||||
// 充电电量
|
||||
double electCharge {};
|
||||
// 充电次数
|
||||
int numCharge {};
|
||||
// 充电收益
|
||||
double incomeCharge {};
|
||||
|
||||
// 故障次数
|
||||
int numFault {};
|
||||
// 故障次数:光伏设备
|
||||
int numFaultSolar {};
|
||||
// 故障次数:储能设备
|
||||
int numFaultStorage {};
|
||||
// 故障次数:负荷设备
|
||||
int numFaultLoad {};
|
||||
} statDay;
|
||||
};
|
||||
#include "app/AppData.h"
|
||||
|
||||
class Application
|
||||
{
|
||||
@@ -91,8 +16,9 @@ public:
|
||||
}
|
||||
|
||||
void init();
|
||||
void initDevice();
|
||||
|
||||
AppData& getAppData();
|
||||
|
||||
bool isQuit() { return isQuit_; }
|
||||
Operator& getOperator() { return op_; }
|
||||
|
||||
@@ -100,9 +26,12 @@ public:
|
||||
|
||||
void runThreadDevice();
|
||||
|
||||
private:
|
||||
public:
|
||||
bool isQuit_ = false;
|
||||
|
||||
// 登录的管理员信息
|
||||
Operator op_;
|
||||
|
||||
// 应用数据
|
||||
AppData appdata_;
|
||||
};
|
||||
Reference in New Issue
Block a user