Commit c372ee4e authored by Shervin Nourbakhsh's avatar Shervin Nourbakhsh
Browse files

Merge commit 'bdd78ad8' into master2

parents 4d2e70c1 bdd78ad8
BasedOnStyle: LLVM BasedOnStyle: LLVM
IndentWidth: 8 IndentWidth: 8
UseTab: ForIndentation #UseTab: UT_AlignWithSpaces # available in release later than 9
BreakBeforeBraces: Linux UseTab: ForContinuationAndIndentation
BreakBeforeBraces: Custom
BraceWrapping:
AfterNamespace: false
AllowShortIfStatementsOnASingleLine: false AllowShortIfStatementsOnASingleLine: false
IndentCaseLabels: false IndentCaseLabels: false
ColumnLimit: 110 ColumnLimit: 110
AlignConsecutiveAssignments: true AlignConsecutiveAssignments: true
AlignConsecutiveDeclarations: true AlignConsecutiveDeclarations: false
AccessModifierOffset: 0 AlignTrailingComments: true
NamespaceIndentation: Inner AccessModifierOffset: -8 # It has to be equal to the tab size
\ No newline at end of file NamespaceIndentation: None
PointerAlignment: Left
AlwaysBreakAfterReturnType: None
SortIncludes: false
...@@ -5,6 +5,9 @@ if(NOT DEFINED PROJECT_NAME) ...@@ -5,6 +5,9 @@ if(NOT DEFINED PROJECT_NAME)
project(cameo VERSION 1.0.1 LANGUAGES CXX) project(cameo VERSION 1.0.1 LANGUAGES CXX)
endif() endif()
message("========================================")
message("Project ${PROJECT_NAME}, major version: ${PROJECT_VERSION_MAJOR}, version ${PROJECT_VERSION}")
include(GNUInstallDirs) include(GNUInstallDirs)
include(CMakePackageConfigHelpers) include(CMakePackageConfigHelpers)
...@@ -50,14 +53,14 @@ target_include_directories(cameo ...@@ -50,14 +53,14 @@ target_include_directories(cameo
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
PUBLIC $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}> PUBLIC $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
) )
#target_include_directories(cameo PRIVATE ${DOCTEST_INCLUDE_DIR})
#target_compile_features(cameo PUBLIC cxx_std_11)
set_target_properties(cameo PROPERTIES set_target_properties(cameo PROPERTIES
SOVERSION ${PROJECT_VERSION_MAJOR} SOVERSION ${PROJECT_VERSION_MAJOR}
VERSION ${PROJECT_VERSION} VERSION ${PROJECT_VERSION}
) )
message(${PROJECT_VERSION_MAJOR})
message(${PROJECT_VERSION})
#--------------- #---------------
# Library version # Library version
write_basic_package_version_file(cameoConfigVersion.cmake write_basic_package_version_file(cameoConfigVersion.cmake
...@@ -119,6 +122,24 @@ export(TARGETS cameo FILE ${CMAKE_BINARY_DIR}/${PROJECT_NAME}Config.cmake) ...@@ -119,6 +122,24 @@ export(TARGETS cameo FILE ${CMAKE_BINARY_DIR}/${PROJECT_NAME}Config.cmake)
#enable_testing() #enable_testing()
#add_subdirectory(test) #add_subdirectory(test)
# include(ExternalProject)
# find_package(Git REQUIRED)
# ExternalProject_Add(
# doctest
# PREFIX ${CMAKE_BINARY_DIR}/doctest
# GIT_REPOSITORY https://github.com/onqtam/doctest.git
# TIMEOUT 10
# UPDATE_COMMAND ${GIT_EXECUTABLE} pull
# CONFIGURE_COMMAND ""
# BUILD_COMMAND ""
# INSTALL_COMMAND ""
# LOG_DOWNLOAD ON
# )
# # Expose required variable (DOCTEST_INCLUDE_DIR) to parent scope
# ExternalProject_Get_Property(doctest source_dir)
# set(DOCTEST_INCLUDE_DIR ${source_dir}/doctest CACHE INTERNAL "Path to include folder for doctest")
#include(CMakeFindDependencyMacro) #include(CMakeFindDependencyMacro)
#find_dependency( #find_dependency(
......
...@@ -346,13 +346,13 @@ LOOKUP_CACHE_SIZE = 0 ...@@ -346,13 +346,13 @@ LOOKUP_CACHE_SIZE = 0
# normally produced when WARNINGS is set to YES. # normally produced when WARNINGS is set to YES.
# The default value is: NO. # The default value is: NO.
EXTRACT_ALL = NO EXTRACT_ALL = YES
# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will # If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will
# be included in the documentation. # be included in the documentation.
# The default value is: NO. # The default value is: NO.
EXTRACT_PRIVATE = NO EXTRACT_PRIVATE = YES
# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal # If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal
# scope will be included in the documentation. # scope will be included in the documentation.
...@@ -1795,7 +1795,7 @@ DIA_PATH = ...@@ -1795,7 +1795,7 @@ DIA_PATH =
# and usage relations if the target is undocumented or is not a class. # and usage relations if the target is undocumented or is not a class.
# The default value is: YES. # The default value is: YES.
HIDE_UNDOC_RELATIONS = YES HIDE_UNDOC_RELATIONS = NO
# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is # If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
# available from the path. This tool is part of Graphviz (see: # available from the path. This tool is part of Graphviz (see:
...@@ -1870,7 +1870,7 @@ GROUP_GRAPHS = YES ...@@ -1870,7 +1870,7 @@ GROUP_GRAPHS = YES
# The default value is: NO. # The default value is: NO.
# This tag requires that the tag HAVE_DOT is set to YES. # This tag requires that the tag HAVE_DOT is set to YES.
UML_LOOK = NO UML_LOOK = YES
# If the UML_LOOK tag is enabled, the fields and methods are shown inside the # If the UML_LOOK tag is enabled, the fields and methods are shown inside the
# class node. If there are many fields or methods and many nodes the graph may # class node. If there are many fields or methods and many nodes the graph may
...@@ -1978,7 +1978,7 @@ DOT_IMAGE_FORMAT = png ...@@ -1978,7 +1978,7 @@ DOT_IMAGE_FORMAT = png
# The default value is: NO. # The default value is: NO.
# This tag requires that the tag HAVE_DOT is set to YES. # This tag requires that the tag HAVE_DOT is set to YES.
INTERACTIVE_SVG = NO INTERACTIVE_SVG = YES
# The DOT_PATH tag can be used to specify the path where the dot tool can be # The DOT_PATH tag can be used to specify the path where the dot tool can be
# found. If left blank, it is assumed the dot tool can be found in the path. # found. If left blank, it is assumed the dot tool can be found in the path.
......
## Dependencies ## Dependencies
- cmake 3.7.2
- cppzmq
- rapidjson
- doxygen (optional)
### CENTOS 8 ### CENTOS 8
List of packages: List of packages:
...@@ -9,7 +13,7 @@ List of packages: ...@@ -9,7 +13,7 @@ List of packages:
- rapidjson-devel - rapidjson-devel
``` ```
pkgs="zeromq-devel rapidjson-devel" pkgs="cmake zeromq-devel rapidjson-devel"
yum install -y $pkgs yum install -y $pkgs
``` ```
...@@ -30,16 +34,3 @@ cmake .. ...@@ -30,16 +34,3 @@ cmake ..
cmake --build . cmake --build .
``` ```
# To Do
- [ ] remove zmq deprecated methods
```
/opt/panosc/cameo/src/impl/SubscriberImpl.cpp:210:36: warning: ‘bool zmq::detail::socket_base::recv(zmq::message_t*, int)’ is deprecated: from 4.3.1, use recv taking a reference to message_t and recv_flags [-Wdeprecated-declarations]
m_subscriber->recv(message.get());
^
In file included from /opt/panosc/cameo/src/impl/SocketWaitingImpl.h:23,
from /opt/panosc/cameo/src/impl/SubscriberImpl.h:20,
from /opt/panosc/cameo/src/impl/SubscriberImpl.cpp:17:
/usr/include/zmq.hpp:1267:10: note: declared here
bool recv(message_t *msg_, int flags_ = 0)
^~~~
```
...@@ -83,7 +83,12 @@ const State SUCCESS = 64; ...@@ -83,7 +83,12 @@ const State SUCCESS = 64;
const State STOPPED = 128; const State STOPPED = 128;
const State KILLED = 256; const State KILLED = 256;
/** \class This
* \brief class managing the current CAMEO application.
*
* \details The application has to be launched by CAMEO command line or another CAMEO app
* \todo why this does not inherit from the Instance class?
*/
class This : private Services, private EventListener { class This : private Services, private EventListener {
friend class cameo::application::Publisher; friend class cameo::application::Publisher;
...@@ -135,11 +140,11 @@ public: ...@@ -135,11 +140,11 @@ public:
*/ */
static void terminate(); static void terminate();
static const std::string& getName(); static const std::string& getName(); ///< returns the name of the CAMEO application corresponding to this instance
static int getId(); static int getId(); ///< returns the ID number of the instance
static void setTimeout(int timeout); static void setTimeout(int timeout);
static int getTimeout(); static int getTimeout();
static const Endpoint& getEndpoint(); static const Endpoint& getEndpoint(); ///< returns the TCP address of this instance
static Server& getServer(); static Server& getServer();
static const Com& getCom(); static const Com& getCom();
...@@ -160,7 +165,7 @@ public: ...@@ -160,7 +165,7 @@ public:
static void cancelWaitings(); static void cancelWaitings();
static bool setRunning(); static bool setRunning(); ///< sets the current instance in RUNNING state
/** /**
* Sets the result. * Sets the result.
...@@ -252,7 +257,7 @@ public: ...@@ -252,7 +257,7 @@ public:
State waitFor(const std::string& eventName); State waitFor(const std::string& eventName);
State waitFor(KeyValue& keyValue); State waitFor(KeyValue& keyValue);
void cancelWaitFor(); void cancelWaitFor(); // to unblock another instance
/** /**
* Deprecated. * Deprecated.
...@@ -472,17 +477,22 @@ class Responder { ...@@ -472,17 +477,22 @@ class Responder {
public: public:
~Responder(); ~Responder();
/** /** \brief Returns the responder with name.
* Returns the responder with name.
* throws ResponderCreationException. * throws ResponderCreationException.
*/ */
static std::unique_ptr<Responder> create(const std::string& name); static std::unique_ptr<Responder> create(const std::string& name);
/// Returns the name of the responder
const std::string& getName() const; const std::string& getName() const;
void cancel(); void cancel();
/** \brief Receive a request
* blocking command
*/
std::unique_ptr<Request> receive(); std::unique_ptr<Request> receive();
/** check if it has been canceled */
bool isCanceled() const; bool isCanceled() const;
private: private:
...@@ -618,3 +628,4 @@ std::ostream& operator<<(std::ostream&, const cameo::application::Port&); ...@@ -618,3 +628,4 @@ std::ostream& operator<<(std::ostream&, const cameo::application::Port&);
#endif #endif
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment