|
@@ -62,12 +62,11 @@ func (a *Access) Message(topic string, payload []byte) error {
|
|
|
if err != nil {
|
|
|
return nil
|
|
|
}
|
|
|
- fmt.Printf("topicInfo: %v, message: %v,types:%v,type:%s", topicInfo, jsonPayload, topicInfo.Types, topicInfo.Types[0])
|
|
|
switch topicInfo.Types[0] {
|
|
|
case "status":
|
|
|
return a.processStatus(topicInfo, device.VendorID, jsonPayload)
|
|
|
case "event":
|
|
|
- fmt.Printf("处理事件消息11111111111:----------%s", topicInfo.DeviceCode)
|
|
|
+ fmt.Printf("处理事件消息11111111111:----------%s\n", topicInfo.DeviceCode)
|
|
|
return a.processEvent(topicInfo, device.VendorID, jsonPayload)
|
|
|
}
|
|
|
return nil
|