-set(amb_sources abstractpropertytype.cpp abstractroutingengine.cpp listplusplus.cpp abstractsink.cpp vehicleproperty.cpp abstractsource.cpp debugout.cpp timestamp.cpp uuidhelper.cpp mappropertytype.hpp)
-set(amb_headers_install abstractpropertytype.h nullptr.h abstractroutingengine.h listplusplus.h abstractsink.h vehicleproperty.h debugout.h abstractsource.h timestamp.h uuidhelper.h mappropertytype.hpp)
+set(amb_sources abstractpropertytype.cpp abstractroutingengine.cpp listplusplus.cpp abstractsink.cpp vehicleproperty.cpp abstractsource.cpp debugout.cpp timestamp.cpp uuidhelper.cpp mappropertytype.hpp propertyinfo.hpp)
+set(amb_headers_install abstractpropertytype.h nullptr.h abstractroutingengine.h listplusplus.h abstractsink.h vehicleproperty.h debugout.h abstractsource.h timestamp.h uuidhelper.h mappropertytype.hpp properyinfo.hpp)
add_library(amb SHARED ${amb_sources})
namespace Zone {
enum Type {
None = 0,
- Driver = 1,
+ FrontRight = 1,
FrontMiddle = 1 << 1,
- Passenger = 1 << 2,
+ FrontLeft = 1 << 2,
LeftRear = 1 << 3,
MiddleRear = 1 << 4,
RightRear = 1 << 5
AbstractPropertyType(std::string property): name(property), timestamp(-1), sequence(-1), zone(Zone::None), index(0) {}
+ ~AbstractPropertyType() { }
+
virtual std::string toString() const = 0;
virtual void fromString(std::string)= 0;
#include "vehicleproperty.h"
#include "abstractpropertytype.h"
+#include "propertyinfo.hpp"
class AbstractSink;
class AbstractSource;
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) = 0;
+ virtual PropertyList supported() = 0;
/// sinks:
virtual void registerSink(AbstractSink* self) = 0;
virtual AsyncRangePropertyReply * getRangePropertyAsync(AsyncRangePropertyRequest request) = 0;
virtual AsyncPropertyReply * setProperty(AsyncSetPropertyRequest request) = 0;
virtual void subscribeToProperty(VehicleProperty::Property, AbstractSink* self) = 0;
+ virtual void subscribeToProperty(VehicleProperty::Property, std::string sourceUuidFilter, AbstractSink *self) = 0;
virtual void unsubscribeToProperty(VehicleProperty::Property, AbstractSink* self) = 0;
- virtual PropertyList supported() = 0;
+
+ virtual PropertyInfo getPropertyInfo(VehicleProperty::Property, std::string sourceUuid) = 0;
+ virtual std::list<std::string> getSourcesForProperty(VehicleProperty::Property) = 0;
};
#endif // ABSTRACTROUTINGENGINE_H
#include "vehicleproperty.h"
#include "abstractroutingengine.h"
#include "abstractpropertytype.h"
+#include "propertyinfo.hpp"
+
-using namespace std;
class AbstractSource;
-typedef list<AbstractSource*> SourceList;
+typedef std::list<AbstractSource*> SourceList;
class AbstractSource: public AbstractSink
{
+using namespace std;
public:
enum Operations {
virtual PropertyList supported() = 0;
virtual int supportedOperations() = 0;
+
+ PropertyInfo getPropertyInfo(VehicleProperty::Property) = 0;
protected: