GasLeakSensor
authorBernhard Tittelbach <xro@realraum.at>
Sat, 16 Nov 2013 20:56:52 +0000 (20:56 +0000)
committerBernhard Tittelbach <xro@realraum.at>
Sat, 16 Nov 2013 20:56:52 +0000 (20:56 +0000)
go/r3events/basicevents.go
go/r3events/marshal_events.go

index 60a8b8d..35f6385 100644 (file)
@@ -81,6 +81,10 @@ type NetGWStatUpdate struct {
     Ts int64
 }
 
+type GasLeakAlert struct {
+    Ts int64
+}
+
 type TimeTick struct {
     Ts int64
 }
index 5456bdb..7da4e1f 100644 (file)
@@ -91,6 +91,11 @@ func UnmarshalByteByte2Event(data [][]byte) (event interface{}, category string,
             err = json.Unmarshal(data[1], newevent)
             category = "time"
             event = *newevent
+        case "GasLeakAlert":
+            newevent := new(GasLeakAlert)
+            err = json.Unmarshal(data[1], newevent)
+            category = "sensors"
+            event = *newevent
         case "MovementSensorUpdate":
             newevent := new(MovementSensorUpdate)
             err = json.Unmarshal(data[1], newevent)