From: Bernhard Tittelbach Date: Thu, 3 Oct 2013 07:37:43 +0000 (+0000) Subject: re-parse r3events from possible external mash. not best design X-Git-Url: https://git.realraum.at/?a=commitdiff_plain;h=db6096af35c81fac74bacda38c734a76b7bdf9c1;p=svn42.git re-parse r3events from possible external mash. not best design --- diff --git a/go/r3-eventbroker_zmq/sockettoevent.go b/go/r3-eventbroker_zmq/sockettoevent.go index 8e202da..34454cc 100644 --- a/go/r3-eventbroker_zmq/sockettoevent.go +++ b/go/r3-eventbroker_zmq/sockettoevent.go @@ -89,6 +89,18 @@ func ParseSocketInputLine(lines [][]byte, ps *pubsub.PubSub, keylookup_socket *z // brn.Oboite("photo0", newphoto) ps.Pub(r3events.IlluminationSensorUpdate{0, newphoto, ts}, "sensors") } + case "IlluminationSensorUpdate","TempSensorUpdate": + //try decode r3event + evnt, err := r3events.UnmarshalByteByte2Event(lines) + if err == nil {ps.Pub(evnt, "sensors")} + case "MovementSensorUpdate" : + //try decode r3event + evnt, err := r3events.UnmarshalByteByte2Event(lines) + if err == nil {ps.Pub(evnt, "movement")} + case "ButtonPressUpdate" : + //try decode r3event + evnt, err := r3events.UnmarshalByteByte2Event(lines) + if err == nil {ps.Pub(evnt, "buttons")} } }