<busconfig>
<policy context="default">
- <allow own="org.automotive.message.broker"/>
- <allow send_destination="org.automotive.message.broker"/>
+ <allow own="org.automotive.message.broker"/>
+ <allow send_destination="org.automotive.message.broker"/>
- <!-- Example: in the default context, this interface is denied write control -->
- <deny send_destination="org.automotive.message.broker" send_interface="org.freedesktop.DBus.Properties"
- send_path="/org/automotive/uncategorized/MachineGunTurretStatus" send_member="Set" />
+ <!-- Example: in the default context, this interface is denied write control -->
+ <deny send_destination="org.automotive.message.broker" send_interface="org.freedesktop.DBus.Properties"
+ send_path="*/0/MachineGunTurretStatus" send_member="Set" />
</policy>
- <!-- Example: the following is an example on how a specific interface can be protected using SMACK
+ <!-- Example: the following is an example on how a specific interface can be protected using SMACK
<policy smack="allow_write_machinegun" >
- <allow send_destination="org.automotive.message.broker" send_interface="org.freedesktop.DBus.Properties"
- send_path="/org/automotive/uncategorized/MachineGunTurretStatus" send_member="Set" />
+ <allow send_destination="org.automotive.message.broker" send_interface="org.freedesktop.DBus.Properties"
+ send_path="*/0/MachineGunTurretStatus" send_member="Set" />
</policy> -->
</busconfig>
std::shared_ptr<AbstractPropertyType> spd,
std::shared_ptr<AbstractPropertyType> time,
std::shared_ptr<AbstractPropertyType> fix,
- std::shared_ptr<AbstractPropertyType> satsUsed);
+ std::shared_ptr<AbstractPropertyType> satsUsed,
+ std::shared_ptr<AbstractPropertyType> vspd);
void parse(std::string gprmc);
std::shared_ptr<AbstractPropertyType> mAltitude;
std::shared_ptr<AbstractPropertyType> mDirection;
std::shared_ptr<AbstractPropertyType> mSpeed;
+ std::shared_ptr<AbstractPropertyType> mVehicleSpeed;
std::shared_ptr<AbstractPropertyType> mGpsTime;
std::shared_ptr<AbstractPropertyType> mFix;
std::shared_ptr<AbstractPropertyType> mSatelitesUsed;
std::shared_ptr<AbstractPropertyType> spd,
std::shared_ptr<AbstractPropertyType> time,
std::shared_ptr<AbstractPropertyType> fix,
- std::shared_ptr<AbstractPropertyType> satsUsed)
+ std::shared_ptr<AbstractPropertyType> satsUsed,
+ std::shared_ptr<AbstractPropertyType> vspd)
:parent(source), isActive(false)
{
mLatitude = lat;
mGpsTime = time;
mFix = fix;
mSatelitesUsed = satsUsed;
+ mVehicleSpeed = vspd;
}
void Location::parse(string nmea)
}
catch(...)
{
- DebugOut(5)<<"Failed to parse direction: "<<dir<<endl;
+ DebugOut(5) << "Failed to parse direction: " << dir << endl;
}
}
auto lon = addPropertySupport<VehicleProperty::LongitudeType>(Zone::None);
auto alt = addPropertySupport<VehicleProperty::AltitudeType>(Zone::None);
auto spd = addPropertySupport(Zone::None, [](){ return new BasicPropertyType<uint16_t>(GPSSPEED, 0); });
+ auto vspd = addPropertySupport<VehicleProperty::VehicleSpeed>(Zone::None);
auto dir = addPropertySupport<VehicleProperty::DirectionType>(Zone::None);
auto time = addPropertySupport(Zone::None, [](){ return new BasicPropertyType<double>(GPSTIME, 0); });
auto fix = addPropertySupport(Zone::None, []() { return new BasicPropertyType<Location::FixType>(GpsFix, Location::NoFix); });
auto satsUsed = addPropertySupport(Zone::None, []() { return new BasicPropertyType<uint16_t>(GpsSatsUsed, 0); });
rawNmea = addPropertySupport(Zone::None, []() { return new StringPropertyType(GpsNmea); });
- location = new Location(this, lat, lon, alt, dir, spd, time, fix, satsUsed);
+ location = new Location(this, lat, lon, alt, dir, spd, time, fix, satsUsed, vspd);
std::string btaddapter = config["bluetoothAdapter"];