This commit is contained in:
Matthias Janetschek
2015-05-21 17:50:39 +02:00
parent 19cb6e5cbe
commit d63423aee9
1309 changed files with 329 additions and 481521 deletions
+5 -3
View File
@@ -10,7 +10,7 @@ find_package(catkin REQUIRED COMPONENTS
hos_cosgi_core
hos_cosgi_scripting
hos_cpp_utils
hos_libvariant
hos_deps
roscpp
hos_cpp_cron
)
@@ -27,6 +27,7 @@ find_package(catkin REQUIRED COMPONENTS
find_package(APR REQUIRED)
find_package(CELIX REQUIRED)
find_package(Boost REQUIRED)
find_package(libvariant REQUIRED)
################################################
## Declare ROS messages, services and actions ##
@@ -90,7 +91,7 @@ find_package(Boost REQUIRED)
catkin_package(
INCLUDE_DIRS include/${PROJECT_NAME}/
# LIBRARIES hos_cosgi_ruleengine
CATKIN_DEPENDS hos_celix hos_cosgi_devicerepository hos_cosgi_core hos_cpp_utils hos_libvariant roscpp hos_cpp_cron hos_cosgi_scripting
CATKIN_DEPENDS hos_celix hos_cosgi_devicerepository hos_cosgi_core hos_cpp_utils hos_deps roscpp hos_cpp_cron hos_cosgi_scripting
# DEPENDS system_lib
)
@@ -110,7 +111,7 @@ include_directories(
${APR_INCLUDE_DIR}
${APR_INCLUDE_DIR}/apr-1.0
include/${PROJECT_NAME}/
${hos_libvariant_INCLUDE_DIRS}/hos_libvariant
${libvariant_INCLUDE_DIR}
)
set(BUNDLE_SYMBOLICNAME "hos.hos_ruleengine")
@@ -128,6 +129,7 @@ bundle(hos_cosgi_ruleengine
target_link_libraries(hos_cosgi_ruleengine
${catkin_LIBRARIES}
${APR_LIBRARIES}
${libvariant_LIBRARY}
)
## Declare a cpp library
@@ -37,8 +37,8 @@ class Script;
}
}
}
namespace libvariant {
class HosSchemaLoader;
namespace utils {
class SchemaLoader;
}
}
@@ -79,7 +79,7 @@ public:
std::shared_ptr<RuleCondition> createRuleCondition(Variant raw);
libvariant::HosSchemaLoader* getHOSSchemaLoader();
utils::SchemaLoader* getHOSSchemaLoader();
devicerepository::DeviceRepositoryService* getDeviceRepository();
};
@@ -10,7 +10,6 @@
#include <hos/cosgi/service/Interface.h>
#include <hos/utils/observable.h>
#include <memory>
#include <Variant/Variant.h>
+2 -2
View File
@@ -45,14 +45,14 @@
<build_depend>hos_cosgi_core</build_depend>
<build_depend>hos_cosgi_scripting</build_depend>
<build_depend>hos_cpp_utils</build_depend>
<build_depend>hos_libvariant</build_depend>
<build_depend>hos_deps</build_depend>
<build_depend>roscpp</build_depend>
<build_depend>hos_cpp_cron</build_depend>
<run_depend>hos_celix</run_depend>
<run_depend>hos_cosgi_devicerepository</run_depend>
<run_depend>hos_cosgi_core</run_depend>
<run_depend>hos_cpp_utils</run_depend>
<run_depend>hos_libvariant</run_depend>
<run_depend>hos_deps</run_depend>
<run_depend>roscpp</run_depend>
<run_depend>hos_cpp_cron</run_depend>
<run_depend>hos_cosgi_scripting</run_depend>
@@ -15,7 +15,7 @@
#include "RulePackage.h"
#include <hos/cosgi/service/ruleengine/ruleengine_service.h>
#include <hos/cosgi/service/devicerepository/devicerepository_service.h>
#include <HosSchemaLoader/HosSchemaLoader.h>
#include <hos/utils/SchemaLoader.h>
#include "../ruleengine_serviceimpl.h"
@@ -30,7 +30,7 @@ Rule::Rule(RulePackage* parent, std::string name)
: parent(parent), name(name) {}
libvariant::HosSchemaLoader* Rule::getHOSSchemaLoader() {
utils::SchemaLoader* Rule::getHOSSchemaLoader() {
return parent->parent->getHOSSchemaLoader();
}
@@ -61,7 +61,7 @@ void RuleEngineServiceImpl::init() {
nodehandle->getParam("ruleengine_prefix", ruleEnginePrefix);
XmlRpc::XmlRpcValue rawValue;
nodehandle->getParam(ruleEnginePrefix, rawValue);
schemaLoader.reset(new libvariant::HosSchemaLoader());
schemaLoader.reset(new utils::SchemaLoader());
registerRuleConditionFactory("logical_or", std::make_shared<rule::LogicalOrConditionFactory>());
registerRuleConditionFactory("logical_and", std::make_shared<rule::LogicalAndConditionFactory>());
registerRuleConditionFactory("devicestatusmsg", std::make_shared<rule::DeviceStatusMsgConditionFactory>());
@@ -14,7 +14,7 @@
#include <hos_core_msgs/DeviceCommand.h>
#include <hos_core_msgs/DeviceStatusUpdate.h>
#include <hos_core_msgs/HosStatusUpdate.h>
#include <HosSchemaLoader/HosSchemaLoader.h>
#include <hos/utils/SchemaLoader.h>
#include <hos/cosgi/service/ruleengine/ruleengine_service.h>
#include <hos/cosgi/service/scripting/scripting_service.h>
#include <hos/cosgi/service/devicerepository/devicerepository_service.h>
@@ -72,7 +72,7 @@ private:
execServiceMap_t execServices;
condFactoryMap_t condFactories;
std::unique_ptr<libvariant::HosSchemaLoader> schemaLoader;
std::unique_ptr<utils::SchemaLoader> schemaLoader;
bool initialized = false;
@@ -106,7 +106,7 @@ public:
std::shared_ptr<RuleConditionFactory> getRuleConditionFactory(std::string type) { return condFactories[type]; }
libvariant::HosSchemaLoader* getHOSSchemaLoader() { return schemaLoader.get(); }
utils::SchemaLoader* getHOSSchemaLoader() { return schemaLoader.get(); }
devicerepository::DeviceRepositoryService* getDeviceRepository() { return repoService; }