--- /dev/null
+/*
+ Copyright (C) 2012 Intel Corporation
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+*/
+
+
+#include "examplesink.h"
+#include "abstractroutingengine.h"
+#include "debugout.h"
+
+extern "C" AbstractSinkManager * create(AbstractRoutingEngine* routingengine)
+{
+ return new ExampleSinkManager(routingengine);
+}
+
+ExampleSink::ExampleSink(AbstractRoutingEngine* engine): AbstractSink(engine)
+{
+ routingEngine->subscribeToProperty(VehicleProperty::EngineSpeed, this);
+ routingEngine->subscribeToProperty(VehicleProperty::VehicleSpeed, this);
+}
+
+
+PropertyList ExampleSink::subscriptions()
+{
+
+}
+
+void ExampleSink::supportedChanged(PropertyList supportedProperties)
+{
+
+}
+
+void ExampleSink::propertyChanged(VehicleProperty::Property property, boost::any value, std::string uuid)
+{
+ DebugOut()<<VehicleProperty::name(property)<<" value: "<<boost::any_cast<uint16_t>(value)<<endl;
+}
+
+std::string ExampleSink::uuid()
+{
+ return "f7e4fab2-eb73-4842-9fb0-e1c550eb2d81";
+}
--- /dev/null
+/*
+ Copyright (C) 2012 Intel Corporation
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+*/
+
+
+#ifndef EXAMPLESINK_H
+#define EXAMPLESINK_H
+
+#include <../../home/tripzero/src/automotive-message-broker/lib/abstractsink.h>
+
+
+class ExampleSink : public AbstractSink
+{
+
+public:
+ ExampleSink(AbstractRoutingEngine* engine);
+ virtual PropertyList subscriptions();
+ virtual void supportedChanged(PropertyList supportedProperties);
+ virtual void propertyChanged(VehicleProperty::Property property, boost::any value, std::string uuid);
+ virtual std::string uuid();
+};
+
+class ExampleSinkManager: public AbstractSinkManager
+{
+public:
+ ExampleSinkManager(AbstractRoutingEngine* engine)
+ :AbstractSinkManager(engine)
+ {
+ new ExampleSink(engine);
+ }
+};
+
+#endif // EXAMPLESINK_H