summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/hello_world/Android.bp40
-rw-r--r--examples/hello_world/hello_world_client.cpp3
-rw-r--r--examples/hello_world/hello_world_service.cpp3
-rw-r--r--examples/hello_world/readme11
-rw-r--r--examples/hello_world/readme_android11
-rw-r--r--examples/response-sample.cpp2
-rw-r--r--examples/routingmanagerd/routingmanagerd.cpp2
7 files changed, 70 insertions, 2 deletions
diff --git a/examples/hello_world/Android.bp b/examples/hello_world/Android.bp
new file mode 100644
index 0000000..7622f0c
--- /dev/null
+++ b/examples/hello_world/Android.bp
@@ -0,0 +1,40 @@
+cc_defaults {
+ name: "vsomeip_hello_world_defaults",
+ vendor: true,
+
+ cppflags: [
+ "-std=c++11",
+ "-Wno-unused-parameter",
+ ],
+
+ shared_libs: [
+ "libvsomeip",
+ "libvsomeip_cfg",
+ "libvsomeip_e2e",
+ "libvsomeip_sd",
+ ],
+}
+
+cc_binary {
+ name: "vsomeip_hello_world_service",
+ defaults: ["vsomeip_hello_world_defaults"],
+
+ srcs: [
+ "hello_world_service.cpp",
+ ],
+}
+
+cc_binary {
+ name: "vsomeip_hello_world_client",
+ defaults: ["vsomeip_hello_world_defaults"],
+
+ srcs: [
+ "hello_world_client.cpp",
+ ],
+}
+
+prebuilt_etc {
+ name: "helloworld-local.json",
+ sub_dir: "vsomeip",
+ src: "helloworld-local.json",
+}
diff --git a/examples/hello_world/hello_world_client.cpp b/examples/hello_world/hello_world_client.cpp
index 37bd0d9..03de7d5 100644
--- a/examples/hello_world/hello_world_client.cpp
+++ b/examples/hello_world/hello_world_client.cpp
@@ -146,6 +146,9 @@ hello_world_client *hw_cl_ptr(nullptr);
int main(int argc, char **argv)
{
+ (void)argc;
+ (void)argv;
+
hello_world_client hw_cl;
#ifndef VSOMEIP_ENABLE_SIGNAL_HANDLING
hw_cl_ptr = &hw_cl;
diff --git a/examples/hello_world/hello_world_service.cpp b/examples/hello_world/hello_world_service.cpp
index ce07721..3968581 100644
--- a/examples/hello_world/hello_world_service.cpp
+++ b/examples/hello_world/hello_world_service.cpp
@@ -140,6 +140,9 @@ hello_world_service *hw_srv_ptr(nullptr);
int main(int argc, char **argv)
{
+ (void)argc;
+ (void)argv;
+
hello_world_service hw_srv;
#ifndef VSOMEIP_ENABLE_SIGNAL_HANDLING
hw_srv_ptr = &hw_srv;
diff --git a/examples/hello_world/readme b/examples/hello_world/readme
index 3e1dc62..1cb9d8f 100644
--- a/examples/hello_world/readme
+++ b/examples/hello_world/readme
@@ -6,10 +6,21 @@
Build instructions for Hello World example
------------------------------------------
+1. Build whole project at first:
+________________________________
+cd <root directory of vSomeIP-Lib>$:
+
mkdir build
cd build
cmake ..
make
+sudo make install
+
+2. Build hello_world target
+___________________________
+cmake --build . --target hello_world
+cd ./examples/hello_world/
+make
Running Hello World Example
---------------------------
diff --git a/examples/hello_world/readme_android b/examples/hello_world/readme_android
new file mode 100644
index 0000000..2eced5b
--- /dev/null
+++ b/examples/hello_world/readme_android
@@ -0,0 +1,11 @@
+To start service and client:
+
+Shell1:
+VSOMEIP_CONFIGURATION=/etc/vsomeip/helloworld-local.json \
+VSOMEIP_APPLICATION_NAME=hello_world_service \
+vsomeip_hello_world_service
+
+Shell2:
+VSOMEIP_CONFIGURATION=/etc/vsomeip/helloworld-local.json \
+VSOMEIP_APPLICATION_NAME=hello_world_client \
+vsomeip_hello_world_client \ No newline at end of file
diff --git a/examples/response-sample.cpp b/examples/response-sample.cpp
index 064388e..68112d2 100644
--- a/examples/response-sample.cpp
+++ b/examples/response-sample.cpp
@@ -19,7 +19,7 @@
class service_sample {
public:
service_sample(bool _use_static_routing) :
- app_(vsomeip::runtime::get()->create_application("response-sample")),
+ app_(vsomeip::runtime::get()->create_application()),
is_registered_(false),
use_static_routing_(_use_static_routing),
blocked_(false),
diff --git a/examples/routingmanagerd/routingmanagerd.cpp b/examples/routingmanagerd/routingmanagerd.cpp
index 53b4fc1..ff0a280 100644
--- a/examples/routingmanagerd/routingmanagerd.cpp
+++ b/examples/routingmanagerd/routingmanagerd.cpp
@@ -17,7 +17,7 @@
#ifdef USE_DLT
#include <dlt/dlt.h>
-#include "../../implementation/logging/include/defines.hpp"
+
#endif
static std::shared_ptr<vsomeip::application> its_application;