summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevron Rees <kevron.m.rees@intel.com>2013-11-21 15:57:38 -0800
committerKevron Rees <kevron.m.rees@intel.com>2013-11-21 15:58:00 -0800
commit9917798b0e9d82f9ecb6aa929f66446e8d0e9e96 (patch)
tree75cf0ab7c5098e8722dff37b8892ef7bcdf215f5
parent66b403ef6b93128be827a41d90a911ddf37a8e6d (diff)
downloadautomotive-message-broker-0.10.804.tar.gz
moved Defrost to WindowStatus object. made both zoned types instead of maps0.10.804
-rw-r--r--docs/amb.idl26
-rw-r--r--docs/environment.txt28
-rw-r--r--examples/gpsnmea2
-rw-r--r--lib/vehicleproperty.cpp16
-rw-r--r--lib/vehicleproperty.h6
-rw-r--r--plugins/dbus/environmentproperties.h22
6 files changed, 30 insertions, 70 deletions
diff --git a/docs/amb.idl b/docs/amb.idl
index a0c45bd6..756085b8 100644
--- a/docs/amb.idl
+++ b/docs/amb.idl
@@ -393,11 +393,6 @@ interface WindshieldWiper : VehiclePropertyType {
readonly attribute unsigned short WindshieldWiper;
};
-dictionary DefrostDictionary {
- unsigned short window;
- boolean defrost;
-}
-
[NoInterfaceObject]
interface HVAC : VehiclePropertyType {
const unsigned short AIRFLOWDIRECTION_FRONTPANEL = 0;
@@ -435,12 +430,6 @@ interface HVAC : VehiclePropertyType {
**/
attribute boolean Heater;
- /** Defrost
- * \brief Must return the defrost status of all windows equiped with defrosters. This will return a dictionary of DefrostDictionary that represents
- * \brief each window and its defrost status.
- **/
- attribute DefrostDictionary Defrost;
-
/** SteeringWheelHeater
* \brief Must return air recirculation on (true) / off (false).
**/
@@ -459,17 +448,16 @@ interface HVAC : VehiclePropertyType {
[NoInterfaceObject]
interface WindowStatus : VehiclePropertyType {
- const unsigned short WINDOWLOCATION_DRIVER= 0;
- const unsigned short WINDOWLOCATION_PASSENGER = 1;
- const unsigned short WINDOWLOCATION_LEFTREAR = 2;
- const unsigned short WINDOWLOCATION_RIGHTREAR = 3;
- const unsigned short WINDOWLOCATION_REAR = 4;
/** WindowStatus
- * \brief Must return window status for each window location. object returned is a
- * dictionary { unsigned short windowlocation, unsigned short percentage opened }
+ * \brief Must return window status for the window location see "zone" attribute
+ **/
+ attribute unsigned short WindowStatus;
+
+ /** Defrost
+ * \brief Must return the defrost status of the window equiped with a defroster.
**/
- readwrite attribute object WindowStatus;
+ attribute boolean Defrost;
};
[NoInterfaceObject]
diff --git a/docs/environment.txt b/docs/environment.txt
index 526479e4..f6dfe2e3 100644
--- a/docs/environment.txt
+++ b/docs/environment.txt
@@ -78,16 +78,6 @@ Properties
Heater on (true) / off (false)
- dict{ byte, bool } Defrost [readwrite]
-
- Defrost on (true) / off (false) per Postion (byte)
-
- Position:
-
- Windshield = 0,
- RearWindow = 1,
- SideMirrors = 2
-
bool SteeringWheelHeater [readwrite]
Steering wheel heater on (true) / off (false)
@@ -102,20 +92,16 @@ Properties
Interface org.automotive.WindowStatus
-Object path /org/automotive/environment/WindowStatus
+Object path {source_id}/{zone}/WindowStatus
Properties
- dict{ byte, byte } WindowStatus [readwrite]
+ uInt16 WindowStatus [readwrite]
- Percent of openness (0-100) (byte) per window (byte)
-
- Window:
-
- Driver = 0,
- Passenger = 1,
- LeftRear = 2,
- RightRear = 3,
- Rear = 4
+ Percent of openness (0-100) (uInt16)
+
+ bool Defrost [readwrite]
+
+ Defrost on (true) / off (false) per Postion (byte)
Interface org.automotive.Sunroof
Object path /org/automotive/environment/Sunroof
diff --git a/examples/gpsnmea b/examples/gpsnmea
index 039199f6..dd77c224 100644
--- a/examples/gpsnmea
+++ b/examples/gpsnmea
@@ -4,7 +4,7 @@
"name" : "gps nmea plugin",
"path" : "/usr/lib/automotive-message-broker/gpsnmea.so",
"test" : "true",
- "device" : "/dev/ttyACM0"
+ "device" : "00:1C:88:13:4E:9C"
}
],
"sinks": [
diff --git a/lib/vehicleproperty.cpp b/lib/vehicleproperty.cpp
index 29b57bad..0fc9a5c4 100644
--- a/lib/vehicleproperty.cpp
+++ b/lib/vehicleproperty.cpp
@@ -268,24 +268,12 @@ VehicleProperty::VehicleProperty()
REGISTERPROPERTY(AirRecirculation,false);
REGISTERPROPERTY(Heater,false);
- registerPropertyPriv(Defrost, []()
- {
- DefrostType *d = new DefrostType();
- d->append(Window::Windshield, false);
-
- return d;
- });
+ REGISTERPROPERTY(Defrost,false);
REGISTERPROPERTY(SteeringWheelHeater,false);
REGISTERPROPERTY(SeatHeater, 0);
REGISTERPROPERTY(SeatCooler, false);
- registerPropertyPriv(WindowStatus, []()
- {
- WindowStatusType* d = new WindowStatusType();
- d->append(Window::Driver,100);
-
- return d;
- });
+ REGISTERPROPERTY(WindowStatus, 100);
REGISTERPROPERTY(Sunroof,0);
REGISTERPROPERTY(SunroofTilt,0);
REGISTERPROPERTY(ConvertibleRoof,false);
diff --git a/lib/vehicleproperty.h b/lib/vehicleproperty.h
index 4f61c4fa..7f307b86 100644
--- a/lib/vehicleproperty.h
+++ b/lib/vehicleproperty.h
@@ -718,8 +718,7 @@ public:
//typedef BasicPropertyType<bool> HeaterType;
static const Property Defrost;
- PROPERTYTYPENOVAL(Defrost, DefrostType,
- MapPropertyType<BasicPropertyType<Window::Location> BOOST_PP_COMMA() BasicPropertyType<bool> > )
+ PROPERTYTYPEBASIC(Defrost, bool )
static const Property SteeringWheelHeater;
PROPERTYTYPEBASIC(SteeringWheelHeater,bool)
@@ -734,8 +733,7 @@ public:
// /typedef BasicPropertyType<bool> SeatCoolerType;
static const Property WindowStatus;
- PROPERTYTYPENOVAL(WindowStatus, WindowStatusType,
- MapPropertyType<BasicPropertyType<Window::Location> BOOST_PP_COMMA() BasicPropertyType<uint16_t> > )
+ PROPERTYTYPEBASIC(WindowStatus, uint16_t)
static const Property Sunroof;
PROPERTYTYPEBASIC(Sunroof, uint16_t)
diff --git a/plugins/dbus/environmentproperties.h b/plugins/dbus/environmentproperties.h
index df45e4a0..e7f9ac76 100644
--- a/plugins/dbus/environmentproperties.h
+++ b/plugins/dbus/environmentproperties.h
@@ -164,15 +164,6 @@ public:
wantPropertyVariant(VehicleProperty::AirRecirculation, "AirRecirculation", "b", AbstractProperty::ReadWrite);
/**
- * @attributeName Defrost
- * @type object
- * @access readwrite
- * @attributeComment \brief Must return the defrost status of all windows equiped with defrosters. This will return a dictionary of { unsigned short, boolean } that represents
- * @attributeComment \brief each window and its defrost status.
- */
- //wantPropertyVariant(VehicleProperty::Defrost, "Defrost", "a(yb)", AbstractProperty::ReadWrite);
-
- /**
* @attributeName SteeringWheelHeater
* @type boolean
* @access readwrite
@@ -220,9 +211,18 @@ public:
* @type object
* @access readwrite
* @attributeComment \brief Must return window status for each window location. object returned is a
- * @attributeComment dictionary { unsigned short windowlocation, unsigned short percentage opened }
+ * @attributeComment unsigned short percentage opened
+ */
+ wantPropertyVariant(VehicleProperty::WindowStatus,"WindowStatus", "q", AbstractProperty::ReadWrite);
+
+ /**
+ * @attributeName Defrost
+ * @type object
+ * @access readwrite
+ * @attributeComment \brief Must return the defrost status of all windows equiped with defrosters. This will return a dictionary of { unsigned short, boolean } that represents
+ * @attributeComment \brief each window and its defrost status.
*/
- wantPropertyVariant(VehicleProperty::WindowStatus,"WindowStatus","a(bb)", AbstractProperty::ReadWrite);
+ wantPropertyVariant(VehicleProperty::Defrost, "Defrost", "b", AbstractProperty::ReadWrite);
}
};