Skip to content

Commit

Permalink
Fully working facts from IoT objects with configuation file
Browse files Browse the repository at this point in the history
  • Loading branch information
Dorian Kurzaj committed Sep 22, 2016
1 parent de86278 commit b46bf40
Show file tree
Hide file tree
Showing 4 changed files with 205 additions and 402 deletions.
3 changes: 2 additions & 1 deletion pdg/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ find_package(catkin REQUIRED COMPONENTS
toaster_msgs
tf
cmake_modules
roslib
)
find_package(cmake_modules REQUIRED)

Expand Down Expand Up @@ -94,7 +95,7 @@ find_package(TinyXML REQUIRED)
catkin_package(
INCLUDE_DIRS include
# LIBRARIES pdg
CATKIN_DEPENDS roscpp rospy std_msgs spencer_tracking_msgs niut_msgs toaster_msgs message_generation message_runtime tf
CATKIN_DEPENDS roscpp rospy std_msgs spencer_tracking_msgs niut_msgs toaster_msgs message_generation message_runtime tf roslib
# DEPENDS system_lib
)

Expand Down
2 changes: 2 additions & 0 deletions pdg/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
<build_depend> tf </build_depend>
<build_depend>tinyxml</build_depend>
<build_depend>cmake_modules</build_depend>
<build_depend>roslib</build_depend>
<run_depend> roscpp </run_depend>
<run_depend> rospy </run_depend>
<run_depend> std_msgs </run_depend>
Expand All @@ -60,6 +61,7 @@
<run_depend> message_runtime </run_depend>
<run_depend> tf </run_depend>
<run_depend>tinyxml</run_depend>
<run_depend>roslib</run_depend>
<!-- The export tag contains other, unspecified, tags -->
<export>
<!-- Other tools can request additional information be placed here -->
Expand Down
72 changes: 72 additions & 0 deletions pdg/params/iot_objects.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<objects>
<object id="/BBB_ADREAM_1/ETH_GW/PHG_FAN_11">
<fact name="FanON">
<value object_value_name="data" operation="copy" />
</fact>
</object>
<object id="/BBB_ADREAM_1/ETH_GW/PHG_LMP_10">
<fact name="LampON">
<value object_value_name="data" operation="copy" />
</fact>
</object>
<object id="/BBB_ADREAM_1/ETH_GW/PHL_LMP_01">
<fact name="LampON">
<value object_value_name="data" operation="copy" />
</fact>
<fact name="LightColor">
<value object_value_name="color" operation="equals" object_value="YELLOW" fact_value="Yellow" />
<value object_value_name="color" operation="equals" object_value="RED" fact_value="Red" />
<value object_value_name="color" operation="equals" object_value="25500" fact_value="Green" />
<value object_value_name="color" operation="equals" object_value="BLUE" fact_value="Blue" />
<value object_value_name="color" operation="equals" object_value="PURPLE" fact_value="Purple" />
</fact>
</object>
<object id="/BBB_ADREAM_1/ETH_GW/PHL_LMP_02">
<fact name="LampON">
<value object_value_name="data" operation="copy" />
</fact>
<fact name="LightColor">
<value object_value_name="color" operation="equals" object_value="YELLOW" fact_value="Yellow" />
<value object_value_name="color" operation="equals" object_value="RED" fact_value="Red" />
<value object_value_name="color" operation="equals" object_value="25500" fact_value="Green" />
<value object_value_name="color" operation="equals" object_value="BLUE" fact_value="Blue" />
<value object_value_name="color" operation="equals" object_value="PURPLE" fact_value="Purple" />
</fact>
</object>
<object id="/BBB_ADREAM_1/ETH_GW/PHG_TMP_00">
<fact name="Temperature">
<value object_value_name="data" operation="copy" />
</fact>
</object>
<object id="/BBB_ADREAM_1/ETH_GW/PHG_TMP_05">
<fact name="Temperature">
<value object_value_name="data" operation="copy" />
</fact>
</object>
<object id="/BBB_ADREAM_1/ETH_GW/PHG_TMP_06">
<fact name="Temperature">
<value object_value_name="data" operation="copy" />
</fact>
</object>
<object id="/BBB_ADREAM_1/ETH_GW/PHG_LUM_02">
<fact name="Luminosity">
<value object_value_name="data" operation="copy" />
</fact>
</object>
<object id="/BBB_ADREAM_1/ETH_GW/PHG_PRS_04">
<fact name="Pressure">
<value object_value_name="data" operation="copy" />
</fact>
</object>
<object id="/BBB_ADREAM_1/ETH_GW/PHG_WGH_03">
<fact name="Weight">
<value object_value_name="data" operation="copy" />
</fact>
</object>
<object id="/BBB_ADREAM_1/ETH_GW/PHG_HUM_01">
<fact name="Humidity">
<value object_value_name="data" operation="copy" />
</fact>
</object>
</objects>
Loading

0 comments on commit b46bf40

Please sign in to comment.