diff options
author | Jürgen Gehring <juergen.gehring@bmw.de> | 2015-07-28 08:50:57 -0700 |
---|---|---|
committer | Jürgen Gehring <juergen.gehring@bmw.de> | 2015-07-28 08:50:57 -0700 |
commit | 336db577dc057b7a13aeaf8eb2c777a26a7b607a (patch) | |
tree | 014ba65d235fd73364cc9544b5e69bdd09f7301e /CommonAPI-Examples/E05Manager/src | |
parent | 9b91fba4b4008007847f32630cbe160287f291fd (diff) | |
download | genivi-common-api-runtime-3.1.3.tar.gz |
CommonAPI-Tools 3.1.33.1.3
Diffstat (limited to 'CommonAPI-Examples/E05Manager/src')
-rw-r--r-- | CommonAPI-Examples/E05Manager/src/E05ManagerClient.cpp | 4 | ||||
-rw-r--r-- | CommonAPI-Examples/E05Manager/src/E05ManagerService.cpp | 10 |
2 files changed, 8 insertions, 6 deletions
diff --git a/CommonAPI-Examples/E05Manager/src/E05ManagerClient.cpp b/CommonAPI-Examples/E05Manager/src/E05ManagerClient.cpp index 983601c..51c7d57 100644 --- a/CommonAPI-Examples/E05Manager/src/E05ManagerClient.cpp +++ b/CommonAPI-Examples/E05Manager/src/E05ManagerClient.cpp @@ -34,7 +34,9 @@ int main() { const std::string &domain = "local"; const std::string &instance = "commonapi.examples.Manager"; - std::shared_ptr<E05ManagerProxy<>> myProxy = runtime->buildProxy<E05ManagerProxy>(domain, instance); + const std::string connectionIdClient = "client-sample"; + + std::shared_ptr<E05ManagerProxy<>> myProxy = runtime->buildProxy<E05ManagerProxy>(domain, instance, connectionIdClient); while (!myProxy->isAvailable()) { usleep(10); } diff --git a/CommonAPI-Examples/E05Manager/src/E05ManagerService.cpp b/CommonAPI-Examples/E05Manager/src/E05ManagerService.cpp index c32faa0..a1626c3 100644 --- a/CommonAPI-Examples/E05Manager/src/E05ManagerService.cpp +++ b/CommonAPI-Examples/E05Manager/src/E05ManagerService.cpp @@ -16,20 +16,20 @@ using namespace v1_0::commonapi::examples; static unsigned int cnt = 0; // counter for simulating external events const static unsigned int maxDeviceNumber = 3; const static std::string managerInstanceName = "commonapi.examples.Manager"; +const std::string connectionIdService = "service-sample"; int main() { - CommonAPI::Runtime::setProperty("LogContext", "E05S"); - CommonAPI::Runtime::setProperty("LibraryBase", "E05Manager"); - + CommonAPI::Runtime::setProperty("LogContext", "E05S"); + CommonAPI::Runtime::setProperty("LibraryBase", "E05Manager"); std::shared_ptr<CommonAPI::Runtime> runtime = CommonAPI::Runtime::get(); std::shared_ptr<E05ManagerStubImpl> myService = std::make_shared < E05ManagerStubImpl > (managerInstanceName); - bool successfullyRegistered = runtime->registerService("local", managerInstanceName, myService); + bool successfullyRegistered = runtime->registerService("local", managerInstanceName, myService, connectionIdService); 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("local", managerInstanceName, myService); + successfullyRegistered = runtime->registerService("local", managerInstanceName, myService, connectionIdService); } std::cout << "Successfully Registered Service!" << std::endl; |