12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- syntax = "proto3";
- // package声明符,用来防止不同的消息类型有命名冲突
- package v1;
- // 用于生成指定语言go的包名称
- option go_package = "smart-site-management-gateway/pb/v1";
- message DustMonitorData{
- string date = 1;
- double pm10= 2;
- double pm25 = 3;
- double tsp = 4;
- // 温度
- double t01 = 5;
- // 湿度
- double h01 = 6;
- // 风向
- double w01 = 7;
- // 风速
- double w02 = 8;
- // 雨量
- double r01 = 9;
- // 气压
- double p01 = 10;
- // 噪声
- double b03 = 11;
- }
- message LatestDustMonitorDataRequest{
- string sn = 1;
- int32 type = 2;
- int64 project_id = 3;
- }
- message LatestDustMonitorDataReply{
- DustMonitorData data = 1;
- }
- message DustMonitorHistoryRequest{
- string sn = 1;
- int32 type = 2;
- int64 time = 3;
- }
- message DustMonitorHistoryReply{
- repeated DustMonitorData list = 1;
- }
- message DustListRequest {
- int64 project_id = 1;
- int32 page = 2;
- int32 page_size = 3;
- }
- message DustListItem {
- int64 id = 1;
- string sn = 2;
- int32 state = 3;
- string name = 4;
- }
- message DustListReply {
- int64 online = 1;
- int64 offline = 2;
- int64 total = 3;
- int32 page = 4;
- int32 page_size = 5;
- repeated DustListItem list = 6;
- }
- message DustAqiRequest {
- string sn = 1;
- }
- message DustAqiReply {
- double aqi = 1;
- }
|