Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
b5f0c0d86f
|
|||
17b2b362a0
|
@ -36,7 +36,7 @@ func (self *CommonHandler) GetId() string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (self *CommonHandler) Lost(msg string, err error, message MessageT) {
|
func (self *CommonHandler) Lost(msg string, err error, message MessageT) {
|
||||||
if err != nil {
|
if err == nil {
|
||||||
log.Printf("Error: %s, message %s is lost", msg, message)
|
log.Printf("Error: %s, message %s is lost", msg, message)
|
||||||
} else {
|
} else {
|
||||||
log.Printf("Error: %s (%s), message %s is lost", msg, err, message)
|
log.Printf("Error: %s (%s), message %s is lost", msg, err, message)
|
||||||
|
@ -20,9 +20,9 @@ type message struct {
|
|||||||
ALARM_status string `json:"ALARM_status"`
|
ALARM_status string `json:"ALARM_status"`
|
||||||
Bat float32 `json:"BatV"`
|
Bat float32 `json:"BatV"`
|
||||||
Work_mode string `json:"Work_mode"`
|
Work_mode string `json:"Work_mode"`
|
||||||
Temp_Black string `json:"Temp_Black"`
|
Temp_Black float32 `json:"Temp_Black"`
|
||||||
Temp_Red string `json:"Temp_Red"`
|
Temp_Red float32 `json:"Temp_Red"`
|
||||||
Temp_White string `json:"Temp_White"`
|
Temp_White float32 `json:"Temp_White"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func Parse(fPort int, decodedPayload []byte, _ string, variables *map[string]database.VariableType, attributes *map[string]interface{}, device *database.Device) error {
|
func Parse(fPort int, decodedPayload []byte, _ string, variables *map[string]database.VariableType, attributes *map[string]interface{}, device *database.Device) error {
|
||||||
|
Reference in New Issue
Block a user