summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJürgen Gehring <Juergen.Gehring@bmw.de>2015-10-16 06:35:29 -0700
committerJürgen Gehring <Juergen.Gehring@bmw.de>2015-10-16 06:35:29 -0700
commit40d4759f262a86bcebaf3a91d9d813f4d6a3ae10 (patch)
treed4dd7ca58da851698a89b548b8f2f8004f6bc379
parentb5822f03d50146d30c6f3256a560a2f7632a43ba (diff)
downloadvSomeIP-40d4759f262a86bcebaf3a91d9d813f4d6a3ae10.tar.gz
vSomeIP 1.3.0p21.3.0p2
-rw-r--r--CMakeLists.txt5
-rw-r--r--examples/vsomeipd.cpp18
2 files changed, 22 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index fd8a193..07c91e4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -127,6 +127,9 @@ target_link_libraries(subscribe-sample vsomeip ${Boost_LIBRARIES} ${DL_LIBRARY})
add_executable(notify-sample examples/notify-sample.cpp ${EXAMPLE_CONFIG_FILES})
target_link_libraries(notify-sample vsomeip ${Boost_LIBRARIES} ${DL_LIBRARY})
+add_executable(vsomeipd examples/vsomeipd.cpp ${EXAMPLE_CONFIG_FILES})
+target_link_libraries(vsomeipd vsomeip ${Boost_LIBRARIES} ${DL_LIBRARY})
+
###################################################################################################
file (GLOB_RECURSE vsomeip_INCLUDE "interface/*.hpp")
@@ -149,7 +152,7 @@ install (
)
install (
- TARGETS request-sample response-sample subscribe-sample notify-sample
+ TARGETS request-sample response-sample subscribe-sample notify-sample vsomeipd
RUNTIME DESTINATION "${INSTALL_BIN_DIR}" COMPONENT bin
)
diff --git a/examples/vsomeipd.cpp b/examples/vsomeipd.cpp
new file mode 100644
index 0000000..6d2ede7
--- /dev/null
+++ b/examples/vsomeipd.cpp
@@ -0,0 +1,18 @@
+// Copyright (C) 2014-2015 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
+// This Source Code Form is subject to the terms of the Mozilla Public
+// License, v. 2.0. If a copy of the MPL was not distributed with this
+// file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+// Example(!) for the most simple daemon application
+
+#include <vsomeip/vsomeip.hpp>
+
+int main(int argc, char **argv) {
+ std::shared_ptr<vsomeip::application> its_daemon
+ = vsomeip::runtime::get()->create_application("vsomeipd");
+
+ if (its_daemon->init())
+ its_daemon->start();
+
+ return 0;
+}