| | |
| | | // 警报请求结构体 |
| | | struct WarningReq { |
| | | Head head; |
| | | float oxygen; // 氧气浓度 |
| | | float carbon; // 一氧化碳浓度 |
| | | float temp; // 温度 |
| | | float humidity; // 湿度 |
| | | |
| | | float oxygenWarning; |
| | | float carbonWarning; |
| | | float tempWarning; |
| | | float humidityWarning; |
| | | |
| | | WarningReq() { |
| | | head.type = WARNING_REQ; |
| | |
| | | } |
| | | }; |
| | | |
| | | |
| | | struct DataThreshold{ |
| | | //阈值 |
| | | float oxygenThreshold; |
| | | float carbonThreshold; |
| | | float tempThreshold; |
| | | float humidityThreshold; |
| | | }; |
| | | |
| | | struct Data{ |
| | | float oxygen; // 氧气浓度 |
| | | float carbon; // 一氧化碳浓度 |
| | | float temp; // 温度 |
| | | float humidity; // 湿度 |
| | | }; |
| | | |
| | | // 警报响应结构体 |
| | | struct WarningRes { |
| | | Head head; |