}
}
-void Core::updateProperty(VehicleProperty::Property property, AbstractPropertyType *value, std::string uuid, double timestamp, uint32_t sequence)
+void Core::updateProperty(VehicleProperty::Property property, AbstractPropertyType *value, std::string uuid)
{
SinkList list = propertySinkMap[property];
propertiesPerSecond++;
- /*if(previousValueMap.find(property) != previousValueMap.end())
- {
- std::string v = previousValueMap[property];
- if(v == value->toString())
- {
- ///no change from last value;
- return;
- }
- }
-
- previousValueMap[property] = value->toString();*/
for(SinkList::iterator itr = list.begin(); itr != list.end(); itr++)
{
- (*itr)->propertyChanged(property, value, uuid, timestamp, sequence);
+ (*itr)->propertyChanged(property, value, uuid);
}
}
void setSupported(PropertyList supported, AbstractSource* source);
void updateSupported(PropertyList added, PropertyList removed);
- void updateProperty(VehicleProperty::Property property, AbstractPropertyType* value, string uuid, double timestamp, uint32_t sequence);
+ void updateProperty(VehicleProperty::Property property, AbstractPropertyType* value, string uuid);
/// sinks:
-set(amb_sources abstractpropertytype.cpp abstractroutingengine.cpp listplusplus.cpp abstractsink.cpp vehicleproperty.cpp abstractsource.cpp debugout.cpp)
+set(amb_sources abstractpropertytype.cpp abstractroutingengine.cpp listplusplus.cpp abstractsink.cpp vehicleproperty.cpp abstractsource.cpp debugout.cpp timestamp.cpp)
set(amb_headers_install abstractpropertytype.h nullptr.h abstractroutingengine.h listplusplus.h abstractsink.h vehicleproperty.h debugout.h abstractsource.h timestamp.h)
include_directories( ${include_dirs} )
add_library(amb SHARED ${amb_sources})
#include <boost/lexical_cast.hpp>
#include <boost/utility.hpp>
#include <type_traits>
+#include "timestamp.h"
class AbstractPropertyType
{
public:
+ AbstractPropertyType(): timestamp(0), sequence(0) {}
+
virtual std::string toString() const = 0;
virtual void fromString(std::string)= 0;
virtual AbstractPropertyType* copy() = 0;
+ double timestamp;
+
+ uint32_t sequence;
+
void setValue(boost::any val)
{
mValue = val;
+ timestamp = amb::currentTime();
}
template <typename T>
typedef std::function<void (AsyncPropertyReply*)> GetPropertyCompletedSignal;
typedef std::function<void (AsyncRangePropertyReply*)> GetRangedPropertyCompletedSignal;
-class PropertyValueTime {
-public:
- ~PropertyValueTime()
- {
- delete value;
- }
-
- AbstractPropertyType* value;
- double timestamp;
-};
-
class AsyncPropertyRequest
{
public:
values.clear();
}
- std::list<PropertyValueTime*> values;
+ std::list<AbstractPropertyType*> values;
bool success;
};
public:
virtual void setSupported(PropertyList supported, AbstractSource* source) = 0;
virtual void updateSupported(PropertyList added, PropertyList removed) = 0;
- virtual void updateProperty(VehicleProperty::Property property, AbstractPropertyType* value, std::string uuid, double timestamp, uint32_t sequence) = 0;
+ virtual void updateProperty(VehicleProperty::Property property, AbstractPropertyType* value, std::string uuid) = 0;
/// sinks:
virtual void registerSink(AbstractSink* self) = 0;
* Do not destroy it. If you need to store the value use value.anyValue() or value.value<T>() to copy.
* @param uuid Unique identifier representing the source
*/
- virtual void propertyChanged(VehicleProperty::Property property, AbstractPropertyType* value, string uuid, double timestamp, uint32_t sequence) = 0;
+ virtual void propertyChanged(VehicleProperty::Property property, AbstractPropertyType* value, string uuid) = 0;
virtual void supportedChanged(PropertyList supportedProperties) = 0;
--- /dev/null
+#include "timestamp.h"
+
+#include <time.h>
+#include <iostream>
+
+double amb::currentTime()
+{
+ struct timespec tm;
+
+ clock_gettime(CLOCK_REALTIME, &tm);
+
+ double ns = double(tm.tv_nsec) / 1000000000;
+
+
+ double time = double(tm.tv_sec) + ns;
+
+ return time;
+}
-#ifndef _TIMESTAMP_H__
-#define _TIMESTAMP_H__
+#ifndef _TIMESTAMP_H___
+#define _TIMESTAMP_H___
-#include <time.h>
-#include <iostream>
namespace amb {
-double currentTime()
-{
- struct timespec tm;
-
- clock_gettime(CLOCK_REALTIME, &tm);
-
- double ns = double(tm.tv_nsec) / 1000000000;
-
-
- double time = double(tm.tv_sec) + ns;
-
- return time;
-}
+double currentTime();
}
}
-void DatabaseSink::propertyChanged(VehicleProperty::Property property, AbstractPropertyType *value, std::string uuid, double timestamp, uint32_t sequence)
+void DatabaseSink::propertyChanged(VehicleProperty::Property property, AbstractPropertyType *value, std::string uuid)
{
DBObject* obj = new DBObject;
obj->key = property;
obj->value = value->toString();
obj->source = uuid;
+ obj->time = value->timestamp;
+ obj->sequence = value->sequence;
}
~DatabaseSink();
virtual PropertyList subscriptions();
virtual void supportedChanged(PropertyList supportedProperties);
- virtual void propertyChanged(VehicleProperty::Property property, AbstractPropertyType* value, std::string uuid, double timestamp, uint32_t sequence);
+ virtual void propertyChanged(VehicleProperty::Property property, AbstractPropertyType* value, std::string uuid);
virtual std::string uuid();
private:
registerObject();
}
-void DBusSink::propertyChanged(VehicleProperty::Property property, AbstractPropertyType *value, string uuid, double, uint32_t)
+void DBusSink::propertyChanged(VehicleProperty::Property property, AbstractPropertyType *value, string uuid)
{
if(!propertyDBusMap.count(property))
return;
public:
DBusSink(std::string interface, std::string path, AbstractRoutingEngine* engine, GDBusConnection* connection, map<string, string> config);
virtual void supportedChanged(PropertyList supportedProperties);
- virtual void propertyChanged(VehicleProperty::Property property, AbstractPropertyType *value, std::string uuid,double,uint32_t);
+ virtual void propertyChanged(VehicleProperty::Property property, AbstractPropertyType *value, std::string uuid);
virtual std::string uuid();
protected:
return "5b0e8a04-d6d7-43af-b827-1663627a25d9";
}
-void DemoSink::propertyChanged(VehicleProperty::Property property, AbstractPropertyType *value, string uuid, double, uint32_t)
+void DemoSink::propertyChanged(VehicleProperty::Property property, AbstractPropertyType *value, string uuid)
{
std::string app = configuration["script"];
std::string strValue = value->toString();
string uuid();
- void propertyChanged(VehicleProperty::Property property, AbstractPropertyType* value, string uuid, double, uint32_t);
+ void propertyChanged(VehicleProperty::Property property, AbstractPropertyType* value, string uuid);
void supportedChanged(PropertyList);
friend class WheelPrivate;
machineGun = !machineGun;
- routingEngine->updateProperty(VehicleProperty::VehicleSpeed, &vel, uuid(),amb::currentTime(), 0);
- routingEngine->updateProperty(VehicleProperty::EngineSpeed, &es, uuid(),amb::currentTime(), 0);
- routingEngine->updateProperty(VehicleProperty::AccelerationX, &ac, uuid(),amb::currentTime(), 0);
- routingEngine->updateProperty(VehicleProperty::SteeringWheelAngle, &swa, uuid(),amb::currentTime(), 0);
- routingEngine->updateProperty(VehicleProperty::TransmissionShiftPosition,&tsp, uuid(),amb::currentTime(), 0);
- routingEngine->updateProperty(VehicleProperty::ThrottlePosition, &tp, uuid(),amb::currentTime(), 0);
- routingEngine->updateProperty(VehicleProperty::EngineCoolantTemperature, &ec, uuid(),amb::currentTime(), 0);
+ vel.timestamp = amb::currentTime();
+ es.timestamp = amb::currentTime();
+ ac.timestamp = amb::currentTime();
+ swa.timestamp = amb::currentTime();
+ tsp.timestamp = amb::currentTime();
+ tp.timestamp = amb::currentTime();
+ ec.timestamp = amb::currentTime();
+
+ routingEngine->updateProperty(VehicleProperty::VehicleSpeed, &vel, uuid());
+ routingEngine->updateProperty(VehicleProperty::EngineSpeed, &es, uuid());
+ routingEngine->updateProperty(VehicleProperty::AccelerationX, &ac, uuid());
+ routingEngine->updateProperty(VehicleProperty::SteeringWheelAngle, &swa, uuid());
+ routingEngine->updateProperty(VehicleProperty::TransmissionShiftPosition,&tsp, uuid());
+ routingEngine->updateProperty(VehicleProperty::ThrottlePosition, &tp, uuid());
+ routingEngine->updateProperty(VehicleProperty::EngineCoolantTemperature, &ec, uuid());
//routingEngine->updateProperty(VehicleProperty::MachineGunTurretStatus, &mgt);
}
void unsubscribeToPropertyChanges(VehicleProperty::Property property);
PropertyList supported();
- void propertyChanged(VehicleProperty::Property property, AbstractPropertyType* value, string uuid, double timestamp, uint32_t sequence) {}
+ void propertyChanged(VehicleProperty::Property property, AbstractPropertyType* value, string uuid) {}
void supportedChanged(PropertyList) {}
void randomizeProperties();
vehicleSpeedFromLastWeek.property = VehicleProperty::VehicleSpeed;
vehicleSpeedFromLastWeek.completed = [](AsyncRangePropertyReply* reply)
{
- std::list<PropertyValueTime*> values = reply->values;
+ std::list<AbstractPropertyType*> values = reply->values;
for(auto itr = values.begin(); itr != values.end(); itr++)
{
- DebugOut(0)<<"Velocity value from last week: "<<(*itr)->value->toString()<<" time: "<<(*itr)->timestamp<<endl;
+ DebugOut(0)<<"Velocity value from last week: "<<(*itr)->toString()<<" time: "<<(*itr)->timestamp<<endl;
}
};
routingEngine->subscribeToProperty(VehicleProperty::VehicleSpeed, this);
}
-void ExampleSink::propertyChanged(VehicleProperty::Property property, AbstractPropertyType* value, std::string uuid, double timestamp, uint32_t sequence)
+void ExampleSink::propertyChanged(VehicleProperty::Property property, AbstractPropertyType* value, std::string uuid)
{
DebugOut()<<property<<" value: "<<value->toString()<<endl;
}
ExampleSink(AbstractRoutingEngine* engine, map<string, string> config);
virtual PropertyList subscriptions();
virtual void supportedChanged(PropertyList supportedProperties);
- virtual void propertyChanged(VehicleProperty::Property property, AbstractPropertyType* value, std::string uuid, double timestamp, uint32_t sequence);
+ virtual void propertyChanged(VehicleProperty::Property property, AbstractPropertyType* value, std::string uuid);
virtual std::string uuid();
};
return true;
}
+
void OBD2Source::updateProperty(VehicleProperty::Property property,AbstractPropertyType* value)
{
//m_re->updateProperty(property,&value);
}
else
{
- m_re->updateProperty(property,value,uuid(),amb::currentTime(),0);
+ m_re->updateProperty(property,value,uuid());
}
}
-void OBD2Source::mafValue(double maf)
-{
- VehicleProperty::VehicleSpeedType emaf(maf);
- m_re->updateProperty(VehicleProperty::MassAirFlow,&emaf,uuid(),amb::currentTime(),0);
-}
-void OBD2Source::engineCoolantTemp(int temp)
-{
- VehicleProperty::VehicleSpeedType etemp(temp);
- m_re->updateProperty(VehicleProperty::EngineCoolantTemperature,&etemp,uuid(),amb::currentTime(),0);
-}
-void OBD2Source::engineSpeed(double speed)
-{
- VehicleProperty::VehicleSpeedType espeed(speed);
- m_re->updateProperty(VehicleProperty::EngineSpeed,&espeed,uuid(),amb::currentTime(),0);
-}
-void OBD2Source::vehicleSpeed(int speed)
-{
- VehicleProperty::EngineSpeedType vspeed(speed);
- m_re->updateProperty(VehicleProperty::VehicleSpeed,&vspeed,uuid(),amb::currentTime(),0);
-}
+
void OBD2Source::setSupported(PropertyList list)
{
m_supportedProperties = list;
void engineCoolantTemp(int temp);
PropertyList removeRequests;
void setSupported(PropertyList list);
- void propertyChanged(VehicleProperty::Property property, AbstractPropertyType* value, string uuid,double,uint32_t) {}
+ void propertyChanged(VehicleProperty::Property property, AbstractPropertyType* value, string uuid) {}
void supportedChanged(PropertyList) {}
GAsyncQueue* commandQueue;
GAsyncQueue* subscriptionAddQueue;
VehicleProperty::TireTemperatureType lrTemp(lrTemperature);
VehicleProperty::TireTemperatureType rrTemp(rrTemperature);
- routingEngine->updateProperty(VehicleProperty::TirePressureLeftFront, &lfPres, uuid(), amb::currentTime(), 0);
- routingEngine->updateProperty(VehicleProperty::TirePressureRightFront, &rfPres, uuid(), amb::currentTime(), 0);
- routingEngine->updateProperty(VehicleProperty::TirePressureLeftRear, &lrPres, uuid(), amb::currentTime(), 0);
- routingEngine->updateProperty(VehicleProperty::TirePressureRightRear, &rrPres, uuid(), amb::currentTime(), 0);
- routingEngine->updateProperty(VehicleProperty::TireTemperatureLeftFront, &lfTemp, uuid(), amb::currentTime(), 0);
- routingEngine->updateProperty(VehicleProperty::TireTemperatureRightFront, &rfTemp, uuid(), amb::currentTime(), 0);
- routingEngine->updateProperty(VehicleProperty::TireTemperatureLeftRear, &lrTemp, uuid(), amb::currentTime(), 0);
- routingEngine->updateProperty(VehicleProperty::TireTemperatureRightRear, &rrTemp, uuid(), amb::currentTime(), 0);
+ routingEngine->updateProperty(VehicleProperty::TirePressureLeftFront, &lfPres, uuid());
+ routingEngine->updateProperty(VehicleProperty::TirePressureRightFront, &rfPres, uuid());
+ routingEngine->updateProperty(VehicleProperty::TirePressureLeftRear, &lrPres, uuid());
+ routingEngine->updateProperty(VehicleProperty::TirePressureRightRear, &rrPres, uuid());
+ routingEngine->updateProperty(VehicleProperty::TireTemperatureLeftFront, &lfTemp, uuid());
+ routingEngine->updateProperty(VehicleProperty::TireTemperatureRightFront, &rfTemp, uuid());
+ routingEngine->updateProperty(VehicleProperty::TireTemperatureLeftRear, &lrTemp, uuid());
+ routingEngine->updateProperty(VehicleProperty::TireTemperatureRightRear, &rrTemp, uuid());
return 0;
}
void unsubscribeToPropertyChanges(VehicleProperty::Property property);
PropertyList supported();
- void propertyChanged(VehicleProperty::Property property, AbstractPropertyType* value, string uuid,double,uint32_t) {}
+ void propertyChanged(VehicleProperty::Property property, AbstractPropertyType* value, string uuid) {}
void supportedChanged(PropertyList) {}
int readValues();
{
return m_uuid;
}
-void WebSocketSink::propertyChanged(VehicleProperty::Property property, AbstractPropertyType *value, string uuid, double timestamp, uint32_t sequence)
+void WebSocketSink::propertyChanged(VehicleProperty::Property property, AbstractPropertyType *value, string uuid)
{
//printf("Got property:%i\n",boost::any_cast<uint16_t>(reply->value));
//uint16_t velocity = boost::any_cast<uint16_t>(value);
s.precision(15);
- s << "{\"type\":\"valuechanged\",\"name\":\"" << tmpstr << "\",\"data\":\"" << value->toString() << "\",\"transactionid\":\"" << m_uuid << "\", \"timestamp\":\""<<timestamp<<"\",\"sequence\":\""<<sequence<<"\"}";
+ s << "{\"type\":\"valuechanged\",\"name\":\"" << tmpstr << "\",\"data\":\"" << value->toString() << "\",\"transactionid\":\"" << m_uuid << "\", \"timestamp\":\""<<value->timestamp<<"\",\"sequence\":\""<<value->sequence<<"\"}";
string replystr = s.str();
//printf("Reply: %s\n",replystr.c_str());
WebSocketSink(AbstractRoutingEngine* re,libwebsocket *wsi,string uuid,VehicleProperty::Property property,std::string ambdproperty);
~WebSocketSink();
string uuid() ;
- void propertyChanged(VehicleProperty::Property property, AbstractPropertyType *value, string uuid, double timestamp, uint32_t sequence);
+ void propertyChanged(VehicleProperty::Property property, AbstractPropertyType *value, string uuid);
void supportedChanged(PropertyList supportedProperties);
PropertyList subscriptions();
libwebsocket *socket() { return m_wsi; }
//TODO: Dirty hack hardcoded stuff, jsut to make it work.
stringstream data ("[");
- std::list<PropertyValueTime*> values = reply->values;
+ std::list<AbstractPropertyType*> values = reply->values;
for(auto itr = values.begin(); itr != values.end(); itr++)
{
if(itr != values.begin())
data<<",";
}
- data << "{ \"value\" : " << "\"" << (*itr)->value->toString() << "\", \"time\" : \"" << (*itr)->timestamp << "\" }";
+ data << "{ \"value\" : " << "\"" << (*itr)->toString() << "\", \"time\" : \"" << (*itr)->timestamp << "\" }";
}
data<<"]";
try
{
AbstractPropertyType* type = VehicleProperty::getPropertyTypeForPropertyNameValue(name,data.front());
- m_re->updateProperty(name, type, source->uuid(), timestamp, 0);
+ m_re->updateProperty(name, type, source->uuid());
double currenttime = amb::currentTime();
pairdata.pop_front();
if (source->propertyReplyMap.find(pair.first) != source->propertyReplyMap.end())
{
- source->propertyReplyMap[pair.first]->value = VehicleProperty::getPropertyTypeForPropertyNameValue(source->propertyReplyMap[pair.first]->property,pair.second);
+ AbstractPropertyType* v = VehicleProperty::getPropertyTypeForPropertyNameValue(source->propertyReplyMap[pair.first]->property,pair.second);
+ source->propertyReplyMap[pair.first]->value = v;
source->propertyReplyMap[pair.first]->completed(source->propertyReplyMap[pair.first]);
source->propertyReplyMap.erase(pair.first);
+ delete v;
}
}
//data will contain a property/value map.
PropertyList activeRequests;
PropertyList removeRequests;
void setSupported(PropertyList list);
- void propertyChanged(VehicleProperty::Property property, AbstractPropertyType* value, string uuid,double, uint32_t) {}
+ void propertyChanged(VehicleProperty::Property property, AbstractPropertyType* value, string uuid) {}
void supportedChanged(PropertyList) {}
void setConfiguration(map<string, string> config);
map<VehicleProperty::Property,AsyncPropertyReply*> propertyReplyMap;
{
this->machineGuns = val;
VehicleProperty::MachineGunTurretStatusType temp(this->machineGuns);
- this->re->updateProperty(VehicleProperty::MachineGunTurretStatus, &temp, mParent->uuid(), amb::currentTime(), 0);
+ temp.timestamp = amb::currentTime();
+ this->re->updateProperty(VehicleProperty::MachineGunTurretStatus, &temp, mParent->uuid());
}
void WheelPrivate::changeTurnSignal(TurnSignals::TurnSignalType dir, bool val)
}
this->turnSignal = tsVal;
VehicleProperty::TurnSignalType temp(this->turnSignal);
- this->re->updateProperty(VehicleProperty::TurnSignal, &temp, mParent->uuid(), amb::currentTime(), 0);
+ temp.timestamp = amb::currentTime();
+ this->re->updateProperty(VehicleProperty::TurnSignal, &temp, mParent->uuid());
}
void WheelPrivate::changeGear(int gear)
this->currentGear = (Transmission::TransmissionPositions)gear;
VehicleProperty::TransmissionShiftPositionType tempTrans(this->currentGear);
VehicleProperty::VehicleSpeedType tempSpeed(this->calcCarSpeed());
- this->re->updateProperty(VehicleProperty::TransmissionShiftPosition, &tempTrans, mParent->uuid(), amb::currentTime(), 0);
- this->re->updateProperty(VehicleProperty::VehicleSpeed, &tempSpeed, mParent->uuid(), amb::currentTime(), 0);
+ tempTrans.timestamp = amb::currentTime();
+ tempSpeed.timestamp = amb::currentTime();
+ this->re->updateProperty(VehicleProperty::TransmissionShiftPosition, &tempTrans, mParent->uuid());
+ this->re->updateProperty(VehicleProperty::VehicleSpeed, &tempSpeed, mParent->uuid());
}
void WheelPrivate::changeOilPressure(bool increase)
{
VehicleProperty::EngineOilPressureType temp(increase ? ++this->oilPSI : --this->oilPSI);
- this->re->updateProperty(VehicleProperty::EngineOilPressure, &temp, mParent->uuid(), amb::currentTime(), 0);
+ temp.timestamp = amb::currentTime();
+ this->re->updateProperty(VehicleProperty::EngineOilPressure, &temp, mParent->uuid());
}
void WheelPrivate::changeCoolantTemp(bool increase)
{
- VehicleProperty::EngineCoolantTemperatureType temp(increase ? ++this->coolantTemp : --this->coolantTemp);
- this->re->updateProperty(VehicleProperty::EngineCoolantTemperature, &temp, mParent->uuid(), amb::currentTime(), 0);
+ VehicleProperty::EngineCoolantTemperatureType temp(increase ? ++this->coolantTemp : --this->coolantTemp);
+ temp.timestamp = amb::currentTime();
+ this->re->updateProperty(VehicleProperty::EngineCoolantTemperature, &temp, mParent->uuid());
}
{
this->steeringAngle = (((double)val/(double)32767.0) + (double)1.0) * (double)180.0;
VehicleProperty::SteeringWheelAngleType temp(this->steeringAngle);
- this->re->updateProperty(VehicleProperty::SteeringWheelAngle, &temp, mParent->uuid(), amb::currentTime(), 0);
+ temp.timestamp = amb::currentTime();
+ this->re->updateProperty(VehicleProperty::SteeringWheelAngle, &temp, mParent->uuid());
}
void WheelPrivate::changeClutch(int val)
if (this->oldClutch != this->clutch)
{
VehicleProperty::ClutchStatusType temp(this->clutch);
- this->re->updateProperty(VehicleProperty::ClutchStatus, &temp, mParent->uuid(), amb::currentTime(), 0);
+ temp.timestamp = amb::currentTime();
+ this->re->updateProperty(VehicleProperty::ClutchStatus, &temp, mParent->uuid());
}
}
VehicleProperty::EngineSpeedType tempRpm(this->calcRPM());
VehicleProperty::VehicleSpeedType tempSpeed(this->calcCarSpeed());
- this->re->updateProperty(VehicleProperty::ThrottlePosition, &tempThrottle, mParent->uuid(), amb::currentTime(), 0);
- this->re->updateProperty(VehicleProperty::EngineSpeed, &tempRpm, mParent->uuid(), amb::currentTime(), 0);
- this->re->updateProperty(VehicleProperty::VehicleSpeed, &tempSpeed, mParent->uuid(), amb::currentTime(), 0);
+ this->re->updateProperty(VehicleProperty::ThrottlePosition, &tempThrottle, mParent->uuid());
+ this->re->updateProperty(VehicleProperty::EngineSpeed, &tempRpm, mParent->uuid());
+ this->re->updateProperty(VehicleProperty::VehicleSpeed, &tempSpeed, mParent->uuid());
}
void WheelPrivate::changeBrake(int val)
if (this->oldBrake != this->brake)
{
VehicleProperty::WheelBrakeType temp(this->brake);
- this->re->updateProperty(VehicleProperty::WheelBrake, &temp, mParent->uuid(), amb::currentTime(), 0);
+ this->re->updateProperty(VehicleProperty::WheelBrake, &temp, mParent->uuid());
}
}
if (this->button[11]) {
// cout << "Inside button 11!" << endl;
VehicleProperty::ButtonEventType tempButton(ButtonEvents::Preset1Button);
- this->re->updateProperty(VehicleProperty::ButtonEvent, &tempButton, mParent->uuid(), amb::currentTime(), 0);
+ this->re->updateProperty(VehicleProperty::ButtonEvent, &tempButton, mParent->uuid());
}
if (this->button[8]) {
// cout << "Inside button 8!" << endl;
VehicleProperty::ButtonEventType tempButton(ButtonEvents::Preset2Button);
- this->re->updateProperty(VehicleProperty::ButtonEvent, &tempButton, mParent->uuid(), amb::currentTime(), 0);
+ this->re->updateProperty(VehicleProperty::ButtonEvent, &tempButton, mParent->uuid());
}
if (this->button[9]) {
// cout << "Inside button 9!" << endl;
VehicleProperty::ButtonEventType tempButton(ButtonEvents::Preset3Button);
- this->re->updateProperty(VehicleProperty::ButtonEvent, &tempButton, mParent->uuid(), amb::currentTime(), 0);
+ this->re->updateProperty(VehicleProperty::ButtonEvent, &tempButton, mParent->uuid());
}
if (this->button[10]) {
// cout << "Inside button 10!" << endl;
VehicleProperty::ButtonEventType tempButton(ButtonEvents::Preset4Button);
- this->re->updateProperty(VehicleProperty::ButtonEvent, &tempButton, mParent->uuid(), amb::currentTime(), 0);
+ this->re->updateProperty(VehicleProperty::ButtonEvent, &tempButton, mParent->uuid());
}
}
}
void unsubscribeToPropertyChanges(VehicleProperty::Property property);
PropertyList supported();
- void propertyChanged(VehicleProperty::Property property, AbstractPropertyType* value, string uuid, double, uint32_t) {}
+ void propertyChanged(VehicleProperty::Property property, AbstractPropertyType* value, string uuid) {}
void supportedChanged(PropertyList) {}
map<string, string> getConfiguration() { return configuration; }