From: Bernhard Tittelbach Date: Sat, 16 Nov 2013 20:56:52 +0000 (+0000) Subject: GasLeakSensor X-Git-Url: https://git.realraum.at/?a=commitdiff_plain;h=df03216ae02275765ae9a6757aed77bf0ac3da20;p=svn42.git GasLeakSensor --- diff --git a/go/r3events/basicevents.go b/go/r3events/basicevents.go index 60a8b8d..35f6385 100644 --- a/go/r3events/basicevents.go +++ b/go/r3events/basicevents.go @@ -81,6 +81,10 @@ type NetGWStatUpdate struct { Ts int64 } +type GasLeakAlert struct { + Ts int64 +} + type TimeTick struct { Ts int64 } diff --git a/go/r3events/marshal_events.go b/go/r3events/marshal_events.go index 5456bdb..7da4e1f 100644 --- a/go/r3events/marshal_events.go +++ b/go/r3events/marshal_events.go @@ -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)