.
This commit is contained in:
+11
-133
@@ -1,94 +1,26 @@
|
|||||||
cmake_minimum_required(VERSION 2.8.3)
|
cmake_minimum_required(VERSION 2.8.3)
|
||||||
project(hos_celix)
|
project(hos_celix)
|
||||||
|
|
||||||
|
|
||||||
## Find catkin macros and libraries
|
## Find catkin macros and libraries
|
||||||
## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
|
|
||||||
## is used, also find other catkin packages
|
|
||||||
find_package(catkin REQUIRED)
|
find_package(catkin REQUIRED)
|
||||||
|
|
||||||
|
|
||||||
## System dependencies are found with CMake's conventions
|
|
||||||
# find_package(Boost REQUIRED COMPONENTS system)
|
|
||||||
|
|
||||||
|
|
||||||
## Uncomment this if the package has a setup.py. This macro ensures
|
|
||||||
## modules and global scripts declared therein get installed
|
|
||||||
## See http://ros.org/doc/api/catkin/html/user_guide/setup_dot_py.html
|
|
||||||
# catkin_python_setup()
|
|
||||||
|
|
||||||
################################################
|
|
||||||
## Declare ROS messages, services and actions ##
|
|
||||||
################################################
|
|
||||||
|
|
||||||
## To declare and build messages, services or actions from within this
|
|
||||||
## package, follow these steps:
|
|
||||||
## * Let MSG_DEP_SET be the set of packages whose message types you use in
|
|
||||||
## your messages/services/actions (e.g. std_msgs, actionlib_msgs, ...).
|
|
||||||
## * In the file package.xml:
|
|
||||||
## * add a build_depend and a run_depend tag for each package in MSG_DEP_SET
|
|
||||||
## * If MSG_DEP_SET isn't empty the following dependencies might have been
|
|
||||||
## pulled in transitively but can be declared for certainty nonetheless:
|
|
||||||
## * add a build_depend tag for "message_generation"
|
|
||||||
## * add a run_depend tag for "message_runtime"
|
|
||||||
## * In this file (CMakeLists.txt):
|
|
||||||
## * add "message_generation" and every package in MSG_DEP_SET to
|
|
||||||
## find_package(catkin REQUIRED COMPONENTS ...)
|
|
||||||
## * add "message_runtime" and every package in MSG_DEP_SET to
|
|
||||||
## catkin_package(CATKIN_DEPENDS ...)
|
|
||||||
## * uncomment the add_*_files sections below as needed
|
|
||||||
## and list every .msg/.srv/.action file to be processed
|
|
||||||
## * uncomment the generate_messages entry below
|
|
||||||
## * add every package in MSG_DEP_SET to generate_messages(DEPENDENCIES ...)
|
|
||||||
|
|
||||||
## Generate messages in the 'msg' folder
|
|
||||||
# add_message_files(
|
|
||||||
# FILES
|
|
||||||
# Message1.msg
|
|
||||||
# Message2.msg
|
|
||||||
# )
|
|
||||||
|
|
||||||
## Generate services in the 'srv' folder
|
|
||||||
# add_service_files(
|
|
||||||
# FILES
|
|
||||||
# Service1.srv
|
|
||||||
# Service2.srv
|
|
||||||
# )
|
|
||||||
|
|
||||||
## Generate actions in the 'action' folder
|
|
||||||
# add_action_files(
|
|
||||||
# FILES
|
|
||||||
# Action1.action
|
|
||||||
# Action2.action
|
|
||||||
# )
|
|
||||||
|
|
||||||
## Generate added messages and services with any dependencies listed here
|
|
||||||
# generate_messages(
|
|
||||||
# DEPENDENCIES
|
|
||||||
# std_msgs # Or other packages containing msgs
|
|
||||||
# )
|
|
||||||
|
|
||||||
###################################
|
###################################
|
||||||
## catkin specific configuration ##
|
## catkin specific configuration ##
|
||||||
###################################
|
###################################
|
||||||
## The catkin_package macro generates cmake config files for your package
|
|
||||||
## Declare things to be passed to dependent projects
|
|
||||||
## INCLUDE_DIRS: uncomment this if you package contains header files
|
|
||||||
## LIBRARIES: libraries you create in this project that dependent projects also need
|
|
||||||
## CATKIN_DEPENDS: catkin_packages dependent projects also need
|
|
||||||
## DEPENDS: system dependencies of this project that dependent projects also need
|
|
||||||
catkin_package(
|
catkin_package(
|
||||||
INCLUDE_DIRS include/${PROJECT_NAME}/
|
INCLUDE_DIRS include/${PROJECT_NAME}/
|
||||||
LIBRARIES celix_framework celix_utils dependency_manager2
|
LIBRARIES celix_framework celix_utils dependency_manager2
|
||||||
CFG_EXTRAS celix-extras.cmake
|
CFG_EXTRAS celix-extras.cmake
|
||||||
# CATKIN_DEPENDS other_catkin_pkg
|
|
||||||
# DEPENDS system_lib
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
###########
|
###########
|
||||||
## Build ##
|
## Build ##
|
||||||
###########
|
###########
|
||||||
|
|
||||||
|
|
||||||
include(ExternalProject)
|
include(ExternalProject)
|
||||||
|
|
||||||
ExternalProject_Add( celix_project
|
ExternalProject_Add( celix_project
|
||||||
@@ -125,28 +57,6 @@ set_property( TARGET dependency_manager2 PROPERTY IMPORTED_LOCATION "${CATKIN_DE
|
|||||||
add_dependencies( dependency_manager2 celix_project )
|
add_dependencies( dependency_manager2 celix_project )
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Specify additional locations of header files
|
|
||||||
## Your package locations should be listed before other locations
|
|
||||||
# include_directories(include)
|
|
||||||
|
|
||||||
## Declare a cpp library
|
|
||||||
# add_library(hos_celix
|
|
||||||
# src/${PROJECT_NAME}/hos_celix.cpp
|
|
||||||
# )
|
|
||||||
|
|
||||||
## Declare a cpp executable
|
|
||||||
# add_executable(hos_celix_node src/hos_celix_node.cpp)
|
|
||||||
|
|
||||||
## Add cmake target dependencies of the executable/library
|
|
||||||
## as an example, message headers may need to be generated before nodes
|
|
||||||
# add_dependencies(hos_celix_node hos_celix_generate_messages_cpp)
|
|
||||||
|
|
||||||
## Specify libraries to link a library or executable target against
|
|
||||||
# target_link_libraries(hos_celix_node
|
|
||||||
# ${catkin_LIBRARIES}
|
|
||||||
# )
|
|
||||||
|
|
||||||
#############
|
#############
|
||||||
## Install ##
|
## Install ##
|
||||||
#############
|
#############
|
||||||
@@ -169,46 +79,14 @@ install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/cmake/
|
|||||||
# FILES_MATCHING PATTERN "*.cmake"
|
# FILES_MATCHING PATTERN "*.cmake"
|
||||||
)
|
)
|
||||||
|
|
||||||
# all install targets should use catkin DESTINATION variables
|
|
||||||
# See http://ros.org/doc/api/catkin/html/adv_user_guide/variables.html
|
|
||||||
|
|
||||||
## Mark executable scripts (Python etc.) for installation
|
###################
|
||||||
## in contrast to setup.py, you can choose the destination
|
## Documentation ##
|
||||||
# install(PROGRAMS
|
###################
|
||||||
# scripts/my_python_script
|
|
||||||
# DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
|
|
||||||
# )
|
|
||||||
|
|
||||||
## Mark executables and/or libraries for installation
|
# We have no documentation, so we create an empty target
|
||||||
# install(TARGETS hos_celix hos_celix_node
|
find_package(Doxygen)
|
||||||
# ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
|
if(DOXYGEN_FOUND)
|
||||||
# LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
|
add_custom_target(doc)
|
||||||
# RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
|
endif(DOXYGEN_FOUND)
|
||||||
# )
|
|
||||||
|
|
||||||
## Mark cpp header files for installation
|
|
||||||
# install(DIRECTORY include/${PROJECT_NAME}/
|
|
||||||
# DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
|
|
||||||
# FILES_MATCHING PATTERN "*.h"
|
|
||||||
# PATTERN ".svn" EXCLUDE
|
|
||||||
# )
|
|
||||||
|
|
||||||
## Mark other files for installation (e.g. launch and bag files, etc.)
|
|
||||||
# install(FILES
|
|
||||||
# # myfile1
|
|
||||||
# # myfile2
|
|
||||||
# DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
|
|
||||||
# )
|
|
||||||
|
|
||||||
#############
|
|
||||||
## Testing ##
|
|
||||||
#############
|
|
||||||
|
|
||||||
## Add gtest based cpp test target and link libraries
|
|
||||||
# catkin_add_gtest(${PROJECT_NAME}-test test/test_hos_celix.cpp)
|
|
||||||
# if(TARGET ${PROJECT_NAME}-test)
|
|
||||||
# target_link_libraries(${PROJECT_NAME}-test ${PROJECT_NAME})
|
|
||||||
# endif()
|
|
||||||
|
|
||||||
## Add folders to be run by python nosetests
|
|
||||||
# catkin_add_nosetests(test)
|
|
||||||
|
|||||||
@@ -2,45 +2,15 @@ cmake_minimum_required(VERSION 2.8.3)
|
|||||||
project(hos_core_msgs)
|
project(hos_core_msgs)
|
||||||
|
|
||||||
## Find catkin macros and libraries
|
## Find catkin macros and libraries
|
||||||
## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
|
|
||||||
## is used, also find other catkin packages
|
|
||||||
find_package(catkin REQUIRED COMPONENTS
|
find_package(catkin REQUIRED COMPONENTS
|
||||||
message_generation
|
message_generation
|
||||||
)
|
)
|
||||||
|
|
||||||
## System dependencies are found with CMake's conventions
|
|
||||||
# find_package(Boost REQUIRED COMPONENTS system)
|
|
||||||
|
|
||||||
|
|
||||||
## Uncomment this if the package has a setup.py. This macro ensures
|
|
||||||
## modules and global scripts declared therein get installed
|
|
||||||
## See http://ros.org/doc/api/catkin/html/user_guide/setup_dot_py.html
|
|
||||||
# catkin_python_setup()
|
|
||||||
|
|
||||||
################################################
|
################################################
|
||||||
## Declare ROS messages, services and actions ##
|
## Declare ROS messages, services and actions ##
|
||||||
################################################
|
################################################
|
||||||
|
|
||||||
## To declare and build messages, services or actions from within this
|
|
||||||
## package, follow these steps:
|
|
||||||
## * Let MSG_DEP_SET be the set of packages whose message types you use in
|
|
||||||
## your messages/services/actions (e.g. std_msgs, actionlib_msgs, ...).
|
|
||||||
## * In the file package.xml:
|
|
||||||
## * add a build_depend and a run_depend tag for each package in MSG_DEP_SET
|
|
||||||
## * If MSG_DEP_SET isn't empty the following dependencies might have been
|
|
||||||
## pulled in transitively but can be declared for certainty nonetheless:
|
|
||||||
## * add a build_depend tag for "message_generation"
|
|
||||||
## * add a run_depend tag for "message_runtime"
|
|
||||||
## * In this file (CMakeLists.txt):
|
|
||||||
## * add "message_generation" and every package in MSG_DEP_SET to
|
|
||||||
## find_package(catkin REQUIRED COMPONENTS ...)
|
|
||||||
## * add "message_runtime" and every package in MSG_DEP_SET to
|
|
||||||
## catkin_package(CATKIN_DEPENDS ...)
|
|
||||||
## * uncomment the add_*_files sections below as needed
|
|
||||||
## and list every .msg/.srv/.action file to be processed
|
|
||||||
## * uncomment the generate_messages entry below
|
|
||||||
## * add every package in MSG_DEP_SET to generate_messages(DEPENDENCIES ...)
|
|
||||||
|
|
||||||
## Generate messages in the 'msg' folder
|
## Generate messages in the 'msg' folder
|
||||||
add_message_files(
|
add_message_files(
|
||||||
DIRECTORY msg
|
DIRECTORY msg
|
||||||
@@ -50,114 +20,41 @@ add_message_files(
|
|||||||
HosStatusUpdate.msg
|
HosStatusUpdate.msg
|
||||||
)
|
)
|
||||||
|
|
||||||
## Generate services in the 'srv' folder
|
|
||||||
# add_service_files(
|
|
||||||
# FILES
|
|
||||||
# Service1.srv
|
|
||||||
# Service2.srv
|
|
||||||
# )
|
|
||||||
|
|
||||||
## Generate actions in the 'action' folder
|
|
||||||
# add_action_files(
|
|
||||||
# FILES
|
|
||||||
# Action1.action
|
|
||||||
# Action2.action
|
|
||||||
# )
|
|
||||||
|
|
||||||
## Generate added messages and services with any dependencies listed here
|
## Generate added messages and services with any dependencies listed here
|
||||||
generate_messages(
|
generate_messages(
|
||||||
# DEPENDENCIES
|
# DEPENDENCIES
|
||||||
# std_msgs # Or other packages containing msgs
|
# std_msgs # Or other packages containing msgs
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
###################################
|
###################################
|
||||||
## catkin specific configuration ##
|
## catkin specific configuration ##
|
||||||
###################################
|
###################################
|
||||||
## The catkin_package macro generates cmake config files for your package
|
|
||||||
## Declare things to be passed to dependent projects
|
|
||||||
## INCLUDE_DIRS: uncomment this if you package contains header files
|
|
||||||
## LIBRARIES: libraries you create in this project that dependent projects also need
|
|
||||||
## CATKIN_DEPENDS: catkin_packages dependent projects also need
|
|
||||||
## DEPENDS: system dependencies of this project that dependent projects also need
|
|
||||||
catkin_package(
|
catkin_package(
|
||||||
INCLUDE_DIRS include
|
INCLUDE_DIRS include
|
||||||
# LIBRARIES hos_core_msgs
|
|
||||||
CATKIN_DEPENDS message_runtime
|
CATKIN_DEPENDS message_runtime
|
||||||
# DEPENDS system_lib
|
|
||||||
)
|
)
|
||||||
|
|
||||||
###########
|
|
||||||
## Build ##
|
|
||||||
###########
|
|
||||||
|
|
||||||
## Specify additional locations of header files
|
|
||||||
## Your package locations should be listed before other locations
|
|
||||||
# include_directories(include)
|
|
||||||
include_directories(
|
|
||||||
${catkin_INCLUDE_DIRS}
|
|
||||||
)
|
|
||||||
|
|
||||||
## Declare a cpp library
|
|
||||||
# add_library(hos_core_msgs
|
|
||||||
# src/${PROJECT_NAME}/hos_core_msgs.cpp
|
|
||||||
# )
|
|
||||||
|
|
||||||
## Declare a cpp executable
|
|
||||||
# add_executable(hos_core_msgs_node src/hos_core_msgs_node.cpp)
|
|
||||||
|
|
||||||
## Add cmake target dependencies of the executable/library
|
|
||||||
## as an example, message headers may need to be generated before nodes
|
|
||||||
# add_dependencies(hos_core_msgs_node hos_core_msgs_generate_messages_cpp)
|
|
||||||
|
|
||||||
## Specify libraries to link a library or executable target against
|
|
||||||
# target_link_libraries(hos_core_msgs_node
|
|
||||||
# ${catkin_LIBRARIES}
|
|
||||||
# )
|
|
||||||
|
|
||||||
#############
|
#############
|
||||||
## Install ##
|
## Install ##
|
||||||
#############
|
#############
|
||||||
|
|
||||||
# all install targets should use catkin DESTINATION variables
|
|
||||||
# See http://ros.org/doc/api/catkin/html/adv_user_guide/variables.html
|
|
||||||
|
|
||||||
## Mark executable scripts (Python etc.) for installation
|
|
||||||
## in contrast to setup.py, you can choose the destination
|
|
||||||
# install(PROGRAMS
|
|
||||||
# scripts/my_python_script
|
|
||||||
# DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
|
|
||||||
# )
|
|
||||||
|
|
||||||
## Mark executables and/or libraries for installation
|
|
||||||
# install(TARGETS hos_core_msgs hos_core_msgs_node
|
|
||||||
# ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
|
|
||||||
# LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
|
|
||||||
# RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
|
|
||||||
# )
|
|
||||||
|
|
||||||
## Mark cpp header files for installation
|
## Mark cpp header files for installation
|
||||||
install(DIRECTORY include/${PROJECT_NAME}/
|
install(DIRECTORY include/${PROJECT_NAME}/
|
||||||
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
|
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
|
||||||
FILES_MATCHING PATTERN "*.h"
|
FILES_MATCHING PATTERN "*.h"
|
||||||
PATTERN ".svn" EXCLUDE
|
|
||||||
)
|
)
|
||||||
|
|
||||||
## Mark other files for installation (e.g. launch and bag files, etc.)
|
|
||||||
# install(FILES
|
|
||||||
# # myfile1
|
|
||||||
# # myfile2
|
|
||||||
# DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
|
|
||||||
# )
|
|
||||||
|
|
||||||
#############
|
###################
|
||||||
## Testing ##
|
## Documentation ##
|
||||||
#############
|
###################
|
||||||
|
|
||||||
## Add gtest based cpp test target and link libraries
|
# We have no documentation, so we create an empty target
|
||||||
# catkin_add_gtest(${PROJECT_NAME}-test test/test_hos_core_msgs.cpp)
|
find_package(Doxygen)
|
||||||
# if(TARGET ${PROJECT_NAME}-test)
|
if(DOXYGEN_FOUND)
|
||||||
# target_link_libraries(${PROJECT_NAME}-test ${PROJECT_NAME})
|
add_custom_target(doc)
|
||||||
# endif()
|
endif(DOXYGEN_FOUND)
|
||||||
|
|
||||||
## Add folders to be run by python nosetests
|
|
||||||
# catkin_add_nosetests(test)
|
|
||||||
|
|||||||
@@ -2,110 +2,15 @@ cmake_minimum_required(VERSION 2.8.3)
|
|||||||
project(hos_core_types)
|
project(hos_core_types)
|
||||||
|
|
||||||
## Find catkin macros and libraries
|
## Find catkin macros and libraries
|
||||||
## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
|
|
||||||
## is used, also find other catkin packages
|
|
||||||
find_package(catkin REQUIRED)
|
find_package(catkin REQUIRED)
|
||||||
|
|
||||||
## System dependencies are found with CMake's conventions
|
|
||||||
# find_package(Boost REQUIRED COMPONENTS system)
|
|
||||||
|
|
||||||
|
|
||||||
## Uncomment this if the package has a setup.py. This macro ensures
|
|
||||||
## modules and global scripts declared therein get installed
|
|
||||||
## See http://ros.org/doc/api/catkin/html/user_guide/setup_dot_py.html
|
|
||||||
# catkin_python_setup()
|
|
||||||
|
|
||||||
################################################
|
|
||||||
## Declare ROS messages, services and actions ##
|
|
||||||
################################################
|
|
||||||
|
|
||||||
## To declare and build messages, services or actions from within this
|
|
||||||
## package, follow these steps:
|
|
||||||
## * Let MSG_DEP_SET be the set of packages whose message types you use in
|
|
||||||
## your messages/services/actions (e.g. std_msgs, actionlib_msgs, ...).
|
|
||||||
## * In the file package.xml:
|
|
||||||
## * add a build_depend and a run_depend tag for each package in MSG_DEP_SET
|
|
||||||
## * If MSG_DEP_SET isn't empty the following dependencies might have been
|
|
||||||
## pulled in transitively but can be declared for certainty nonetheless:
|
|
||||||
## * add a build_depend tag for "message_generation"
|
|
||||||
## * add a run_depend tag for "message_runtime"
|
|
||||||
## * In this file (CMakeLists.txt):
|
|
||||||
## * add "message_generation" and every package in MSG_DEP_SET to
|
|
||||||
## find_package(catkin REQUIRED COMPONENTS ...)
|
|
||||||
## * add "message_runtime" and every package in MSG_DEP_SET to
|
|
||||||
## catkin_package(CATKIN_DEPENDS ...)
|
|
||||||
## * uncomment the add_*_files sections below as needed
|
|
||||||
## and list every .msg/.srv/.action file to be processed
|
|
||||||
## * uncomment the generate_messages entry below
|
|
||||||
## * add every package in MSG_DEP_SET to generate_messages(DEPENDENCIES ...)
|
|
||||||
|
|
||||||
## Generate messages in the 'msg' folder
|
|
||||||
# add_message_files(
|
|
||||||
# FILES
|
|
||||||
# Message1.msg
|
|
||||||
# Message2.msg
|
|
||||||
# )
|
|
||||||
|
|
||||||
## Generate services in the 'srv' folder
|
|
||||||
# add_service_files(
|
|
||||||
# FILES
|
|
||||||
# Service1.srv
|
|
||||||
# Service2.srv
|
|
||||||
# )
|
|
||||||
|
|
||||||
## Generate actions in the 'action' folder
|
|
||||||
# add_action_files(
|
|
||||||
# FILES
|
|
||||||
# Action1.action
|
|
||||||
# Action2.action
|
|
||||||
# )
|
|
||||||
|
|
||||||
## Generate added messages and services with any dependencies listed here
|
|
||||||
# generate_messages(
|
|
||||||
# DEPENDENCIES
|
|
||||||
# std_msgs # Or other packages containing msgs
|
|
||||||
# )
|
|
||||||
|
|
||||||
###################################
|
###################################
|
||||||
## catkin specific configuration ##
|
## catkin specific configuration ##
|
||||||
###################################
|
###################################
|
||||||
## The catkin_package macro generates cmake config files for your package
|
|
||||||
## Declare things to be passed to dependent projects
|
|
||||||
## INCLUDE_DIRS: uncomment this if you package contains header files
|
|
||||||
## LIBRARIES: libraries you create in this project that dependent projects also need
|
|
||||||
## CATKIN_DEPENDS: catkin_packages dependent projects also need
|
|
||||||
## DEPENDS: system dependencies of this project that dependent projects also need
|
|
||||||
catkin_package(
|
catkin_package(
|
||||||
# INCLUDE_DIRS include
|
|
||||||
# LIBRARIES hos_core_types
|
|
||||||
# CATKIN_DEPENDS other_catkin_pkg
|
|
||||||
# DEPENDS system_lib
|
|
||||||
)
|
)
|
||||||
|
|
||||||
###########
|
|
||||||
## Build ##
|
|
||||||
###########
|
|
||||||
|
|
||||||
## Specify additional locations of header files
|
|
||||||
## Your package locations should be listed before other locations
|
|
||||||
# include_directories(include)
|
|
||||||
|
|
||||||
## Declare a cpp library
|
|
||||||
# add_library(hos_core_types
|
|
||||||
# src/${PROJECT_NAME}/hos_core_types.cpp
|
|
||||||
# )
|
|
||||||
|
|
||||||
## Declare a cpp executable
|
|
||||||
# add_executable(hos_core_types src/hos_core_types_node.cpp)
|
|
||||||
|
|
||||||
## Add cmake target dependencies of the executable/library
|
|
||||||
## as an example, message headers may need to be generated before nodes
|
|
||||||
# add_dependencies(hos_core_types_node hos_core_types_generate_messages_cpp)
|
|
||||||
|
|
||||||
## Specify libraries to link a library or executable target against
|
|
||||||
# target_link_libraries(hos_core_types_node
|
|
||||||
# ${catkin_LIBRARIES}
|
|
||||||
# )
|
|
||||||
|
|
||||||
#############
|
#############
|
||||||
## Install ##
|
## Install ##
|
||||||
@@ -117,46 +22,14 @@ foreach(dir launch schema)
|
|||||||
)
|
)
|
||||||
endforeach(dir)
|
endforeach(dir)
|
||||||
|
|
||||||
# all install targets should use catkin DESTINATION variables
|
|
||||||
# See http://ros.org/doc/api/catkin/html/adv_user_guide/variables.html
|
|
||||||
|
|
||||||
## Mark executable scripts (Python etc.) for installation
|
###################
|
||||||
## in contrast to setup.py, you can choose the destination
|
## Documentation ##
|
||||||
# install(PROGRAMS
|
###################
|
||||||
# scripts/my_python_script
|
|
||||||
# DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
|
|
||||||
# )
|
|
||||||
|
|
||||||
## Mark executables and/or libraries for installation
|
# We have no documentation, so we create an empty target
|
||||||
# install(TARGETS hos_core_types hos_core_types_node
|
find_package(Doxygen)
|
||||||
# ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
|
if(DOXYGEN_FOUND)
|
||||||
# LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
|
add_custom_target(doc)
|
||||||
# RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
|
endif(DOXYGEN_FOUND)
|
||||||
# )
|
|
||||||
|
|
||||||
## Mark cpp header files for installation
|
|
||||||
# install(DIRECTORY include/${PROJECT_NAME}/
|
|
||||||
# DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
|
|
||||||
# FILES_MATCHING PATTERN "*.h"
|
|
||||||
# PATTERN ".svn" EXCLUDE
|
|
||||||
# )
|
|
||||||
|
|
||||||
## Mark other files for installation (e.g. launch and bag files, etc.)
|
|
||||||
# install(FILES
|
|
||||||
# # myfile1
|
|
||||||
# # myfile2
|
|
||||||
# DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
|
|
||||||
# )
|
|
||||||
|
|
||||||
#############
|
|
||||||
## Testing ##
|
|
||||||
#############
|
|
||||||
|
|
||||||
## Add gtest based cpp test target and link libraries
|
|
||||||
# catkin_add_gtest(${PROJECT_NAME}-test test/test_hos_core_types.cpp)
|
|
||||||
# if(TARGET ${PROJECT_NAME}-test)
|
|
||||||
# target_link_libraries(${PROJECT_NAME}-test ${PROJECT_NAME})
|
|
||||||
# endif()
|
|
||||||
|
|
||||||
## Add folders to be run by python nosetests
|
|
||||||
# catkin_add_nosetests(test)
|
|
||||||
|
|||||||
@@ -24,10 +24,6 @@ namespace interface {
|
|||||||
class Object {
|
class Object {
|
||||||
public:
|
public:
|
||||||
virtual ~Object() {}
|
virtual ~Object() {}
|
||||||
|
|
||||||
template<class T> T* castPtr() {
|
|
||||||
return dynamic_cast<T*>(this);
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -113,7 +113,7 @@ int main(int argc, char **argv) {
|
|||||||
// Create and register hos-core-service
|
// Create and register hos-core-service
|
||||||
CoreServiceImpl hosCoreService(rosPublicNodeHandle, rosPrivateNodeHandle);
|
CoreServiceImpl hosCoreService(rosPublicNodeHandle, rosPrivateNodeHandle);
|
||||||
service_registration_pt reg = nullptr;
|
service_registration_pt reg = nullptr;
|
||||||
bundleContext_registerService(context, (char*)CoreService::SERVICE_NAME, static_cast<CoreService*>(&hosCoreService), nullptr, ®);
|
bundleContext_registerService(context, (char*)CoreService::SERVICE_NAME, &hosCoreService, nullptr, ®);
|
||||||
ROS_INFO("HOS core service registered");
|
ROS_INFO("HOS core service registered");
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -2,8 +2,6 @@ cmake_minimum_required(VERSION 2.8.3)
|
|||||||
project(hos_cosgi_devicerepository)
|
project(hos_cosgi_devicerepository)
|
||||||
|
|
||||||
## Find catkin macros and libraries
|
## Find catkin macros and libraries
|
||||||
## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
|
|
||||||
## is used, also find other catkin packages
|
|
||||||
find_package(catkin REQUIRED COMPONENTS
|
find_package(catkin REQUIRED COMPONENTS
|
||||||
hos_celix
|
hos_celix
|
||||||
hos_core_msgs
|
hos_core_msgs
|
||||||
@@ -14,87 +12,22 @@ find_package(catkin REQUIRED COMPONENTS
|
|||||||
)
|
)
|
||||||
|
|
||||||
## System dependencies are found with CMake's conventions
|
## System dependencies are found with CMake's conventions
|
||||||
# find_package(Boost REQUIRED COMPONENTS system)
|
|
||||||
|
|
||||||
|
|
||||||
## Uncomment this if the package has a setup.py. This macro ensures
|
|
||||||
## modules and global scripts declared therein get installed
|
|
||||||
## See http://ros.org/doc/api/catkin/html/user_guide/setup_dot_py.html
|
|
||||||
# catkin_python_setup()
|
|
||||||
|
|
||||||
find_package(APR REQUIRED)
|
find_package(APR REQUIRED)
|
||||||
find_package(CELIX REQUIRED)
|
find_package(CELIX REQUIRED)
|
||||||
find_package(Boost REQUIRED)
|
find_package(Boost REQUIRED)
|
||||||
find_package(libvariant REQUIRED)
|
find_package(libvariant REQUIRED)
|
||||||
|
|
||||||
|
|
||||||
################################################
|
|
||||||
## Declare ROS messages, services and actions ##
|
|
||||||
################################################
|
|
||||||
|
|
||||||
## To declare and build messages, services or actions from within this
|
|
||||||
## package, follow these steps:
|
|
||||||
## * Let MSG_DEP_SET be the set of packages whose message types you use in
|
|
||||||
## your messages/services/actions (e.g. std_msgs, actionlib_msgs, ...).
|
|
||||||
## * In the file package.xml:
|
|
||||||
## * add a build_depend and a run_depend tag for each package in MSG_DEP_SET
|
|
||||||
## * If MSG_DEP_SET isn't empty the following dependencies might have been
|
|
||||||
## pulled in transitively but can be declared for certainty nonetheless:
|
|
||||||
## * add a build_depend tag for "message_generation"
|
|
||||||
## * add a run_depend tag for "message_runtime"
|
|
||||||
## * In this file (CMakeLists.txt):
|
|
||||||
## * add "message_generation" and every package in MSG_DEP_SET to
|
|
||||||
## find_package(catkin REQUIRED COMPONENTS ...)
|
|
||||||
## * add "message_runtime" and every package in MSG_DEP_SET to
|
|
||||||
## catkin_package(CATKIN_DEPENDS ...)
|
|
||||||
## * uncomment the add_*_files sections below as needed
|
|
||||||
## and list every .msg/.srv/.action file to be processed
|
|
||||||
## * uncomment the generate_messages entry below
|
|
||||||
## * add every package in MSG_DEP_SET to generate_messages(DEPENDENCIES ...)
|
|
||||||
|
|
||||||
## Generate messages in the 'msg' folder
|
|
||||||
# add_message_files(
|
|
||||||
# FILES
|
|
||||||
# Message1.msg
|
|
||||||
# Message2.msg
|
|
||||||
# )
|
|
||||||
|
|
||||||
## Generate services in the 'srv' folder
|
|
||||||
# add_service_files(
|
|
||||||
# FILES
|
|
||||||
# Service1.srv
|
|
||||||
# Service2.srv
|
|
||||||
# )
|
|
||||||
|
|
||||||
## Generate actions in the 'action' folder
|
|
||||||
# add_action_files(
|
|
||||||
# FILES
|
|
||||||
# Action1.action
|
|
||||||
# Action2.action
|
|
||||||
# )
|
|
||||||
|
|
||||||
## Generate added messages and services with any dependencies listed here
|
|
||||||
# generate_messages(
|
|
||||||
# DEPENDENCIES
|
|
||||||
# hos_core_msgs
|
|
||||||
# )
|
|
||||||
|
|
||||||
###################################
|
###################################
|
||||||
## catkin specific configuration ##
|
## catkin specific configuration ##
|
||||||
###################################
|
###################################
|
||||||
## The catkin_package macro generates cmake config files for your package
|
|
||||||
## Declare things to be passed to dependent projects
|
|
||||||
## INCLUDE_DIRS: uncomment this if you package contains header files
|
|
||||||
## LIBRARIES: libraries you create in this project that dependent projects also need
|
|
||||||
## CATKIN_DEPENDS: catkin_packages dependent projects also need
|
|
||||||
## DEPENDS: system dependencies of this project that dependent projects also need
|
|
||||||
catkin_package(
|
catkin_package(
|
||||||
INCLUDE_DIRS include/${PROJECT_NAME}/
|
INCLUDE_DIRS include/${PROJECT_NAME}/
|
||||||
# LIBRARIES hos_cosgi_devicerepository
|
CATKIN_DEPENDS hos_celix hos_core_msgs hos_cosgi_core roscpp hos_cpp_utils
|
||||||
CATKIN_DEPENDS hos_celix hos_core_msgs hos_cosgi_core roscpp hos_deps hos_cpp_utils
|
|
||||||
# DEPENDS system_lib
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
###########
|
###########
|
||||||
## Build ##
|
## Build ##
|
||||||
###########
|
###########
|
||||||
@@ -103,14 +36,11 @@ add_definitions(
|
|||||||
-std=c++11
|
-std=c++11
|
||||||
)
|
)
|
||||||
|
|
||||||
## Specify additional locations of header files
|
|
||||||
## Your package locations should be listed before other locations
|
|
||||||
# include_directories(include)
|
|
||||||
include_directories(
|
include_directories(
|
||||||
|
include/${PROJECT_NAME}/
|
||||||
${catkin_INCLUDE_DIRS}
|
${catkin_INCLUDE_DIRS}
|
||||||
${APR_INCLUDE_DIR}
|
${APR_INCLUDE_DIR}
|
||||||
${APR_INCLUDE_DIR}/apr-1.0
|
${APR_INCLUDE_DIR}/apr-1.0
|
||||||
include/${PROJECT_NAME}/
|
|
||||||
${libvariant_INCLUDE_DIR}
|
${libvariant_INCLUDE_DIR}
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -123,28 +53,13 @@ bundle(hos_cosgi_devicerepository
|
|||||||
${PROJECT_SOURCE_DIR}/src/BundleActivator
|
${PROJECT_SOURCE_DIR}/src/BundleActivator
|
||||||
${PROJECT_SOURCE_DIR}/src/hos/cosgi/service/devicerepository/DeviceRepositoryServiceImpl
|
${PROJECT_SOURCE_DIR}/src/hos/cosgi/service/devicerepository/DeviceRepositoryServiceImpl
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(hos_cosgi_devicerepository
|
target_link_libraries(hos_cosgi_devicerepository
|
||||||
${catkin_LIBRARIES}
|
${catkin_LIBRARIES}
|
||||||
${APR_LIBRARIES}
|
${APR_LIBRARIES}
|
||||||
${libvariant_LIBRARY}
|
${libvariant_LIBRARY}
|
||||||
)
|
)
|
||||||
|
|
||||||
## Declare a cpp library
|
|
||||||
# add_library(hos_cosgi_itemrepository
|
|
||||||
# src/${PROJECT_NAME}/hos_cosgi_devicerepository.cpp
|
|
||||||
# )
|
|
||||||
|
|
||||||
## Declare a cpp executable
|
|
||||||
# add_executable(hos_cosgi_itemrepository_node src/hos_cosgi_itemrepository_node.cpp)
|
|
||||||
|
|
||||||
## Add cmake target dependencies of the executable/library
|
|
||||||
## as an example, message headers may need to be generated before nodes
|
|
||||||
# add_dependencies(hos_cosgi_itemrepository_node hos_cosgi_itemrepository_generate_messages_cpp)
|
|
||||||
|
|
||||||
## Specify libraries to link a library or executable target against
|
|
||||||
# target_link_libraries(hos_cosgi_itemrepository_node
|
|
||||||
# ${catkin_LIBRARIES}
|
|
||||||
# )
|
|
||||||
|
|
||||||
#############
|
#############
|
||||||
## Install ##
|
## Install ##
|
||||||
@@ -161,39 +76,22 @@ install(FILES
|
|||||||
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/bundles
|
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/bundles
|
||||||
)
|
)
|
||||||
|
|
||||||
# all install targets should use catkin DESTINATION variables
|
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc
|
||||||
# See http://ros.org/doc/api/catkin/html/adv_user_guide/variables.html
|
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
|
||||||
|
OPTIONAL
|
||||||
|
)
|
||||||
|
|
||||||
## Mark executable scripts (Python etc.) for installation
|
|
||||||
## in contrast to setup.py, you can choose the destination
|
|
||||||
# install(PROGRAMS
|
|
||||||
# scripts/my_python_script
|
|
||||||
# DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
|
|
||||||
# )
|
|
||||||
|
|
||||||
## Mark executables and/or libraries for installation
|
###################
|
||||||
# install(TARGETS hos_cosgi_itemrepository hos_cosgi_itemrepository_node
|
## Documentation ##
|
||||||
# ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
|
###################
|
||||||
# LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
|
|
||||||
# RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
|
|
||||||
# )
|
|
||||||
|
|
||||||
## Mark other files for installation (e.g. launch and bag files, etc.)
|
find_package(Doxygen)
|
||||||
# install(FILES
|
if(DOXYGEN_FOUND)
|
||||||
# # myfile1
|
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY)
|
||||||
# # myfile2
|
add_custom_target(doc
|
||||||
# DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
|
${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
|
||||||
# )
|
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||||
|
)
|
||||||
|
endif(DOXYGEN_FOUND)
|
||||||
|
|
||||||
#############
|
|
||||||
## Testing ##
|
|
||||||
#############
|
|
||||||
|
|
||||||
## Add gtest based cpp test target and link libraries
|
|
||||||
# catkin_add_gtest(${PROJECT_NAME}-test test/test_hos_cosgi_itemrepository.cpp)
|
|
||||||
# if(TARGET ${PROJECT_NAME}-test)
|
|
||||||
# target_link_libraries(${PROJECT_NAME}-test ${PROJECT_NAME})
|
|
||||||
# endif()
|
|
||||||
|
|
||||||
## Add folders to be run by python nosetests
|
|
||||||
# catkin_add_nosetests(test)
|
|
||||||
|
|||||||
@@ -0,0 +1,248 @@
|
|||||||
|
# Doxyfile 1.8.8
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Project related configuration options
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
DOXYFILE_ENCODING = UTF-8
|
||||||
|
PROJECT_NAME = hos_cosgi_devicerepository
|
||||||
|
OUTPUT_DIRECTORY = doc
|
||||||
|
CREATE_SUBDIRS = NO
|
||||||
|
ALLOW_UNICODE_NAMES = NO
|
||||||
|
OUTPUT_LANGUAGE = English
|
||||||
|
BRIEF_MEMBER_DESC = YES
|
||||||
|
REPEAT_BRIEF = YES
|
||||||
|
ABBREVIATE_BRIEF = "The $name class" \
|
||||||
|
"The $name widget" \
|
||||||
|
"The $name file" \
|
||||||
|
is \
|
||||||
|
provides \
|
||||||
|
specifies \
|
||||||
|
contains \
|
||||||
|
represents \
|
||||||
|
a \
|
||||||
|
an \
|
||||||
|
the
|
||||||
|
ALWAYS_DETAILED_SEC = NO
|
||||||
|
INLINE_INHERITED_MEMB = NO
|
||||||
|
FULL_PATH_NAMES = NO
|
||||||
|
SHORT_NAMES = NO
|
||||||
|
JAVADOC_AUTOBRIEF = NO
|
||||||
|
QT_AUTOBRIEF = NO
|
||||||
|
MULTILINE_CPP_IS_BRIEF = NO
|
||||||
|
INHERIT_DOCS = YES
|
||||||
|
SEPARATE_MEMBER_PAGES = NO
|
||||||
|
TAB_SIZE = 4
|
||||||
|
OPTIMIZE_OUTPUT_FOR_C = NO
|
||||||
|
OPTIMIZE_OUTPUT_JAVA = NO
|
||||||
|
OPTIMIZE_FOR_FORTRAN = NO
|
||||||
|
OPTIMIZE_OUTPUT_VHDL = NO
|
||||||
|
MARKDOWN_SUPPORT = YES
|
||||||
|
AUTOLINK_SUPPORT = YES
|
||||||
|
BUILTIN_STL_SUPPORT = NO
|
||||||
|
CPP_CLI_SUPPORT = NO
|
||||||
|
SIP_SUPPORT = NO
|
||||||
|
IDL_PROPERTY_SUPPORT = YES
|
||||||
|
DISTRIBUTE_GROUP_DOC = NO
|
||||||
|
SUBGROUPING = YES
|
||||||
|
INLINE_GROUPED_CLASSES = NO
|
||||||
|
INLINE_SIMPLE_STRUCTS = NO
|
||||||
|
TYPEDEF_HIDES_STRUCT = NO
|
||||||
|
LOOKUP_CACHE_SIZE = 0
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Build related configuration options
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
EXTRACT_ALL = YES
|
||||||
|
EXTRACT_PRIVATE = NO
|
||||||
|
EXTRACT_PACKAGE = NO
|
||||||
|
EXTRACT_STATIC = NO
|
||||||
|
EXTRACT_LOCAL_CLASSES = YES
|
||||||
|
EXTRACT_LOCAL_METHODS = NO
|
||||||
|
EXTRACT_ANON_NSPACES = NO
|
||||||
|
HIDE_UNDOC_MEMBERS = NO
|
||||||
|
HIDE_UNDOC_CLASSES = NO
|
||||||
|
HIDE_FRIEND_COMPOUNDS = NO
|
||||||
|
HIDE_IN_BODY_DOCS = NO
|
||||||
|
INTERNAL_DOCS = NO
|
||||||
|
CASE_SENSE_NAMES = NO
|
||||||
|
HIDE_SCOPE_NAMES = NO
|
||||||
|
SHOW_INCLUDE_FILES = YES
|
||||||
|
SHOW_GROUPED_MEMB_INC = NO
|
||||||
|
FORCE_LOCAL_INCLUDES = NO
|
||||||
|
INLINE_INFO = YES
|
||||||
|
SORT_MEMBER_DOCS = YES
|
||||||
|
SORT_BRIEF_DOCS = NO
|
||||||
|
SORT_MEMBERS_CTORS_1ST = NO
|
||||||
|
SORT_GROUP_NAMES = NO
|
||||||
|
SORT_BY_SCOPE_NAME = NO
|
||||||
|
STRICT_PROTO_MATCHING = NO
|
||||||
|
GENERATE_TODOLIST = YES
|
||||||
|
GENERATE_TESTLIST = YES
|
||||||
|
GENERATE_BUGLIST = YES
|
||||||
|
GENERATE_DEPRECATEDLIST= YES
|
||||||
|
MAX_INITIALIZER_LINES = 30
|
||||||
|
SHOW_USED_FILES = YES
|
||||||
|
SHOW_FILES = YES
|
||||||
|
SHOW_NAMESPACES = YES
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Configuration options related to warning and progress messages
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
QUIET = NO
|
||||||
|
WARNINGS = YES
|
||||||
|
WARN_IF_UNDOCUMENTED = YES
|
||||||
|
WARN_IF_DOC_ERROR = YES
|
||||||
|
WARN_NO_PARAMDOC = NO
|
||||||
|
WARN_FORMAT = "$file:$line: $text"
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Configuration options related to the input files
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
INPUT = @CMAKE_CURRENT_SOURCE_DIR@/include \
|
||||||
|
@CMAKE_CURRENT_SOURCE_DIR@/src
|
||||||
|
INPUT_ENCODING = UTF-8
|
||||||
|
FILE_PATTERNS = *.c \
|
||||||
|
*.cc \
|
||||||
|
*.cxx \
|
||||||
|
*.cpp \
|
||||||
|
*.c++ \
|
||||||
|
*.java \
|
||||||
|
*.ii \
|
||||||
|
*.ixx \
|
||||||
|
*.ipp \
|
||||||
|
*.i++ \
|
||||||
|
*.inl \
|
||||||
|
*.idl \
|
||||||
|
*.ddl \
|
||||||
|
*.odl \
|
||||||
|
*.h \
|
||||||
|
*.hh \
|
||||||
|
*.hxx \
|
||||||
|
*.hpp \
|
||||||
|
*.h++ \
|
||||||
|
*.cs \
|
||||||
|
*.d \
|
||||||
|
*.php \
|
||||||
|
*.php4 \
|
||||||
|
*.php5 \
|
||||||
|
*.phtml \
|
||||||
|
*.inc \
|
||||||
|
*.m \
|
||||||
|
*.markdown \
|
||||||
|
*.md \
|
||||||
|
*.mm \
|
||||||
|
*.dox \
|
||||||
|
*.py \
|
||||||
|
*.f90 \
|
||||||
|
*.f \
|
||||||
|
*.for \
|
||||||
|
*.tcl \
|
||||||
|
*.vhd \
|
||||||
|
*.vhdl \
|
||||||
|
*.ucf \
|
||||||
|
*.qsf \
|
||||||
|
*.as \
|
||||||
|
*.js
|
||||||
|
RECURSIVE = YES
|
||||||
|
EXCLUDE_SYMLINKS = NO
|
||||||
|
EXAMPLE_PATTERNS = *
|
||||||
|
EXAMPLE_RECURSIVE = NO
|
||||||
|
FILTER_SOURCE_FILES = NO
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Configuration options related to source browsing
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
SOURCE_BROWSER = NO
|
||||||
|
INLINE_SOURCES = NO
|
||||||
|
STRIP_CODE_COMMENTS = YES
|
||||||
|
REFERENCED_BY_RELATION = NO
|
||||||
|
REFERENCES_RELATION = NO
|
||||||
|
REFERENCES_LINK_SOURCE = YES
|
||||||
|
SOURCE_TOOLTIPS = YES
|
||||||
|
USE_HTAGS = NO
|
||||||
|
VERBATIM_HEADERS = YES
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Configuration options related to the alphabetical class index
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
ALPHABETICAL_INDEX = YES
|
||||||
|
COLS_IN_ALPHA_INDEX = 5
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Configuration options related to the HTML output
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
GENERATE_HTML = YES
|
||||||
|
HTML_OUTPUT = html
|
||||||
|
HTML_FILE_EXTENSION = .html
|
||||||
|
HTML_COLORSTYLE_HUE = 220
|
||||||
|
HTML_COLORSTYLE_SAT = 100
|
||||||
|
HTML_COLORSTYLE_GAMMA = 80
|
||||||
|
HTML_TIMESTAMP = YES
|
||||||
|
HTML_DYNAMIC_SECTIONS = NO
|
||||||
|
HTML_INDEX_NUM_ENTRIES = 100
|
||||||
|
GENERATE_DOCSET = NO
|
||||||
|
DOCSET_FEEDNAME = "Doxygen generated docs"
|
||||||
|
DOCSET_BUNDLE_ID = org.doxygen.Project
|
||||||
|
DOCSET_PUBLISHER_ID = org.doxygen.Publisher
|
||||||
|
DOCSET_PUBLISHER_NAME = Publisher
|
||||||
|
GENERATE_HTMLHELP = NO
|
||||||
|
GENERATE_CHI = NO
|
||||||
|
BINARY_TOC = NO
|
||||||
|
TOC_EXPAND = NO
|
||||||
|
GENERATE_QHP = NO
|
||||||
|
QHP_NAMESPACE = org.doxygen.Project
|
||||||
|
QHP_VIRTUAL_FOLDER = doc
|
||||||
|
GENERATE_ECLIPSEHELP = NO
|
||||||
|
ECLIPSE_DOC_ID = org.doxygen.Project
|
||||||
|
DISABLE_INDEX = NO
|
||||||
|
GENERATE_TREEVIEW = YES
|
||||||
|
ENUM_VALUES_PER_LINE = 4
|
||||||
|
TREEVIEW_WIDTH = 250
|
||||||
|
EXT_LINKS_IN_WINDOW = NO
|
||||||
|
FORMULA_FONTSIZE = 10
|
||||||
|
FORMULA_TRANSPARENT = YES
|
||||||
|
USE_MATHJAX = NO
|
||||||
|
MATHJAX_FORMAT = HTML-CSS
|
||||||
|
MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest
|
||||||
|
SEARCHENGINE = YES
|
||||||
|
SERVER_BASED_SEARCH = NO
|
||||||
|
EXTERNAL_SEARCH = NO
|
||||||
|
SEARCHDATA_FILE = searchdata.xml
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Configuration options related to the preprocessor
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
ENABLE_PREPROCESSING = YES
|
||||||
|
MACRO_EXPANSION = NO
|
||||||
|
EXPAND_ONLY_PREDEF = NO
|
||||||
|
SEARCH_INCLUDES = YES
|
||||||
|
SKIP_FUNCTION_MACROS = YES
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Configuration options related to external references
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
ALLEXTERNALS = NO
|
||||||
|
EXTERNAL_GROUPS = YES
|
||||||
|
EXTERNAL_PAGES = YES
|
||||||
|
PERL_PATH = /usr/bin/perl
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Configuration options related to the dot tool
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
CLASS_DIAGRAMS = YES
|
||||||
|
HIDE_UNDOC_RELATIONS = YES
|
||||||
|
HAVE_DOT = NO
|
||||||
|
DOT_NUM_THREADS = 0
|
||||||
|
DOT_FONTNAME = Helvetica
|
||||||
|
DOT_FONTSIZE = 10
|
||||||
|
CLASS_GRAPH = YES
|
||||||
|
COLLABORATION_GRAPH = YES
|
||||||
|
GROUP_GRAPHS = YES
|
||||||
|
UML_LOOK = NO
|
||||||
|
UML_LIMIT_NUM_FIELDS = 10
|
||||||
|
TEMPLATE_RELATIONS = NO
|
||||||
|
INCLUDE_GRAPH = YES
|
||||||
|
INCLUDED_BY_GRAPH = YES
|
||||||
|
CALL_GRAPH = NO
|
||||||
|
CALLER_GRAPH = NO
|
||||||
|
GRAPHICAL_HIERARCHY = YES
|
||||||
|
DIRECTORY_GRAPH = YES
|
||||||
|
DOT_IMAGE_FORMAT = png
|
||||||
|
INTERACTIVE_SVG = NO
|
||||||
|
DOT_GRAPH_MAX_NODES = 50
|
||||||
|
MAX_DOT_GRAPH_DEPTH = 0
|
||||||
|
DOT_TRANSPARENT = NO
|
||||||
|
DOT_MULTI_TARGETS = NO
|
||||||
|
GENERATE_LEGEND = YES
|
||||||
|
DOT_CLEANUP = YES
|
||||||
+4
-2
@@ -130,11 +130,13 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Implementation of device repository service
|
* Implementation of DeviceRepositoryService.
|
||||||
**/
|
**/
|
||||||
class DeviceRepositoryServiceImpl
|
class DeviceRepositoryServiceImpl
|
||||||
: public virtual DeviceRepositoryService,
|
: public virtual DeviceRepositoryService,
|
||||||
public implementation::ObservableService<DeviceRepositoryServiceImpl, DeviceEventType, DeviceEvent> {
|
public implementation::Service<DeviceRepositoryServiceImpl>,
|
||||||
|
public implementation::Observable<DeviceEventType, DeviceEvent> {
|
||||||
|
//public implementation::ObservableService<DeviceRepositoryServiceImpl, > { /* Why does this one not work? */
|
||||||
|
|
||||||
private:
|
private:
|
||||||
typedef std::map<std::string, std::shared_ptr<DeviceImpl>> devicesMap_t;
|
typedef std::map<std::string, std::shared_ptr<DeviceImpl>> devicesMap_t;
|
||||||
|
|||||||
@@ -2,8 +2,6 @@ cmake_minimum_required(VERSION 2.8.3)
|
|||||||
project(hos_cosgi_ruleengine)
|
project(hos_cosgi_ruleengine)
|
||||||
|
|
||||||
## Find catkin macros and libraries
|
## Find catkin macros and libraries
|
||||||
## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
|
|
||||||
## is used, also find other catkin packages
|
|
||||||
find_package(catkin REQUIRED COMPONENTS
|
find_package(catkin REQUIRED COMPONENTS
|
||||||
hos_celix
|
hos_celix
|
||||||
hos_cosgi_devicerepository
|
hos_cosgi_devicerepository
|
||||||
@@ -16,83 +14,19 @@ find_package(catkin REQUIRED COMPONENTS
|
|||||||
)
|
)
|
||||||
|
|
||||||
## System dependencies are found with CMake's conventions
|
## System dependencies are found with CMake's conventions
|
||||||
# find_package(Boost REQUIRED COMPONENTS system)
|
|
||||||
|
|
||||||
|
|
||||||
## Uncomment this if the package has a setup.py. This macro ensures
|
|
||||||
## modules and global scripts declared therein get installed
|
|
||||||
## See http://ros.org/doc/api/catkin/html/user_guide/setup_dot_py.html
|
|
||||||
# catkin_python_setup()
|
|
||||||
|
|
||||||
find_package(APR REQUIRED)
|
find_package(APR REQUIRED)
|
||||||
find_package(CELIX REQUIRED)
|
find_package(CELIX REQUIRED)
|
||||||
find_package(Boost REQUIRED)
|
find_package(Boost REQUIRED)
|
||||||
find_package(libvariant REQUIRED)
|
find_package(libvariant REQUIRED)
|
||||||
|
|
||||||
################################################
|
|
||||||
## Declare ROS messages, services and actions ##
|
|
||||||
################################################
|
|
||||||
## To declare and build messages, services or actions from within this
|
|
||||||
## package, follow these steps:
|
|
||||||
## * Let MSG_DEP_SET be the set of packages whose message types you use in
|
|
||||||
## your messages/services/actions (e.g. std_msgs, actionlib_msgs, ...).
|
|
||||||
## * In the file package.xml:
|
|
||||||
## * add a build_depend and a run_depend tag for each package in MSG_DEP_SET
|
|
||||||
## * If MSG_DEP_SET isn't empty the following dependencies might have been
|
|
||||||
## pulled in transitively but can be declared for certainty nonetheless:
|
|
||||||
## * add a build_depend tag for "message_generation"
|
|
||||||
## * add a run_depend tag for "message_runtime"
|
|
||||||
## * In this file (CMakeLists.txt):
|
|
||||||
## * add "message_generation" and every package in MSG_DEP_SET to
|
|
||||||
## find_package(catkin REQUIRED COMPONENTS ...)
|
|
||||||
## * add "message_runtime" and every package in MSG_DEP_SET to
|
|
||||||
## catkin_package(CATKIN_DEPENDS ...)
|
|
||||||
## * uncomment the add_*_files sections below as needed
|
|
||||||
## and list every .msg/.srv/.action file to be processed
|
|
||||||
## * uncomment the generate_messages entry below
|
|
||||||
## * add every package in MSG_DEP_SET to generate_messages(DEPENDENCIES ...)
|
|
||||||
|
|
||||||
## Generate messages in the 'msg' folder
|
|
||||||
# add_message_files(
|
|
||||||
# FILES
|
|
||||||
# Message1.msg
|
|
||||||
# Message2.msg
|
|
||||||
# )
|
|
||||||
|
|
||||||
## Generate services in the 'srv' folder
|
|
||||||
# add_service_files(
|
|
||||||
# FILES
|
|
||||||
# Service1.srv
|
|
||||||
# Service2.srv
|
|
||||||
# )
|
|
||||||
|
|
||||||
## Generate actions in the 'action' folder
|
|
||||||
# add_action_files(
|
|
||||||
# FILES
|
|
||||||
# Action1.action
|
|
||||||
# Action2.action
|
|
||||||
# )
|
|
||||||
|
|
||||||
## Generate added messages and services with any dependencies listed here
|
|
||||||
# generate_messages(
|
|
||||||
# DEPENDENCIES
|
|
||||||
# std_msgs # Or other packages containing msgs
|
|
||||||
# )
|
|
||||||
|
|
||||||
###################################
|
###################################
|
||||||
## catkin specific configuration ##
|
## catkin specific configuration ##
|
||||||
###################################
|
###################################
|
||||||
## The catkin_package macro generates cmake config files for your package
|
|
||||||
## Declare things to be passed to dependent projects
|
|
||||||
## INCLUDE_DIRS: uncomment this if you package contains header files
|
|
||||||
## LIBRARIES: libraries you create in this project that dependent projects also need
|
|
||||||
## CATKIN_DEPENDS: catkin_packages dependent projects also need
|
|
||||||
## DEPENDS: system dependencies of this project that dependent projects also need
|
|
||||||
catkin_package(
|
catkin_package(
|
||||||
INCLUDE_DIRS include/${PROJECT_NAME}/
|
INCLUDE_DIRS include/${PROJECT_NAME}/
|
||||||
# LIBRARIES hos_cosgi_ruleengine
|
CATKIN_DEPENDS hos_celix hos_cosgi_core hos_cpp_utils roscpp
|
||||||
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
|
|
||||||
)
|
)
|
||||||
|
|
||||||
###########
|
###########
|
||||||
@@ -103,14 +37,11 @@ add_definitions(
|
|||||||
-std=c++11
|
-std=c++11
|
||||||
)
|
)
|
||||||
|
|
||||||
## Specify additional locations of header files
|
|
||||||
## Your package locations should be listed before other locations
|
|
||||||
# include_directories(include)
|
|
||||||
include_directories(
|
include_directories(
|
||||||
|
include/${PROJECT_NAME}/
|
||||||
${catkin_INCLUDE_DIRS}
|
${catkin_INCLUDE_DIRS}
|
||||||
${APR_INCLUDE_DIR}
|
${APR_INCLUDE_DIR}
|
||||||
${APR_INCLUDE_DIR}/apr-1.0
|
${APR_INCLUDE_DIR}/apr-1.0
|
||||||
include/${PROJECT_NAME}/
|
|
||||||
${libvariant_INCLUDE_DIR}
|
${libvariant_INCLUDE_DIR}
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -129,28 +60,13 @@ bundle(hos_cosgi_ruleengine
|
|||||||
${PROJECT_SOURCE_DIR}/src/hos/cosgi/service/ruleengine/rules/conditions/LogicalAndCondition
|
${PROJECT_SOURCE_DIR}/src/hos/cosgi/service/ruleengine/rules/conditions/LogicalAndCondition
|
||||||
${PROJECT_SOURCE_DIR}/src/hos/cosgi/service/ruleengine/rules/conditions/DeviceMsgCondition
|
${PROJECT_SOURCE_DIR}/src/hos/cosgi/service/ruleengine/rules/conditions/DeviceMsgCondition
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(hos_cosgi_ruleengine
|
target_link_libraries(hos_cosgi_ruleengine
|
||||||
${catkin_LIBRARIES}
|
${catkin_LIBRARIES}
|
||||||
${APR_LIBRARIES}
|
${APR_LIBRARIES}
|
||||||
${libvariant_LIBRARY}
|
${libvariant_LIBRARY}
|
||||||
)
|
)
|
||||||
|
|
||||||
## Declare a cpp library
|
|
||||||
# add_library(hos_cosgi_ruleengine
|
|
||||||
# src/${PROJECT_NAME}/hos_cosgi_ruleengine.cpp
|
|
||||||
# )
|
|
||||||
|
|
||||||
## Declare a cpp executable
|
|
||||||
# add_executable(hos_cosgi_ruleengine_node src/hos_cosgi_ruleengine_node.cpp)
|
|
||||||
|
|
||||||
## Add cmake target dependencies of the executable/library
|
|
||||||
## as an example, message headers may need to be generated before nodes
|
|
||||||
# add_dependencies(hos_cosgi_ruleengine_node hos_cosgi_ruleengine_generate_messages_cpp)
|
|
||||||
|
|
||||||
## Specify libraries to link a library or executable target against
|
|
||||||
# target_link_libraries(hos_cosgi_ruleengine_node
|
|
||||||
# ${catkin_LIBRARIES}
|
|
||||||
# )
|
|
||||||
|
|
||||||
#############
|
#############
|
||||||
## Install ##
|
## Install ##
|
||||||
@@ -167,46 +83,21 @@ install(FILES
|
|||||||
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/bundles
|
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/bundles
|
||||||
)
|
)
|
||||||
|
|
||||||
# all install targets should use catkin DESTINATION variables
|
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc
|
||||||
# See http://ros.org/doc/api/catkin/html/adv_user_guide/variables.html
|
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
|
||||||
|
OPTIONAL
|
||||||
|
)
|
||||||
|
|
||||||
## Mark executable scripts (Python etc.) for installation
|
|
||||||
## in contrast to setup.py, you can choose the destination
|
|
||||||
# install(PROGRAMS
|
|
||||||
# scripts/my_python_script
|
|
||||||
# DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
|
|
||||||
# )
|
|
||||||
|
|
||||||
## Mark executables and/or libraries for installation
|
###################
|
||||||
# install(TARGETS hos_cosgi_ruleengine hos_cosgi_ruleengine_node
|
## Documentation ##
|
||||||
# ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
|
###################
|
||||||
# LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
|
|
||||||
# RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
|
|
||||||
# )
|
|
||||||
|
|
||||||
## Mark cpp header files for installation
|
find_package(Doxygen)
|
||||||
# install(DIRECTORY include/${PROJECT_NAME}/
|
if(DOXYGEN_FOUND)
|
||||||
# DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
|
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY)
|
||||||
# FILES_MATCHING PATTERN "*.h"
|
add_custom_target(doc
|
||||||
# PATTERN ".svn" EXCLUDE
|
${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
|
||||||
# )
|
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||||
|
)
|
||||||
## Mark other files for installation (e.g. launch and bag files, etc.)
|
endif(DOXYGEN_FOUND)
|
||||||
# install(FILES
|
|
||||||
# # myfile1
|
|
||||||
# # myfile2
|
|
||||||
# DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
|
|
||||||
# )
|
|
||||||
|
|
||||||
#############
|
|
||||||
## Testing ##
|
|
||||||
#############
|
|
||||||
|
|
||||||
## Add gtest based cpp test target and link libraries
|
|
||||||
# catkin_add_gtest(${PROJECT_NAME}-test test/test_hos_cosgi_ruleengine.cpp)
|
|
||||||
# if(TARGET ${PROJECT_NAME}-test)
|
|
||||||
# target_link_libraries(${PROJECT_NAME}-test ${PROJECT_NAME})
|
|
||||||
# endif()
|
|
||||||
|
|
||||||
## Add folders to be run by python nosetests
|
|
||||||
# catkin_add_nosetests(test)
|
|
||||||
|
|||||||
@@ -0,0 +1,248 @@
|
|||||||
|
# Doxyfile 1.8.8
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Project related configuration options
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
DOXYFILE_ENCODING = UTF-8
|
||||||
|
PROJECT_NAME = hos_cosgi_ruleengine
|
||||||
|
OUTPUT_DIRECTORY = doc
|
||||||
|
CREATE_SUBDIRS = NO
|
||||||
|
ALLOW_UNICODE_NAMES = NO
|
||||||
|
OUTPUT_LANGUAGE = English
|
||||||
|
BRIEF_MEMBER_DESC = YES
|
||||||
|
REPEAT_BRIEF = YES
|
||||||
|
ABBREVIATE_BRIEF = "The $name class" \
|
||||||
|
"The $name widget" \
|
||||||
|
"The $name file" \
|
||||||
|
is \
|
||||||
|
provides \
|
||||||
|
specifies \
|
||||||
|
contains \
|
||||||
|
represents \
|
||||||
|
a \
|
||||||
|
an \
|
||||||
|
the
|
||||||
|
ALWAYS_DETAILED_SEC = NO
|
||||||
|
INLINE_INHERITED_MEMB = NO
|
||||||
|
FULL_PATH_NAMES = NO
|
||||||
|
SHORT_NAMES = NO
|
||||||
|
JAVADOC_AUTOBRIEF = NO
|
||||||
|
QT_AUTOBRIEF = NO
|
||||||
|
MULTILINE_CPP_IS_BRIEF = NO
|
||||||
|
INHERIT_DOCS = YES
|
||||||
|
SEPARATE_MEMBER_PAGES = NO
|
||||||
|
TAB_SIZE = 4
|
||||||
|
OPTIMIZE_OUTPUT_FOR_C = NO
|
||||||
|
OPTIMIZE_OUTPUT_JAVA = NO
|
||||||
|
OPTIMIZE_FOR_FORTRAN = NO
|
||||||
|
OPTIMIZE_OUTPUT_VHDL = NO
|
||||||
|
MARKDOWN_SUPPORT = YES
|
||||||
|
AUTOLINK_SUPPORT = YES
|
||||||
|
BUILTIN_STL_SUPPORT = NO
|
||||||
|
CPP_CLI_SUPPORT = NO
|
||||||
|
SIP_SUPPORT = NO
|
||||||
|
IDL_PROPERTY_SUPPORT = YES
|
||||||
|
DISTRIBUTE_GROUP_DOC = NO
|
||||||
|
SUBGROUPING = YES
|
||||||
|
INLINE_GROUPED_CLASSES = NO
|
||||||
|
INLINE_SIMPLE_STRUCTS = NO
|
||||||
|
TYPEDEF_HIDES_STRUCT = NO
|
||||||
|
LOOKUP_CACHE_SIZE = 0
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Build related configuration options
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
EXTRACT_ALL = YES
|
||||||
|
EXTRACT_PRIVATE = NO
|
||||||
|
EXTRACT_PACKAGE = NO
|
||||||
|
EXTRACT_STATIC = NO
|
||||||
|
EXTRACT_LOCAL_CLASSES = YES
|
||||||
|
EXTRACT_LOCAL_METHODS = NO
|
||||||
|
EXTRACT_ANON_NSPACES = NO
|
||||||
|
HIDE_UNDOC_MEMBERS = NO
|
||||||
|
HIDE_UNDOC_CLASSES = NO
|
||||||
|
HIDE_FRIEND_COMPOUNDS = NO
|
||||||
|
HIDE_IN_BODY_DOCS = NO
|
||||||
|
INTERNAL_DOCS = NO
|
||||||
|
CASE_SENSE_NAMES = NO
|
||||||
|
HIDE_SCOPE_NAMES = NO
|
||||||
|
SHOW_INCLUDE_FILES = YES
|
||||||
|
SHOW_GROUPED_MEMB_INC = NO
|
||||||
|
FORCE_LOCAL_INCLUDES = NO
|
||||||
|
INLINE_INFO = YES
|
||||||
|
SORT_MEMBER_DOCS = YES
|
||||||
|
SORT_BRIEF_DOCS = NO
|
||||||
|
SORT_MEMBERS_CTORS_1ST = NO
|
||||||
|
SORT_GROUP_NAMES = NO
|
||||||
|
SORT_BY_SCOPE_NAME = NO
|
||||||
|
STRICT_PROTO_MATCHING = NO
|
||||||
|
GENERATE_TODOLIST = YES
|
||||||
|
GENERATE_TESTLIST = YES
|
||||||
|
GENERATE_BUGLIST = YES
|
||||||
|
GENERATE_DEPRECATEDLIST= YES
|
||||||
|
MAX_INITIALIZER_LINES = 30
|
||||||
|
SHOW_USED_FILES = YES
|
||||||
|
SHOW_FILES = YES
|
||||||
|
SHOW_NAMESPACES = YES
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Configuration options related to warning and progress messages
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
QUIET = NO
|
||||||
|
WARNINGS = YES
|
||||||
|
WARN_IF_UNDOCUMENTED = YES
|
||||||
|
WARN_IF_DOC_ERROR = YES
|
||||||
|
WARN_NO_PARAMDOC = NO
|
||||||
|
WARN_FORMAT = "$file:$line: $text"
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Configuration options related to the input files
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
INPUT = @CMAKE_CURRENT_SOURCE_DIR@/include \
|
||||||
|
@CMAKE_CURRENT_SOURCE_DIR@/src
|
||||||
|
INPUT_ENCODING = UTF-8
|
||||||
|
FILE_PATTERNS = *.c \
|
||||||
|
*.cc \
|
||||||
|
*.cxx \
|
||||||
|
*.cpp \
|
||||||
|
*.c++ \
|
||||||
|
*.java \
|
||||||
|
*.ii \
|
||||||
|
*.ixx \
|
||||||
|
*.ipp \
|
||||||
|
*.i++ \
|
||||||
|
*.inl \
|
||||||
|
*.idl \
|
||||||
|
*.ddl \
|
||||||
|
*.odl \
|
||||||
|
*.h \
|
||||||
|
*.hh \
|
||||||
|
*.hxx \
|
||||||
|
*.hpp \
|
||||||
|
*.h++ \
|
||||||
|
*.cs \
|
||||||
|
*.d \
|
||||||
|
*.php \
|
||||||
|
*.php4 \
|
||||||
|
*.php5 \
|
||||||
|
*.phtml \
|
||||||
|
*.inc \
|
||||||
|
*.m \
|
||||||
|
*.markdown \
|
||||||
|
*.md \
|
||||||
|
*.mm \
|
||||||
|
*.dox \
|
||||||
|
*.py \
|
||||||
|
*.f90 \
|
||||||
|
*.f \
|
||||||
|
*.for \
|
||||||
|
*.tcl \
|
||||||
|
*.vhd \
|
||||||
|
*.vhdl \
|
||||||
|
*.ucf \
|
||||||
|
*.qsf \
|
||||||
|
*.as \
|
||||||
|
*.js
|
||||||
|
RECURSIVE = YES
|
||||||
|
EXCLUDE_SYMLINKS = NO
|
||||||
|
EXAMPLE_PATTERNS = *
|
||||||
|
EXAMPLE_RECURSIVE = NO
|
||||||
|
FILTER_SOURCE_FILES = NO
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Configuration options related to source browsing
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
SOURCE_BROWSER = NO
|
||||||
|
INLINE_SOURCES = NO
|
||||||
|
STRIP_CODE_COMMENTS = YES
|
||||||
|
REFERENCED_BY_RELATION = NO
|
||||||
|
REFERENCES_RELATION = NO
|
||||||
|
REFERENCES_LINK_SOURCE = YES
|
||||||
|
SOURCE_TOOLTIPS = YES
|
||||||
|
USE_HTAGS = NO
|
||||||
|
VERBATIM_HEADERS = YES
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Configuration options related to the alphabetical class index
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
ALPHABETICAL_INDEX = YES
|
||||||
|
COLS_IN_ALPHA_INDEX = 5
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Configuration options related to the HTML output
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
GENERATE_HTML = YES
|
||||||
|
HTML_OUTPUT = html
|
||||||
|
HTML_FILE_EXTENSION = .html
|
||||||
|
HTML_COLORSTYLE_HUE = 220
|
||||||
|
HTML_COLORSTYLE_SAT = 100
|
||||||
|
HTML_COLORSTYLE_GAMMA = 80
|
||||||
|
HTML_TIMESTAMP = YES
|
||||||
|
HTML_DYNAMIC_SECTIONS = NO
|
||||||
|
HTML_INDEX_NUM_ENTRIES = 100
|
||||||
|
GENERATE_DOCSET = NO
|
||||||
|
DOCSET_FEEDNAME = "Doxygen generated docs"
|
||||||
|
DOCSET_BUNDLE_ID = org.doxygen.Project
|
||||||
|
DOCSET_PUBLISHER_ID = org.doxygen.Publisher
|
||||||
|
DOCSET_PUBLISHER_NAME = Publisher
|
||||||
|
GENERATE_HTMLHELP = NO
|
||||||
|
GENERATE_CHI = NO
|
||||||
|
BINARY_TOC = NO
|
||||||
|
TOC_EXPAND = NO
|
||||||
|
GENERATE_QHP = NO
|
||||||
|
QHP_NAMESPACE = org.doxygen.Project
|
||||||
|
QHP_VIRTUAL_FOLDER = doc
|
||||||
|
GENERATE_ECLIPSEHELP = NO
|
||||||
|
ECLIPSE_DOC_ID = org.doxygen.Project
|
||||||
|
DISABLE_INDEX = NO
|
||||||
|
GENERATE_TREEVIEW = YES
|
||||||
|
ENUM_VALUES_PER_LINE = 4
|
||||||
|
TREEVIEW_WIDTH = 250
|
||||||
|
EXT_LINKS_IN_WINDOW = NO
|
||||||
|
FORMULA_FONTSIZE = 10
|
||||||
|
FORMULA_TRANSPARENT = YES
|
||||||
|
USE_MATHJAX = NO
|
||||||
|
MATHJAX_FORMAT = HTML-CSS
|
||||||
|
MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest
|
||||||
|
SEARCHENGINE = YES
|
||||||
|
SERVER_BASED_SEARCH = NO
|
||||||
|
EXTERNAL_SEARCH = NO
|
||||||
|
SEARCHDATA_FILE = searchdata.xml
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Configuration options related to the preprocessor
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
ENABLE_PREPROCESSING = YES
|
||||||
|
MACRO_EXPANSION = NO
|
||||||
|
EXPAND_ONLY_PREDEF = NO
|
||||||
|
SEARCH_INCLUDES = YES
|
||||||
|
SKIP_FUNCTION_MACROS = YES
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Configuration options related to external references
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
ALLEXTERNALS = NO
|
||||||
|
EXTERNAL_GROUPS = YES
|
||||||
|
EXTERNAL_PAGES = YES
|
||||||
|
PERL_PATH = /usr/bin/perl
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Configuration options related to the dot tool
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
CLASS_DIAGRAMS = YES
|
||||||
|
HIDE_UNDOC_RELATIONS = YES
|
||||||
|
HAVE_DOT = NO
|
||||||
|
DOT_NUM_THREADS = 0
|
||||||
|
DOT_FONTNAME = Helvetica
|
||||||
|
DOT_FONTSIZE = 10
|
||||||
|
CLASS_GRAPH = YES
|
||||||
|
COLLABORATION_GRAPH = YES
|
||||||
|
GROUP_GRAPHS = YES
|
||||||
|
UML_LOOK = NO
|
||||||
|
UML_LIMIT_NUM_FIELDS = 10
|
||||||
|
TEMPLATE_RELATIONS = NO
|
||||||
|
INCLUDE_GRAPH = YES
|
||||||
|
INCLUDED_BY_GRAPH = YES
|
||||||
|
CALL_GRAPH = NO
|
||||||
|
CALLER_GRAPH = NO
|
||||||
|
GRAPHICAL_HIERARCHY = YES
|
||||||
|
DIRECTORY_GRAPH = YES
|
||||||
|
DOT_IMAGE_FORMAT = png
|
||||||
|
INTERACTIVE_SVG = NO
|
||||||
|
DOT_GRAPH_MAX_NODES = 50
|
||||||
|
MAX_DOT_GRAPH_DEPTH = 0
|
||||||
|
DOT_TRANSPARENT = NO
|
||||||
|
DOT_MULTI_TARGETS = NO
|
||||||
|
GENERATE_LEGEND = YES
|
||||||
|
DOT_CLEANUP = YES
|
||||||
+32
@@ -16,6 +16,14 @@ namespace libvariant { class Variant; }
|
|||||||
namespace hos {
|
namespace hos {
|
||||||
namespace cosgi {
|
namespace cosgi {
|
||||||
namespace service {
|
namespace service {
|
||||||
|
|
||||||
|
|
||||||
|
// forward declarations
|
||||||
|
namespace devicerepository { class DeviceRepositoryService; }
|
||||||
|
namespace core { class CoreService; }
|
||||||
|
|
||||||
|
|
||||||
|
// service namespace
|
||||||
namespace ruleengine {
|
namespace ruleengine {
|
||||||
|
|
||||||
|
|
||||||
@@ -92,6 +100,30 @@ public:
|
|||||||
* \param[in] factory rule condition factory.
|
* \param[in] factory rule condition factory.
|
||||||
*/
|
*/
|
||||||
virtual void registerRuleConditionFactory(const std::string& type, std::shared_ptr<RuleConditionFactory> factory) noexcept = 0;
|
virtual void registerRuleConditionFactory(const std::string& type, std::shared_ptr<RuleConditionFactory> factory) noexcept = 0;
|
||||||
|
|
||||||
|
|
||||||
|
/* Interface for third-party conditions. */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the rule condition factory responsible for the given condition type.
|
||||||
|
*
|
||||||
|
* \param[in] type condition type identifier.
|
||||||
|
*/
|
||||||
|
virtual RuleConditionFactory* getRuleConditionFactory(const std::string& type) noexcept = 0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns a reference to the device repository service.
|
||||||
|
*
|
||||||
|
* \return device respository service.
|
||||||
|
*/
|
||||||
|
virtual devicerepository::DeviceRepositoryService* getDeviceRepository() noexcept = 0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns a reference to the core service.
|
||||||
|
*
|
||||||
|
* \return core service.
|
||||||
|
*/
|
||||||
|
virtual core::CoreService* getCoreService() noexcept = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
-7
@@ -126,13 +126,6 @@ public:
|
|||||||
virtual void conditionStateChanged(bool newState, const conditions::ConditionTriggerType& trigger,
|
virtual void conditionStateChanged(bool newState, const conditions::ConditionTriggerType& trigger,
|
||||||
const libvariant::Variant& lcontext = libvariant::Variant()) noexcept = 0;
|
const libvariant::Variant& lcontext = libvariant::Variant()) noexcept = 0;
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns a reference to the device repository service.
|
|
||||||
*
|
|
||||||
* \return device repository service.
|
|
||||||
*/
|
|
||||||
virtual devicerepository::DeviceRepositoryService* getDeviceRepository() noexcept = 0;
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+3
-1
@@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
|
|
||||||
#include "RuleCondition.h"
|
#include "RuleCondition.h"
|
||||||
|
#include <hos/cosgi/service/Implementation.h>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -20,7 +21,8 @@ namespace conditions {
|
|||||||
* Base class for condition implementations.
|
* Base class for condition implementations.
|
||||||
*/
|
*/
|
||||||
class RuleConditionImpl
|
class RuleConditionImpl
|
||||||
: public virtual RuleCondition {
|
: public virtual RuleCondition,
|
||||||
|
public implementation::Object {
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
|
|||||||
@@ -1,29 +1,21 @@
|
|||||||
/*
|
|
||||||
* bundle_activator.cpp
|
|
||||||
*
|
|
||||||
* Created on: 26.04.2015
|
|
||||||
* Author: matzman
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
// std
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
|
#include <string>
|
||||||
#include <apr_general.h>
|
|
||||||
|
|
||||||
#include "ros/ros.h"
|
|
||||||
|
|
||||||
extern "C" {
|
|
||||||
#include "celix/bundle_activator.h"
|
|
||||||
#include "celix/bundle_context.h"
|
|
||||||
#include "celix/service_listener.h"
|
|
||||||
#include "celix/service_reference.h"
|
|
||||||
#include "celix/constants.h"
|
|
||||||
}
|
|
||||||
|
|
||||||
#include <hos/cosgi/service/core/CoreService.h>
|
|
||||||
#include "hos/cosgi/service/ruleengine/RuleEngineServiceImpl.h"
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <mutex>
|
#include <mutex>
|
||||||
|
// ROS
|
||||||
|
#include <ros/ros.h>
|
||||||
|
// APR
|
||||||
|
#include <apr_general.h>
|
||||||
|
// Celix
|
||||||
|
#include <hos/cosgi/celix.h>
|
||||||
|
// CoreService
|
||||||
|
#include "hos/cosgi/service/ruleengine/RuleEngineServiceImpl.h"
|
||||||
|
#include <hos/cosgi/service/core/CoreService.h>
|
||||||
|
#include <hos/cosgi/service/devicerepository/DeviceRepositoryService.h>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
using namespace hos::cosgi::service::ruleengine;
|
using namespace hos::cosgi::service::ruleengine;
|
||||||
@@ -32,6 +24,8 @@ using namespace hos::cosgi::service::devicerepository;
|
|||||||
using namespace hos::cosgi::service::core;
|
using namespace hos::cosgi::service::core;
|
||||||
using namespace hos::cosgi;
|
using namespace hos::cosgi;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
struct UserData {
|
struct UserData {
|
||||||
apr_pool_t* memoryPool = nullptr;
|
apr_pool_t* memoryPool = nullptr;
|
||||||
std::unique_ptr<RuleEngineServiceImpl> serviceImpl = nullptr;
|
std::unique_ptr<RuleEngineServiceImpl> serviceImpl = nullptr;
|
||||||
@@ -41,40 +35,49 @@ struct UserData {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
celix_status_t cb_serviceChanged(void* listener, service_event_pt event) {
|
celix_status_t cb_serviceChanged(void* listener, service_event_pt event) {
|
||||||
UserData* myUserData = (UserData*) ((serviceListener*)listener)->handle;
|
UserData* myUserData = (UserData*) ((serviceListener*)listener)->handle;
|
||||||
if (event->type == OSGI_FRAMEWORK_SERVICE_EVENT_REGISTERED) {
|
if (event->type == OSGI_FRAMEWORK_SERVICE_EVENT_REGISTERED) {
|
||||||
char* serviceName = nullptr;
|
char* serviceName = nullptr;
|
||||||
bool checkReg = false;
|
bool checkReg = false;
|
||||||
serviceReference_getProperty(event->reference, (char*)OSGI_FRAMEWORK_OBJECTCLASS, &serviceName);
|
serviceReference_getProperty(event->reference, (char*)OSGI_FRAMEWORK_OBJECTCLASS, &serviceName);
|
||||||
|
|
||||||
if (serviceName && std::strcmp(serviceName, DeviceRepositoryService::SERVICE_NAME) == 0) {
|
if (serviceName && std::strcmp(serviceName, DeviceRepositoryService::SERVICE_NAME) == 0) {
|
||||||
DeviceRepositoryService *service = nullptr;
|
DeviceRepositoryService *service = nullptr;
|
||||||
bundleContext_getService(myUserData->bundleContext, event->reference, (void**)&service);
|
bundleContext_getService(myUserData->bundleContext, event->reference, (void**)&service);
|
||||||
myUserData->serviceImpl->setRepoService(service);
|
myUserData->serviceImpl->setRepoService(service);
|
||||||
checkReg = true;
|
checkReg = true;
|
||||||
|
|
||||||
} else if (serviceName && std::strcmp(serviceName, ScriptingService::SERVICE_NAME) == 0) {
|
} else if (serviceName && std::strcmp(serviceName, ScriptingService::SERVICE_NAME) == 0) {
|
||||||
ScriptingService *service = nullptr;
|
ScriptingService *service = nullptr;
|
||||||
bundleContext_getService(myUserData->bundleContext, event->reference, (void**)&service);
|
bundleContext_getService(myUserData->bundleContext, event->reference, (void**)&service);
|
||||||
myUserData->serviceImpl->addExecutionBackend(service);
|
myUserData->serviceImpl->addExecutionBackend(service);
|
||||||
checkReg = true;
|
checkReg = true;
|
||||||
}
|
}
|
||||||
// Register hos-devicerepository-service
|
|
||||||
|
// Register rule engine service
|
||||||
if (checkReg && !myUserData->serviceReg && myUserData->serviceImpl->isInitialized()) {
|
if (checkReg && !myUserData->serviceReg && myUserData->serviceImpl->isInitialized()) {
|
||||||
bundleContext_registerService(myUserData->bundleContext, (char*)RuleEngineServiceImpl::SERVICE_NAME, myUserData->serviceImpl.get(), nullptr, &myUserData->serviceReg);
|
bundleContext_registerService(myUserData->bundleContext, (char*)RuleEngineServiceImpl::SERVICE_NAME, myUserData->serviceImpl.get(), nullptr, &myUserData->serviceReg);
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (event->type == OSGI_FRAMEWORK_SERVICE_EVENT_UNREGISTERING) {
|
} else if (event->type == OSGI_FRAMEWORK_SERVICE_EVENT_UNREGISTERING) {
|
||||||
}
|
}
|
||||||
return CELIX_SUCCESS;
|
return CELIX_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
celix_status_t bundleActivator_create(bundle_context_pt context, void **userData) {
|
celix_status_t bundleActivator_create(bundle_context_pt context, void **userData) {
|
||||||
celix_status_t status = CELIX_START_ERROR;
|
celix_status_t status = CELIX_START_ERROR;
|
||||||
apr_pool_t* memoryPool = nullptr;
|
apr_pool_t* memoryPool = nullptr;
|
||||||
|
|
||||||
// Create APR memory pool
|
// Create APR memory pool
|
||||||
apr_status_t astatus = apr_pool_create(&memoryPool, NULL);
|
apr_status_t astatus = apr_pool_create(&memoryPool, NULL);
|
||||||
if (astatus != APR_SUCCESS) {
|
if (astatus != APR_SUCCESS) {
|
||||||
ROS_ERROR("RuleEngineService: Could not create APR memory pool (%i).", astatus);
|
ROS_ERROR("RuleEngineService: Could not create APR memory pool (%i).", astatus);
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
// Create user data
|
// Create user data
|
||||||
UserData* myUserData = (UserData*)apr_palloc(memoryPool, sizeof(UserData));
|
UserData* myUserData = (UserData*)apr_palloc(memoryPool, sizeof(UserData));
|
||||||
if (myUserData != nullptr) {
|
if (myUserData != nullptr) {
|
||||||
@@ -83,6 +86,7 @@ celix_status_t bundleActivator_create(bundle_context_pt context, void **userData
|
|||||||
*userData = (void*)myUserData;
|
*userData = (void*)myUserData;
|
||||||
status = CELIX_SUCCESS;
|
status = CELIX_SUCCESS;
|
||||||
ROS_INFO("RuleEngineService: Bundle successfully created");
|
ROS_INFO("RuleEngineService: Bundle successfully created");
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
ROS_ERROR("RuleEngineService: Could not create user data struct");
|
ROS_ERROR("RuleEngineService: Could not create user data struct");
|
||||||
apr_pool_destroy(memoryPool);
|
apr_pool_destroy(memoryPool);
|
||||||
@@ -91,17 +95,21 @@ celix_status_t bundleActivator_create(bundle_context_pt context, void **userData
|
|||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
celix_status_t bundleActivator_start(void * userData, bundle_context_pt context) {
|
celix_status_t bundleActivator_start(void * userData, bundle_context_pt context) {
|
||||||
celix_status_t status = CELIX_SUCCESS;
|
celix_status_t status = CELIX_SUCCESS;
|
||||||
if (userData != nullptr) {
|
if (userData != nullptr) {
|
||||||
UserData* myUserData = (UserData*)userData;
|
UserData* myUserData = (UserData*)userData;
|
||||||
// Create hos-devicerepository-service
|
|
||||||
|
// Create rule engine service
|
||||||
if (myUserData->serviceReg != nullptr) {
|
if (myUserData->serviceReg != nullptr) {
|
||||||
serviceRegistration_unregister(myUserData->serviceReg);
|
serviceRegistration_unregister(myUserData->serviceReg);
|
||||||
myUserData->serviceReg = nullptr;
|
myUserData->serviceReg = nullptr;
|
||||||
}
|
}
|
||||||
myUserData->serviceImpl.reset(new RuleEngineServiceImpl());
|
myUserData->serviceImpl.reset(new RuleEngineServiceImpl());
|
||||||
// Get HOS Core Service
|
|
||||||
|
// Get core Service
|
||||||
service_reference_pt ref = nullptr;
|
service_reference_pt ref = nullptr;
|
||||||
bundleContext_getServiceReference(context, (char*)CoreService::SERVICE_NAME, &ref);
|
bundleContext_getServiceReference(context, (char*)CoreService::SERVICE_NAME, &ref);
|
||||||
CoreService* coreService = nullptr;
|
CoreService* coreService = nullptr;
|
||||||
@@ -111,7 +119,8 @@ celix_status_t bundleActivator_start(void * userData, bundle_context_pt context)
|
|||||||
} else {
|
} else {
|
||||||
myUserData->serviceImpl->setCoreService(coreService);
|
myUserData->serviceImpl->setCoreService(coreService);
|
||||||
}
|
}
|
||||||
// Get HOS Core Service
|
|
||||||
|
// Get device repository service
|
||||||
service_reference_pt ref2 = nullptr;
|
service_reference_pt ref2 = nullptr;
|
||||||
bundleContext_getServiceReference(context, (char*)DeviceRepositoryService::SERVICE_NAME, &ref2);
|
bundleContext_getServiceReference(context, (char*)DeviceRepositoryService::SERVICE_NAME, &ref2);
|
||||||
DeviceRepositoryService* repoService = nullptr;
|
DeviceRepositoryService* repoService = nullptr;
|
||||||
@@ -119,14 +128,17 @@ celix_status_t bundleActivator_start(void * userData, bundle_context_pt context)
|
|||||||
if (repoService) {
|
if (repoService) {
|
||||||
myUserData->serviceImpl->setRepoService(repoService);
|
myUserData->serviceImpl->setRepoService(repoService);
|
||||||
}
|
}
|
||||||
// Register hos-devicerepository-service
|
|
||||||
|
// Register rule engine service
|
||||||
if (myUserData->serviceImpl->isInitialized()) {
|
if (myUserData->serviceImpl->isInitialized()) {
|
||||||
bundleContext_registerService(context, (char*)RuleEngineServiceImpl::SERVICE_NAME, myUserData->serviceImpl.get(), nullptr, &myUserData->serviceReg);
|
bundleContext_registerService(context, (char*)RuleEngineServiceImpl::SERVICE_NAME, myUserData->serviceImpl.get(), nullptr, &myUserData->serviceReg);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Register service listener
|
// Register service listener
|
||||||
myUserData->myServiceListener.handle = myUserData;
|
myUserData->myServiceListener.handle = myUserData;
|
||||||
myUserData->myServiceListener.serviceChanged = cb_serviceChanged;
|
myUserData->myServiceListener.serviceChanged = cb_serviceChanged;
|
||||||
bundleContext_addServiceListener(context, &myUserData->myServiceListener, nullptr);
|
bundleContext_addServiceListener(context, &myUserData->myServiceListener, nullptr);
|
||||||
|
|
||||||
ROS_INFO("RuleEngineService: Bundle successfully started");
|
ROS_INFO("RuleEngineService: Bundle successfully started");
|
||||||
} else {
|
} else {
|
||||||
ROS_ERROR("RuleEngineService: Could not start bundle, user data struct is null");
|
ROS_ERROR("RuleEngineService: Could not start bundle, user data struct is null");
|
||||||
@@ -134,6 +146,8 @@ celix_status_t bundleActivator_start(void * userData, bundle_context_pt context)
|
|||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
celix_status_t bundleActivator_stop(void * userData, bundle_context_pt context) {
|
celix_status_t bundleActivator_stop(void * userData, bundle_context_pt context) {
|
||||||
celix_status_t status = CELIX_ILLEGAL_STATE;
|
celix_status_t status = CELIX_ILLEGAL_STATE;
|
||||||
if (userData != nullptr) {
|
if (userData != nullptr) {
|
||||||
@@ -154,6 +168,8 @@ celix_status_t bundleActivator_stop(void * userData, bundle_context_pt context)
|
|||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
celix_status_t bundleActivator_destroy(void * userData, bundle_context_pt context) {
|
celix_status_t bundleActivator_destroy(void * userData, bundle_context_pt context) {
|
||||||
celix_status_t status = CELIX_ILLEGAL_STATE;
|
celix_status_t status = CELIX_ILLEGAL_STATE;
|
||||||
if (userData != nullptr) {
|
if (userData != nullptr) {
|
||||||
|
|||||||
+68
-38
@@ -1,41 +1,44 @@
|
|||||||
/*
|
|
||||||
* hos_ruleengine_service_impl.cpp
|
|
||||||
*
|
|
||||||
* Created on: 26.04.2015
|
|
||||||
* Author: matzman
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <ros/ros.h>
|
#include "RuleEngineServiceImpl.h"
|
||||||
|
// std
|
||||||
#include <exception>
|
#include <exception>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <unordered_set>
|
#include <unordered_set>
|
||||||
|
// ROS
|
||||||
|
#include <ros/ros.h>
|
||||||
|
// libvariant
|
||||||
#include <Variant/Variant.h>
|
#include <Variant/Variant.h>
|
||||||
#include <celix/bundle_context.h>
|
// HOS
|
||||||
#include <hos/cosgi/service/core/CoreService.h>
|
#include <hos/cosgi/service/core/CoreService.h>
|
||||||
#include <hos/cosgi/service/devicerepository/DeviceRepositoryService.h>
|
#include <hos/cosgi/service/devicerepository/DeviceRepositoryService.h>
|
||||||
#include <Variant/Variant.h>
|
#include <hos/utils/SchemaLoader.h>
|
||||||
|
// HOS internal
|
||||||
#include "RuleEngineServiceImpl.h"
|
|
||||||
|
|
||||||
#include "rules/conditions/LogicalAndCondition.h"
|
#include "rules/conditions/LogicalAndCondition.h"
|
||||||
#include "rules/conditions/LogicalOrCondition.h"
|
#include "rules/conditions/LogicalOrCondition.h"
|
||||||
#include "rules/conditions/DeviceMsgCondition.h"
|
#include "rules/conditions/DeviceMsgCondition.h"
|
||||||
#include "rules/RulePackageImpl.h"
|
#include "rules/RulePackageImpl.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Service Namespace
|
||||||
namespace hos {
|
namespace hos {
|
||||||
namespace cosgi {
|
namespace cosgi {
|
||||||
namespace service {
|
namespace service {
|
||||||
namespace ruleengine {
|
namespace ruleengine {
|
||||||
|
|
||||||
|
|
||||||
using namespace ::libvariant;
|
using namespace ::libvariant;
|
||||||
|
|
||||||
|
|
||||||
template<> const char* implementation::ServiceInfo<RuleEngineServiceImpl>::name = service::ruleengine::RuleEngineService::SERVICE_NAME;
|
|
||||||
template<> const int implementation::ServiceInfo<RuleEngineServiceImpl>::major = 0;
|
|
||||||
template<> const int implementation::ServiceInfo<RuleEngineServiceImpl>::minor = 6;
|
|
||||||
|
|
||||||
void RuleEngineServiceImpl::setCoreService(service::core::CoreService* coreService) {
|
// Service information
|
||||||
|
template<> const char* implementation::ServiceInfo<RuleEngineServiceImpl>::name = service::ruleengine::RuleEngineService::SERVICE_NAME;
|
||||||
|
template<> const int implementation::ServiceInfo<RuleEngineServiceImpl>::major = 1;
|
||||||
|
template<> const int implementation::ServiceInfo<RuleEngineServiceImpl>::minor = 0;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void RuleEngineServiceImpl::setCoreService(service::core::CoreService* coreService) noexcept {
|
||||||
if (coreService && !this->coreService) {
|
if (coreService && !this->coreService) {
|
||||||
this->coreService = coreService;
|
this->coreService = coreService;
|
||||||
this->nodehandle = &coreService->getPrivateNodeHandle();
|
this->nodehandle = &coreService->getPrivateNodeHandle();
|
||||||
@@ -48,7 +51,8 @@ void RuleEngineServiceImpl::setCoreService(service::core::CoreService* coreServi
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void RuleEngineServiceImpl::setRepoService(devicerepository::DeviceRepositoryService* repoService) {
|
|
||||||
|
void RuleEngineServiceImpl::setRepoService(devicerepository::DeviceRepositoryService* repoService) noexcept {
|
||||||
if (repoService && !this->repoService) {
|
if (repoService && !this->repoService) {
|
||||||
this->repoService = repoService;
|
this->repoService = repoService;
|
||||||
int major = 0, minor = 0;
|
int major = 0, minor = 0;
|
||||||
@@ -60,16 +64,21 @@ void RuleEngineServiceImpl::setRepoService(devicerepository::DeviceRepositorySer
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void RuleEngineServiceImpl::init() {
|
|
||||||
|
void RuleEngineServiceImpl::init() noexcept {
|
||||||
|
// Get public parameters
|
||||||
nodehandle->getParam("ruleengine_prefix", ruleEnginePrefix);
|
nodehandle->getParam("ruleengine_prefix", ruleEnginePrefix);
|
||||||
XmlRpc::XmlRpcValue rawValue;
|
|
||||||
nodehandle->getParam(ruleEnginePrefix, rawValue);
|
// Register condition factories
|
||||||
schemaLoader.reset(new utils::SchemaLoader());
|
|
||||||
registerRuleConditionFactory("logical_or", std::make_shared<rules::conditions::LogicalOrConditionFactory>());
|
registerRuleConditionFactory("logical_or", std::make_shared<rules::conditions::LogicalOrConditionFactory>());
|
||||||
registerRuleConditionFactory("logical_and", std::make_shared<rules::conditions::LogicalAndConditionFactory>());
|
registerRuleConditionFactory("logical_and", std::make_shared<rules::conditions::LogicalAndConditionFactory>());
|
||||||
registerRuleConditionFactory("devicestatusmsg", std::make_shared<rules::conditions::DeviceStatusMsgConditionFactory>());
|
registerRuleConditionFactory("devicestatusmsg", std::make_shared<rules::conditions::DeviceStatusMsgConditionFactory>());
|
||||||
registerRuleConditionFactory("devicecommandmsg", std::make_shared<rules::conditions::DeviceCommandMsgConditionFactory>());
|
registerRuleConditionFactory("devicecommandmsg", std::make_shared<rules::conditions::DeviceCommandMsgConditionFactory>());
|
||||||
registerRuleConditionFactory("devicestatechange", std::make_shared<rules::conditions::DeviceStateChangeConditionFactory>());
|
registerRuleConditionFactory("devicestatechange", std::make_shared<rules::conditions::DeviceStateChangeConditionFactory>());
|
||||||
|
|
||||||
|
// Create rule packages
|
||||||
|
XmlRpc::XmlRpcValue rawValue;
|
||||||
|
nodehandle->getParam(ruleEnginePrefix, rawValue);
|
||||||
if (rawValue.getType() == XmlRpc::XmlRpcValue::TypeStruct) {
|
if (rawValue.getType() == XmlRpc::XmlRpcValue::TypeStruct) {
|
||||||
for (auto pkg : rawValue) {
|
for (auto pkg : rawValue) {
|
||||||
std::string pname = pkg.first;
|
std::string pname = pkg.first;
|
||||||
@@ -82,11 +91,13 @@ void RuleEngineServiceImpl::init() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
initialized = true;
|
initialized = true;
|
||||||
ROS_INFO_STREAM("RuleEngineService: Initialized and Ready.");
|
ROS_INFO_STREAM("RuleEngineService: Initialized and Ready.");
|
||||||
}
|
}
|
||||||
|
|
||||||
void RuleEngineServiceImpl::addRulePkg(std::string name) {
|
|
||||||
|
void RuleEngineServiceImpl::addRulePkg(const std::string& name) {
|
||||||
std::stringstream ss;
|
std::stringstream ss;
|
||||||
ss << ruleEnginePrefix << "/" << name;
|
ss << ruleEnginePrefix << "/" << name;
|
||||||
XmlRpc::XmlRpcValue rawValue;
|
XmlRpc::XmlRpcValue rawValue;
|
||||||
@@ -94,20 +105,26 @@ void RuleEngineServiceImpl::addRulePkg(std::string name) {
|
|||||||
addRulePkg(name, static_cast<std::string>(rawValue));
|
addRulePkg(name, static_cast<std::string>(rawValue));
|
||||||
}
|
}
|
||||||
|
|
||||||
void RuleEngineServiceImpl::addRulePkg(std::string name, std::string rawValue) {
|
|
||||||
Variant s = schemaLoader->GetSchema(std::string("hos:schema://core/configs/rulepackage"));
|
void RuleEngineServiceImpl::addRulePkg(const std::string& name, const std::string& rawValue) {
|
||||||
|
// Validate config
|
||||||
|
auto schemaLoader = coreService->getSchemaLoader();
|
||||||
|
Variant s = schemaLoader.GetSchema(std::string("hos:schema://core/configs/rulepackage"));
|
||||||
Variant m = Deserialize(rawValue, SERIALIZE_JSON);
|
Variant m = Deserialize(rawValue, SERIALIZE_JSON);
|
||||||
SchemaResult sr = SchemaValidate(s, m, schemaLoader.get());
|
SchemaResult sr = SchemaValidate(s, m, &schemaLoader);
|
||||||
if (!sr.Error()) {
|
if (!sr.Error()) {
|
||||||
|
|
||||||
|
// Crerate rule package
|
||||||
std::shared_ptr<rules::RulePackageImpl> pkg = rules::RulePackageImpl::createRulePackage(this, name, m);
|
std::shared_ptr<rules::RulePackageImpl> pkg = rules::RulePackageImpl::createRulePackage(this, name, m);
|
||||||
if (pkg) {
|
if (pkg) {
|
||||||
if (pkg->getScriptingService()) {
|
if (pkg->getScriptingService()) { // we have a suitable scripting service
|
||||||
rulePkgs.insert({name, pkg});
|
rulePkgs.insert({name, pkg});
|
||||||
pkg->setEnabled(true);
|
pkg->setEnabled(true);
|
||||||
} else {
|
} else { // we don't have a suitable scripting service
|
||||||
noExecRulePkgs.insert({name, pkg});
|
noExecRulePkgs.insert({name, pkg});
|
||||||
std::cout << "No execution service found for rule package \"" << name << "\"" << std::endl;
|
std::cout << "No execution service found for rule package \"" << name << "\"" << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
throw std::runtime_error("Unknown error during rule package creation.");
|
throw std::runtime_error("Unknown error during rule package creation.");
|
||||||
}
|
}
|
||||||
@@ -124,11 +141,14 @@ void RuleEngineServiceImpl::addRulePkg(std::string name, std::string rawValue) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void RuleEngineServiceImpl::removeRulePkg(std::string name) {
|
|
||||||
|
void RuleEngineServiceImpl::removeRulePkg(const std::string& name) noexcept {
|
||||||
rulePkgs.erase(name);
|
rulePkgs.erase(name);
|
||||||
|
noExecRulePkgs.erase(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
void RuleEngineServiceImpl::addExecutionBackend(scripting::ScriptingService* service) {
|
|
||||||
|
void RuleEngineServiceImpl::addExecutionBackend(scripting::ScriptingService* service) noexcept {
|
||||||
if (execServices.find(service->getLanguage()) == execServices.end()) {
|
if (execServices.find(service->getLanguage()) == execServices.end()) {
|
||||||
execServices.insert({service->getLanguage(), service});
|
execServices.insert({service->getLanguage(), service});
|
||||||
ROS_INFO_STREAM("RuleEngineService: Added execution service \"" << service->getLanguage() << "\".");
|
ROS_INFO_STREAM("RuleEngineService: Added execution service \"" << service->getLanguage() << "\".");
|
||||||
@@ -136,7 +156,7 @@ void RuleEngineServiceImpl::addExecutionBackend(scripting::ScriptingService* ser
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
scripting::ScriptingService* RuleEngineServiceImpl::getExecutionBackend(std::string language) {
|
scripting::ScriptingService* RuleEngineServiceImpl::getExecutionBackend(const std::string& language) noexcept {
|
||||||
auto s = execServices.find(language);
|
auto s = execServices.find(language);
|
||||||
if (s != execServices.end()) {
|
if (s != execServices.end()) {
|
||||||
return s->second;
|
return s->second;
|
||||||
@@ -150,6 +170,15 @@ void RuleEngineServiceImpl::registerRuleConditionFactory(const std::string& type
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
RuleConditionFactory* RuleEngineServiceImpl::getRuleConditionFactory(const std::string& type) noexcept {
|
||||||
|
RuleConditionFactory* retval = nullptr;
|
||||||
|
try {
|
||||||
|
retval = condFactories.at(type).get();
|
||||||
|
} catch(...) {}
|
||||||
|
return retval;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
std::weak_ptr<rules::RulePackage> RuleEngineServiceImpl::getRulePackage(const std::string& name) noexcept {
|
std::weak_ptr<rules::RulePackage> RuleEngineServiceImpl::getRulePackage(const std::string& name) noexcept {
|
||||||
std::weak_ptr<rules::RulePackage> retval;
|
std::weak_ptr<rules::RulePackage> retval;
|
||||||
try {
|
try {
|
||||||
@@ -165,12 +194,19 @@ std::weak_ptr<rules::RulePackage> RuleEngineServiceImpl::getRulePackage(const st
|
|||||||
|
|
||||||
|
|
||||||
std::vector<std::weak_ptr<rules::RulePackage>> RuleEngineServiceImpl::getRulePackages() noexcept {
|
std::vector<std::weak_ptr<rules::RulePackage>> RuleEngineServiceImpl::getRulePackages() noexcept {
|
||||||
|
std::vector<std::weak_ptr<rules::RulePackage>> retval;
|
||||||
|
for (auto p : rulePkgs) {
|
||||||
|
retval.push_back(p.second);
|
||||||
|
}
|
||||||
|
for (auto p : noExecRulePkgs) {
|
||||||
|
retval.push_back(p.second);
|
||||||
|
}
|
||||||
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
size_t RuleEngineServiceImpl::getRulePackageCount() noexcept {
|
size_t RuleEngineServiceImpl::getRulePackageCount() noexcept {
|
||||||
|
return rulePkgs.size() + noExecRulePkgs.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -180,9 +216,3 @@ size_t RuleEngineServiceImpl::getRulePackageCount() noexcept {
|
|||||||
} // namespace cosgi
|
} // namespace cosgi
|
||||||
} // namespace hos
|
} // namespace hos
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -2,38 +2,26 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
|
||||||
|
#include <hos/cosgi/service/ruleengine/RuleEngineService.h>
|
||||||
#include <mutex>
|
// hos includes
|
||||||
#include <map>
|
#include <hos/cosgi/service/core/CoreService.h>
|
||||||
#include <set>
|
#include <hos/cosgi/service/devicerepository/DeviceRepositoryService.h>
|
||||||
|
#include <hos/cosgi/service/scripting/ScriptingService.h>
|
||||||
|
#include <hos/cosgi/service/Implementation.h>
|
||||||
#include <hos_core_msgs/DeviceCommand.h>
|
#include <hos_core_msgs/DeviceCommand.h>
|
||||||
#include <hos_core_msgs/DeviceStatusUpdate.h>
|
#include <hos_core_msgs/DeviceStatusUpdate.h>
|
||||||
#include <hos_core_msgs/HosStatusUpdate.h>
|
#include <hos_core_msgs/HosStatusUpdate.h>
|
||||||
#include <hos/utils/SchemaLoader.h>
|
#include <hos/utils/SchemaLoader.h>
|
||||||
#include <hos/cosgi/service/devicerepository/DeviceRepositoryService.h>
|
// ROS includes
|
||||||
#include <hos/cosgi/service/Implementation.h>
|
|
||||||
#include <hos/cosgi/service/ruleengine/RuleEngineService.h>
|
|
||||||
#include <hos/cosgi/service/scripting/ScriptingService.h>
|
|
||||||
#include <ros/ros.h>
|
#include <ros/ros.h>
|
||||||
|
// std includes
|
||||||
|
#include <mutex>
|
||||||
|
#include <map>
|
||||||
|
#include <set>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
|
||||||
// Forward declarations
|
|
||||||
namespace XmlRpc {
|
|
||||||
class XmlRpcValue;
|
|
||||||
}
|
|
||||||
namespace hos {
|
|
||||||
namespace cosgi {
|
|
||||||
namespace service {
|
|
||||||
namespace core {
|
|
||||||
class CoreService;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Service Namespace
|
// Service Namespace
|
||||||
namespace hos {
|
namespace hos {
|
||||||
@@ -41,12 +29,17 @@ namespace cosgi {
|
|||||||
namespace service {
|
namespace service {
|
||||||
namespace ruleengine {
|
namespace ruleengine {
|
||||||
|
|
||||||
|
|
||||||
|
// Forward declaration
|
||||||
namespace rules {
|
namespace rules {
|
||||||
class RulePackageImpl;
|
class RulePackageImpl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Implementation of RuleEngineService.
|
||||||
|
**/
|
||||||
class RuleEngineServiceImpl :
|
class RuleEngineServiceImpl :
|
||||||
public virtual RuleEngineService,
|
public virtual RuleEngineService,
|
||||||
public implementation::Service<RuleEngineServiceImpl> {
|
public implementation::Service<RuleEngineServiceImpl> {
|
||||||
@@ -67,57 +60,52 @@ private:
|
|||||||
execServiceMap_t execServices;
|
execServiceMap_t execServices;
|
||||||
condFactoryMap_t condFactories;
|
condFactoryMap_t condFactories;
|
||||||
|
|
||||||
std::unique_ptr<utils::SchemaLoader> schemaLoader;
|
|
||||||
|
|
||||||
bool initialized = false;
|
bool initialized = false;
|
||||||
|
|
||||||
void addRulePkg(std::string name);
|
void addRulePkg(const std::string& name);
|
||||||
void addRulePkg(std::string name, std::string rawValue);
|
void addRulePkg(const std::string& name, const std::string& rawValue);
|
||||||
void removeRulePkg(std::string name);
|
void removeRulePkg(const std::string& name) noexcept;
|
||||||
|
|
||||||
void init();
|
void init() noexcept;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
/* Initialization */
|
/* Initialization */
|
||||||
|
|
||||||
void setCoreService(service::core::CoreService* coreService);
|
void setCoreService(service::core::CoreService* coreService) noexcept;
|
||||||
|
|
||||||
void setRepoService(devicerepository::DeviceRepositoryService* repoService);
|
void setRepoService(devicerepository::DeviceRepositoryService* repoService) noexcept;
|
||||||
|
|
||||||
|
|
||||||
/* Public Service Implementations */
|
/* Public Service Implementations */
|
||||||
|
|
||||||
virtual void registerRuleConditionFactory(const std::string& type, std::shared_ptr<RuleConditionFactory> factory) noexcept override;
|
virtual void registerRuleConditionFactory(const std::string& type, std::shared_ptr<RuleConditionFactory> factory) noexcept override;
|
||||||
|
|
||||||
|
virtual RuleConditionFactory* getRuleConditionFactory(const std::string& type) noexcept override;
|
||||||
|
|
||||||
virtual std::weak_ptr<rules::RulePackage> getRulePackage(const std::string& name) noexcept override;
|
virtual std::weak_ptr<rules::RulePackage> getRulePackage(const std::string& name) noexcept override;
|
||||||
|
|
||||||
virtual std::vector<std::weak_ptr<rules::RulePackage>> getRulePackages() noexcept override;
|
virtual std::vector<std::weak_ptr<rules::RulePackage>> getRulePackages() noexcept override;
|
||||||
|
|
||||||
|
|
||||||
virtual size_t getRulePackageCount() noexcept override;
|
virtual size_t getRulePackageCount() noexcept override;
|
||||||
|
|
||||||
|
virtual devicerepository::DeviceRepositoryService* getDeviceRepository() noexcept override {
|
||||||
/* Internal Stuff */
|
|
||||||
|
|
||||||
bool isInitialized() { return initialized; }
|
|
||||||
|
|
||||||
void addExecutionBackend(scripting::ScriptingService* service);
|
|
||||||
|
|
||||||
scripting::ScriptingService* getExecutionBackend(std::string language);
|
|
||||||
|
|
||||||
std::shared_ptr<RuleConditionFactory> getRuleConditionFactory(std::string type) {
|
|
||||||
return condFactories[type];
|
|
||||||
}
|
|
||||||
|
|
||||||
utils::SchemaLoader* getHOSSchemaLoader() {
|
|
||||||
return schemaLoader.get();
|
|
||||||
}
|
|
||||||
|
|
||||||
devicerepository::DeviceRepositoryService* getDeviceRepository() {
|
|
||||||
return repoService;
|
return repoService;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
virtual core::CoreService* getCoreService() noexcept override {
|
||||||
|
return coreService;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Internal */
|
||||||
|
|
||||||
|
bool isInitialized() noexcept { return initialized; }
|
||||||
|
|
||||||
|
void addExecutionBackend(scripting::ScriptingService* service) noexcept;
|
||||||
|
|
||||||
|
scripting::ScriptingService* getExecutionBackend(const std::string& language) noexcept;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,24 +1,11 @@
|
|||||||
/*
|
|
||||||
* Rule.cpp
|
|
||||||
*
|
|
||||||
* Created on: 29.04.2015
|
|
||||||
* Author: matzman
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
#include "RuleImpl.h"
|
||||||
#include "../rules/RuleImpl.h"
|
#include "RulePackageImpl.h"
|
||||||
|
#include "../RuleEngineServiceImpl.h"
|
||||||
#include <ros/ros.h>
|
|
||||||
#include <hos/cosgi/service/devicerepository/DeviceRepositoryService.h>
|
|
||||||
#include <hos/cosgi/service/ruleengine/rules/conditions/RuleCondition.h>
|
#include <hos/cosgi/service/ruleengine/rules/conditions/RuleCondition.h>
|
||||||
#include <hos/cosgi/service/ruleengine/RuleEngineService.h>
|
|
||||||
#include <hos/cosgi/service/scripting/ScriptingService.h>
|
|
||||||
#include <hos/utils/SchemaLoader.h>
|
#include <hos/utils/SchemaLoader.h>
|
||||||
#include <Variant/Variant.h>
|
#include <Variant/Variant.h>
|
||||||
|
|
||||||
#include "../rules/RulePackageImpl.h"
|
|
||||||
|
|
||||||
#include "../RuleEngineServiceImpl.h"
|
|
||||||
|
|
||||||
|
|
||||||
namespace hos {
|
namespace hos {
|
||||||
@@ -28,19 +15,18 @@ namespace ruleengine {
|
|||||||
namespace rules {
|
namespace rules {
|
||||||
|
|
||||||
|
|
||||||
RuleImpl::RuleImpl(RulePackageImpl* parent, std::string name)
|
|
||||||
: parent(parent), name(name) {}
|
|
||||||
|
|
||||||
std::shared_ptr<conditions::RuleCondition> RuleImpl::createRuleCondition(const Variant& condition) {
|
std::shared_ptr<conditions::RuleCondition> RuleImpl::createRuleCondition(const Variant& condition) {
|
||||||
std::shared_ptr<conditions::RuleCondition> retval;
|
std::shared_ptr<conditions::RuleCondition> retval;
|
||||||
if (condition.IsMap() && condition.HasPath("type") && condition["type"].IsString()) {
|
if (condition.IsMap() && condition.HasPath("type") && condition["type"].IsString()) {
|
||||||
if (condition.HasPath("$schema")) {
|
if (condition.HasPath("$schema")) {
|
||||||
SchemaResult sr = SchemaValidate(Variant(), condition, parent->parent->getHOSSchemaLoader());
|
auto schemaLoader = parent->getParent()->getCoreService()->getSchemaLoader();
|
||||||
|
SchemaResult sr = SchemaValidate(Variant(), condition, &schemaLoader);
|
||||||
if (sr.Error()) {
|
if (sr.Error()) {
|
||||||
throw std::runtime_error(sr.PrettyPrintMessage());
|
throw std::runtime_error(sr.PrettyPrintMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
auto conditionFactory = parent->getConditionFactory(condition["type"].AsString());
|
auto conditionFactory = parent->getParent()->getRuleConditionFactory(condition["type"].AsString());
|
||||||
if (conditionFactory) {
|
if (conditionFactory) {
|
||||||
auto cond = conditionFactory->createCondition(this, condition);
|
auto cond = conditionFactory->createCondition(this, condition);
|
||||||
if (cond) {
|
if (cond) {
|
||||||
@@ -57,7 +43,8 @@ std::shared_ptr<conditions::RuleCondition> RuleImpl::createRuleCondition(const V
|
|||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::shared_ptr<RuleImpl> RuleImpl::createRule(RulePackageImpl* parent, std::string name, Variant raw) {
|
|
||||||
|
std::shared_ptr<RuleImpl> RuleImpl::createRule(RulePackageImpl* parent, const std::string& name, const Variant& raw) {
|
||||||
std::shared_ptr<RuleImpl> retval;
|
std::shared_ptr<RuleImpl> retval;
|
||||||
if (!parent->getRule(name).expired()) {
|
if (!parent->getRule(name).expired()) {
|
||||||
throw std::runtime_error("Rule with the same name already exists.");
|
throw std::runtime_error("Rule with the same name already exists.");
|
||||||
@@ -102,10 +89,6 @@ std::shared_ptr<RuleImpl> RuleImpl::createRule(RulePackageImpl* parent, std::str
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
devicerepository::DeviceRepositoryService* RuleImpl::getDeviceRepository() noexcept {
|
|
||||||
return parent->parent->getDeviceRepository();
|
|
||||||
}
|
|
||||||
|
|
||||||
void RuleImpl::setEnabled(bool enabled) noexcept {
|
void RuleImpl::setEnabled(bool enabled) noexcept {
|
||||||
if (this->enabled != enabled) {
|
if (this->enabled != enabled) {
|
||||||
if (condition) {
|
if (condition) {
|
||||||
@@ -126,6 +109,7 @@ void RuleImpl::executeScript(const libvariant::Variant& lContext) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void RuleImpl::executeExitScript(const libvariant::Variant& lContext) {
|
void RuleImpl::executeExitScript(const libvariant::Variant& lContext) {
|
||||||
if (enabled && exitScript) {
|
if (enabled && exitScript) {
|
||||||
try {
|
try {
|
||||||
@@ -169,8 +153,11 @@ void RuleImpl::conditionStateChanged(bool newState, const conditions::ConditionT
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} /* namespace rule */
|
} /* namespace rule */
|
||||||
} /* namespace ruleengine */
|
} /* namespace ruleengine */
|
||||||
} /* namespace service */
|
} /* namespace service */
|
||||||
} /* namespace cosgi */
|
} /* namespace cosgi */
|
||||||
} /* namespace hos */
|
} /* namespace hos */
|
||||||
|
|
||||||
|
|||||||
@@ -2,92 +2,88 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#include <hos/cosgi/service/ruleengine/rules/conditions/RuleCondition.h>
|
|
||||||
#include <hos/cosgi/service/ruleengine/rules/Rule.h>
|
#include <hos/cosgi/service/ruleengine/rules/Rule.h>
|
||||||
#include <hos/cosgi/service/ruleengine/rules/RulePackage.h>
|
#include <hos/cosgi/service/ruleengine/rules/conditions/RuleCondition.h>
|
||||||
|
#include <hos/cosgi/service/devicerepository/DeviceRepositoryService.h>
|
||||||
|
#include <hos/cosgi/service/scripting/ScriptingService.h>
|
||||||
#include "RulePackageImpl.h"
|
#include "RulePackageImpl.h"
|
||||||
|
#include <Variant/Variant.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <Variant/Variant.h>
|
|
||||||
|
|
||||||
|
|
||||||
// Forward declarations
|
|
||||||
namespace hos {
|
|
||||||
namespace cosgi {
|
|
||||||
namespace service {
|
|
||||||
namespace devicerepository {
|
|
||||||
class Device;
|
|
||||||
class DeviceEvent;
|
|
||||||
class DeviceRepositoryService;
|
|
||||||
}
|
|
||||||
namespace ruleengine {
|
|
||||||
namespace rules {
|
|
||||||
class RulePackageImpl;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
namespace scripting {
|
|
||||||
class ScriptingService;
|
|
||||||
class GlobalScriptContext;
|
|
||||||
class Script;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
namespace utils {
|
|
||||||
class SchemaLoader;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
// main namespace
|
||||||
namespace hos {
|
namespace hos {
|
||||||
namespace cosgi {
|
namespace cosgi {
|
||||||
namespace service {
|
namespace service {
|
||||||
namespace ruleengine {
|
namespace ruleengine {
|
||||||
namespace rules {
|
namespace rules {
|
||||||
|
|
||||||
using namespace ::libvariant;
|
|
||||||
|
|
||||||
class RuleImpl : public virtual Rule {
|
using namespace libvariant;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Implementation of Rule.
|
||||||
|
*/
|
||||||
|
class RuleImpl
|
||||||
|
: public virtual Rule,
|
||||||
|
public implementation::Object {
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
RulePackageImpl* parent;
|
||||||
|
std::string name;
|
||||||
std::shared_ptr<scripting::Script> script;
|
std::shared_ptr<scripting::Script> script;
|
||||||
std::shared_ptr<scripting::Script> exitScript;
|
std::shared_ptr<scripting::Script> exitScript;
|
||||||
std::shared_ptr<conditions::RuleCondition> condition;
|
std::shared_ptr<conditions::RuleCondition> condition;
|
||||||
|
|
||||||
bool enabled = false;
|
bool enabled = false;
|
||||||
bool currentState = false;
|
bool currentState = false;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
RulePackageImpl* const parent;
|
|
||||||
const std::string name;
|
|
||||||
|
|
||||||
RuleImpl(RulePackageImpl* parent, const std::string name);
|
/* Initialization */
|
||||||
static std::shared_ptr<RuleImpl> createRule(RulePackageImpl* parent, const std::string name, Variant raw);
|
|
||||||
|
|
||||||
virtual RulePackage* getParent() noexcept {
|
RuleImpl(RulePackageImpl* parent, const std::string& name)
|
||||||
return parent->castPtr<RulePackage>();
|
: parent(parent), name(name) {}
|
||||||
|
|
||||||
|
static std::shared_ptr<RuleImpl> createRule(RulePackageImpl* parent, const std::string& name, const Variant& raw);
|
||||||
|
|
||||||
|
|
||||||
|
/* Public Service Implementations */
|
||||||
|
|
||||||
|
virtual RulePackage* getParent() noexcept override {
|
||||||
|
return parent;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual const std::string& getName() noexcept {
|
virtual const std::string& getName() noexcept override {
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual bool isActive() noexcept override {
|
virtual bool isActive() noexcept override {
|
||||||
return currentState;
|
return currentState;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual bool evaluate() override;
|
virtual bool evaluate() override;
|
||||||
|
|
||||||
virtual void executeScript(const libvariant::Variant& lContext = libvariant::Variant()) override;
|
virtual void executeScript(const libvariant::Variant& lContext = libvariant::Variant()) override;
|
||||||
|
|
||||||
virtual void executeExitScript(const libvariant::Variant& lContext = libvariant::Variant()) override;
|
virtual void executeExitScript(const libvariant::Variant& lContext = libvariant::Variant()) override;
|
||||||
|
|
||||||
virtual bool isEnabled() noexcept override {
|
virtual bool isEnabled() noexcept override {
|
||||||
return enabled;
|
return enabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void setEnabled(bool enabled) noexcept override;
|
virtual void setEnabled(bool enabled) noexcept override;
|
||||||
|
|
||||||
void conditionStateChanged(bool newState, const conditions::ConditionTriggerType& category, const Variant& lcontext = Variant()) noexcept override;
|
virtual void conditionStateChanged(bool newState, const conditions::ConditionTriggerType& category, const Variant& lcontext = Variant()) noexcept override;
|
||||||
|
|
||||||
std::shared_ptr<conditions::RuleCondition> createRuleCondition(const Variant& raw) override;
|
std::shared_ptr<conditions::RuleCondition> createRuleCondition(const Variant& raw) override;
|
||||||
devicerepository::DeviceRepositoryService* getDeviceRepository() noexcept override;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+20
-18
@@ -1,31 +1,24 @@
|
|||||||
/*
|
|
||||||
* RulePackage.cpp
|
|
||||||
*
|
|
||||||
* Created on: 29.04.2015
|
|
||||||
* Author: matzman
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
#include "RulePackageImpl.h"
|
||||||
#include "RuleImpl.h"
|
#include "RuleImpl.h"
|
||||||
|
|
||||||
#include <ros/ros.h>
|
#include <ros/ros.h>
|
||||||
#include <exception>
|
#include <exception>
|
||||||
#include <Variant/Variant.h>
|
#include <Variant/Variant.h>
|
||||||
|
|
||||||
#include "../RuleEngineServiceImpl.h"
|
|
||||||
#include "RulePackageImpl.h"
|
|
||||||
|
|
||||||
|
|
||||||
|
// main namespace
|
||||||
namespace hos {
|
namespace hos {
|
||||||
namespace cosgi {
|
namespace cosgi {
|
||||||
namespace service {
|
namespace service {
|
||||||
namespace ruleengine {
|
namespace ruleengine {
|
||||||
namespace rules {
|
namespace rules {
|
||||||
|
|
||||||
RulePackageImpl::RulePackageImpl(service::ruleengine::RuleEngineServiceImpl* parent, const std::string name, const std::string language, const Variant raw)
|
|
||||||
: parent(parent), name(name), language(language), rawValue(raw) {}
|
|
||||||
|
|
||||||
RulePackageImpl::~RulePackageImpl() {}
|
|
||||||
|
|
||||||
std::shared_ptr<RulePackageImpl> RulePackageImpl::createRulePackage(service::ruleengine::RuleEngineServiceImpl* parent, std::string name, Variant raw) {
|
std::shared_ptr<RulePackageImpl> RulePackageImpl::createRulePackage( service::ruleengine::RuleEngineServiceImpl* parent,
|
||||||
|
const std::string& name,
|
||||||
|
const Variant& raw ) {
|
||||||
std::shared_ptr<RulePackageImpl> retval;
|
std::shared_ptr<RulePackageImpl> retval;
|
||||||
if (!parent->getRulePackage(name).expired()) {
|
if (!parent->getRulePackage(name).expired()) {
|
||||||
std::stringstream ss;
|
std::stringstream ss;
|
||||||
@@ -33,18 +26,28 @@ std::shared_ptr<RulePackageImpl> RulePackageImpl::createRulePackage(service::rul
|
|||||||
throw std::runtime_error(ss.str());
|
throw std::runtime_error(ss.str());
|
||||||
}
|
}
|
||||||
if (raw.IsMap()) {
|
if (raw.IsMap()) {
|
||||||
|
|
||||||
|
// language
|
||||||
std::string language;
|
std::string language;
|
||||||
if (raw.HasPath("language") && raw["language"].IsString()) {
|
if (raw.HasPath("language") && raw["language"].IsString()) {
|
||||||
language = raw["language"].AsString();
|
language = raw["language"].AsString();
|
||||||
} else {
|
} else {
|
||||||
throw std::runtime_error("Rule package JSON is missing language parameter or parameter has wrong type.");
|
throw std::runtime_error("Rule package JSON is missing language parameter or parameter has wrong type.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// create rule package
|
||||||
retval = std::make_shared<RulePackageImpl>(parent, name, language, raw);
|
retval = std::make_shared<RulePackageImpl>(parent, name, language, raw);
|
||||||
|
|
||||||
|
// retrieve scripting service
|
||||||
retval->executionService = parent->getExecutionBackend(retval->language);
|
retval->executionService = parent->getExecutionBackend(retval->language);
|
||||||
if (retval->executionService) {
|
if (retval->executionService) {
|
||||||
|
|
||||||
|
// create global script context
|
||||||
if (raw.HasPath("globalcontext")) {
|
if (raw.HasPath("globalcontext")) {
|
||||||
retval->globalContext = retval->executionService->createGlobalScriptContext(raw["globalcontext"]);
|
retval->globalContext = retval->executionService->createGlobalScriptContext(raw["globalcontext"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// create rules
|
||||||
if (raw.HasPath("rules") && raw["rules"].IsMap()) {
|
if (raw.HasPath("rules") && raw["rules"].IsMap()) {
|
||||||
for (auto r : raw["rules"].AsMap()) {
|
for (auto r : raw["rules"].AsMap()) {
|
||||||
try {
|
try {
|
||||||
@@ -59,6 +62,7 @@ std::shared_ptr<RulePackageImpl> RulePackageImpl::createRulePackage(service::rul
|
|||||||
if (retval->rules.size() == 0) {
|
if (retval->rules.size() == 0) {
|
||||||
throw std::runtime_error("Rule package has no rules.");
|
throw std::runtime_error("Rule package has no rules.");
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
throw std::runtime_error("Rule package JSON is missing rules parameter or parameter has wrong type.");
|
throw std::runtime_error("Rule package JSON is missing rules parameter or parameter has wrong type.");
|
||||||
}
|
}
|
||||||
@@ -78,18 +82,15 @@ std::weak_ptr<Rule> RulePackageImpl::getRule(const std::string& name) noexcept {
|
|||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
std::vector<std::weak_ptr<Rule>> RulePackageImpl::getRules() noexcept {
|
std::vector<std::weak_ptr<Rule>> RulePackageImpl::getRules() noexcept {
|
||||||
std::vector<std::weak_ptr<Rule>> retval;
|
std::vector<std::weak_ptr<Rule>> retval;
|
||||||
for (auto item : this->rules) {
|
for (auto item : this->rules) {
|
||||||
retval.push_back(dynamic_pointer_cast<Rule>(item.second));
|
retval.push_back(std::static_pointer_cast<Rule>(item.second));
|
||||||
}
|
}
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::shared_ptr<RuleConditionFactory> RulePackageImpl::getConditionFactory(std::string type) {
|
|
||||||
return parent->getRuleConditionFactory(type);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void RulePackageImpl::setEnabled(bool enabled) noexcept {
|
void RulePackageImpl::setEnabled(bool enabled) noexcept {
|
||||||
if (this->enabled != enabled) {
|
if (this->enabled != enabled) {
|
||||||
@@ -107,3 +108,4 @@ void RulePackageImpl::setEnabled(bool enabled) noexcept {
|
|||||||
} /* namespace service */
|
} /* namespace service */
|
||||||
} /* namespace cosgi */
|
} /* namespace cosgi */
|
||||||
} /* namespace hos */
|
} /* namespace hos */
|
||||||
|
|
||||||
|
|||||||
@@ -2,93 +2,110 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#include <hos/cosgi/service/ruleengine/rules/RulePackage.h>
|
#include <hos/cosgi/service/ruleengine/rules/RulePackage.h>
|
||||||
#include <hos/cosgi/service/scripting/ScriptingService.h>
|
#include <hos/cosgi/service/scripting/ScriptingService.h>
|
||||||
#include "../RuleEngineServiceImpl.h"
|
#include "../RuleEngineServiceImpl.h"
|
||||||
|
#include <Variant/Variant.h>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <Variant/Variant.h>
|
|
||||||
|
|
||||||
|
|
||||||
|
namespace hos {
|
||||||
|
namespace cosgi {
|
||||||
|
namespace service {
|
||||||
|
namespace ruleengine {
|
||||||
|
namespace rules {
|
||||||
|
|
||||||
|
|
||||||
// Forward declarations
|
// Forward declarations
|
||||||
namespace hos {
|
|
||||||
namespace cosgi {
|
|
||||||
namespace service {
|
|
||||||
namespace ruleengine {
|
|
||||||
class RuleEngineServiceImpl;
|
|
||||||
class RuleConditionFactory;
|
|
||||||
namespace rules {
|
|
||||||
class RuleImpl;
|
class RuleImpl;
|
||||||
}
|
|
||||||
}
|
|
||||||
namespace scripting {
|
|
||||||
class GlobalScriptContext;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
namespace hos {
|
|
||||||
namespace cosgi {
|
|
||||||
namespace service {
|
|
||||||
namespace ruleengine {
|
|
||||||
namespace rules {
|
|
||||||
|
|
||||||
using namespace ::libvariant;
|
using namespace ::libvariant;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Implementation of RulePackage.
|
||||||
|
*/
|
||||||
class RulePackageImpl
|
class RulePackageImpl
|
||||||
: public virtual RulePackage {
|
: public virtual RulePackage,
|
||||||
|
public implementation::Object {
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
typedef std::map<std::string, std::shared_ptr<RuleImpl>> ruleMap_t;
|
typedef std::map<std::string, std::shared_ptr<RuleImpl>> ruleMap_t;
|
||||||
|
|
||||||
|
|
||||||
|
service::ruleengine::RuleEngineServiceImpl* parent;
|
||||||
|
std::string name;
|
||||||
|
std::string language;
|
||||||
|
Variant rawValue;
|
||||||
|
|
||||||
service::scripting::ScriptingService* executionService = nullptr;
|
service::scripting::ScriptingService* executionService = nullptr;
|
||||||
std::shared_ptr<scripting::GlobalScriptContext> globalContext;
|
std::shared_ptr<scripting::GlobalScriptContext> globalContext;
|
||||||
ruleMap_t rules;
|
ruleMap_t rules;
|
||||||
Variant rawValue;
|
|
||||||
bool enabled = false;
|
|
||||||
|
|
||||||
|
bool enabled = false;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
static std::shared_ptr<RulePackageImpl> createRulePackage(service::ruleengine::RuleEngineServiceImpl* parent, std::string name, Variant raw);
|
/* Initialization */
|
||||||
RulePackageImpl(service::ruleengine::RuleEngineServiceImpl* parent, const std::string name, const std::string language, Variant raw);
|
|
||||||
virtual ~RulePackageImpl();
|
|
||||||
|
|
||||||
service::ruleengine::RuleEngineServiceImpl* const parent;
|
static std::shared_ptr<RulePackageImpl> createRulePackage( service::ruleengine::RuleEngineServiceImpl* parent,
|
||||||
const std::string name;
|
const std::string& name,
|
||||||
const std::string language;
|
const Variant& raw );
|
||||||
|
|
||||||
|
RulePackageImpl( service::ruleengine::RuleEngineServiceImpl* parent,
|
||||||
|
const std::string& name,
|
||||||
|
const std::string& language,
|
||||||
|
const Variant& raw )
|
||||||
|
: parent(parent), name(name), language(language), rawValue(raw) {}
|
||||||
|
|
||||||
|
|
||||||
|
/* Public Service Implementations */
|
||||||
|
|
||||||
virtual service::ruleengine::RuleEngineService* getParent() noexcept override {
|
virtual service::ruleengine::RuleEngineService* getParent() noexcept override {
|
||||||
return parent->castPtr<service::ruleengine::RuleEngineService>();
|
return parent;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual const std::string& getName() noexcept override {
|
virtual const std::string& getName() noexcept override {
|
||||||
return name;
|
return name;
|
||||||
};
|
}
|
||||||
|
|
||||||
virtual const std::string& getLanguage() noexcept override {
|
virtual const std::string& getLanguage() noexcept override {
|
||||||
return language;
|
return language;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual std::weak_ptr<Rule> getRule(const std::string& name) noexcept override;
|
virtual std::weak_ptr<Rule> getRule(const std::string& name) noexcept override;
|
||||||
|
|
||||||
virtual std::vector<std::weak_ptr<Rule>> getRules() noexcept override;
|
virtual std::vector<std::weak_ptr<Rule>> getRules() noexcept override;
|
||||||
virtual size_t getRuleCount() noexcept override { return rules.size(); }
|
|
||||||
|
virtual size_t getRuleCount() noexcept override {
|
||||||
|
return rules.size();
|
||||||
|
}
|
||||||
|
|
||||||
virtual bool isEnabled() noexcept override {
|
virtual bool isEnabled() noexcept override {
|
||||||
return enabled;
|
return enabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void setEnabled(bool enabled) noexcept override;
|
virtual void setEnabled(bool enabled) noexcept override;
|
||||||
|
|
||||||
virtual service::scripting::ScriptingService* getScriptingService() noexcept override { return executionService; }
|
virtual service::scripting::ScriptingService* getScriptingService() noexcept override {
|
||||||
virtual std::weak_ptr<scripting::GlobalScriptContext> getGlobalScriptContext() noexcept override { return globalContext; }
|
return executionService;
|
||||||
std::shared_ptr<service::ruleengine::RuleConditionFactory> getConditionFactory(std::string type);
|
}
|
||||||
|
|
||||||
|
virtual std::weak_ptr<scripting::GlobalScriptContext> getGlobalScriptContext() noexcept override {
|
||||||
|
return globalContext;
|
||||||
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} /* namespace rules */
|
} /* namespace rules */
|
||||||
} /* namespace ruleengine */
|
} /* namespace ruleengine */
|
||||||
} /* namespace service */
|
} /* namespace service */
|
||||||
|
|||||||
+6
-5
@@ -23,7 +23,7 @@ void DeviceMsgCondition::notificationReceived(interface::Observer<devicereposito
|
|||||||
if (!device && this->deviceID.compare(e->device->getDeviceID()) == 0) {
|
if (!device && this->deviceID.compare(e->device->getDeviceID()) == 0) {
|
||||||
ROS_INFO_STREAM("Rule " << parent->getName() << ": Device " << deviceID << " appeared.");
|
ROS_INFO_STREAM("Rule " << parent->getName() << ": Device " << deviceID << " appeared.");
|
||||||
device = e->device;
|
device = e->device;
|
||||||
parent->getDeviceRepository()->deleteObserver(devicerepository::DeviceEventType::DEVICE_ADDED, this);
|
parent->getParent()->getParent()->getDeviceRepository()->deleteObserver(devicerepository::DeviceEventType::DEVICE_ADDED, this);
|
||||||
_registerAsListener();
|
_registerAsListener();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -32,7 +32,7 @@ void DeviceMsgCondition::notificationReceived(interface::Observer<devicereposito
|
|||||||
ROS_ERROR_STREAM("Rule " << parent->getName() << ": Device " << deviceID << " disappeared.");
|
ROS_ERROR_STREAM("Rule " << parent->getName() << ": Device " << deviceID << " disappeared.");
|
||||||
device->deleteObserver(this);
|
device->deleteObserver(this);
|
||||||
device = nullptr;
|
device = nullptr;
|
||||||
parent->getDeviceRepository()->addObserver(devicerepository::DeviceEventType::DEVICE_ADDED, this);
|
parent->getParent()->getParent()->getDeviceRepository()->addObserver(devicerepository::DeviceEventType::DEVICE_ADDED, this);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@@ -43,21 +43,22 @@ void DeviceMsgCondition::notificationReceived(interface::Observer<devicereposito
|
|||||||
void DeviceMsgCondition::setEnabled(bool enabled) noexcept {
|
void DeviceMsgCondition::setEnabled(bool enabled) noexcept {
|
||||||
if (this->enabled != enabled) {
|
if (this->enabled != enabled) {
|
||||||
if (enabled) {
|
if (enabled) {
|
||||||
auto repoService = parent->getDeviceRepository();
|
auto repoService = parent->getParent()->getParent()->getDeviceRepository();
|
||||||
auto device = repoService->getDevice(deviceID);
|
auto device = repoService->getDevice(deviceID);
|
||||||
if (!device.expired()) {
|
if (!device.expired()) {
|
||||||
this->device = device.lock().get();
|
this->device = device.lock().get();
|
||||||
_registerAsListener();
|
_registerAsListener();
|
||||||
} else {
|
} else {
|
||||||
ROS_ERROR_STREAM("Rule " << parent->getName() << ": Could not find device " << deviceID);
|
ROS_ERROR_STREAM("Rule " << parent->getName() << ": Could not find device " << deviceID);
|
||||||
parent->getDeviceRepository()->addObserver(devicerepository::DeviceEventType::DEVICE_ADDED, this);
|
auto repoService = parent->getParent()->getParent()->getDeviceRepository();
|
||||||
|
repoService->addObserver(devicerepository::DeviceEventType::DEVICE_ADDED, this);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (device) {
|
if (device) {
|
||||||
device->deleteObserver(this);
|
device->deleteObserver(this);
|
||||||
device = nullptr;
|
device = nullptr;
|
||||||
}
|
}
|
||||||
parent->getDeviceRepository()->deleteObserver(this);
|
parent->getParent()->getParent()->getDeviceRepository()->deleteObserver(this);
|
||||||
}
|
}
|
||||||
this->enabled = enabled;
|
this->enabled = enabled;
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
#include <set>
|
#include <set>
|
||||||
|
|
||||||
|
|
||||||
// main Namespace
|
// main namespace
|
||||||
namespace hos {
|
namespace hos {
|
||||||
namespace cosgi {
|
namespace cosgi {
|
||||||
namespace service {
|
namespace service {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"language": "python",
|
"language": "python",
|
||||||
"globalcontext": { "code": "print \"GlobalContext: Init!\"\nvar1 = 66.6\nvar2 = 0"},
|
"globalcontext": { "code": "print(\"GlobalContext: Init!\")\nvar1 = 66.6\nvar2 = 0"},
|
||||||
"rules": {
|
"rules": {
|
||||||
"rule01": {
|
"rule01": {
|
||||||
"condition": {
|
"condition": {
|
||||||
@@ -15,16 +15,16 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"script": { "code": "global var2\nprint \"Hello World1: \" + str(var2)\nvar2 = var2 + 1\nimport __main__\nprint \"__main__.__dict__: \" + str(__main__.__dict__)\nprint \"event_type: \" + event_type\nprint \"devices: \" + str(Devices.keys())\nprint \"DeviceCount: \" + str(len(Devices))\nprint \"test: \" + str(Devices[\"dummySwitch1\"])" },
|
"script": { "code": "global var2\nprint(\"Hello World1: \" + str(var2))\nvar2 = var2 + 1\nimport __main__\nprint(\"__main__.__dict__: \" + str(__main__.__dict__))\nprint(\"event_type: \" + event_type)\nprint(\"devices: \" + str(Devices.keys()))\nprint(\"DeviceCount: \" + str(len(Devices)))\nprint(\"test: \" + str(Devices[\"dummySwitch1\"]))" },
|
||||||
"exitscript": { "code": "print \"Hello from exitscript1\"" }
|
"exitscript": { "code": "print(\"Hello from exitscript1\")" }
|
||||||
},
|
},
|
||||||
"rule02": {
|
"rule02": {
|
||||||
"condition": {
|
"condition": {
|
||||||
"type": "devicestatechange",
|
"type": "devicestatechange",
|
||||||
"deviceid": "dummySwitch0"
|
"deviceid": "dummySwitch0"
|
||||||
},
|
},
|
||||||
"script": { "code": "print \"Hello World2: \" + str(var2)\nvar2 = var2 + 1\nimport __main__\nprint \"__main__.__dict__: \" + str(__main__.__dict__)\nprint \"test: \" + event_type" },
|
"script": { "code": "print(\"Hello World2: \" + str(var2))\nvar2 = var2 + 1\nimport __main__\nprint(\"__main__.__dict__: \" + str(__main__.__dict__))\nprint(\"test: \" + event_type)" },
|
||||||
"exitscript": { "code": "print \"Hello from exitscript2\"" }
|
"exitscript": { "code": "print(\"Hello from exitscript2\")" }
|
||||||
},
|
},
|
||||||
"rule03": {
|
"rule03": {
|
||||||
"condition": {
|
"condition": {
|
||||||
@@ -37,8 +37,8 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"script": { "code": "print \"Hello World3: \" + str(var2)\nvar2 = var2 + 1\nimport __main__\nprint \"__main__.__dict__: \" + str(__main__.__dict__)\nprint \"test: \" + event_type" },
|
"script": { "code": "print(\"Hello World3: \" + str(var2))\nvar2 = var2 + 1\nimport __main__\nprint(\"__main__.__dict__: \" + str(__main__.__dict__))\nprint(\"test: \" + event_type)" },
|
||||||
"exitscript": { "code": "print \"Hello from exitscript2\"" }
|
"exitscript": { "code": "print(\"Hello from exitscript2\")" }
|
||||||
},
|
},
|
||||||
"rule04": {
|
"rule04": {
|
||||||
"condition": {
|
"condition": {
|
||||||
@@ -53,7 +53,7 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"script": { "code": "print \"Dimmer 0 reached 100\"\nDevices[\"dummySwitch1\"].sendCommand({\"switch\": {\"set\": True}})" }
|
"script": { "code": "print(\"Dimmer 0 reached 100\")\nDevices[\"dummySwitch1\"].sendCommand({\"switch\": {\"set\": True}})" }
|
||||||
},
|
},
|
||||||
"rule05": {
|
"rule05": {
|
||||||
"condition": {
|
"condition": {
|
||||||
@@ -68,7 +68,7 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"script": { "code": "print \"Dimmer 0 left 100\"\nDevices[\"dummySwitch1\"].sendCommand({\"switch\": {\"set\": False}})" }
|
"script": { "code": "print(\"Dimmer 0 left 100\")\nDevices[\"dummySwitch1\"].sendCommand({\"switch\": {\"set\": False}})" }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2,91 +2,22 @@ cmake_minimum_required(VERSION 2.8.3)
|
|||||||
project(hos_cosgi_scripting)
|
project(hos_cosgi_scripting)
|
||||||
|
|
||||||
## Find catkin macros and libraries
|
## Find catkin macros and libraries
|
||||||
## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
|
|
||||||
## is used, also find other catkin packages
|
|
||||||
find_package(catkin REQUIRED COMPONENTS
|
find_package(catkin REQUIRED COMPONENTS
|
||||||
hos_cosgi_core
|
hos_cosgi_core
|
||||||
hos_deps
|
hos_deps
|
||||||
)
|
)
|
||||||
|
|
||||||
|
## System dependencies are found with CMake's conventions
|
||||||
find_package(libvariant REQUIRED)
|
find_package(libvariant REQUIRED)
|
||||||
|
|
||||||
|
|
||||||
## System dependencies are found with CMake's conventions
|
|
||||||
# find_package(Boost REQUIRED COMPONENTS system)
|
|
||||||
|
|
||||||
|
|
||||||
## Uncomment this if the package has a setup.py. This macro ensures
|
|
||||||
## modules and global scripts declared therein get installed
|
|
||||||
## See http://ros.org/doc/api/catkin/html/user_guide/setup_dot_py.html
|
|
||||||
# catkin_python_setup()
|
|
||||||
|
|
||||||
################################################
|
|
||||||
## Declare ROS messages, services and actions ##
|
|
||||||
################################################
|
|
||||||
|
|
||||||
## To declare and build messages, services or actions from within this
|
|
||||||
## package, follow these steps:
|
|
||||||
## * Let MSG_DEP_SET be the set of packages whose message types you use in
|
|
||||||
## your messages/services/actions (e.g. std_msgs, actionlib_msgs, ...).
|
|
||||||
## * In the file package.xml:
|
|
||||||
## * add a build_depend and a run_depend tag for each package in MSG_DEP_SET
|
|
||||||
## * If MSG_DEP_SET isn't empty the following dependencies might have been
|
|
||||||
## pulled in transitively but can be declared for certainty nonetheless:
|
|
||||||
## * add a build_depend tag for "message_generation"
|
|
||||||
## * add a run_depend tag for "message_runtime"
|
|
||||||
## * In this file (CMakeLists.txt):
|
|
||||||
## * add "message_generation" and every package in MSG_DEP_SET to
|
|
||||||
## find_package(catkin REQUIRED COMPONENTS ...)
|
|
||||||
## * add "message_runtime" and every package in MSG_DEP_SET to
|
|
||||||
## catkin_package(CATKIN_DEPENDS ...)
|
|
||||||
## * uncomment the add_*_files sections below as needed
|
|
||||||
## and list every .msg/.srv/.action file to be processed
|
|
||||||
## * uncomment the generate_messages entry below
|
|
||||||
## * add every package in MSG_DEP_SET to generate_messages(DEPENDENCIES ...)
|
|
||||||
|
|
||||||
## Generate messages in the 'msg' folder
|
|
||||||
# add_message_files(
|
|
||||||
# FILES
|
|
||||||
# Message1.msg
|
|
||||||
# Message2.msg
|
|
||||||
# )
|
|
||||||
|
|
||||||
## Generate services in the 'srv' folder
|
|
||||||
# add_service_files(
|
|
||||||
# FILES
|
|
||||||
# Service1.srv
|
|
||||||
# Service2.srv
|
|
||||||
# )
|
|
||||||
|
|
||||||
## Generate actions in the 'action' folder
|
|
||||||
# add_action_files(
|
|
||||||
# FILES
|
|
||||||
# Action1.action
|
|
||||||
# Action2.action
|
|
||||||
# )
|
|
||||||
|
|
||||||
## Generate added messages and services with any dependencies listed here
|
|
||||||
# generate_messages(
|
|
||||||
# DEPENDENCIES
|
|
||||||
# std_msgs # Or other packages containing msgs
|
|
||||||
# )
|
|
||||||
|
|
||||||
###################################
|
###################################
|
||||||
## catkin specific configuration ##
|
## catkin specific configuration ##
|
||||||
###################################
|
###################################
|
||||||
## The catkin_package macro generates cmake config files for your package
|
|
||||||
## Declare things to be passed to dependent projects
|
|
||||||
## INCLUDE_DIRS: uncomment this if you package contains header files
|
|
||||||
## LIBRARIES: libraries you create in this project that dependent projects also need
|
|
||||||
## CATKIN_DEPENDS: catkin_packages dependent projects also need
|
|
||||||
## DEPENDS: system dependencies of this project that dependent projects also need
|
|
||||||
catkin_package(
|
catkin_package(
|
||||||
INCLUDE_DIRS include/${PROJECT_NAME}/
|
INCLUDE_DIRS include/${PROJECT_NAME}/
|
||||||
# LIBRARIES hos_cosgi_scripting
|
CATKIN_DEPENDS hos_cosgi_core
|
||||||
CATKIN_DEPENDS hos_cosgi_core hos_deps
|
|
||||||
# DEPENDS system_lib
|
|
||||||
)
|
)
|
||||||
|
|
||||||
###########
|
###########
|
||||||
@@ -99,26 +30,6 @@ include_directories(
|
|||||||
${libvariant_INCLUDE_DIR}
|
${libvariant_INCLUDE_DIR}
|
||||||
)
|
)
|
||||||
|
|
||||||
## Specify additional locations of header files
|
|
||||||
## Your package locations should be listed before other locations
|
|
||||||
# include_directories(include)
|
|
||||||
|
|
||||||
## Declare a cpp library
|
|
||||||
# add_library(hos_cosgi_scripting
|
|
||||||
# src/${PROJECT_NAME}/hos_cosgi_scripting.cpp
|
|
||||||
# )
|
|
||||||
|
|
||||||
## Declare a cpp executable
|
|
||||||
# add_executable(hos_cosgi_scripting_node src/hos_cosgi_scripting_node.cpp)
|
|
||||||
|
|
||||||
## Add cmake target dependencies of the executable/library
|
|
||||||
## as an example, message headers may need to be generated before nodes
|
|
||||||
# add_dependencies(hos_cosgi_scripting_node hos_cosgi_scripting_generate_messages_cpp)
|
|
||||||
|
|
||||||
## Specify libraries to link a library or executable target against
|
|
||||||
# target_link_libraries(hos_cosgi_scripting_node
|
|
||||||
# ${catkin_LIBRARIES}
|
|
||||||
# )
|
|
||||||
|
|
||||||
#############
|
#############
|
||||||
## Install ##
|
## Install ##
|
||||||
@@ -130,46 +41,22 @@ install(DIRECTORY include/${PROJECT_NAME}/
|
|||||||
FILES_MATCHING PATTERN "*.h"
|
FILES_MATCHING PATTERN "*.h"
|
||||||
)
|
)
|
||||||
|
|
||||||
# all install targets should use catkin DESTINATION variables
|
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc
|
||||||
# See http://ros.org/doc/api/catkin/html/adv_user_guide/variables.html
|
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
|
||||||
|
OPTIONAL
|
||||||
|
)
|
||||||
|
|
||||||
## Mark executable scripts (Python etc.) for installation
|
|
||||||
## in contrast to setup.py, you can choose the destination
|
|
||||||
# install(PROGRAMS
|
|
||||||
# scripts/my_python_script
|
|
||||||
# DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
|
|
||||||
# )
|
|
||||||
|
|
||||||
## Mark executables and/or libraries for installation
|
###################
|
||||||
# install(TARGETS hos_cosgi_scripting hos_cosgi_scripting_node
|
## Documentation ##
|
||||||
# ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
|
###################
|
||||||
# LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
|
|
||||||
# RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
|
|
||||||
# )
|
|
||||||
|
|
||||||
## Mark cpp header files for installation
|
find_package(Doxygen)
|
||||||
# install(DIRECTORY include/${PROJECT_NAME}/
|
if(DOXYGEN_FOUND)
|
||||||
# DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
|
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY)
|
||||||
# FILES_MATCHING PATTERN "*.h"
|
add_custom_target(doc
|
||||||
# PATTERN ".svn" EXCLUDE
|
${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
|
||||||
# )
|
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||||
|
)
|
||||||
|
endif(DOXYGEN_FOUND)
|
||||||
|
|
||||||
## Mark other files for installation (e.g. launch and bag files, etc.)
|
|
||||||
# install(FILES
|
|
||||||
# # myfile1
|
|
||||||
# # myfile2
|
|
||||||
# DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
|
|
||||||
# )
|
|
||||||
|
|
||||||
#############
|
|
||||||
## Testing ##
|
|
||||||
#############
|
|
||||||
|
|
||||||
## Add gtest based cpp test target and link libraries
|
|
||||||
# catkin_add_gtest(${PROJECT_NAME}-test test/test_hos_cosgi_scripting.cpp)
|
|
||||||
# if(TARGET ${PROJECT_NAME}-test)
|
|
||||||
# target_link_libraries(${PROJECT_NAME}-test ${PROJECT_NAME})
|
|
||||||
# endif()
|
|
||||||
|
|
||||||
## Add folders to be run by python nosetests
|
|
||||||
# catkin_add_nosetests(test)
|
|
||||||
|
|||||||
@@ -0,0 +1,247 @@
|
|||||||
|
# Doxyfile 1.8.8
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Project related configuration options
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
DOXYFILE_ENCODING = UTF-8
|
||||||
|
PROJECT_NAME = hos_cosgi_scripting
|
||||||
|
OUTPUT_DIRECTORY = doc
|
||||||
|
CREATE_SUBDIRS = NO
|
||||||
|
ALLOW_UNICODE_NAMES = NO
|
||||||
|
OUTPUT_LANGUAGE = English
|
||||||
|
BRIEF_MEMBER_DESC = YES
|
||||||
|
REPEAT_BRIEF = YES
|
||||||
|
ABBREVIATE_BRIEF = "The $name class" \
|
||||||
|
"The $name widget" \
|
||||||
|
"The $name file" \
|
||||||
|
is \
|
||||||
|
provides \
|
||||||
|
specifies \
|
||||||
|
contains \
|
||||||
|
represents \
|
||||||
|
a \
|
||||||
|
an \
|
||||||
|
the
|
||||||
|
ALWAYS_DETAILED_SEC = NO
|
||||||
|
INLINE_INHERITED_MEMB = NO
|
||||||
|
FULL_PATH_NAMES = NO
|
||||||
|
SHORT_NAMES = NO
|
||||||
|
JAVADOC_AUTOBRIEF = NO
|
||||||
|
QT_AUTOBRIEF = NO
|
||||||
|
MULTILINE_CPP_IS_BRIEF = NO
|
||||||
|
INHERIT_DOCS = YES
|
||||||
|
SEPARATE_MEMBER_PAGES = NO
|
||||||
|
TAB_SIZE = 4
|
||||||
|
OPTIMIZE_OUTPUT_FOR_C = NO
|
||||||
|
OPTIMIZE_OUTPUT_JAVA = NO
|
||||||
|
OPTIMIZE_FOR_FORTRAN = NO
|
||||||
|
OPTIMIZE_OUTPUT_VHDL = NO
|
||||||
|
MARKDOWN_SUPPORT = YES
|
||||||
|
AUTOLINK_SUPPORT = YES
|
||||||
|
BUILTIN_STL_SUPPORT = NO
|
||||||
|
CPP_CLI_SUPPORT = NO
|
||||||
|
SIP_SUPPORT = NO
|
||||||
|
IDL_PROPERTY_SUPPORT = YES
|
||||||
|
DISTRIBUTE_GROUP_DOC = NO
|
||||||
|
SUBGROUPING = YES
|
||||||
|
INLINE_GROUPED_CLASSES = NO
|
||||||
|
INLINE_SIMPLE_STRUCTS = NO
|
||||||
|
TYPEDEF_HIDES_STRUCT = NO
|
||||||
|
LOOKUP_CACHE_SIZE = 0
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Build related configuration options
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
EXTRACT_ALL = YES
|
||||||
|
EXTRACT_PRIVATE = NO
|
||||||
|
EXTRACT_PACKAGE = NO
|
||||||
|
EXTRACT_STATIC = NO
|
||||||
|
EXTRACT_LOCAL_CLASSES = YES
|
||||||
|
EXTRACT_LOCAL_METHODS = NO
|
||||||
|
EXTRACT_ANON_NSPACES = NO
|
||||||
|
HIDE_UNDOC_MEMBERS = NO
|
||||||
|
HIDE_UNDOC_CLASSES = NO
|
||||||
|
HIDE_FRIEND_COMPOUNDS = NO
|
||||||
|
HIDE_IN_BODY_DOCS = NO
|
||||||
|
INTERNAL_DOCS = NO
|
||||||
|
CASE_SENSE_NAMES = NO
|
||||||
|
HIDE_SCOPE_NAMES = NO
|
||||||
|
SHOW_INCLUDE_FILES = YES
|
||||||
|
SHOW_GROUPED_MEMB_INC = NO
|
||||||
|
FORCE_LOCAL_INCLUDES = NO
|
||||||
|
INLINE_INFO = YES
|
||||||
|
SORT_MEMBER_DOCS = YES
|
||||||
|
SORT_BRIEF_DOCS = NO
|
||||||
|
SORT_MEMBERS_CTORS_1ST = NO
|
||||||
|
SORT_GROUP_NAMES = NO
|
||||||
|
SORT_BY_SCOPE_NAME = NO
|
||||||
|
STRICT_PROTO_MATCHING = NO
|
||||||
|
GENERATE_TODOLIST = YES
|
||||||
|
GENERATE_TESTLIST = YES
|
||||||
|
GENERATE_BUGLIST = YES
|
||||||
|
GENERATE_DEPRECATEDLIST= YES
|
||||||
|
MAX_INITIALIZER_LINES = 30
|
||||||
|
SHOW_USED_FILES = YES
|
||||||
|
SHOW_FILES = YES
|
||||||
|
SHOW_NAMESPACES = YES
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Configuration options related to warning and progress messages
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
QUIET = NO
|
||||||
|
WARNINGS = YES
|
||||||
|
WARN_IF_UNDOCUMENTED = YES
|
||||||
|
WARN_IF_DOC_ERROR = YES
|
||||||
|
WARN_NO_PARAMDOC = NO
|
||||||
|
WARN_FORMAT = "$file:$line: $text"
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Configuration options related to the input files
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
INPUT = @CMAKE_CURRENT_SOURCE_DIR@/include
|
||||||
|
INPUT_ENCODING = UTF-8
|
||||||
|
FILE_PATTERNS = *.c \
|
||||||
|
*.cc \
|
||||||
|
*.cxx \
|
||||||
|
*.cpp \
|
||||||
|
*.c++ \
|
||||||
|
*.java \
|
||||||
|
*.ii \
|
||||||
|
*.ixx \
|
||||||
|
*.ipp \
|
||||||
|
*.i++ \
|
||||||
|
*.inl \
|
||||||
|
*.idl \
|
||||||
|
*.ddl \
|
||||||
|
*.odl \
|
||||||
|
*.h \
|
||||||
|
*.hh \
|
||||||
|
*.hxx \
|
||||||
|
*.hpp \
|
||||||
|
*.h++ \
|
||||||
|
*.cs \
|
||||||
|
*.d \
|
||||||
|
*.php \
|
||||||
|
*.php4 \
|
||||||
|
*.php5 \
|
||||||
|
*.phtml \
|
||||||
|
*.inc \
|
||||||
|
*.m \
|
||||||
|
*.markdown \
|
||||||
|
*.md \
|
||||||
|
*.mm \
|
||||||
|
*.dox \
|
||||||
|
*.py \
|
||||||
|
*.f90 \
|
||||||
|
*.f \
|
||||||
|
*.for \
|
||||||
|
*.tcl \
|
||||||
|
*.vhd \
|
||||||
|
*.vhdl \
|
||||||
|
*.ucf \
|
||||||
|
*.qsf \
|
||||||
|
*.as \
|
||||||
|
*.js
|
||||||
|
RECURSIVE = YES
|
||||||
|
EXCLUDE_SYMLINKS = NO
|
||||||
|
EXAMPLE_PATTERNS = *
|
||||||
|
EXAMPLE_RECURSIVE = NO
|
||||||
|
FILTER_SOURCE_FILES = NO
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Configuration options related to source browsing
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
SOURCE_BROWSER = NO
|
||||||
|
INLINE_SOURCES = NO
|
||||||
|
STRIP_CODE_COMMENTS = YES
|
||||||
|
REFERENCED_BY_RELATION = NO
|
||||||
|
REFERENCES_RELATION = NO
|
||||||
|
REFERENCES_LINK_SOURCE = YES
|
||||||
|
SOURCE_TOOLTIPS = YES
|
||||||
|
USE_HTAGS = NO
|
||||||
|
VERBATIM_HEADERS = YES
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Configuration options related to the alphabetical class index
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
ALPHABETICAL_INDEX = YES
|
||||||
|
COLS_IN_ALPHA_INDEX = 5
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Configuration options related to the HTML output
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
GENERATE_HTML = YES
|
||||||
|
HTML_OUTPUT = html
|
||||||
|
HTML_FILE_EXTENSION = .html
|
||||||
|
HTML_COLORSTYLE_HUE = 220
|
||||||
|
HTML_COLORSTYLE_SAT = 100
|
||||||
|
HTML_COLORSTYLE_GAMMA = 80
|
||||||
|
HTML_TIMESTAMP = YES
|
||||||
|
HTML_DYNAMIC_SECTIONS = NO
|
||||||
|
HTML_INDEX_NUM_ENTRIES = 100
|
||||||
|
GENERATE_DOCSET = NO
|
||||||
|
DOCSET_FEEDNAME = "Doxygen generated docs"
|
||||||
|
DOCSET_BUNDLE_ID = org.doxygen.Project
|
||||||
|
DOCSET_PUBLISHER_ID = org.doxygen.Publisher
|
||||||
|
DOCSET_PUBLISHER_NAME = Publisher
|
||||||
|
GENERATE_HTMLHELP = NO
|
||||||
|
GENERATE_CHI = NO
|
||||||
|
BINARY_TOC = NO
|
||||||
|
TOC_EXPAND = NO
|
||||||
|
GENERATE_QHP = NO
|
||||||
|
QHP_NAMESPACE = org.doxygen.Project
|
||||||
|
QHP_VIRTUAL_FOLDER = doc
|
||||||
|
GENERATE_ECLIPSEHELP = NO
|
||||||
|
ECLIPSE_DOC_ID = org.doxygen.Project
|
||||||
|
DISABLE_INDEX = NO
|
||||||
|
GENERATE_TREEVIEW = YES
|
||||||
|
ENUM_VALUES_PER_LINE = 4
|
||||||
|
TREEVIEW_WIDTH = 250
|
||||||
|
EXT_LINKS_IN_WINDOW = NO
|
||||||
|
FORMULA_FONTSIZE = 10
|
||||||
|
FORMULA_TRANSPARENT = YES
|
||||||
|
USE_MATHJAX = NO
|
||||||
|
MATHJAX_FORMAT = HTML-CSS
|
||||||
|
MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest
|
||||||
|
SEARCHENGINE = YES
|
||||||
|
SERVER_BASED_SEARCH = NO
|
||||||
|
EXTERNAL_SEARCH = NO
|
||||||
|
SEARCHDATA_FILE = searchdata.xml
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Configuration options related to the preprocessor
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
ENABLE_PREPROCESSING = YES
|
||||||
|
MACRO_EXPANSION = NO
|
||||||
|
EXPAND_ONLY_PREDEF = NO
|
||||||
|
SEARCH_INCLUDES = YES
|
||||||
|
SKIP_FUNCTION_MACROS = YES
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Configuration options related to external references
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
ALLEXTERNALS = NO
|
||||||
|
EXTERNAL_GROUPS = YES
|
||||||
|
EXTERNAL_PAGES = YES
|
||||||
|
PERL_PATH = /usr/bin/perl
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Configuration options related to the dot tool
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
CLASS_DIAGRAMS = YES
|
||||||
|
HIDE_UNDOC_RELATIONS = YES
|
||||||
|
HAVE_DOT = NO
|
||||||
|
DOT_NUM_THREADS = 0
|
||||||
|
DOT_FONTNAME = Helvetica
|
||||||
|
DOT_FONTSIZE = 10
|
||||||
|
CLASS_GRAPH = YES
|
||||||
|
COLLABORATION_GRAPH = YES
|
||||||
|
GROUP_GRAPHS = YES
|
||||||
|
UML_LOOK = NO
|
||||||
|
UML_LIMIT_NUM_FIELDS = 10
|
||||||
|
TEMPLATE_RELATIONS = NO
|
||||||
|
INCLUDE_GRAPH = YES
|
||||||
|
INCLUDED_BY_GRAPH = YES
|
||||||
|
CALL_GRAPH = NO
|
||||||
|
CALLER_GRAPH = NO
|
||||||
|
GRAPHICAL_HIERARCHY = YES
|
||||||
|
DIRECTORY_GRAPH = YES
|
||||||
|
DOT_IMAGE_FORMAT = png
|
||||||
|
INTERACTIVE_SVG = NO
|
||||||
|
DOT_GRAPH_MAX_NODES = 50
|
||||||
|
MAX_DOT_GRAPH_DEPTH = 0
|
||||||
|
DOT_TRANSPARENT = NO
|
||||||
|
DOT_MULTI_TARGETS = NO
|
||||||
|
GENERATE_LEGEND = YES
|
||||||
|
DOT_CLEANUP = YES
|
||||||
@@ -2,8 +2,6 @@ cmake_minimum_required(VERSION 2.8.3)
|
|||||||
project(hos_cosgi_scripting_python)
|
project(hos_cosgi_scripting_python)
|
||||||
|
|
||||||
## Find catkin macros and libraries
|
## Find catkin macros and libraries
|
||||||
## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
|
|
||||||
## is used, also find other catkin packages
|
|
||||||
find_package(catkin REQUIRED COMPONENTS
|
find_package(catkin REQUIRED COMPONENTS
|
||||||
hos_celix
|
hos_celix
|
||||||
hos_cosgi_core
|
hos_cosgi_core
|
||||||
@@ -13,106 +11,63 @@ find_package(catkin REQUIRED COMPONENTS
|
|||||||
hos_deps
|
hos_deps
|
||||||
)
|
)
|
||||||
|
|
||||||
|
set(USE_PYTHON_VERSION 2 CACHE STRING "Use Python version")
|
||||||
|
|
||||||
## System dependencies are found with CMake's conventions
|
## System dependencies are found with CMake's conventions
|
||||||
# find_package(Boost REQUIRED COMPONENTS system)
|
|
||||||
|
|
||||||
|
|
||||||
## Uncomment this if the package has a setup.py. This macro ensures
|
|
||||||
## modules and global scripts declared therein get installed
|
|
||||||
## See http://ros.org/doc/api/catkin/html/user_guide/setup_dot_py.html
|
|
||||||
# catkin_python_setup()
|
|
||||||
|
|
||||||
find_package(APR REQUIRED)
|
find_package(APR REQUIRED)
|
||||||
find_package(CELIX REQUIRED)
|
find_package(CELIX REQUIRED)
|
||||||
find_package(Boost REQUIRED COMPONENTS python)
|
|
||||||
find_package(libvariant REQUIRED)
|
find_package(libvariant REQUIRED)
|
||||||
|
find_package(PythonLibs ${USE_PYTHON_VERSION} REQUIRED)
|
||||||
|
|
||||||
|
if (USE_PYTHON_VERSION EQUAL 2)
|
||||||
|
find_package(Boost REQUIRED COMPONENTS python)
|
||||||
|
elseif(USE_PYTHON_VERSION EQUAL 3)
|
||||||
|
#find_package(Boost REQUIRED COMPONENTS python-py34)
|
||||||
|
|
||||||
|
# Taken from http://code.metager.de/source/xref/lib/OpenImageIO/src/python/CMakeLists.txt:
|
||||||
|
#Finding the python3 component for boost is a little tricky, since it has
|
||||||
|
#different names on different systems. Try the most common ones
|
||||||
|
#(boost_python3, boost_python-py34, …).
|
||||||
|
foreach (_boost_py3_lib python3 python-py34 python-py33 python-py32)
|
||||||
|
find_package (Boost 1.42 QUIET COMPONENTS ${_boost_py3_lib})
|
||||||
|
string (TOUPPER ${_boost_py3_lib} boost_py3_lib_name)
|
||||||
|
if (Boost_${boost_py3_lib_name}_FOUND)
|
||||||
|
#Not the most beautiful thing to do, but that gets them included in
|
||||||
|
#the target_link_libraries(…) call farther down
|
||||||
|
set (Boost_PYTHON_LIBRARIES ${Boost_${boost_py3_lib_name}_LIBRARIES})
|
||||||
|
break ()
|
||||||
|
endif ()
|
||||||
|
endforeach ()
|
||||||
|
|
||||||
|
else()
|
||||||
|
message( FATAL_ERROR "Unsupported Python version ${USE_PYTHON_VERSION}" )
|
||||||
|
endif()
|
||||||
|
|
||||||
################################################
|
|
||||||
## Declare ROS messages, services and actions ##
|
|
||||||
################################################
|
|
||||||
|
|
||||||
## To declare and build messages, services or actions from within this
|
|
||||||
## package, follow these steps:
|
|
||||||
## * Let MSG_DEP_SET be the set of packages whose message types you use in
|
|
||||||
## your messages/services/actions (e.g. std_msgs, actionlib_msgs, ...).
|
|
||||||
## * In the file package.xml:
|
|
||||||
## * add a build_depend and a run_depend tag for each package in MSG_DEP_SET
|
|
||||||
## * If MSG_DEP_SET isn't empty the following dependencies might have been
|
|
||||||
## pulled in transitively but can be declared for certainty nonetheless:
|
|
||||||
## * add a build_depend tag for "message_generation"
|
|
||||||
## * add a run_depend tag for "message_runtime"
|
|
||||||
## * In this file (CMakeLists.txt):
|
|
||||||
## * add "message_generation" and every package in MSG_DEP_SET to
|
|
||||||
## find_package(catkin REQUIRED COMPONENTS ...)
|
|
||||||
## * add "message_runtime" and every package in MSG_DEP_SET to
|
|
||||||
## catkin_package(CATKIN_DEPENDS ...)
|
|
||||||
## * uncomment the add_*_files sections below as needed
|
|
||||||
## and list every .msg/.srv/.action file to be processed
|
|
||||||
## * uncomment the generate_messages entry below
|
|
||||||
## * add every package in MSG_DEP_SET to generate_messages(DEPENDENCIES ...)
|
|
||||||
|
|
||||||
## Generate messages in the 'msg' folder
|
|
||||||
# add_message_files(
|
|
||||||
# FILES
|
|
||||||
# Message1.msg
|
|
||||||
# Message2.msg
|
|
||||||
# )
|
|
||||||
|
|
||||||
## Generate services in the 'srv' folder
|
|
||||||
# add_service_files(
|
|
||||||
# FILES
|
|
||||||
# Service1.srv
|
|
||||||
# Service2.srv
|
|
||||||
# )
|
|
||||||
|
|
||||||
## Generate actions in the 'action' folder
|
|
||||||
# add_action_files(
|
|
||||||
# FILES
|
|
||||||
# Action1.action
|
|
||||||
# Action2.action
|
|
||||||
# )
|
|
||||||
|
|
||||||
## Generate added messages and services with any dependencies listed here
|
|
||||||
# generate_messages(
|
|
||||||
# DEPENDENCIES
|
|
||||||
# std_msgs # Or other packages containing msgs
|
|
||||||
# )
|
|
||||||
|
|
||||||
###################################
|
###################################
|
||||||
## catkin specific configuration ##
|
## catkin specific configuration ##
|
||||||
###################################
|
###################################
|
||||||
## The catkin_package macro generates cmake config files for your package
|
|
||||||
## Declare things to be passed to dependent projects
|
|
||||||
## INCLUDE_DIRS: uncomment this if you package contains header files
|
|
||||||
## LIBRARIES: libraries you create in this project that dependent projects also need
|
|
||||||
## CATKIN_DEPENDS: catkin_packages dependent projects also need
|
|
||||||
## DEPENDS: system dependencies of this project that dependent projects also need
|
|
||||||
catkin_package(
|
catkin_package(
|
||||||
# INCLUDE_DIRS include
|
CATKIN_DEPENDS hos_celix hos_cosgi_core hos_cosgi_scripting hos_cpp_utils
|
||||||
# LIBRARIES hos_cosgi_ruleexecution_python
|
|
||||||
CATKIN_DEPENDS hos_celix hos_cosgi_core hos_cosgi_scripting hos_cpp_utils hos_deps hos_cosgi_devicerepository
|
|
||||||
# DEPENDS system_lib
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
###########
|
###########
|
||||||
## Build ##
|
## Build ##
|
||||||
###########
|
###########
|
||||||
|
|
||||||
add_definitions(
|
add_definitions(
|
||||||
-std=c++11
|
-std=c++11
|
||||||
|
-D_PYTHON_${USE_PYTHON_VERSION}_
|
||||||
)
|
)
|
||||||
|
|
||||||
## Specify additional locations of header files
|
|
||||||
## Your package locations should be listed before other locations
|
|
||||||
# include_directories(include)
|
|
||||||
include_directories(
|
include_directories(
|
||||||
${catkin_INCLUDE_DIRS}
|
${catkin_INCLUDE_DIRS}
|
||||||
${APR_INCLUDE_DIR}
|
${APR_INCLUDE_DIR}
|
||||||
${APR_INCLUDE_DIR}/apr-1.0
|
${APR_INCLUDE_DIR}/apr-1.0
|
||||||
include
|
|
||||||
${libvariant_INCLUDE_DIR}
|
${libvariant_INCLUDE_DIR}
|
||||||
/usr/include/python2.7
|
${PYTHON_INCLUDE_DIRS}
|
||||||
)
|
)
|
||||||
|
|
||||||
set(BUNDLE_SYMBOLICNAME "hos.hos_scripting_python")
|
set(BUNDLE_SYMBOLICNAME "hos.hos_scripting_python")
|
||||||
@@ -126,87 +81,41 @@ bundle(hos_cosgi_scripting_python
|
|||||||
${PROJECT_SOURCE_DIR}/src/hos/cosgi/service/scripting/python/utils/utils
|
${PROJECT_SOURCE_DIR}/src/hos/cosgi/service/scripting/python/utils/utils
|
||||||
${PROJECT_SOURCE_DIR}/src/hos/cosgi/service/scripting/python/hosapi/PyHOSAPI
|
${PROJECT_SOURCE_DIR}/src/hos/cosgi/service/scripting/python/hosapi/PyHOSAPI
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(hos_cosgi_scripting_python
|
target_link_libraries(hos_cosgi_scripting_python
|
||||||
${catkin_LIBRARIES}
|
${catkin_LIBRARIES}
|
||||||
${APR_LIBRARIES}
|
${APR_LIBRARIES}
|
||||||
${Boost_LIBRARIES}
|
${Boost_LIBRARIES}
|
||||||
${libvariant_LIBRARY}
|
${libvariant_LIBRARIES}
|
||||||
python2.7
|
${PYTHON_LIBRARIES}
|
||||||
)
|
)
|
||||||
|
|
||||||
## Declare a cpp library
|
|
||||||
# add_library(hos_cosgi_ruleexecution_python
|
|
||||||
# src/${PROJECT_NAME}/hos_cosgi_ruleexecution_python.cpp
|
|
||||||
# )
|
|
||||||
|
|
||||||
## Declare a cpp executable
|
|
||||||
# add_executable(hos_cosgi_ruleexecution_python_node src/hos_cosgi_ruleexecution_python_node.cpp)
|
|
||||||
|
|
||||||
## Add cmake target dependencies of the executable/library
|
|
||||||
## as an example, message headers may need to be generated before nodes
|
|
||||||
# add_dependencies(hos_cosgi_ruleexecution_python_node hos_cosgi_ruleexecution_python_generate_messages_cpp)
|
|
||||||
|
|
||||||
## Specify libraries to link a library or executable target against
|
|
||||||
# target_link_libraries(hos_cosgi_ruleexecution_python_node
|
|
||||||
# ${catkin_LIBRARIES}
|
|
||||||
# )
|
|
||||||
|
|
||||||
#############
|
#############
|
||||||
## Install ##
|
## Install ##
|
||||||
#############
|
#############
|
||||||
|
|
||||||
## Mark cpp header files for installation
|
|
||||||
#install(DIRECTORY include/${PROJECT_NAME}/
|
|
||||||
# DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
|
|
||||||
# FILES_MATCHING PATTERN "*.h"
|
|
||||||
#)
|
|
||||||
|
|
||||||
install(FILES
|
install(FILES
|
||||||
${CMAKE_BINARY_DIR}/hos_cosgi_scripting_python.zip
|
${CMAKE_BINARY_DIR}/hos_cosgi_scripting_python.zip
|
||||||
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/bundles
|
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/bundles
|
||||||
)
|
)
|
||||||
|
|
||||||
|
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc
|
||||||
|
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
|
||||||
|
OPTIONAL
|
||||||
|
)
|
||||||
|
|
||||||
# all install targets should use catkin DESTINATION variables
|
|
||||||
# See http://ros.org/doc/api/catkin/html/adv_user_guide/variables.html
|
|
||||||
|
|
||||||
## Mark executable scripts (Python etc.) for installation
|
###################
|
||||||
## in contrast to setup.py, you can choose the destination
|
## Documentation ##
|
||||||
# install(PROGRAMS
|
###################
|
||||||
# scripts/my_python_script
|
|
||||||
# DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
|
|
||||||
# )
|
|
||||||
|
|
||||||
## Mark executables and/or libraries for installation
|
find_package(Doxygen)
|
||||||
# install(TARGETS hos_cosgi_ruleexecution_python hos_cosgi_ruleexecution_python_node
|
if(DOXYGEN_FOUND)
|
||||||
# ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
|
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY)
|
||||||
# LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
|
add_custom_target(doc
|
||||||
# RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
|
${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
|
||||||
# )
|
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||||
|
)
|
||||||
|
endif(DOXYGEN_FOUND)
|
||||||
|
|
||||||
## Mark cpp header files for installation
|
|
||||||
# install(DIRECTORY include/${PROJECT_NAME}/
|
|
||||||
# DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
|
|
||||||
# FILES_MATCHING PATTERN "*.h"
|
|
||||||
# PATTERN ".svn" EXCLUDE
|
|
||||||
# )
|
|
||||||
|
|
||||||
## Mark other files for installation (e.g. launch and bag files, etc.)
|
|
||||||
# install(FILES
|
|
||||||
# # myfile1
|
|
||||||
# # myfile2
|
|
||||||
# DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
|
|
||||||
# )
|
|
||||||
|
|
||||||
#############
|
|
||||||
## Testing ##
|
|
||||||
#############
|
|
||||||
|
|
||||||
## Add gtest based cpp test target and link libraries
|
|
||||||
# catkin_add_gtest(${PROJECT_NAME}-test test/test_hos_cosgi_ruleexecution_python.cpp)
|
|
||||||
# if(TARGET ${PROJECT_NAME}-test)
|
|
||||||
# target_link_libraries(${PROJECT_NAME}-test ${PROJECT_NAME})
|
|
||||||
# endif()
|
|
||||||
|
|
||||||
## Add folders to be run by python nosetests
|
|
||||||
# catkin_add_nosetests(test)
|
|
||||||
|
|||||||
@@ -0,0 +1,247 @@
|
|||||||
|
# Doxyfile 1.8.8
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Project related configuration options
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
DOXYFILE_ENCODING = UTF-8
|
||||||
|
PROJECT_NAME = hos_cosgi_scripting_python
|
||||||
|
OUTPUT_DIRECTORY = doc
|
||||||
|
CREATE_SUBDIRS = NO
|
||||||
|
ALLOW_UNICODE_NAMES = NO
|
||||||
|
OUTPUT_LANGUAGE = English
|
||||||
|
BRIEF_MEMBER_DESC = YES
|
||||||
|
REPEAT_BRIEF = YES
|
||||||
|
ABBREVIATE_BRIEF = "The $name class" \
|
||||||
|
"The $name widget" \
|
||||||
|
"The $name file" \
|
||||||
|
is \
|
||||||
|
provides \
|
||||||
|
specifies \
|
||||||
|
contains \
|
||||||
|
represents \
|
||||||
|
a \
|
||||||
|
an \
|
||||||
|
the
|
||||||
|
ALWAYS_DETAILED_SEC = NO
|
||||||
|
INLINE_INHERITED_MEMB = NO
|
||||||
|
FULL_PATH_NAMES = NO
|
||||||
|
SHORT_NAMES = NO
|
||||||
|
JAVADOC_AUTOBRIEF = NO
|
||||||
|
QT_AUTOBRIEF = NO
|
||||||
|
MULTILINE_CPP_IS_BRIEF = NO
|
||||||
|
INHERIT_DOCS = YES
|
||||||
|
SEPARATE_MEMBER_PAGES = NO
|
||||||
|
TAB_SIZE = 4
|
||||||
|
OPTIMIZE_OUTPUT_FOR_C = NO
|
||||||
|
OPTIMIZE_OUTPUT_JAVA = NO
|
||||||
|
OPTIMIZE_FOR_FORTRAN = NO
|
||||||
|
OPTIMIZE_OUTPUT_VHDL = NO
|
||||||
|
MARKDOWN_SUPPORT = YES
|
||||||
|
AUTOLINK_SUPPORT = YES
|
||||||
|
BUILTIN_STL_SUPPORT = NO
|
||||||
|
CPP_CLI_SUPPORT = NO
|
||||||
|
SIP_SUPPORT = NO
|
||||||
|
IDL_PROPERTY_SUPPORT = YES
|
||||||
|
DISTRIBUTE_GROUP_DOC = NO
|
||||||
|
SUBGROUPING = YES
|
||||||
|
INLINE_GROUPED_CLASSES = NO
|
||||||
|
INLINE_SIMPLE_STRUCTS = NO
|
||||||
|
TYPEDEF_HIDES_STRUCT = NO
|
||||||
|
LOOKUP_CACHE_SIZE = 0
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Build related configuration options
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
EXTRACT_ALL = YES
|
||||||
|
EXTRACT_PRIVATE = NO
|
||||||
|
EXTRACT_PACKAGE = NO
|
||||||
|
EXTRACT_STATIC = NO
|
||||||
|
EXTRACT_LOCAL_CLASSES = YES
|
||||||
|
EXTRACT_LOCAL_METHODS = NO
|
||||||
|
EXTRACT_ANON_NSPACES = NO
|
||||||
|
HIDE_UNDOC_MEMBERS = NO
|
||||||
|
HIDE_UNDOC_CLASSES = NO
|
||||||
|
HIDE_FRIEND_COMPOUNDS = NO
|
||||||
|
HIDE_IN_BODY_DOCS = NO
|
||||||
|
INTERNAL_DOCS = NO
|
||||||
|
CASE_SENSE_NAMES = NO
|
||||||
|
HIDE_SCOPE_NAMES = NO
|
||||||
|
SHOW_INCLUDE_FILES = YES
|
||||||
|
SHOW_GROUPED_MEMB_INC = NO
|
||||||
|
FORCE_LOCAL_INCLUDES = NO
|
||||||
|
INLINE_INFO = YES
|
||||||
|
SORT_MEMBER_DOCS = YES
|
||||||
|
SORT_BRIEF_DOCS = NO
|
||||||
|
SORT_MEMBERS_CTORS_1ST = NO
|
||||||
|
SORT_GROUP_NAMES = NO
|
||||||
|
SORT_BY_SCOPE_NAME = NO
|
||||||
|
STRICT_PROTO_MATCHING = NO
|
||||||
|
GENERATE_TODOLIST = YES
|
||||||
|
GENERATE_TESTLIST = YES
|
||||||
|
GENERATE_BUGLIST = YES
|
||||||
|
GENERATE_DEPRECATEDLIST= YES
|
||||||
|
MAX_INITIALIZER_LINES = 30
|
||||||
|
SHOW_USED_FILES = YES
|
||||||
|
SHOW_FILES = YES
|
||||||
|
SHOW_NAMESPACES = YES
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Configuration options related to warning and progress messages
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
QUIET = NO
|
||||||
|
WARNINGS = YES
|
||||||
|
WARN_IF_UNDOCUMENTED = YES
|
||||||
|
WARN_IF_DOC_ERROR = YES
|
||||||
|
WARN_NO_PARAMDOC = NO
|
||||||
|
WARN_FORMAT = "$file:$line: $text"
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Configuration options related to the input files
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
INPUT = @CMAKE_CURRENT_SOURCE_DIR@/src
|
||||||
|
INPUT_ENCODING = UTF-8
|
||||||
|
FILE_PATTERNS = *.c \
|
||||||
|
*.cc \
|
||||||
|
*.cxx \
|
||||||
|
*.cpp \
|
||||||
|
*.c++ \
|
||||||
|
*.java \
|
||||||
|
*.ii \
|
||||||
|
*.ixx \
|
||||||
|
*.ipp \
|
||||||
|
*.i++ \
|
||||||
|
*.inl \
|
||||||
|
*.idl \
|
||||||
|
*.ddl \
|
||||||
|
*.odl \
|
||||||
|
*.h \
|
||||||
|
*.hh \
|
||||||
|
*.hxx \
|
||||||
|
*.hpp \
|
||||||
|
*.h++ \
|
||||||
|
*.cs \
|
||||||
|
*.d \
|
||||||
|
*.php \
|
||||||
|
*.php4 \
|
||||||
|
*.php5 \
|
||||||
|
*.phtml \
|
||||||
|
*.inc \
|
||||||
|
*.m \
|
||||||
|
*.markdown \
|
||||||
|
*.md \
|
||||||
|
*.mm \
|
||||||
|
*.dox \
|
||||||
|
*.py \
|
||||||
|
*.f90 \
|
||||||
|
*.f \
|
||||||
|
*.for \
|
||||||
|
*.tcl \
|
||||||
|
*.vhd \
|
||||||
|
*.vhdl \
|
||||||
|
*.ucf \
|
||||||
|
*.qsf \
|
||||||
|
*.as \
|
||||||
|
*.js
|
||||||
|
RECURSIVE = YES
|
||||||
|
EXCLUDE_SYMLINKS = NO
|
||||||
|
EXAMPLE_PATTERNS = *
|
||||||
|
EXAMPLE_RECURSIVE = NO
|
||||||
|
FILTER_SOURCE_FILES = NO
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Configuration options related to source browsing
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
SOURCE_BROWSER = NO
|
||||||
|
INLINE_SOURCES = NO
|
||||||
|
STRIP_CODE_COMMENTS = YES
|
||||||
|
REFERENCED_BY_RELATION = NO
|
||||||
|
REFERENCES_RELATION = NO
|
||||||
|
REFERENCES_LINK_SOURCE = YES
|
||||||
|
SOURCE_TOOLTIPS = YES
|
||||||
|
USE_HTAGS = NO
|
||||||
|
VERBATIM_HEADERS = YES
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Configuration options related to the alphabetical class index
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
ALPHABETICAL_INDEX = YES
|
||||||
|
COLS_IN_ALPHA_INDEX = 5
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Configuration options related to the HTML output
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
GENERATE_HTML = YES
|
||||||
|
HTML_OUTPUT = html
|
||||||
|
HTML_FILE_EXTENSION = .html
|
||||||
|
HTML_COLORSTYLE_HUE = 220
|
||||||
|
HTML_COLORSTYLE_SAT = 100
|
||||||
|
HTML_COLORSTYLE_GAMMA = 80
|
||||||
|
HTML_TIMESTAMP = YES
|
||||||
|
HTML_DYNAMIC_SECTIONS = NO
|
||||||
|
HTML_INDEX_NUM_ENTRIES = 100
|
||||||
|
GENERATE_DOCSET = NO
|
||||||
|
DOCSET_FEEDNAME = "Doxygen generated docs"
|
||||||
|
DOCSET_BUNDLE_ID = org.doxygen.Project
|
||||||
|
DOCSET_PUBLISHER_ID = org.doxygen.Publisher
|
||||||
|
DOCSET_PUBLISHER_NAME = Publisher
|
||||||
|
GENERATE_HTMLHELP = NO
|
||||||
|
GENERATE_CHI = NO
|
||||||
|
BINARY_TOC = NO
|
||||||
|
TOC_EXPAND = NO
|
||||||
|
GENERATE_QHP = NO
|
||||||
|
QHP_NAMESPACE = org.doxygen.Project
|
||||||
|
QHP_VIRTUAL_FOLDER = doc
|
||||||
|
GENERATE_ECLIPSEHELP = NO
|
||||||
|
ECLIPSE_DOC_ID = org.doxygen.Project
|
||||||
|
DISABLE_INDEX = NO
|
||||||
|
GENERATE_TREEVIEW = YES
|
||||||
|
ENUM_VALUES_PER_LINE = 4
|
||||||
|
TREEVIEW_WIDTH = 250
|
||||||
|
EXT_LINKS_IN_WINDOW = NO
|
||||||
|
FORMULA_FONTSIZE = 10
|
||||||
|
FORMULA_TRANSPARENT = YES
|
||||||
|
USE_MATHJAX = NO
|
||||||
|
MATHJAX_FORMAT = HTML-CSS
|
||||||
|
MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest
|
||||||
|
SEARCHENGINE = YES
|
||||||
|
SERVER_BASED_SEARCH = NO
|
||||||
|
EXTERNAL_SEARCH = NO
|
||||||
|
SEARCHDATA_FILE = searchdata.xml
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Configuration options related to the preprocessor
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
ENABLE_PREPROCESSING = YES
|
||||||
|
MACRO_EXPANSION = NO
|
||||||
|
EXPAND_ONLY_PREDEF = NO
|
||||||
|
SEARCH_INCLUDES = YES
|
||||||
|
SKIP_FUNCTION_MACROS = YES
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Configuration options related to external references
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
ALLEXTERNALS = NO
|
||||||
|
EXTERNAL_GROUPS = YES
|
||||||
|
EXTERNAL_PAGES = YES
|
||||||
|
PERL_PATH = /usr/bin/perl
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Configuration options related to the dot tool
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
CLASS_DIAGRAMS = YES
|
||||||
|
HIDE_UNDOC_RELATIONS = YES
|
||||||
|
HAVE_DOT = NO
|
||||||
|
DOT_NUM_THREADS = 0
|
||||||
|
DOT_FONTNAME = Helvetica
|
||||||
|
DOT_FONTSIZE = 10
|
||||||
|
CLASS_GRAPH = YES
|
||||||
|
COLLABORATION_GRAPH = YES
|
||||||
|
GROUP_GRAPHS = YES
|
||||||
|
UML_LOOK = NO
|
||||||
|
UML_LIMIT_NUM_FIELDS = 10
|
||||||
|
TEMPLATE_RELATIONS = NO
|
||||||
|
INCLUDE_GRAPH = YES
|
||||||
|
INCLUDED_BY_GRAPH = YES
|
||||||
|
CALL_GRAPH = NO
|
||||||
|
CALLER_GRAPH = NO
|
||||||
|
GRAPHICAL_HIERARCHY = YES
|
||||||
|
DIRECTORY_GRAPH = YES
|
||||||
|
DOT_IMAGE_FORMAT = png
|
||||||
|
INTERACTIVE_SVG = NO
|
||||||
|
DOT_GRAPH_MAX_NODES = 50
|
||||||
|
MAX_DOT_GRAPH_DEPTH = 0
|
||||||
|
DOT_TRANSPARENT = NO
|
||||||
|
DOT_MULTI_TARGETS = NO
|
||||||
|
GENERATE_LEGEND = YES
|
||||||
|
DOT_CLEANUP = YES
|
||||||
@@ -46,7 +46,7 @@ celix_status_t cb_serviceChanged(void* listener, service_event_pt event) {
|
|||||||
myUserData->serviceImpl->setRepoService(service);
|
myUserData->serviceImpl->setRepoService(service);
|
||||||
checkReg = true;
|
checkReg = true;
|
||||||
}
|
}
|
||||||
// Register hos-devicerepository-service
|
// Register python scripting service
|
||||||
if (checkReg && !myUserData->serviceReg && myUserData->serviceImpl->isInitialized()) {
|
if (checkReg && !myUserData->serviceReg && myUserData->serviceImpl->isInitialized()) {
|
||||||
bundleContext_registerService(myUserData->bundleContext, (char*)PyScriptingService::SERVICE_NAME, myUserData->serviceImpl.get(), nullptr, &myUserData->serviceReg);
|
bundleContext_registerService(myUserData->bundleContext, (char*)PyScriptingService::SERVICE_NAME, myUserData->serviceImpl.get(), nullptr, &myUserData->serviceReg);
|
||||||
}
|
}
|
||||||
|
|||||||
+9
-3
@@ -64,7 +64,13 @@ void PyScriptingService::init() noexcept {
|
|||||||
ROS_INFO_STREAM("PyScriptingService: Python Version: " << version);
|
ROS_INFO_STREAM("PyScriptingService: Python Version: " << version);
|
||||||
|
|
||||||
// Initialize HOS Python API
|
// Initialize HOS Python API
|
||||||
inithos();
|
#if defined ( _PYTHON_2_ )
|
||||||
|
inithos();
|
||||||
|
#elif defined ( _PYTHON_3_ )
|
||||||
|
init_module_hos();
|
||||||
|
#else
|
||||||
|
#error "Python version not defined"
|
||||||
|
#endif
|
||||||
deviceService.reset(new hosapi::PyDeviceRepositoryWrapper(repoService));
|
deviceService.reset(new hosapi::PyDeviceRepositoryWrapper(repoService));
|
||||||
|
|
||||||
initialized = true;
|
initialized = true;
|
||||||
@@ -109,12 +115,12 @@ std::shared_ptr<service::scripting::Script> PyScriptingService::createScript(con
|
|||||||
|
|
||||||
void PyScript::execute( std::shared_ptr<GlobalScriptContext> gContext, const libvariant::Variant& lContext ) {
|
void PyScript::execute( std::shared_ptr<GlobalScriptContext> gContext, const libvariant::Variant& lContext ) {
|
||||||
try {
|
try {
|
||||||
auto gCont = dynamic_pointer_cast<PyGlobalScriptContext>(gContext);
|
|
||||||
|
|
||||||
// Get global scope
|
// Get global scope
|
||||||
boost::python::object* gscope;
|
boost::python::object* gscope;
|
||||||
if (gContext) {
|
if (gContext) {
|
||||||
gscope = &dynamic_pointer_cast<PyGlobalScriptContext>(gContext)->getPyObject();
|
auto gCont = dynamic_pointer_cast<PyGlobalScriptContext>(gContext);
|
||||||
|
gscope = &gCont->getPyObject();
|
||||||
} else {
|
} else {
|
||||||
gscope = &service->getPyDefaultScrope();
|
gscope = &service->getPyDefaultScrope();
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-2
@@ -39,7 +39,8 @@ using namespace libvariant;
|
|||||||
* Python implementation of GlobalScriptContext.
|
* Python implementation of GlobalScriptContext.
|
||||||
*/
|
*/
|
||||||
class PyGlobalScriptContext
|
class PyGlobalScriptContext
|
||||||
: public virtual service::scripting::GlobalScriptContext {
|
: public virtual service::scripting::GlobalScriptContext,
|
||||||
|
public implementation::Object {
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
@@ -70,7 +71,8 @@ public:
|
|||||||
* Python implementation of Script.
|
* Python implementation of Script.
|
||||||
*/
|
*/
|
||||||
class PyScript
|
class PyScript
|
||||||
: public virtual service::scripting::Script {
|
: public virtual service::scripting::Script,
|
||||||
|
public implementation::Object {
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
|||||||
+7
-1
@@ -12,7 +12,13 @@
|
|||||||
/**
|
/**
|
||||||
* This function declares the python hos module.
|
* This function declares the python hos module.
|
||||||
*/
|
*/
|
||||||
extern "C" void inithos();
|
#if defined ( _PYTHON_2_ )
|
||||||
|
extern "C" void inithos();
|
||||||
|
#elif defined ( _PYTHON_3_ )
|
||||||
|
extern "C" void init_module_hos();
|
||||||
|
#else
|
||||||
|
#error "Python version not defined"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+3
-3
@@ -48,14 +48,14 @@ boost::python::object convertVariantToBoostPython(const libvariant::Variant& var
|
|||||||
libvariant::Variant convertBoostPythonTovariant(const boost::python::object& obj) noexcept {
|
libvariant::Variant convertBoostPythonTovariant(const boost::python::object& obj) noexcept {
|
||||||
libvariant::Variant retval;
|
libvariant::Variant retval;
|
||||||
if (!obj.is_none()) {
|
if (!obj.is_none()) {
|
||||||
if (PyObject_TypeCheck(obj.ptr(), &PyString_Type)) {
|
if (PyObject_TypeCheck(obj.ptr(), &PyUnicode_Type)) {
|
||||||
retval = libvariant::Variant(boost::python::extract<std::string>(obj));
|
retval = libvariant::Variant(boost::python::extract<std::string>(obj));
|
||||||
} else if (PyObject_TypeCheck(obj.ptr(), &PyBool_Type)) {
|
} else if (PyObject_TypeCheck(obj.ptr(), &PyBool_Type)) {
|
||||||
retval = libvariant::Variant(boost::python::extract<bool>(obj));
|
retval = libvariant::Variant(boost::python::extract<bool>(obj));
|
||||||
} else if (PyObject_TypeCheck(obj.ptr(), &PyFloat_Type)) {
|
} else if (PyObject_TypeCheck(obj.ptr(), &PyFloat_Type)) {
|
||||||
retval = libvariant::Variant(boost::python::extract<double>(obj));
|
retval = libvariant::Variant(boost::python::extract<double>(obj));
|
||||||
} else if (PyObject_TypeCheck(obj.ptr(), &PyInt_Type)) {
|
} else if (PyObject_TypeCheck(obj.ptr(), &PyLong_Type)) {
|
||||||
retval = libvariant::Variant(boost::python::extract<int>(obj));
|
retval = libvariant::Variant(boost::python::extract<long>(obj));
|
||||||
} else if (PyObject_TypeCheck(obj.ptr(), &PyDict_Type)) {
|
} else if (PyObject_TypeCheck(obj.ptr(), &PyDict_Type)) {
|
||||||
boost::python::dict dict = boost::python::extract<boost::python::dict>(obj);
|
boost::python::dict dict = boost::python::extract<boost::python::dict>(obj);
|
||||||
for (int i = 0; i < boost::python::len(dict); i++) {
|
for (int i = 0; i < boost::python::len(dict); i++) {
|
||||||
|
|||||||
@@ -2,8 +2,6 @@ cmake_minimum_required(VERSION 2.8.3)
|
|||||||
project(hos_cosgi_webserver)
|
project(hos_cosgi_webserver)
|
||||||
|
|
||||||
## Find catkin macros and libraries
|
## Find catkin macros and libraries
|
||||||
## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
|
|
||||||
## is used, also find other catkin packages
|
|
||||||
find_package(catkin REQUIRED COMPONENTS
|
find_package(catkin REQUIRED COMPONENTS
|
||||||
hos_celix
|
hos_celix
|
||||||
hos_cosgi_devicerepository
|
hos_cosgi_devicerepository
|
||||||
@@ -14,87 +12,23 @@ find_package(catkin REQUIRED COMPONENTS
|
|||||||
)
|
)
|
||||||
|
|
||||||
## System dependencies are found with CMake's conventions
|
## System dependencies are found with CMake's conventions
|
||||||
# find_package(Boost REQUIRED COMPONENTS system)
|
|
||||||
|
|
||||||
|
|
||||||
## Uncomment this if the package has a setup.py. This macro ensures
|
|
||||||
## modules and global scripts declared therein get installed
|
|
||||||
## See http://ros.org/doc/api/catkin/html/user_guide/setup_dot_py.html
|
|
||||||
# catkin_python_setup()
|
|
||||||
|
|
||||||
find_package(APR REQUIRED)
|
find_package(APR REQUIRED)
|
||||||
find_package(CELIX REQUIRED)
|
find_package(CELIX REQUIRED)
|
||||||
find_package(Boost REQUIRED)
|
find_package(Boost REQUIRED)
|
||||||
find_package(libvariant REQUIRED)
|
find_package(libvariant REQUIRED)
|
||||||
find_package(libhttpserver REQUIRED)
|
find_package(libhttpserver REQUIRED)
|
||||||
|
|
||||||
################################################
|
|
||||||
## Declare ROS messages, services and actions ##
|
|
||||||
################################################
|
|
||||||
|
|
||||||
## To declare and build messages, services or actions from within this
|
|
||||||
## package, follow these steps:
|
|
||||||
## * Let MSG_DEP_SET be the set of packages whose message types you use in
|
|
||||||
## your messages/services/actions (e.g. std_msgs, actionlib_msgs, ...).
|
|
||||||
## * In the file package.xml:
|
|
||||||
## * add a build_depend and a run_depend tag for each package in MSG_DEP_SET
|
|
||||||
## * If MSG_DEP_SET isn't empty the following dependencies might have been
|
|
||||||
## pulled in transitively but can be declared for certainty nonetheless:
|
|
||||||
## * add a build_depend tag for "message_generation"
|
|
||||||
## * add a run_depend tag for "message_runtime"
|
|
||||||
## * In this file (CMakeLists.txt):
|
|
||||||
## * add "message_generation" and every package in MSG_DEP_SET to
|
|
||||||
## find_package(catkin REQUIRED COMPONENTS ...)
|
|
||||||
## * add "message_runtime" and every package in MSG_DEP_SET to
|
|
||||||
## catkin_package(CATKIN_DEPENDS ...)
|
|
||||||
## * uncomment the add_*_files sections below as needed
|
|
||||||
## and list every .msg/.srv/.action file to be processed
|
|
||||||
## * uncomment the generate_messages entry below
|
|
||||||
## * add every package in MSG_DEP_SET to generate_messages(DEPENDENCIES ...)
|
|
||||||
|
|
||||||
## Generate messages in the 'msg' folder
|
|
||||||
# add_message_files(
|
|
||||||
# FILES
|
|
||||||
# Message1.msg
|
|
||||||
# Message2.msg
|
|
||||||
# )
|
|
||||||
|
|
||||||
## Generate services in the 'srv' folder
|
|
||||||
# add_service_files(
|
|
||||||
# FILES
|
|
||||||
# Service1.srv
|
|
||||||
# Service2.srv
|
|
||||||
# )
|
|
||||||
|
|
||||||
## Generate actions in the 'action' folder
|
|
||||||
# add_action_files(
|
|
||||||
# FILES
|
|
||||||
# Action1.action
|
|
||||||
# Action2.action
|
|
||||||
# )
|
|
||||||
|
|
||||||
## Generate added messages and services with any dependencies listed here
|
|
||||||
# generate_messages(
|
|
||||||
# DEPENDENCIES
|
|
||||||
# std_msgs # Or other packages containing msgs
|
|
||||||
# )
|
|
||||||
|
|
||||||
###################################
|
###################################
|
||||||
## catkin specific configuration ##
|
## catkin specific configuration ##
|
||||||
###################################
|
###################################
|
||||||
## The catkin_package macro generates cmake config files for your package
|
|
||||||
## Declare things to be passed to dependent projects
|
|
||||||
## INCLUDE_DIRS: uncomment this if you package contains header files
|
|
||||||
## LIBRARIES: libraries you create in this project that dependent projects also need
|
|
||||||
## CATKIN_DEPENDS: catkin_packages dependent projects also need
|
|
||||||
## DEPENDS: system dependencies of this project that dependent projects also need
|
|
||||||
catkin_package(
|
catkin_package(
|
||||||
# INCLUDE_DIRS include
|
INCLUDE_DIRS include/${PROJECT_NAME}/
|
||||||
# LIBRARIES hos_cosgi_webserver
|
CATKIN_DEPENDS hos_celix hos_cosgi_core hos_cpp_utils roscpp
|
||||||
# CATKIN_DEPENDS hos_celix hos_cosgi_devicerepository hos_cosgi_core hos_cpp_utils hos_libhttpserver hos_libvariant roscpp
|
|
||||||
# DEPENDS system_lib
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
###########
|
###########
|
||||||
## Build ##
|
## Build ##
|
||||||
###########
|
###########
|
||||||
@@ -103,15 +37,12 @@ add_definitions(
|
|||||||
-std=c++11
|
-std=c++11
|
||||||
)
|
)
|
||||||
|
|
||||||
## Specify additional locations of header files
|
|
||||||
## Your package locations should be listed before other locations
|
|
||||||
# include_directories(include)
|
|
||||||
include_directories(
|
include_directories(
|
||||||
|
include/${PROJECT_NAME}/
|
||||||
${catkin_INCLUDE_DIRS}
|
${catkin_INCLUDE_DIRS}
|
||||||
${APR_INCLUDE_DIR}
|
${APR_INCLUDE_DIR}
|
||||||
${APR_INCLUDE_DIR}/apr-1.0
|
${APR_INCLUDE_DIR}/apr-1.0
|
||||||
include/${PROJECT_NAME}/
|
${libvariant_INCLUDE_DIRS}
|
||||||
${libvariant_INCLUDE_DIR}
|
|
||||||
${libhttpserver_INCLUDE_DIRS}
|
${libhttpserver_INCLUDE_DIRS}
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -126,6 +57,7 @@ bundle(hos_cosgi_webserver
|
|||||||
${PROJECT_SOURCE_DIR}/src/hos/cosgi/service/webserver/resources/DevicesHTTPResource
|
${PROJECT_SOURCE_DIR}/src/hos/cosgi/service/webserver/resources/DevicesHTTPResource
|
||||||
${PROJECT_SOURCE_DIR}/src/hos/cosgi/service/webserver/resources/SchemaHTTPResource
|
${PROJECT_SOURCE_DIR}/src/hos/cosgi/service/webserver/resources/SchemaHTTPResource
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(hos_cosgi_webserver
|
target_link_libraries(hos_cosgi_webserver
|
||||||
${catkin_LIBRARIES}
|
${catkin_LIBRARIES}
|
||||||
${APR_LIBRARIES}
|
${APR_LIBRARIES}
|
||||||
@@ -134,23 +66,6 @@ target_link_libraries(hos_cosgi_webserver
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
## Declare a cpp library
|
|
||||||
# add_library(hos_cosgi_webserver
|
|
||||||
# src/${PROJECT_NAME}/hos_cosgi_webserver.cpp
|
|
||||||
# )
|
|
||||||
|
|
||||||
## Declare a cpp executable
|
|
||||||
# add_executable(hos_cosgi_webserver_node src/hos_cosgi_webserver_node.cpp)
|
|
||||||
|
|
||||||
## Add cmake target dependencies of the executable/library
|
|
||||||
## as an example, message headers may need to be generated before nodes
|
|
||||||
# add_dependencies(hos_cosgi_webserver_node hos_cosgi_webserver_generate_messages_cpp)
|
|
||||||
|
|
||||||
## Specify libraries to link a library or executable target against
|
|
||||||
# target_link_libraries(hos_cosgi_webserver_node
|
|
||||||
# ${catkin_LIBRARIES}
|
|
||||||
# )
|
|
||||||
|
|
||||||
#############
|
#############
|
||||||
## Install ##
|
## Install ##
|
||||||
#############
|
#############
|
||||||
@@ -166,47 +81,22 @@ install(FILES
|
|||||||
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/bundles
|
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/bundles
|
||||||
)
|
)
|
||||||
|
|
||||||
|
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc
|
||||||
|
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
|
||||||
|
OPTIONAL
|
||||||
|
)
|
||||||
|
|
||||||
# all install targets should use catkin DESTINATION variables
|
|
||||||
# See http://ros.org/doc/api/catkin/html/adv_user_guide/variables.html
|
|
||||||
|
|
||||||
## Mark executable scripts (Python etc.) for installation
|
###################
|
||||||
## in contrast to setup.py, you can choose the destination
|
## Documentation ##
|
||||||
# install(PROGRAMS
|
###################
|
||||||
# scripts/my_python_script
|
|
||||||
# DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
|
|
||||||
# )
|
|
||||||
|
|
||||||
## Mark executables and/or libraries for installation
|
find_package(Doxygen)
|
||||||
# install(TARGETS hos_cosgi_webserver hos_cosgi_webserver_node
|
if(DOXYGEN_FOUND)
|
||||||
# ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
|
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY)
|
||||||
# LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
|
add_custom_target(doc
|
||||||
# RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
|
${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
|
||||||
# )
|
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||||
|
)
|
||||||
|
endif(DOXYGEN_FOUND)
|
||||||
|
|
||||||
## Mark cpp header files for installation
|
|
||||||
# install(DIRECTORY include/${PROJECT_NAME}/
|
|
||||||
# DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
|
|
||||||
# FILES_MATCHING PATTERN "*.h"
|
|
||||||
# PATTERN ".svn" EXCLUDE
|
|
||||||
# )
|
|
||||||
|
|
||||||
## Mark other files for installation (e.g. launch and bag files, etc.)
|
|
||||||
# install(FILES
|
|
||||||
# # myfile1
|
|
||||||
# # myfile2
|
|
||||||
# DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
|
|
||||||
# )
|
|
||||||
|
|
||||||
#############
|
|
||||||
## Testing ##
|
|
||||||
#############
|
|
||||||
|
|
||||||
## Add gtest based cpp test target and link libraries
|
|
||||||
# catkin_add_gtest(${PROJECT_NAME}-test test/test_hos_cosgi_webserver.cpp)
|
|
||||||
# if(TARGET ${PROJECT_NAME}-test)
|
|
||||||
# target_link_libraries(${PROJECT_NAME}-test ${PROJECT_NAME})
|
|
||||||
# endif()
|
|
||||||
|
|
||||||
## Add folders to be run by python nosetests
|
|
||||||
# catkin_add_nosetests(test)
|
|
||||||
|
|||||||
@@ -0,0 +1,248 @@
|
|||||||
|
# Doxyfile 1.8.8
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Project related configuration options
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
DOXYFILE_ENCODING = UTF-8
|
||||||
|
PROJECT_NAME = hos_cosgi_webserver
|
||||||
|
OUTPUT_DIRECTORY = doc
|
||||||
|
CREATE_SUBDIRS = NO
|
||||||
|
ALLOW_UNICODE_NAMES = NO
|
||||||
|
OUTPUT_LANGUAGE = English
|
||||||
|
BRIEF_MEMBER_DESC = YES
|
||||||
|
REPEAT_BRIEF = YES
|
||||||
|
ABBREVIATE_BRIEF = "The $name class" \
|
||||||
|
"The $name widget" \
|
||||||
|
"The $name file" \
|
||||||
|
is \
|
||||||
|
provides \
|
||||||
|
specifies \
|
||||||
|
contains \
|
||||||
|
represents \
|
||||||
|
a \
|
||||||
|
an \
|
||||||
|
the
|
||||||
|
ALWAYS_DETAILED_SEC = NO
|
||||||
|
INLINE_INHERITED_MEMB = NO
|
||||||
|
FULL_PATH_NAMES = NO
|
||||||
|
SHORT_NAMES = NO
|
||||||
|
JAVADOC_AUTOBRIEF = NO
|
||||||
|
QT_AUTOBRIEF = NO
|
||||||
|
MULTILINE_CPP_IS_BRIEF = NO
|
||||||
|
INHERIT_DOCS = YES
|
||||||
|
SEPARATE_MEMBER_PAGES = NO
|
||||||
|
TAB_SIZE = 4
|
||||||
|
OPTIMIZE_OUTPUT_FOR_C = NO
|
||||||
|
OPTIMIZE_OUTPUT_JAVA = NO
|
||||||
|
OPTIMIZE_FOR_FORTRAN = NO
|
||||||
|
OPTIMIZE_OUTPUT_VHDL = NO
|
||||||
|
MARKDOWN_SUPPORT = YES
|
||||||
|
AUTOLINK_SUPPORT = YES
|
||||||
|
BUILTIN_STL_SUPPORT = NO
|
||||||
|
CPP_CLI_SUPPORT = NO
|
||||||
|
SIP_SUPPORT = NO
|
||||||
|
IDL_PROPERTY_SUPPORT = YES
|
||||||
|
DISTRIBUTE_GROUP_DOC = NO
|
||||||
|
SUBGROUPING = YES
|
||||||
|
INLINE_GROUPED_CLASSES = NO
|
||||||
|
INLINE_SIMPLE_STRUCTS = NO
|
||||||
|
TYPEDEF_HIDES_STRUCT = NO
|
||||||
|
LOOKUP_CACHE_SIZE = 0
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Build related configuration options
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
EXTRACT_ALL = YES
|
||||||
|
EXTRACT_PRIVATE = NO
|
||||||
|
EXTRACT_PACKAGE = NO
|
||||||
|
EXTRACT_STATIC = NO
|
||||||
|
EXTRACT_LOCAL_CLASSES = YES
|
||||||
|
EXTRACT_LOCAL_METHODS = NO
|
||||||
|
EXTRACT_ANON_NSPACES = NO
|
||||||
|
HIDE_UNDOC_MEMBERS = NO
|
||||||
|
HIDE_UNDOC_CLASSES = NO
|
||||||
|
HIDE_FRIEND_COMPOUNDS = NO
|
||||||
|
HIDE_IN_BODY_DOCS = NO
|
||||||
|
INTERNAL_DOCS = NO
|
||||||
|
CASE_SENSE_NAMES = NO
|
||||||
|
HIDE_SCOPE_NAMES = NO
|
||||||
|
SHOW_INCLUDE_FILES = YES
|
||||||
|
SHOW_GROUPED_MEMB_INC = NO
|
||||||
|
FORCE_LOCAL_INCLUDES = NO
|
||||||
|
INLINE_INFO = YES
|
||||||
|
SORT_MEMBER_DOCS = YES
|
||||||
|
SORT_BRIEF_DOCS = NO
|
||||||
|
SORT_MEMBERS_CTORS_1ST = NO
|
||||||
|
SORT_GROUP_NAMES = NO
|
||||||
|
SORT_BY_SCOPE_NAME = NO
|
||||||
|
STRICT_PROTO_MATCHING = NO
|
||||||
|
GENERATE_TODOLIST = YES
|
||||||
|
GENERATE_TESTLIST = YES
|
||||||
|
GENERATE_BUGLIST = YES
|
||||||
|
GENERATE_DEPRECATEDLIST= YES
|
||||||
|
MAX_INITIALIZER_LINES = 30
|
||||||
|
SHOW_USED_FILES = YES
|
||||||
|
SHOW_FILES = YES
|
||||||
|
SHOW_NAMESPACES = YES
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Configuration options related to warning and progress messages
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
QUIET = NO
|
||||||
|
WARNINGS = YES
|
||||||
|
WARN_IF_UNDOCUMENTED = YES
|
||||||
|
WARN_IF_DOC_ERROR = YES
|
||||||
|
WARN_NO_PARAMDOC = NO
|
||||||
|
WARN_FORMAT = "$file:$line: $text"
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Configuration options related to the input files
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
INPUT = @CMAKE_CURRENT_SOURCE_DIR@/include \
|
||||||
|
@CMAKE_CURRENT_SOURCE_DIR@/src
|
||||||
|
INPUT_ENCODING = UTF-8
|
||||||
|
FILE_PATTERNS = *.c \
|
||||||
|
*.cc \
|
||||||
|
*.cxx \
|
||||||
|
*.cpp \
|
||||||
|
*.c++ \
|
||||||
|
*.java \
|
||||||
|
*.ii \
|
||||||
|
*.ixx \
|
||||||
|
*.ipp \
|
||||||
|
*.i++ \
|
||||||
|
*.inl \
|
||||||
|
*.idl \
|
||||||
|
*.ddl \
|
||||||
|
*.odl \
|
||||||
|
*.h \
|
||||||
|
*.hh \
|
||||||
|
*.hxx \
|
||||||
|
*.hpp \
|
||||||
|
*.h++ \
|
||||||
|
*.cs \
|
||||||
|
*.d \
|
||||||
|
*.php \
|
||||||
|
*.php4 \
|
||||||
|
*.php5 \
|
||||||
|
*.phtml \
|
||||||
|
*.inc \
|
||||||
|
*.m \
|
||||||
|
*.markdown \
|
||||||
|
*.md \
|
||||||
|
*.mm \
|
||||||
|
*.dox \
|
||||||
|
*.py \
|
||||||
|
*.f90 \
|
||||||
|
*.f \
|
||||||
|
*.for \
|
||||||
|
*.tcl \
|
||||||
|
*.vhd \
|
||||||
|
*.vhdl \
|
||||||
|
*.ucf \
|
||||||
|
*.qsf \
|
||||||
|
*.as \
|
||||||
|
*.js
|
||||||
|
RECURSIVE = YES
|
||||||
|
EXCLUDE_SYMLINKS = NO
|
||||||
|
EXAMPLE_PATTERNS = *
|
||||||
|
EXAMPLE_RECURSIVE = NO
|
||||||
|
FILTER_SOURCE_FILES = NO
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Configuration options related to source browsing
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
SOURCE_BROWSER = NO
|
||||||
|
INLINE_SOURCES = NO
|
||||||
|
STRIP_CODE_COMMENTS = YES
|
||||||
|
REFERENCED_BY_RELATION = NO
|
||||||
|
REFERENCES_RELATION = NO
|
||||||
|
REFERENCES_LINK_SOURCE = YES
|
||||||
|
SOURCE_TOOLTIPS = YES
|
||||||
|
USE_HTAGS = NO
|
||||||
|
VERBATIM_HEADERS = YES
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Configuration options related to the alphabetical class index
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
ALPHABETICAL_INDEX = YES
|
||||||
|
COLS_IN_ALPHA_INDEX = 5
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Configuration options related to the HTML output
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
GENERATE_HTML = YES
|
||||||
|
HTML_OUTPUT = html
|
||||||
|
HTML_FILE_EXTENSION = .html
|
||||||
|
HTML_COLORSTYLE_HUE = 220
|
||||||
|
HTML_COLORSTYLE_SAT = 100
|
||||||
|
HTML_COLORSTYLE_GAMMA = 80
|
||||||
|
HTML_TIMESTAMP = YES
|
||||||
|
HTML_DYNAMIC_SECTIONS = NO
|
||||||
|
HTML_INDEX_NUM_ENTRIES = 100
|
||||||
|
GENERATE_DOCSET = NO
|
||||||
|
DOCSET_FEEDNAME = "Doxygen generated docs"
|
||||||
|
DOCSET_BUNDLE_ID = org.doxygen.Project
|
||||||
|
DOCSET_PUBLISHER_ID = org.doxygen.Publisher
|
||||||
|
DOCSET_PUBLISHER_NAME = Publisher
|
||||||
|
GENERATE_HTMLHELP = NO
|
||||||
|
GENERATE_CHI = NO
|
||||||
|
BINARY_TOC = NO
|
||||||
|
TOC_EXPAND = NO
|
||||||
|
GENERATE_QHP = NO
|
||||||
|
QHP_NAMESPACE = org.doxygen.Project
|
||||||
|
QHP_VIRTUAL_FOLDER = doc
|
||||||
|
GENERATE_ECLIPSEHELP = NO
|
||||||
|
ECLIPSE_DOC_ID = org.doxygen.Project
|
||||||
|
DISABLE_INDEX = NO
|
||||||
|
GENERATE_TREEVIEW = YES
|
||||||
|
ENUM_VALUES_PER_LINE = 4
|
||||||
|
TREEVIEW_WIDTH = 250
|
||||||
|
EXT_LINKS_IN_WINDOW = NO
|
||||||
|
FORMULA_FONTSIZE = 10
|
||||||
|
FORMULA_TRANSPARENT = YES
|
||||||
|
USE_MATHJAX = NO
|
||||||
|
MATHJAX_FORMAT = HTML-CSS
|
||||||
|
MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest
|
||||||
|
SEARCHENGINE = YES
|
||||||
|
SERVER_BASED_SEARCH = NO
|
||||||
|
EXTERNAL_SEARCH = NO
|
||||||
|
SEARCHDATA_FILE = searchdata.xml
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Configuration options related to the preprocessor
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
ENABLE_PREPROCESSING = YES
|
||||||
|
MACRO_EXPANSION = NO
|
||||||
|
EXPAND_ONLY_PREDEF = NO
|
||||||
|
SEARCH_INCLUDES = YES
|
||||||
|
SKIP_FUNCTION_MACROS = YES
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Configuration options related to external references
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
ALLEXTERNALS = NO
|
||||||
|
EXTERNAL_GROUPS = YES
|
||||||
|
EXTERNAL_PAGES = YES
|
||||||
|
PERL_PATH = /usr/bin/perl
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Configuration options related to the dot tool
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
CLASS_DIAGRAMS = YES
|
||||||
|
HIDE_UNDOC_RELATIONS = YES
|
||||||
|
HAVE_DOT = NO
|
||||||
|
DOT_NUM_THREADS = 0
|
||||||
|
DOT_FONTNAME = Helvetica
|
||||||
|
DOT_FONTSIZE = 10
|
||||||
|
CLASS_GRAPH = YES
|
||||||
|
COLLABORATION_GRAPH = YES
|
||||||
|
GROUP_GRAPHS = YES
|
||||||
|
UML_LOOK = NO
|
||||||
|
UML_LIMIT_NUM_FIELDS = 10
|
||||||
|
TEMPLATE_RELATIONS = NO
|
||||||
|
INCLUDE_GRAPH = YES
|
||||||
|
INCLUDED_BY_GRAPH = YES
|
||||||
|
CALL_GRAPH = NO
|
||||||
|
CALLER_GRAPH = NO
|
||||||
|
GRAPHICAL_HIERARCHY = YES
|
||||||
|
DIRECTORY_GRAPH = YES
|
||||||
|
DOT_IMAGE_FORMAT = png
|
||||||
|
INTERACTIVE_SVG = NO
|
||||||
|
DOT_GRAPH_MAX_NODES = 50
|
||||||
|
MAX_DOT_GRAPH_DEPTH = 0
|
||||||
|
DOT_TRANSPARENT = NO
|
||||||
|
DOT_MULTI_TARGETS = NO
|
||||||
|
GENERATE_LEGEND = YES
|
||||||
|
DOT_CLEANUP = YES
|
||||||
@@ -160,3 +160,16 @@ install(DIRECTORY include/${PROJECT_NAME}/
|
|||||||
|
|
||||||
## Add folders to be run by python nosetests
|
## Add folders to be run by python nosetests
|
||||||
# catkin_add_nosetests(test)
|
# catkin_add_nosetests(test)
|
||||||
|
|
||||||
|
|
||||||
|
###################
|
||||||
|
## Documentation ##
|
||||||
|
###################
|
||||||
|
|
||||||
|
# We have no documentation, so we create an empty target
|
||||||
|
find_package(Doxygen)
|
||||||
|
if(DOXYGEN_FOUND)
|
||||||
|
add_custom_target(doc)
|
||||||
|
endif(DOXYGEN_FOUND)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -2,90 +2,22 @@ cmake_minimum_required(VERSION 2.8.3)
|
|||||||
project(hos_cpp_utils)
|
project(hos_cpp_utils)
|
||||||
|
|
||||||
## Find catkin macros and libraries
|
## Find catkin macros and libraries
|
||||||
## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
|
|
||||||
## is used, also find other catkin packages
|
|
||||||
find_package(catkin REQUIRED COMPONENTS
|
find_package(catkin REQUIRED COMPONENTS
|
||||||
roscpp
|
roscpp
|
||||||
hos_deps
|
hos_deps
|
||||||
)
|
)
|
||||||
|
|
||||||
message("CMAKE_MODULE_PATH: ${CMAKE_MODULE_PATH}")
|
|
||||||
find_package(libvariant REQUIRED)
|
|
||||||
message("libvariant_INCLUDE_DIR: ${libvariant_INCLUDE_DIR}")
|
|
||||||
message("libvariant_LIBRARY: ${libvariant_LIBRARY}")
|
|
||||||
|
|
||||||
## System dependencies are found with CMake's conventions
|
## System dependencies are found with CMake's conventions
|
||||||
# find_package(Boost REQUIRED COMPONENTS system)
|
find_package(libvariant REQUIRED)
|
||||||
|
|
||||||
|
|
||||||
## Uncomment this if the package has a setup.py. This macro ensures
|
|
||||||
## modules and global scripts declared therein get installed
|
|
||||||
## See http://ros.org/doc/api/catkin/html/user_guide/setup_dot_py.html
|
|
||||||
# catkin_python_setup()
|
|
||||||
|
|
||||||
################################################
|
|
||||||
## Declare ROS messages, services and actions ##
|
|
||||||
################################################
|
|
||||||
|
|
||||||
## To declare and build messages, services or actions from within this
|
|
||||||
## package, follow these steps:
|
|
||||||
## * Let MSG_DEP_SET be the set of packages whose message types you use in
|
|
||||||
## your messages/services/actions (e.g. std_msgs, actionlib_msgs, ...).
|
|
||||||
## * In the file package.xml:
|
|
||||||
## * add a build_depend and a run_depend tag for each package in MSG_DEP_SET
|
|
||||||
## * If MSG_DEP_SET isn't empty the following dependencies might have been
|
|
||||||
## pulled in transitively but can be declared for certainty nonetheless:
|
|
||||||
## * add a build_depend tag for "message_generation"
|
|
||||||
## * add a run_depend tag for "message_runtime"
|
|
||||||
## * In this file (CMakeLists.txt):
|
|
||||||
## * add "message_generation" and every package in MSG_DEP_SET to
|
|
||||||
## find_package(catkin REQUIRED COMPONENTS ...)
|
|
||||||
## * add "message_runtime" and every package in MSG_DEP_SET to
|
|
||||||
## catkin_package(CATKIN_DEPENDS ...)
|
|
||||||
## * uncomment the add_*_files sections below as needed
|
|
||||||
## and list every .msg/.srv/.action file to be processed
|
|
||||||
## * uncomment the generate_messages entry below
|
|
||||||
## * add every package in MSG_DEP_SET to generate_messages(DEPENDENCIES ...)
|
|
||||||
|
|
||||||
## Generate messages in the 'msg' folder
|
|
||||||
# add_message_files(
|
|
||||||
# FILES
|
|
||||||
# Message1.msg
|
|
||||||
# Message2.msg
|
|
||||||
# )
|
|
||||||
|
|
||||||
## Generate services in the 'srv' folder
|
|
||||||
# add_service_files(
|
|
||||||
# FILES
|
|
||||||
# Service1.srv
|
|
||||||
# Service2.srv
|
|
||||||
# )
|
|
||||||
|
|
||||||
## Generate actions in the 'action' folder
|
|
||||||
# add_action_files(
|
|
||||||
# FILES
|
|
||||||
# Action1.action
|
|
||||||
# Action2.action
|
|
||||||
# )
|
|
||||||
|
|
||||||
## Generate added messages and services with any dependencies listed here
|
|
||||||
# generate_messages(
|
|
||||||
# DEPENDENCIES
|
|
||||||
# std_msgs # Or other packages containing msgs
|
|
||||||
# )
|
|
||||||
|
|
||||||
###################################
|
###################################
|
||||||
## catkin specific configuration ##
|
## catkin specific configuration ##
|
||||||
###################################
|
###################################
|
||||||
## The catkin_package macro generates cmake config files for your package
|
|
||||||
## Declare things to be passed to dependent projects
|
|
||||||
## INCLUDE_DIRS: uncomment this if you package contains header files
|
|
||||||
## LIBRARIES: libraries you create in this project that dependent projects also need
|
|
||||||
## CATKIN_DEPENDS: catkin_packages dependent projects also need
|
|
||||||
## DEPENDS: system dependencies of this project that dependent projects also need
|
|
||||||
catkin_package(
|
catkin_package(
|
||||||
INCLUDE_DIRS include/${PROJECT_NAME}/
|
INCLUDE_DIRS include/${PROJECT_NAME}/
|
||||||
LIBRARIES hos_cpp_utils
|
LIBRARIES hos_cpp_utils
|
||||||
)
|
)
|
||||||
|
|
||||||
###########
|
###########
|
||||||
@@ -98,40 +30,21 @@ add_definitions(
|
|||||||
)
|
)
|
||||||
|
|
||||||
include_directories(
|
include_directories(
|
||||||
|
include/${PROJECT_NAME}/
|
||||||
${catkin_INCLUDE_DIRS}
|
${catkin_INCLUDE_DIRS}
|
||||||
${libvariant_INCLUDE_DIR}
|
${libvariant_INCLUDE_DIR}
|
||||||
include/hos_cpp_utils
|
|
||||||
)
|
)
|
||||||
|
|
||||||
## Declare a cpp library
|
## Declare a cpp library
|
||||||
add_library(hos_cpp_utils STATIC
|
add_library(hos_cpp_utils STATIC
|
||||||
src/hos/utils/SchemaLoader.cpp
|
src/hos/utils/SchemaLoader.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(hos_cpp_utils
|
target_link_libraries(hos_cpp_utils
|
||||||
${catkin_LIBRARIES}
|
${catkin_LIBRARIES}
|
||||||
${libvariant_LIBRARY}
|
${libvariant_LIBRARY}
|
||||||
)
|
)
|
||||||
|
|
||||||
## Specify additional locations of header files
|
|
||||||
## Your package locations should be listed before other locations
|
|
||||||
# include_directories(include)
|
|
||||||
|
|
||||||
## Declare a cpp library
|
|
||||||
# add_library(hos_cpp_common
|
|
||||||
# src/${PROJECT_NAME}/hos_cpp_common.cpp
|
|
||||||
# )
|
|
||||||
|
|
||||||
## Declare a cpp executable
|
|
||||||
# add_executable(hos_cpp_common_node src/hos_cpp_common_node.cpp)
|
|
||||||
|
|
||||||
## Add cmake target dependencies of the executable/library
|
|
||||||
## as an example, message headers may need to be generated before nodes
|
|
||||||
# add_dependencies(hos_cpp_common_node hos_cpp_common_generate_messages_cpp)
|
|
||||||
|
|
||||||
## Specify libraries to link a library or executable target against
|
|
||||||
# target_link_libraries(hos_cpp_common_node
|
|
||||||
# ${catkin_LIBRARIES}
|
|
||||||
# )
|
|
||||||
|
|
||||||
#############
|
#############
|
||||||
## Install ##
|
## Install ##
|
||||||
@@ -144,46 +57,28 @@ install(TARGETS hos_cpp_utils
|
|||||||
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
|
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
|
||||||
)
|
)
|
||||||
|
|
||||||
# all install targets should use catkin DESTINATION variables
|
|
||||||
# See http://ros.org/doc/api/catkin/html/adv_user_guide/variables.html
|
|
||||||
|
|
||||||
## Mark executable scripts (Python etc.) for installation
|
|
||||||
## in contrast to setup.py, you can choose the destination
|
|
||||||
# install(PROGRAMS
|
|
||||||
# scripts/my_python_script
|
|
||||||
# DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
|
|
||||||
# )
|
|
||||||
|
|
||||||
## Mark executables and/or libraries for installation
|
|
||||||
# install(TARGETS hos_cpp_common hos_cpp_common_node
|
|
||||||
# ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
|
|
||||||
# LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
|
|
||||||
# RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
|
|
||||||
# )
|
|
||||||
|
|
||||||
## Mark cpp header files for installation
|
## Mark cpp header files for installation
|
||||||
install(DIRECTORY include/${PROJECT_NAME}/
|
install(DIRECTORY include/${PROJECT_NAME}/
|
||||||
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
|
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
|
||||||
FILES_MATCHING PATTERN "*.h"
|
FILES_MATCHING PATTERN "*.h"
|
||||||
PATTERN ".svn" EXCLUDE
|
|
||||||
)
|
)
|
||||||
|
|
||||||
## Mark other files for installation (e.g. launch and bag files, etc.)
|
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc
|
||||||
# install(FILES
|
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
|
||||||
# # myfile1
|
OPTIONAL
|
||||||
# # myfile2
|
)
|
||||||
# DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
|
|
||||||
# )
|
|
||||||
|
|
||||||
#############
|
|
||||||
## Testing ##
|
|
||||||
#############
|
|
||||||
|
|
||||||
## Add gtest based cpp test target and link libraries
|
###################
|
||||||
# catkin_add_gtest(${PROJECT_NAME}-test test/test_hos_cpp_common.cpp)
|
## Documentation ##
|
||||||
# if(TARGET ${PROJECT_NAME}-test)
|
###################
|
||||||
# target_link_libraries(${PROJECT_NAME}-test ${PROJECT_NAME})
|
|
||||||
# endif()
|
find_package(Doxygen)
|
||||||
|
if(DOXYGEN_FOUND)
|
||||||
|
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY)
|
||||||
|
add_custom_target(doc
|
||||||
|
${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
|
||||||
|
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||||
|
)
|
||||||
|
endif(DOXYGEN_FOUND)
|
||||||
|
|
||||||
## Add folders to be run by python nosetests
|
|
||||||
# catkin_add_nosetests(test)
|
|
||||||
|
|||||||
@@ -0,0 +1,248 @@
|
|||||||
|
# Doxyfile 1.8.8
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Project related configuration options
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
DOXYFILE_ENCODING = UTF-8
|
||||||
|
PROJECT_NAME = hos_cpp_utils
|
||||||
|
OUTPUT_DIRECTORY = doc
|
||||||
|
CREATE_SUBDIRS = NO
|
||||||
|
ALLOW_UNICODE_NAMES = NO
|
||||||
|
OUTPUT_LANGUAGE = English
|
||||||
|
BRIEF_MEMBER_DESC = YES
|
||||||
|
REPEAT_BRIEF = YES
|
||||||
|
ABBREVIATE_BRIEF = "The $name class" \
|
||||||
|
"The $name widget" \
|
||||||
|
"The $name file" \
|
||||||
|
is \
|
||||||
|
provides \
|
||||||
|
specifies \
|
||||||
|
contains \
|
||||||
|
represents \
|
||||||
|
a \
|
||||||
|
an \
|
||||||
|
the
|
||||||
|
ALWAYS_DETAILED_SEC = NO
|
||||||
|
INLINE_INHERITED_MEMB = NO
|
||||||
|
FULL_PATH_NAMES = NO
|
||||||
|
SHORT_NAMES = NO
|
||||||
|
JAVADOC_AUTOBRIEF = NO
|
||||||
|
QT_AUTOBRIEF = NO
|
||||||
|
MULTILINE_CPP_IS_BRIEF = NO
|
||||||
|
INHERIT_DOCS = YES
|
||||||
|
SEPARATE_MEMBER_PAGES = NO
|
||||||
|
TAB_SIZE = 4
|
||||||
|
OPTIMIZE_OUTPUT_FOR_C = NO
|
||||||
|
OPTIMIZE_OUTPUT_JAVA = NO
|
||||||
|
OPTIMIZE_FOR_FORTRAN = NO
|
||||||
|
OPTIMIZE_OUTPUT_VHDL = NO
|
||||||
|
MARKDOWN_SUPPORT = YES
|
||||||
|
AUTOLINK_SUPPORT = YES
|
||||||
|
BUILTIN_STL_SUPPORT = NO
|
||||||
|
CPP_CLI_SUPPORT = NO
|
||||||
|
SIP_SUPPORT = NO
|
||||||
|
IDL_PROPERTY_SUPPORT = YES
|
||||||
|
DISTRIBUTE_GROUP_DOC = NO
|
||||||
|
SUBGROUPING = YES
|
||||||
|
INLINE_GROUPED_CLASSES = NO
|
||||||
|
INLINE_SIMPLE_STRUCTS = NO
|
||||||
|
TYPEDEF_HIDES_STRUCT = NO
|
||||||
|
LOOKUP_CACHE_SIZE = 0
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Build related configuration options
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
EXTRACT_ALL = YES
|
||||||
|
EXTRACT_PRIVATE = NO
|
||||||
|
EXTRACT_PACKAGE = NO
|
||||||
|
EXTRACT_STATIC = NO
|
||||||
|
EXTRACT_LOCAL_CLASSES = YES
|
||||||
|
EXTRACT_LOCAL_METHODS = NO
|
||||||
|
EXTRACT_ANON_NSPACES = NO
|
||||||
|
HIDE_UNDOC_MEMBERS = NO
|
||||||
|
HIDE_UNDOC_CLASSES = NO
|
||||||
|
HIDE_FRIEND_COMPOUNDS = NO
|
||||||
|
HIDE_IN_BODY_DOCS = NO
|
||||||
|
INTERNAL_DOCS = NO
|
||||||
|
CASE_SENSE_NAMES = NO
|
||||||
|
HIDE_SCOPE_NAMES = NO
|
||||||
|
SHOW_INCLUDE_FILES = YES
|
||||||
|
SHOW_GROUPED_MEMB_INC = NO
|
||||||
|
FORCE_LOCAL_INCLUDES = NO
|
||||||
|
INLINE_INFO = YES
|
||||||
|
SORT_MEMBER_DOCS = YES
|
||||||
|
SORT_BRIEF_DOCS = NO
|
||||||
|
SORT_MEMBERS_CTORS_1ST = NO
|
||||||
|
SORT_GROUP_NAMES = NO
|
||||||
|
SORT_BY_SCOPE_NAME = NO
|
||||||
|
STRICT_PROTO_MATCHING = NO
|
||||||
|
GENERATE_TODOLIST = YES
|
||||||
|
GENERATE_TESTLIST = YES
|
||||||
|
GENERATE_BUGLIST = YES
|
||||||
|
GENERATE_DEPRECATEDLIST= YES
|
||||||
|
MAX_INITIALIZER_LINES = 30
|
||||||
|
SHOW_USED_FILES = YES
|
||||||
|
SHOW_FILES = YES
|
||||||
|
SHOW_NAMESPACES = YES
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Configuration options related to warning and progress messages
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
QUIET = NO
|
||||||
|
WARNINGS = YES
|
||||||
|
WARN_IF_UNDOCUMENTED = YES
|
||||||
|
WARN_IF_DOC_ERROR = YES
|
||||||
|
WARN_NO_PARAMDOC = NO
|
||||||
|
WARN_FORMAT = "$file:$line: $text"
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Configuration options related to the input files
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
INPUT = @CMAKE_CURRENT_SOURCE_DIR@/include \
|
||||||
|
@CMAKE_CURRENT_SOURCE_DIR@/src
|
||||||
|
INPUT_ENCODING = UTF-8
|
||||||
|
FILE_PATTERNS = *.c \
|
||||||
|
*.cc \
|
||||||
|
*.cxx \
|
||||||
|
*.cpp \
|
||||||
|
*.c++ \
|
||||||
|
*.java \
|
||||||
|
*.ii \
|
||||||
|
*.ixx \
|
||||||
|
*.ipp \
|
||||||
|
*.i++ \
|
||||||
|
*.inl \
|
||||||
|
*.idl \
|
||||||
|
*.ddl \
|
||||||
|
*.odl \
|
||||||
|
*.h \
|
||||||
|
*.hh \
|
||||||
|
*.hxx \
|
||||||
|
*.hpp \
|
||||||
|
*.h++ \
|
||||||
|
*.cs \
|
||||||
|
*.d \
|
||||||
|
*.php \
|
||||||
|
*.php4 \
|
||||||
|
*.php5 \
|
||||||
|
*.phtml \
|
||||||
|
*.inc \
|
||||||
|
*.m \
|
||||||
|
*.markdown \
|
||||||
|
*.md \
|
||||||
|
*.mm \
|
||||||
|
*.dox \
|
||||||
|
*.py \
|
||||||
|
*.f90 \
|
||||||
|
*.f \
|
||||||
|
*.for \
|
||||||
|
*.tcl \
|
||||||
|
*.vhd \
|
||||||
|
*.vhdl \
|
||||||
|
*.ucf \
|
||||||
|
*.qsf \
|
||||||
|
*.as \
|
||||||
|
*.js
|
||||||
|
RECURSIVE = YES
|
||||||
|
EXCLUDE_SYMLINKS = NO
|
||||||
|
EXAMPLE_PATTERNS = *
|
||||||
|
EXAMPLE_RECURSIVE = NO
|
||||||
|
FILTER_SOURCE_FILES = NO
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Configuration options related to source browsing
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
SOURCE_BROWSER = NO
|
||||||
|
INLINE_SOURCES = NO
|
||||||
|
STRIP_CODE_COMMENTS = YES
|
||||||
|
REFERENCED_BY_RELATION = NO
|
||||||
|
REFERENCES_RELATION = NO
|
||||||
|
REFERENCES_LINK_SOURCE = YES
|
||||||
|
SOURCE_TOOLTIPS = YES
|
||||||
|
USE_HTAGS = NO
|
||||||
|
VERBATIM_HEADERS = YES
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Configuration options related to the alphabetical class index
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
ALPHABETICAL_INDEX = YES
|
||||||
|
COLS_IN_ALPHA_INDEX = 5
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Configuration options related to the HTML output
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
GENERATE_HTML = YES
|
||||||
|
HTML_OUTPUT = html
|
||||||
|
HTML_FILE_EXTENSION = .html
|
||||||
|
HTML_COLORSTYLE_HUE = 220
|
||||||
|
HTML_COLORSTYLE_SAT = 100
|
||||||
|
HTML_COLORSTYLE_GAMMA = 80
|
||||||
|
HTML_TIMESTAMP = YES
|
||||||
|
HTML_DYNAMIC_SECTIONS = NO
|
||||||
|
HTML_INDEX_NUM_ENTRIES = 100
|
||||||
|
GENERATE_DOCSET = NO
|
||||||
|
DOCSET_FEEDNAME = "Doxygen generated docs"
|
||||||
|
DOCSET_BUNDLE_ID = org.doxygen.Project
|
||||||
|
DOCSET_PUBLISHER_ID = org.doxygen.Publisher
|
||||||
|
DOCSET_PUBLISHER_NAME = Publisher
|
||||||
|
GENERATE_HTMLHELP = NO
|
||||||
|
GENERATE_CHI = NO
|
||||||
|
BINARY_TOC = NO
|
||||||
|
TOC_EXPAND = NO
|
||||||
|
GENERATE_QHP = NO
|
||||||
|
QHP_NAMESPACE = org.doxygen.Project
|
||||||
|
QHP_VIRTUAL_FOLDER = doc
|
||||||
|
GENERATE_ECLIPSEHELP = NO
|
||||||
|
ECLIPSE_DOC_ID = org.doxygen.Project
|
||||||
|
DISABLE_INDEX = NO
|
||||||
|
GENERATE_TREEVIEW = YES
|
||||||
|
ENUM_VALUES_PER_LINE = 4
|
||||||
|
TREEVIEW_WIDTH = 250
|
||||||
|
EXT_LINKS_IN_WINDOW = NO
|
||||||
|
FORMULA_FONTSIZE = 10
|
||||||
|
FORMULA_TRANSPARENT = YES
|
||||||
|
USE_MATHJAX = NO
|
||||||
|
MATHJAX_FORMAT = HTML-CSS
|
||||||
|
MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest
|
||||||
|
SEARCHENGINE = YES
|
||||||
|
SERVER_BASED_SEARCH = NO
|
||||||
|
EXTERNAL_SEARCH = NO
|
||||||
|
SEARCHDATA_FILE = searchdata.xml
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Configuration options related to the preprocessor
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
ENABLE_PREPROCESSING = YES
|
||||||
|
MACRO_EXPANSION = NO
|
||||||
|
EXPAND_ONLY_PREDEF = NO
|
||||||
|
SEARCH_INCLUDES = YES
|
||||||
|
SKIP_FUNCTION_MACROS = YES
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Configuration options related to external references
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
ALLEXTERNALS = NO
|
||||||
|
EXTERNAL_GROUPS = YES
|
||||||
|
EXTERNAL_PAGES = YES
|
||||||
|
PERL_PATH = /usr/bin/perl
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Configuration options related to the dot tool
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
CLASS_DIAGRAMS = YES
|
||||||
|
HIDE_UNDOC_RELATIONS = YES
|
||||||
|
HAVE_DOT = NO
|
||||||
|
DOT_NUM_THREADS = 0
|
||||||
|
DOT_FONTNAME = Helvetica
|
||||||
|
DOT_FONTSIZE = 10
|
||||||
|
CLASS_GRAPH = YES
|
||||||
|
COLLABORATION_GRAPH = YES
|
||||||
|
GROUP_GRAPHS = YES
|
||||||
|
UML_LOOK = NO
|
||||||
|
UML_LIMIT_NUM_FIELDS = 10
|
||||||
|
TEMPLATE_RELATIONS = NO
|
||||||
|
INCLUDE_GRAPH = YES
|
||||||
|
INCLUDED_BY_GRAPH = YES
|
||||||
|
CALL_GRAPH = NO
|
||||||
|
CALLER_GRAPH = NO
|
||||||
|
GRAPHICAL_HIERARCHY = YES
|
||||||
|
DIRECTORY_GRAPH = YES
|
||||||
|
DOT_IMAGE_FORMAT = png
|
||||||
|
INTERACTIVE_SVG = NO
|
||||||
|
DOT_GRAPH_MAX_NODES = 50
|
||||||
|
MAX_DOT_GRAPH_DEPTH = 0
|
||||||
|
DOT_TRANSPARENT = NO
|
||||||
|
DOT_MULTI_TARGETS = NO
|
||||||
|
GENERATE_LEGEND = YES
|
||||||
|
DOT_CLEANUP = YES
|
||||||
@@ -21,4 +21,16 @@ catkin_package(
|
|||||||
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules
|
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules
|
||||||
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/cmake/
|
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/cmake/
|
||||||
# FILES_MATCHING PATTERN "*.cmake"
|
# FILES_MATCHING PATTERN "*.cmake"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
###################
|
||||||
|
## Documentation ##
|
||||||
|
###################
|
||||||
|
|
||||||
|
# We have no documentation, so we create an empty target
|
||||||
|
find_package(Doxygen)
|
||||||
|
if(DOXYGEN_FOUND)
|
||||||
|
add_custom_target(doc)
|
||||||
|
endif(DOXYGEN_FOUND)
|
||||||
|
|
||||||
|
|||||||
@@ -168,3 +168,15 @@ catkin_install_python(PROGRAMS
|
|||||||
|
|
||||||
## Add folders to be run by python nosetests
|
## Add folders to be run by python nosetests
|
||||||
# catkin_add_nosetests(test)
|
# catkin_add_nosetests(test)
|
||||||
|
|
||||||
|
|
||||||
|
###################
|
||||||
|
## Documentation ##
|
||||||
|
###################
|
||||||
|
|
||||||
|
# We have no documentation, so we create an empty target
|
||||||
|
find_package(Doxygen)
|
||||||
|
if(DOXYGEN_FOUND)
|
||||||
|
add_custom_target(doc)
|
||||||
|
endif(DOXYGEN_FOUND)
|
||||||
|
|
||||||
|
|||||||
@@ -168,3 +168,15 @@ install(DIRECTORY launch
|
|||||||
|
|
||||||
## Add folders to be run by python nosetests
|
## Add folders to be run by python nosetests
|
||||||
# catkin_add_nosetests(test)
|
# catkin_add_nosetests(test)
|
||||||
|
|
||||||
|
|
||||||
|
###################
|
||||||
|
## Documentation ##
|
||||||
|
###################
|
||||||
|
|
||||||
|
# We have no documentation, so we create an empty target
|
||||||
|
find_package(Doxygen)
|
||||||
|
if(DOXYGEN_FOUND)
|
||||||
|
add_custom_target(doc)
|
||||||
|
endif(DOXYGEN_FOUND)
|
||||||
|
|
||||||
|
|||||||
@@ -167,3 +167,16 @@ catkin_install_python(PROGRAMS
|
|||||||
|
|
||||||
## Add folders to be run by python nosetests
|
## Add folders to be run by python nosetests
|
||||||
# catkin_add_nosetests(test)
|
# catkin_add_nosetests(test)
|
||||||
|
|
||||||
|
|
||||||
|
###################
|
||||||
|
## Documentation ##
|
||||||
|
###################
|
||||||
|
|
||||||
|
# We have no documentation, so we create an empty target
|
||||||
|
find_package(Doxygen)
|
||||||
|
if(DOXYGEN_FOUND)
|
||||||
|
add_custom_target(doc)
|
||||||
|
endif(DOXYGEN_FOUND)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -160,3 +160,15 @@ include_directories(
|
|||||||
|
|
||||||
## Add folders to be run by python nosetests
|
## Add folders to be run by python nosetests
|
||||||
# catkin_add_nosetests(test)
|
# catkin_add_nosetests(test)
|
||||||
|
|
||||||
|
|
||||||
|
###################
|
||||||
|
## Documentation ##
|
||||||
|
###################
|
||||||
|
|
||||||
|
# We have no documentation, so we create an empty target
|
||||||
|
find_package(Doxygen)
|
||||||
|
if(DOXYGEN_FOUND)
|
||||||
|
add_custom_target(doc)
|
||||||
|
endif(DOXYGEN_FOUND)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user