add Board::GetJson

This commit is contained in:
Terrence
2024-11-03 05:54:15 +08:00
parent 5006e5bda1
commit 92efdc9b64
16 changed files with 131 additions and 115 deletions

View File

@@ -27,7 +27,7 @@ public:
virtual WebSocket* CreateWebSocket() = 0;
virtual bool GetNetworkState(std::string& network_name, int& signal_quality, std::string& signal_quality_text) = 0;
virtual bool GetBatteryVoltage(int &voltage, bool& charging);
virtual std::string GetJson() = 0;
virtual std::string GetJson();
protected:
Board() = default;
@@ -35,6 +35,7 @@ protected:
private:
Board(const Board&) = delete; // 禁用拷贝构造函数
Board& operator=(const Board&) = delete; // 禁用赋值操作
virtual std::string GetBoardJson() = 0;
};
#define DECLARE_BOARD(BOARD_CLASS_NAME) \