/**< Engine coolant temperature in degrees celcius **/
static const Property EngineCoolantTemperature;
- PROPERTYTYPE(EngineCoolantTemperature, EngineCoolantTemperatureType, BasicPropertyType<uint>, uint)
+ PROPERTYTYPE(EngineCoolantTemperature, EngineCoolantTemperatureType, BasicPropertyType<int>, int)
//typedef BasicPropertyType<int> EngineCoolantTemperatureType;
static const Property EngineCoolantLevel;
static gboolean timeoutCallback(gpointer data)
{
ExampleSourcePlugin* src = (ExampleSourcePlugin*)data;
-
+
src->randomizeProperties();
-
+
return true;
}
extern "C" AbstractSource * create(AbstractRoutingEngine* routingengine, map<string, string> config)
{
return new ExampleSourcePlugin(routingengine, config);
-
+
}
const string ExampleSourcePlugin::uuid()
steeringWheelAngle = 1 + (359.00 * (rand() / (RAND_MAX + 1.0)));
throttlePos = 1 + (100.00 * (rand() / (RAND_MAX + 1.0)));
engineCoolant = 1 + (40.00 * (rand() / (RAND_MAX + 140.0)));
-
+
DebugOut()<<"setting velocity to: "<<velocity<<endl;
DebugOut()<<"setting enginespeed to: "<<engineSpeed<<endl;
-
+
vel.setValue(velocity);
vel.priority = AbstractPropertyType::High;
es.setValue(engineSpeed);