summaryrefslogtreecommitdiff
path: root/CommonAPI-Examples/E04PhoneBook
diff options
context:
space:
mode:
Diffstat (limited to 'CommonAPI-Examples/E04PhoneBook')
-rw-r--r--CommonAPI-Examples/E04PhoneBook/CMakeLists.txt40
-rw-r--r--CommonAPI-Examples/E04PhoneBook/README85
-rw-r--r--CommonAPI-Examples/E04PhoneBook/fidl/E04PhoneBook-SomeIP.fdepl198
-rw-r--r--CommonAPI-Examples/E04PhoneBook/fidl/E04PhoneBook.fidl162
-rw-r--r--CommonAPI-Examples/E04PhoneBook/src/E04PhoneBookClient.cpp8
-rw-r--r--CommonAPI-Examples/E04PhoneBook/src/E04PhoneBookService.cpp14
-rw-r--r--CommonAPI-Examples/E04PhoneBook/src/E04PhoneBookStubImpl.cpp6
-rw-r--r--CommonAPI-Examples/E04PhoneBook/src/E04PhoneBookStubImpl.h6
-rw-r--r--CommonAPI-Examples/E04PhoneBook/vsomeip-client.json56
-rw-r--r--CommonAPI-Examples/E04PhoneBook/vsomeip-local.json110
-rw-r--r--CommonAPI-Examples/E04PhoneBook/vsomeip-service.json98
11 files changed, 408 insertions, 375 deletions
diff --git a/CommonAPI-Examples/E04PhoneBook/CMakeLists.txt b/CommonAPI-Examples/E04PhoneBook/CMakeLists.txt
index 78758de..750dec7 100644
--- a/CommonAPI-Examples/E04PhoneBook/CMakeLists.txt
+++ b/CommonAPI-Examples/E04PhoneBook/CMakeLists.txt
@@ -31,11 +31,11 @@ OPTION(USE_INSTALLED_COMMONAPI "Set to OFF to use the local (build tree) version
message(STATUS "USE_INSTALLED_COMMONAPI is set to value: ${USE_INSTALLED_COMMONAPI}")
if ("${USE_INSTALLED_COMMONAPI}" STREQUAL "ON")
- FIND_PACKAGE(CommonAPI 3.1.3 REQUIRED CONFIG NO_CMAKE_PACKAGE_REGISTRY)
- FIND_PACKAGE(CommonAPI-DBus 3.1.3 REQUIRED CONFIG NO_CMAKE_PACKAGE_REGISTRY)
+ FIND_PACKAGE(CommonAPI 3.1.4 REQUIRED CONFIG NO_CMAKE_PACKAGE_REGISTRY)
+ FIND_PACKAGE(CommonAPI-DBus 3.1.4 REQUIRED CONFIG NO_CMAKE_PACKAGE_REGISTRY)
else()
- FIND_PACKAGE(CommonAPI 3.1.3 REQUIRED CONFIG NO_SYSTEM_ENVIRONMENT_PATH NO_CMAKE_SYSTEM_PATH)
- FIND_PACKAGE(CommonAPI-DBus 3.1.3 REQUIRED CONFIG NO_SYSTEM_ENVIRONMENT_PATH NO_CMAKE_SYSTEM_PATH)
+ FIND_PACKAGE(CommonAPI 3.1.4 REQUIRED CONFIG NO_SYSTEM_ENVIRONMENT_PATH NO_CMAKE_SYSTEM_PATH)
+ FIND_PACKAGE(CommonAPI-DBus 3.1.4 REQUIRED CONFIG NO_SYSTEM_ENVIRONMENT_PATH NO_CMAKE_SYSTEM_PATH)
endif()
message(STATUS "CommonAPI_CONSIDERED_CONFIGS: ${CommonAPI_CONSIDERED_CONFIGS}")
@@ -48,23 +48,23 @@ include(FindPkgConfig)
###############################################################################
# find DBus by using the 'pkg-config' tool
if (MSVC)
- #Not beautiful, but it works
- if (DBus_DIR)
- if (DBus_BUILD_DIR)
- set(DBus_INCLUDE_DIRS "${DBus_DIR};${DBus_BUILD_DIR};")
- else ()
- message (FATAL_ERROR "DBus_BUILD_DIR not set! Cannot continue.")
- endif ()
- else()
- message (FATAL_ERROR "DBus_DIR not set! Cannot continue.")
- endif ()
+ #Not beautiful, but it works
+ if (DBus_DIR)
+ if (DBus_BUILD_DIR)
+ set(DBus_INCLUDE_DIRS "${DBus_DIR};${DBus_BUILD_DIR};")
+ else ()
+ message (FATAL_ERROR "DBus_BUILD_DIR not set! Cannot continue.")
+ endif ()
+ else()
+ message (FATAL_ERROR "DBus_DIR not set! Cannot continue.")
+ endif ()
else()
- pkg_check_modules(DBus REQUIRED dbus-1>=1.4)
+ pkg_check_modules(DBus REQUIRED dbus-1>=1.4)
endif()
# SOME/IP
-find_package (CommonAPI-SomeIP 3.1.3 REQUIRED)
-find_package (vsomeip 1.3.0 REQUIRED)
+find_package (CommonAPI-SomeIP 3.1.4 REQUIRED)
+find_package (vsomeip 2.0.0 REQUIRED)
# Source Files
set(PRJ_SRC_PATH src)
@@ -100,7 +100,7 @@ message(STATUS "USE_INSTALLED_DBUS is set to value: ${USE_INSTALLED_DBUS}")
include_directories(
src-gen/core
- src-gen/dbus
+ src-gen/dbus
src-gen/someip
${COMMONAPI_INCLUDE_DIRS}
${COMMONAPI_DBUS_INCLUDE_DIRS}
@@ -114,7 +114,7 @@ link_directories(
${COMMONAPI_LIBDIR}
${COMMONAPI_DBUS_LIBDIR}
${COMMONAPI_SOMEIP_CMAKE_DIR}/build
- ${Boost_LIBRARY_DIR}
+ ${Boost_LIBRARY_DIR}
)
else()
link_directories(
@@ -122,7 +122,7 @@ link_directories(
${COMMONAPI_DBUS_LIBDIR}
${COMMONAPI_SOMEIP_CMAKE_DIR}/build
${DBus_INCLUDE_DIRS}/dbus/.libs
- ${Boost_LIBRARY_DIR}
+ ${Boost_LIBRARY_DIR}
)
endif()
diff --git a/CommonAPI-Examples/E04PhoneBook/README b/CommonAPI-Examples/E04PhoneBook/README
index 431351a..497af83 100644
--- a/CommonAPI-Examples/E04PhoneBook/README
+++ b/CommonAPI-Examples/E04PhoneBook/README
@@ -169,50 +169,83 @@ On client side we create two proxies which shall set different filters and get d
[source,{cppstr}]
----
int main() {
+ CommonAPI::Runtime::setProperty("LogContext", "E04C");
+ CommonAPI::Runtime::setProperty("LibraryBase", "E04PhoneBook");
+
std::shared_ptr<CommonAPI::Runtime> runtime = CommonAPI::Runtime::get();
const std::string &domain = "local";
const std::string &instance = "commonapi.examples.PhoneBook";
+ const std::string &connection = "client-sample";
- std::shared_ptr < E04PhoneBookProxyDefault > myProxyA =
- runtime->buildProxy < E04PhoneBookProxy > (domain, instance);
-
- while (!myProxyA->isAvailable()) { usleep(10); }
+ std::shared_ptr < E04PhoneBookProxy<> > myProxyA = runtime->buildProxy < E04PhoneBookProxy > (domain, instance, connection);
+ while (!myProxyA->isAvailable()) {
+ usleep(10);
+ }
+ std::cout << "Service for Proxy A is available!" << std::endl;
- const CommonAPI::ConnectionId_t otherConnectionId = "42";
+ const CommonAPI::ConnectionId_t otherConnection = "other-client-sample";
+ std::shared_ptr < E04PhoneBookProxy<> > myProxyB = runtime->buildProxy < E04PhoneBookProxy > (domain, instance, otherConnection);
+ while (!myProxyB->isAvailable()) {
+ usleep(10);
+ }
+ std::cout << "Service for Proxy B is available!" << std::endl;
- std::shared_ptr < E04PhoneBookProxyDefault > myProxyB =
- runtime->buildProxy < E04PhoneBookProxy > (domain, instance, otherConnectionId);
-
- while (!myProxyB->isAvailable()) { usleep(10); }
+ // Subscribe A to broadcast
+ myProxyA->getPhoneBookDataSetSelectiveEvent().subscribe(
+ [&](const std::vector<E04PhoneBook::phoneBookDataElementMap>& phoneBookDataSet) {
+ std::cout << "-- A --" << std::endl;
+ printFilterResult(phoneBookDataSet, "A");
+ std::cout << "-------" << std::endl;
+ });
- myProxyA->getPhoneBookDataSetSelectiveEvent().subscribe([&](
- const std::vector<E04PhoneBook::phoneBookDataElementMap>& phoneBookDataSet) {
- printFilterResult(phoneBookDataSet, "A");});
+ std::cout << "Subscribed A" << std::endl;
- myProxyB->getPhoneBookDataSetSelectiveEvent().subscribe([&](
- const std::vector<E04PhoneBook::phoneBookDataElementMap>& phoneBookDataSet) {
- printFilterResult(phoneBookDataSet, "B");});
+ // Subscribe B to broadcast
+ myProxyB->getPhoneBookDataSetSelectiveEvent().subscribe(
+ [&](const std::vector<E04PhoneBook::phoneBookDataElementMap>& phoneBookDataSet) {
+ std::cout << "-- B --" << std::endl;
+ printFilterResult(phoneBookDataSet, "B");
+ std::cout << "-------" << std::endl;
+ });
+ std::cout << "Subscribed B" << std::endl;
+
+ // Get actual phoneBook from service
CommonAPI::CallStatus myCallStatus;
std::vector<E04PhoneBook::phoneBookStruct> myValue;
myProxyA->getPhoneBookAttribute().getValue(myCallStatus, myValue);
- printPhoneBook (myValue);
+ if (myCallStatus != CommonAPI::CallStatus::SUCCESS)
+ std::cerr << "Remote call getPhoneBookAttribute failed!\n";
+ else
+ printPhoneBook (myValue);
+
+ // Synchronous call setPhoneBookDataFilter
+ std::cout << "Call setPhoneBookDataFilter A ..." << std::endl;
+ E04PhoneBook::elementFilterStruct lElementFilterA = {true, true, false, false, false, false};
+ std::vector<E04PhoneBook::contentFilterStruct> lContentFilterA = { {E04PhoneBook::phoneBookDataElementEnum::NAME, "*"}};
- E04PhoneBook::elementFilterStruct lElementFilterA =
- {true, true, false, false, false, false};
- std::vector<E04PhoneBook::contentFilterStruct> lContentFilterA =
- { {E04PhoneBook::phoneBookDataElementEnum::NAME, "*"}};
myProxyA->setPhoneBookDataFilter(lElementFilterA, lContentFilterA, myCallStatus);
+ if (myCallStatus != CommonAPI::CallStatus::SUCCESS)
+ std::cerr << "Remote call setPhoneBookDataFilter A failed: " << (int) myCallStatus << std::endl;
+ else
+ std::cout << "Remote call setPhoneBookDataFilter A succeeded." << std::endl;
- E04PhoneBook::elementFilterStruct lElementFilterB =
- {true, false, false, false, false, true};
- std::vector<E04PhoneBook::contentFilterStruct> lContentFilterB =
- { {E04PhoneBook::phoneBookDataElementEnum::NAME, "*"}};
- myProxyB->setPhoneBookDataFilter(lElementFilterB, lContentFilterB, myCallStatus);
+ std::cout << "Call setPhoneBookDataFilter B ..." << std::endl;
+ E04PhoneBook::elementFilterStruct lElementFilterB = {true, false, false, false, false, true};
+ std::vector<E04PhoneBook::contentFilterStruct> lContentFilterB = { {E04PhoneBook::phoneBookDataElementEnum::NAME, "*"}};
- while (true) { std::this_thread::sleep_for(std::chrono::seconds(5)); }
+ myProxyB->setPhoneBookDataFilter(lElementFilterB, lContentFilterB, myCallStatus);
+ if (myCallStatus != CommonAPI::CallStatus::SUCCESS)
+ std::cerr << "Remote call setPhoneBookDataFilter B failed: " << (int) myCallStatus << std::endl;
+ else
+ std::cout << "Remote call setPhoneBookDataFilter B succeeded." << std::endl;
+
+ while (true) {
+ std::cout << "Now I am going to sleep for 5 seconds..." << std::endl;
+ std::this_thread::sleep_for(std::chrono::seconds(5));
+ }
return 0;
}
----
diff --git a/CommonAPI-Examples/E04PhoneBook/fidl/E04PhoneBook-SomeIP.fdepl b/CommonAPI-Examples/E04PhoneBook/fidl/E04PhoneBook-SomeIP.fdepl
index 1ca64c2..472b585 100644
--- a/CommonAPI-Examples/E04PhoneBook/fidl/E04PhoneBook-SomeIP.fdepl
+++ b/CommonAPI-Examples/E04PhoneBook/fidl/E04PhoneBook-SomeIP.fdepl
@@ -7,110 +7,110 @@ import "platform:/plugin/org.genivi.commonapi.someip/deployment/CommonAPI-SOMEIP
import "E04PhoneBook.fidl"
define org.genivi.commonapi.someip.deployment for interface commonapi.examples.E04PhoneBook {
- SomeIpServiceID = 4660
- SomeIpEventGroups = { 7000, 7001 }
-
- attribute phoneBook {
- SomeIpGetterID = 33000
- SomeIpSetterID = 33001
- SomeIpNotifierID = 8000
- SomeIpEventGroups = { 7000 }
- }
-
- method setPhoneBookDataFilter {
- SomeIpMethodID = 33002
- }
-
- broadcast phoneBookDataSet {
- SomeIpEventID = 8001
- SomeIpEventGroups = { 7001 }
- }
-
- enumeration phoneNumberEnum {
- WORK {
- }
- HOME {
- }
- MOBILE1 {
- }
- MOBILE2 {
- }
- }
-
- struct phoneBookStruct {
- name {
- }
- forename {
- }
- organisation {
- }
- address {
- }
- email {
- }
- phoneNumber {
- }
- }
-
- struct elementFilterStruct {
- addName {
- }
- addForename {
- }
- addOrganisation {
- }
- addAddress {
- }
- addEmail {
- }
- addPhoneNumber {
- }
- }
-
- struct contentFilterStruct {
- element {
- }
- expression {
- }
- }
-
- enumeration phoneBookDataElementEnum {
- NAME {
- }
- FORENAME {
- }
- ORGANISATION {
- }
- ADDRESS {
- }
- EMAIL {
- }
- PHONENUMBER {
- }
- }
-
- struct phoneBookDataElement {
- }
-
- struct phoneBookDataElementString {
- content {
- }
- }
-
- struct phoneBookDataElementPhoneNumber {
- content {
- }
- }
+ SomeIpServiceID = 4660
+ SomeIpEventGroups = { 7000, 7001 }
+
+ attribute phoneBook {
+ SomeIpGetterID = 33000
+ SomeIpSetterID = 33001
+ SomeIpNotifierID = 8000
+ SomeIpEventGroups = { 7000 }
+ }
+
+ method setPhoneBookDataFilter {
+ SomeIpMethodID = 33002
+ }
+
+ broadcast phoneBookDataSet {
+ SomeIpEventID = 8001
+ SomeIpEventGroups = { 7001 }
+ }
+
+ enumeration phoneNumberEnum {
+ WORK {
+ }
+ HOME {
+ }
+ MOBILE1 {
+ }
+ MOBILE2 {
+ }
+ }
+
+ struct phoneBookStruct {
+ name {
+ }
+ forename {
+ }
+ organisation {
+ }
+ address {
+ }
+ email {
+ }
+ phoneNumber {
+ }
+ }
+
+ struct elementFilterStruct {
+ addName {
+ }
+ addForename {
+ }
+ addOrganisation {
+ }
+ addAddress {
+ }
+ addEmail {
+ }
+ addPhoneNumber {
+ }
+ }
+
+ struct contentFilterStruct {
+ element {
+ }
+ expression {
+ }
+ }
+
+ enumeration phoneBookDataElementEnum {
+ NAME {
+ }
+ FORENAME {
+ }
+ ORGANISATION {
+ }
+ ADDRESS {
+ }
+ EMAIL {
+ }
+ PHONENUMBER {
+ }
+ }
+
+ struct phoneBookDataElement {
+ }
+
+ struct phoneBookDataElementString {
+ content {
+ }
+ }
+
+ struct phoneBookDataElementPhoneNumber {
+ content {
+ }
+ }
}
define org.genivi.commonapi.someip.deployment for provider Service {
- instance commonapi.examples.E04PhoneBook {
- InstanceId = "commonapi.examples.PhoneBook"
+ instance commonapi.examples.E04PhoneBook {
+ InstanceId = "commonapi.examples.PhoneBook"
- SomeIpInstanceID = 22136
-
- SomeIpUnicastAddress = "192.168.0.2"
+ SomeIpInstanceID = 22136
+
+ SomeIpUnicastAddress = "192.168.0.2"
SomeIpReliableUnicastPort = 30491
SomeIpUnreliableUnicastPort = 30492
}
diff --git a/CommonAPI-Examples/E04PhoneBook/fidl/E04PhoneBook.fidl b/CommonAPI-Examples/E04PhoneBook/fidl/E04PhoneBook.fidl
index c22fd77..06c57d0 100644
--- a/CommonAPI-Examples/E04PhoneBook/fidl/E04PhoneBook.fidl
+++ b/CommonAPI-Examples/E04PhoneBook/fidl/E04PhoneBook.fidl
@@ -8,85 +8,85 @@
package commonapi.examples
interface E04PhoneBook {
- version { major 0 minor 0 }
-
- <** @description : the phone book itself **>
- attribute phoneBookStruct [] phoneBook readonly
-
- <** @description : filter operations **>
- method setPhoneBookDataFilter {
- in {
- elementFilterStruct elementFilter
- contentFilterStruct [] contentFilter
- }
- }
-
- <** @description : filter result **>
- broadcast phoneBookDataSet selective {
- out {
- phoneBookDataElementMap [] phoneBookDataSet
- }
- }
-
- <** @description : Data types of the phone book itself **>
- enumeration phoneNumberEnum {
- WORK
- HOME
- MOBILE1
- MOBILE2
- }
-
- map phoneNumberMap {
- phoneNumberEnum to String
- }
-
- struct phoneBookStruct {
- String name
- String forename
- String organisation
- String address
- String email
- phoneNumberMap phoneNumber
- }
-
- <** @description : Data types for the filter operations **>
-
- struct elementFilterStruct {
- Boolean addName
- Boolean addForename
- Boolean addOrganisation
- Boolean addAddress
- Boolean addEmail
- Boolean addPhoneNumber
- }
-
- struct contentFilterStruct {
- phoneBookDataElementEnum element
- String expression
- }
-
- <** @description : Data types for the result of the phone book filter **>
- enumeration phoneBookDataElementEnum {
- NAME
- FORENAME
- ORGANISATION
- ADDRESS
- EMAIL
- PHONENUMBER
- }
-
- struct phoneBookDataElement polymorphic {
- }
-
- struct phoneBookDataElementString extends phoneBookDataElement {
- String content
- }
-
- struct phoneBookDataElementPhoneNumber extends phoneBookDataElement {
- phoneNumberMap content
- }
-
- map phoneBookDataElementMap {
- phoneBookDataElementEnum to phoneBookDataElement
- }
+ version { major 0 minor 0 }
+
+ <** @description : the phone book itself **>
+ attribute phoneBookStruct [] phoneBook readonly
+
+ <** @description : filter operations **>
+ method setPhoneBookDataFilter {
+ in {
+ elementFilterStruct elementFilter
+ contentFilterStruct [] contentFilter
+ }
+ }
+
+ <** @description : filter result **>
+ broadcast phoneBookDataSet selective {
+ out {
+ phoneBookDataElementMap [] phoneBookDataSet
+ }
+ }
+
+ <** @description : Data types of the phone book itself **>
+ enumeration phoneNumberEnum {
+ WORK
+ HOME
+ MOBILE1
+ MOBILE2
+ }
+
+ map phoneNumberMap {
+ phoneNumberEnum to String
+ }
+
+ struct phoneBookStruct {
+ String name
+ String forename
+ String organisation
+ String address
+ String email
+ phoneNumberMap phoneNumber
+ }
+
+ <** @description : Data types for the filter operations **>
+
+ struct elementFilterStruct {
+ Boolean addName
+ Boolean addForename
+ Boolean addOrganisation
+ Boolean addAddress
+ Boolean addEmail
+ Boolean addPhoneNumber
+ }
+
+ struct contentFilterStruct {
+ phoneBookDataElementEnum element
+ String expression
+ }
+
+ <** @description : Data types for the result of the phone book filter **>
+ enumeration phoneBookDataElementEnum {
+ NAME
+ FORENAME
+ ORGANISATION
+ ADDRESS
+ EMAIL
+ PHONENUMBER
+ }
+
+ struct phoneBookDataElement polymorphic {
+ }
+
+ struct phoneBookDataElementString extends phoneBookDataElement {
+ String content
+ }
+
+ struct phoneBookDataElementPhoneNumber extends phoneBookDataElement {
+ phoneNumberMap content
+ }
+
+ map phoneBookDataElementMap {
+ phoneBookDataElementEnum to phoneBookDataElement
+ }
} \ No newline at end of file
diff --git a/CommonAPI-Examples/E04PhoneBook/src/E04PhoneBookClient.cpp b/CommonAPI-Examples/E04PhoneBook/src/E04PhoneBookClient.cpp
index 7db3313..0a56ee5 100644
--- a/CommonAPI-Examples/E04PhoneBook/src/E04PhoneBookClient.cpp
+++ b/CommonAPI-Examples/E04PhoneBook/src/E04PhoneBookClient.cpp
@@ -191,9 +191,9 @@ int main() {
if (myCallStatus != CommonAPI::CallStatus::SUCCESS)
std::cerr << "Remote call setPhoneBookDataFilter A failed: " << (int) myCallStatus << std::endl;
else
- std::cout << "Remote call setPhoneBookDataFilter A succeeded." << std::endl;
+ std::cout << "Remote call setPhoneBookDataFilter A succeeded." << std::endl;
- std::cout << "Call setPhoneBookDataFilter B ..." << std::endl;
+ std::cout << "Call setPhoneBookDataFilter B ..." << std::endl;
E04PhoneBook::elementFilterStruct lElementFilterB = {true, false, false, false, false, true};
std::vector<E04PhoneBook::contentFilterStruct> lContentFilterB = { {E04PhoneBook::phoneBookDataElementEnum::NAME, "*"}};
@@ -201,10 +201,10 @@ int main() {
if (myCallStatus != CommonAPI::CallStatus::SUCCESS)
std::cerr << "Remote call setPhoneBookDataFilter B failed: " << (int) myCallStatus << std::endl;
else
- std::cout << "Remote call setPhoneBookDataFilter B succeeded." << std::endl;
+ std::cout << "Remote call setPhoneBookDataFilter B succeeded." << std::endl;
while (true) {
- std::cout << "Now I am going to sleep for 5 seconds..." << std::endl;
+ std::cout << "Now I am going to sleep for 5 seconds..." << std::endl;
std::this_thread::sleep_for(std::chrono::seconds(5));
}
return 0;
diff --git a/CommonAPI-Examples/E04PhoneBook/src/E04PhoneBookService.cpp b/CommonAPI-Examples/E04PhoneBook/src/E04PhoneBookService.cpp
index 020209b..7decc7c 100644
--- a/CommonAPI-Examples/E04PhoneBook/src/E04PhoneBookService.cpp
+++ b/CommonAPI-Examples/E04PhoneBook/src/E04PhoneBookService.cpp
@@ -24,15 +24,15 @@ int main() {
std::shared_ptr<E04PhoneBookStubImpl> myService = std::make_shared<E04PhoneBookStubImpl>();
myService->setPhoneBookAttribute(myService->createTestPhoneBook());
- bool successfullyRegistered = runtime->registerService(domain, instance, myService, connection);
+ bool successfullyRegistered = runtime->registerService(domain, instance, myService, connection);
- while (!successfullyRegistered) {
- std::cout << "Register Service failed, trying again in 100 milliseconds..." << std::endl;
- std::this_thread::sleep_for(std::chrono::milliseconds(100));
- successfullyRegistered = runtime->registerService(domain, instance, myService);
- }
+ while (!successfullyRegistered) {
+ std::cout << "Register Service failed, trying again in 100 milliseconds..." << std::endl;
+ std::this_thread::sleep_for(std::chrono::milliseconds(100));
+ successfullyRegistered = runtime->registerService(domain, instance, myService);
+ }
- std::cout << "Successfully Registered Service!" << std::endl;
+ std::cout << "Successfully Registered Service!" << std::endl;
while (true) {
std::cout << "Waiting for calls... (Abort with CTRL+C)" << std::endl;
diff --git a/CommonAPI-Examples/E04PhoneBook/src/E04PhoneBookStubImpl.cpp b/CommonAPI-Examples/E04PhoneBook/src/E04PhoneBookStubImpl.cpp
index bfd06bb..f4f11f3 100644
--- a/CommonAPI-Examples/E04PhoneBook/src/E04PhoneBookStubImpl.cpp
+++ b/CommonAPI-Examples/E04PhoneBook/src/E04PhoneBookStubImpl.cpp
@@ -40,9 +40,9 @@ void E04PhoneBookStubImpl::onPhoneBookDataSetSelectiveSubscriptionChanged(const
}
void E04PhoneBookStubImpl::setPhoneBookDataFilter(const std::shared_ptr<CommonAPI::ClientId> _client,
- E04PhoneBook::elementFilterStruct _elementFilter,
- std::vector<E04PhoneBook::contentFilterStruct> _contentFilter,
- setPhoneBookDataFilterReply_t _reply) {
+ E04PhoneBook::elementFilterStruct _elementFilter,
+ std::vector<E04PhoneBook::contentFilterStruct> _contentFilter,
+ setPhoneBookDataFilterReply_t _reply) {
std::shared_ptr < CommonAPI::ClientIdList > clientList = getSubscribersForPhoneBookDataSetSelective();
std::cout << "setPhoneBookDataFilter called from client " << _client->hashCode() << " of ("
<< clientList->size() << ")" << std::endl;
diff --git a/CommonAPI-Examples/E04PhoneBook/src/E04PhoneBookStubImpl.h b/CommonAPI-Examples/E04PhoneBook/src/E04PhoneBookStubImpl.h
index 38fce08..a7259aa 100644
--- a/CommonAPI-Examples/E04PhoneBook/src/E04PhoneBookStubImpl.h
+++ b/CommonAPI-Examples/E04PhoneBook/src/E04PhoneBookStubImpl.h
@@ -26,9 +26,9 @@ public:
const CommonAPI::SelectiveBroadcastSubscriptionEvent);
void setPhoneBookDataFilter(const std::shared_ptr<CommonAPI::ClientId> _client,
- E04PhoneBook::elementFilterStruct _elementFilter,
- std::vector<E04PhoneBook::contentFilterStruct> _contentFilter,
- setPhoneBookDataFilterReply_t _reply);
+ E04PhoneBook::elementFilterStruct _elementFilter,
+ std::vector<E04PhoneBook::contentFilterStruct> _contentFilter,
+ setPhoneBookDataFilterReply_t _reply);
private:
std::unordered_map<std::shared_ptr<CommonAPI::ClientId>, std::vector<E04PhoneBook::phoneBookDataElementMap>> phoneBookClientData;
diff --git a/CommonAPI-Examples/E04PhoneBook/vsomeip-client.json b/CommonAPI-Examples/E04PhoneBook/vsomeip-client.json
index f3f9cd8..6ad0351 100644
--- a/CommonAPI-Examples/E04PhoneBook/vsomeip-client.json
+++ b/CommonAPI-Examples/E04PhoneBook/vsomeip-client.json
@@ -1,30 +1,30 @@
{
- "unicast" : "10.10.46.59",
- "netmask" : "255.255.255.0",
- "logging" :
- {
- "level" : "debug",
- "console" : "true",
- "file" : { "enable" : "true", "path" : "/var/log/vsomeip.log" },
- "dlt" : "true"
- },
- "applications" :
- [
- {
- "name" : "client-sample",
- "id" : "0x1343"
- },
- {
- "name" : "other-client-sample",
- "id" : "0x1344"
- }
- ],
- "routing" : "client-sample",
- "service-discovery" :
- {
- "enable" : "true",
- "multicast" : "224.244.224.245",
- "port" : "30490",
- "protocol" : "udp"
- }
+ "unicast" : "10.10.46.59",
+ "netmask" : "255.255.255.0",
+ "logging" :
+ {
+ "level" : "debug",
+ "console" : "true",
+ "file" : { "enable" : "true", "path" : "/var/log/vsomeip.log" },
+ "dlt" : "true"
+ },
+ "applications" :
+ [
+ {
+ "name" : "client-sample",
+ "id" : "0x1343"
+ },
+ {
+ "name" : "other-client-sample",
+ "id" : "0x1344"
+ }
+ ],
+ "routing" : "client-sample",
+ "service-discovery" :
+ {
+ "enable" : "true",
+ "multicast" : "224.244.224.245",
+ "port" : "30490",
+ "protocol" : "udp"
+ }
}
diff --git a/CommonAPI-Examples/E04PhoneBook/vsomeip-local.json b/CommonAPI-Examples/E04PhoneBook/vsomeip-local.json
index d03051d..f7a08d2 100644
--- a/CommonAPI-Examples/E04PhoneBook/vsomeip-local.json
+++ b/CommonAPI-Examples/E04PhoneBook/vsomeip-local.json
@@ -1,47 +1,47 @@
{
- "unicast" : "192.168.56.101",
- "logging" :
- {
- "level" : "debug",
- "console" : "true",
- "file" : { "enable" : "false", "path" : "/var/log/vsomeip.log" },
- "dlt" : "false"
- },
- "applications" :
- [
- {
- "name" : "client-sample",
- "id" : "0x1343"
- },
- {
- "name" : "other-client-sample",
- "id" : "0x1482"
- },
- {
- "name" : "service-sample",
- "id" : "0x1277"
- }
- ],
- "servicegroups" :
- [
- {
- "name" : "default",
- "delays" :
- {
- "initial" : { "minimum" : "10", "maximum" : "100" },
- "repetition-base" : "200",
- "repetition-max" : "3",
- "cyclic-offer" : "2000",
- "cyclic-request" : "2001"
- },
- "services" :
- [
- {
- "service" : "0x1234",
- "instance" : "0x5678",
- "reliable" : { "port" : "30509", "enable-magic-cookies" : "false" },
- "unreliable" : "31000",
- "events" :
+ "unicast" : "192.168.56.101",
+ "logging" :
+ {
+ "level" : "debug",
+ "console" : "true",
+ "file" : { "enable" : "false", "path" : "/var/log/vsomeip.log" },
+ "dlt" : "false"
+ },
+ "applications" :
+ [
+ {
+ "name" : "client-sample",
+ "id" : "0x1343"
+ },
+ {
+ "name" : "other-client-sample",
+ "id" : "0x1482"
+ },
+ {
+ "name" : "service-sample",
+ "id" : "0x1277"
+ }
+ ],
+ "servicegroups" :
+ [
+ {
+ "name" : "default",
+ "delays" :
+ {
+ "initial" : { "minimum" : "10", "maximum" : "100" },
+ "repetition-base" : "200",
+ "repetition-max" : "3",
+ "cyclic-offer" : "2000",
+ "cyclic-request" : "2001"
+ },
+ "services" :
+ [
+ {
+ "service" : "0x1234",
+ "instance" : "0x5678",
+ "reliable" : { "port" : "30509", "enable-magic-cookies" : "false" },
+ "unreliable" : "31000",
+ "events" :
[
{
"event" : "0x1F40",
@@ -65,16 +65,16 @@
"events" : [ "0x1F41" ]
}
]
- }
- ]
- }
- ],
- "routing" : "client-sample",
- "service-discovery" :
- {
- "enable" : "true",
- "multicast" : "224.244.224.245",
- "port" : "30490",
- "protocol" : "udp"
- }
+ }
+ ]
+ }
+ ],
+ "routing" : "client-sample",
+ "service-discovery" :
+ {
+ "enable" : "true",
+ "multicast" : "224.244.224.245",
+ "port" : "30490",
+ "protocol" : "udp"
+ }
}
diff --git a/CommonAPI-Examples/E04PhoneBook/vsomeip-service.json b/CommonAPI-Examples/E04PhoneBook/vsomeip-service.json
index 3d05bb9..2cb2ef1 100644
--- a/CommonAPI-Examples/E04PhoneBook/vsomeip-service.json
+++ b/CommonAPI-Examples/E04PhoneBook/vsomeip-service.json
@@ -1,50 +1,50 @@
{
- "unicast" : "10.10.46.59",
- "logging" :
- {
- "level" : "debug",
- "console" : "true",
- "file" : { "enable" : "false", "path" : "/var/log/vsomeip.log" },
- "dlt" : "false"
- },
- "applications" :
- [
- {
- "name" : "service-sample",
- "id" : "0x1277"
- }
- ],
- "servicegroups" :
- [
- {
- "name" : "default",
- "delays" :
- {
- "initial" : { "minimum" : "10", "maximum" : "100" },
- "repetition-base" : "200",
- "repetition-max" : "3",
- "cyclic-offer" : "2000",
- "cyclic-request" : "2001"
- },
- "services" :
- [
- {
- "service" : "0x1234",
- "instance" : "0x5678",
- "reliable" : { "port" : "30509", "enable-magic-cookies" : "false" },
- "unreliable" : "31000",
- "events" :
+ "unicast" : "10.10.46.59",
+ "logging" :
+ {
+ "level" : "debug",
+ "console" : "true",
+ "file" : { "enable" : "false", "path" : "/var/log/vsomeip.log" },
+ "dlt" : "false"
+ },
+ "applications" :
+ [
+ {
+ "name" : "service-sample",
+ "id" : "0x1277"
+ }
+ ],
+ "servicegroups" :
+ [
+ {
+ "name" : "default",
+ "delays" :
+ {
+ "initial" : { "minimum" : "10", "maximum" : "100" },
+ "repetition-base" : "200",
+ "repetition-max" : "3",
+ "cyclic-offer" : "2000",
+ "cyclic-request" : "2001"
+ },
+ "services" :
+ [
+ {
+ "service" : "0x1234",
+ "instance" : "0x5678",
+ "reliable" : { "port" : "30509", "enable-magic-cookies" : "false" },
+ "unreliable" : "31000",
+ "events" :
[
{
"event" : "0x1F40",
"is_field" : "true",
- "is_reliable" : "true",
+ "is_reliable" : "true",
"update-cycle" : "0"
},
{
"event" : "0x1F41",
"is_field" : "false",
- "is_reliable" : "true",
+ "is_reliable" : "true",
"update-cycle" : "0"
}
],
@@ -59,16 +59,16 @@
"events" : [ "0x1F41" ]
}
]
- }
- ]
- }
- ],
- "routing" : "service-sample",
- "service-discovery" :
- {
- "enable" : "true",
- "multicast" : "224.244.224.245",
- "port" : "30490",
- "protocol" : "udp"
- }
+ }
+ ]
+ }
+ ],
+ "routing" : "service-sample",
+ "service-discovery" :
+ {
+ "enable" : "true",
+ "multicast" : "224.244.224.245",
+ "port" : "30490",
+ "protocol" : "udp"
+ }
}