| 123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- package common
- // 下发指令
- type PublishCmd struct {
- Code int `json:"code"`
- DeviceName string `json:"deviceName"`
- Area string `json:"area"`
- Address string `json:"address"`
- Action string `json:"action"`
- Params string `json:"params"`
- Identity string `json:"identity"`
- }
- // 上报消息外层结构
- type UpMsg struct {
- ID string `json:"id"`
- Method string `json:"method"`
- Params UpParam `json:"params"`
- Version string `json:"version"`
- }
- type UpParam struct {
- Time int64 `json:"time"`
- Value interface{} `json:"value"` // 动态内容,按需解析
- }
- // 心跳上报 value 结构
- type HeartBeatValue struct {
- DeviceName string `json:"device_name"`
- Area string `json:"area"`
- Number string `json:"number"`
- UUID string `json:"uuid"`
- UpdatedTime string `json:"updated_time"`
- Cluster string `json:"cluster"`
- }
- // 照度上报 value 结构
- type AlsValue struct {
- DeviceName string `json:"device_name"`
- Area string `json:"area"`
- Number string `json:"number"`
- UUID string `json:"uuid"`
- Lux int `json:"lux"`
- UpdatedTime string `json:"updated_time"`
- }
|