Transmission::TransmissionPositions transmissionShiftPostion = Transmission::Neutral;
uint16_t steeringWheelAngle=0;
uint16_t throttlePos = 0;
-uint16_t engineCoolant = 40;
+int engineCoolant = 40;
bool machineGun = false;
+const char* id = "6dd4268a-c605-4a06-9034-59c1e8344c8e";
+
static gboolean timeoutCallback(gpointer data)
{
ExampleSourcePlugin* src = (ExampleSourcePlugin*)data;
const string ExampleSourcePlugin::uuid()
{
- return "6dd4268a-c605-4a06-9034-59c1e8344c8e";
+ return id;
}
DebugOut()<<"setting velocity to: "<<velocity<<endl;
DebugOut()<<"setting enginespeed to: "<<engineSpeed<<endl;
- VehicleProperty::VehicleSpeedType vel(velocity);
- VehicleProperty::EngineSpeedType es(engineSpeed);
- VehicleProperty::AccelerationXType ac(accelerationX);
- VehicleProperty::SteeringWheelAngleType swa(steeringWheelAngle);
- VehicleProperty::TransmissionShiftPositionType tsp(transmissionShiftPostion);
- VehicleProperty::TransmissionGearPositionType tgp(transmissionShiftPostion);
- VehicleProperty::ThrottlePositionType tp(throttlePos);
- VehicleProperty::EngineCoolantTemperatureType ec(engineCoolant);
- VehicleProperty::MachineGunTurretStatusType mgt(machineGun);
+ vel.setValue(velocity);
+ es.setValue(engineSpeed);
+ ac.setValue(accelerationX);
+ swa.setValue(steeringWheelAngle);
+ tsp.setValue(transmissionShiftPostion);
+ tgp.setValue(transmissionShiftPostion);
+ tp.setValue(throttlePos);
+ ec.setValue(engineCoolant);
+ mgt.setValue(machineGun);
machineGun = !machineGun;
PropertyList mSupported;
uint16_t velocity;
uint16_t engineSpeed;
+
+ VehicleProperty::VehicleSpeedType vel;
+ VehicleProperty::EngineSpeedType es;
+ VehicleProperty::AccelerationXType ac;
+ VehicleProperty::SteeringWheelAngleType swa;
+ VehicleProperty::TransmissionShiftPositionType tsp;
+ VehicleProperty::TransmissionGearPositionType tgp;
+ VehicleProperty::ThrottlePositionType tp;
+ VehicleProperty::EngineCoolantTemperatureType ec;
+ VehicleProperty::MachineGunTurretStatusType mgt;
};
#endif // EXAMPLEPLUGIN_H