Merge pull request #69 from fredcadete/master
[profile/ivi/automotive-message-broker.git] / plugins / exampleplugin.cpp
index ecfefab..6ea63cd 100644 (file)
@@ -107,10 +107,9 @@ ExampleSourcePlugin::ExampleSourcePlugin(AbstractRoutingEngine* re, map<string,
 
 
 
-extern "C" AbstractSource * create(AbstractRoutingEngine* routingengine, map<string, string> config)
+extern "C" void create(AbstractRoutingEngine* routingengine, map<string, string> config)
 {
-       return new ExampleSourcePlugin(routingengine, config);
-
+       new ExampleSourcePlugin(routingengine, config);
 }
 
 const string ExampleSourcePlugin::uuid()
@@ -197,13 +196,9 @@ void ExampleSourcePlugin::getPropertyAsync(AsyncPropertyReply *reply)
        {
                VehicleProperty::DoorsPerRowType temp;
 
-               BasicPropertyType<uint16_t> row1(2);
-               BasicPropertyType<uint16_t> row2(2);
-               BasicPropertyType<uint16_t> row3(1);
-
-               temp.append(row1);
-               temp.append(row2);
-               temp.append(row3);
+               temp.append(2);
+               temp.append(2);
+               temp.append(1);
 
                reply->value = &temp;
                reply->success = true;
@@ -366,8 +361,10 @@ void ExampleSourcePlugin::randomizeProperties()
        DebugOut()<<"setting enginespeed to: "<<engineSpeed<<endl;
 
        vel.setValue(velocity);
+       vel.sequence++;
        vel.priority = AbstractPropertyType::High;
        es.setValue(engineSpeed);
+       es.sequence++;
        es.priority = AbstractPropertyType::Low;
        ac.setValue(accelerationX);
        swa.setValue(steeringWheelAngle);
@@ -395,7 +392,7 @@ void ExampleSourcePlugin::addPropertySupport(VehicleProperty::Property property,
 {
        mSupported.push_back(property);
 
-       std::list<Zone::Type> zones;
+       Zone::ZoneList zones;
 
        zones.push_back(zone);