diff options
author | Aleksandar Kanchev <kanchev@itestra.com> | 2013-03-14 11:43:13 +0100 |
---|---|---|
committer | Aleksandar Kanchev <kanchev@itestra.com> | 2013-03-14 11:43:13 +0100 |
commit | 809b42e0503cb1e866616ce6e2d497c01896b587 (patch) | |
tree | c3c3a2feaa6965f0afb0879f768e144575f3892f | |
parent | ea24a98697839057c1fc5478c1b50320f6c741e5 (diff) | |
download | genivi-common-api-runtime-809b42e0503cb1e866616ce6e2d497c01896b587.tar.gz |
rename CommonAPI-Echo to CommonAPI-Ping
-rw-r--r-- | CommonAPI-Echo/Makefile.am | 68 | ||||
-rw-r--r-- | CommonAPI-Ping/.gitignore (renamed from CommonAPI-Echo/.gitignore) | 0 | ||||
-rw-r--r-- | CommonAPI-Ping/LICENSE (renamed from CommonAPI-Echo/LICENSE) | 0 | ||||
-rw-r--r-- | CommonAPI-Ping/Makefile.am | 68 | ||||
-rw-r--r-- | CommonAPI-Ping/configure.ac (renamed from CommonAPI-Echo/configure.ac) | 4 | ||||
-rw-r--r-- | CommonAPI-Ping/m4/ax_cxx_compile_stdcxx_11.m4 (renamed from CommonAPI-Echo/m4/ax_cxx_compile_stdcxx_11.m4) | 0 | ||||
-rw-r--r-- | CommonAPI-Ping/src/Benchmark.cpp (renamed from CommonAPI-Echo/src/Benchmark.cpp) | 62 | ||||
-rw-r--r-- | CommonAPI-Ping/src/Benchmark.h (renamed from CommonAPI-Echo/src/Benchmark.h) | 18 | ||||
-rw-r--r-- | CommonAPI-Ping/src/BenchmarkStats.cpp (renamed from CommonAPI-Echo/src/BenchmarkStats.cpp) | 0 | ||||
-rw-r--r-- | CommonAPI-Ping/src/BenchmarkStats.h (renamed from CommonAPI-Echo/src/BenchmarkStats.h) | 0 | ||||
-rw-r--r-- | CommonAPI-Ping/src/Ping.fidl (renamed from CommonAPI-Echo/src/Echo.fidl) | 2 | ||||
-rw-r--r-- | CommonAPI-Ping/src/PingClient.cpp (renamed from CommonAPI-Echo/src/EchoClient.cpp) | 2 | ||||
-rw-r--r-- | CommonAPI-Ping/src/PingService.cpp (renamed from CommonAPI-Echo/src/EchoService.cpp) | 14 |
13 files changed, 119 insertions, 119 deletions
diff --git a/CommonAPI-Echo/Makefile.am b/CommonAPI-Echo/Makefile.am deleted file mode 100644 index 243cc5c..0000000 --- a/CommonAPI-Echo/Makefile.am +++ /dev/null @@ -1,68 +0,0 @@ -ACLOCAL_AMFLAGS = -I m4 -EXTRA_DIST = LICENSE - -# ------------------------------------------------------------------------------ -MAINTAINERCLEANFILES = \ - Makefile.in \ - aclocal.m4 \ - configure - -maintainer-clean-local: - -rm -rf build-aux - -rm -f config.h.in* - -rm -f m4/libtool*.m4 - -rm -f m4/lt*.m4 - -rm -rf src-gen - -AM_CPPFLAGS = \ - ${COMMONAPI_DBUS_CFLAGS} \ - -I$(top_srcdir)/src-gen \ - -D_GNU_SOURCE \ - -D_GLIBCXX_USE_NANOSLEEP - -AM_LDFLAGS = ${COMMONAPI_DBUS_LIBS} - -# ------------------------------------------------------------------------------ -lib_LTLIBRARIES = \ - libcommonapi-tests-Echo.la \ - libcommonapi-tests-EchoProxy.la \ - libcommonapi-tests-EchoStubDefault.la - -libcommonapi_tests_Echo_la_SOURCES = \ - src-gen/CommonAPI/tests/Echo.h \ - src-gen/CommonAPI/tests/Echo.cpp - -libcommonapi_tests_EchoProxy_la_SOURCES = \ - src-gen/CommonAPI/tests/EchoProxyBase.h \ - src-gen/CommonAPI/tests/EchoProxy.h \ - src-gen/CommonAPI/tests/EchoDBusProxy.h \ - src-gen/CommonAPI/tests/EchoDBusProxy.cpp -libcommonapi_tests_EchoProxy_la_LIBADD = \ - libcommonapi-tests-Echo.la - -libcommonapi_tests_EchoStubDefault_la_SOURCES = \ - src-gen/CommonAPI/tests/EchoStub.h \ - src-gen/CommonAPI/tests/EchoStubDefault.h \ - src-gen/CommonAPI/tests/EchoStubDefault.cpp \ - src-gen/CommonAPI/tests/EchoDBusStubAdapter.h \ - src-gen/CommonAPI/tests/EchoDBusStubAdapter.cpp -libcommonapi_tests_EchoStubDefault_la_LIBADD = \ - libcommonapi-tests-Echo.la - -# ------------------------------------------------------------------------------ -bin_PROGRAMS = \ - EchoClient \ - EchoService - -EchoClient_SOURCES = \ - src/BenchmarkStats.h \ - src/BenchmarkStats.cpp \ - src/Benchmark.h \ - src/Benchmark.cpp \ - src/EchoClient.cpp -EchoClient_LDADD = libcommonapi-tests-EchoProxy.la - -EchoService_SOURCES = \ - src/EchoService.cpp -EchoService_LDADD = \ - libcommonapi-tests-EchoStubDefault.la
\ No newline at end of file diff --git a/CommonAPI-Echo/.gitignore b/CommonAPI-Ping/.gitignore index db0b55e..db0b55e 100644 --- a/CommonAPI-Echo/.gitignore +++ b/CommonAPI-Ping/.gitignore diff --git a/CommonAPI-Echo/LICENSE b/CommonAPI-Ping/LICENSE index 14e2f77..14e2f77 100644 --- a/CommonAPI-Echo/LICENSE +++ b/CommonAPI-Ping/LICENSE diff --git a/CommonAPI-Ping/Makefile.am b/CommonAPI-Ping/Makefile.am new file mode 100644 index 0000000..8757ffc --- /dev/null +++ b/CommonAPI-Ping/Makefile.am @@ -0,0 +1,68 @@ +ACLOCAL_AMFLAGS = -I m4 +EXTRA_DIST = LICENSE + +# ------------------------------------------------------------------------------ +MAINTAINERCLEANFILES = \ + Makefile.in \ + aclocal.m4 \ + configure + +maintainer-clean-local: + -rm -rf build-aux + -rm -f config.h.in* + -rm -f m4/libtool*.m4 + -rm -f m4/lt*.m4 + -rm -rf src-gen + +AM_CPPFLAGS = \ + ${COMMONAPI_DBUS_CFLAGS} \ + -I$(top_srcdir)/src-gen \ + -D_GNU_SOURCE \ + -D_GLIBCXX_USE_NANOSLEEP + +AM_LDFLAGS = ${COMMONAPI_DBUS_LIBS} + +# ------------------------------------------------------------------------------ +lib_LTLIBRARIES = \ + libcommonapi-tests-Ping.la \ + libcommonapi-tests-PingProxy.la \ + libcommonapi-tests-PingStubDefault.la + +libcommonapi_tests_Ping_la_SOURCES = \ + src-gen/CommonAPI/tests/Ping.h \ + src-gen/CommonAPI/tests/Ping.cpp + +libcommonapi_tests_PingProxy_la_SOURCES = \ + src-gen/CommonAPI/tests/PingProxyBase.h \ + src-gen/CommonAPI/tests/PingProxy.h \ + src-gen/CommonAPI/tests/PingDBusProxy.h \ + src-gen/CommonAPI/tests/PingDBusProxy.cpp +libcommonapi_tests_PingProxy_la_LIBADD = \ + libcommonapi-tests-Ping.la + +libcommonapi_tests_PingStubDefault_la_SOURCES = \ + src-gen/CommonAPI/tests/PingStub.h \ + src-gen/CommonAPI/tests/PingStubDefault.h \ + src-gen/CommonAPI/tests/PingStubDefault.cpp \ + src-gen/CommonAPI/tests/PingDBusStubAdapter.h \ + src-gen/CommonAPI/tests/PingDBusStubAdapter.cpp +libcommonapi_tests_PingStubDefault_la_LIBADD = \ + libcommonapi-tests-Ping.la + +# ------------------------------------------------------------------------------ +bin_PROGRAMS = \ + PingClient \ + PingService + +PingClient_SOURCES = \ + src/BenchmarkStats.h \ + src/BenchmarkStats.cpp \ + src/Benchmark.h \ + src/Benchmark.cpp \ + src/PingClient.cpp +PingClient_LDADD = libcommonapi-tests-PingProxy.la + +PingService_SOURCES = \ + src/PingService.cpp +PingService_LDADD = \ + libcommonapi-tests-PingStubDefault.la
\ No newline at end of file diff --git a/CommonAPI-Echo/configure.ac b/CommonAPI-Ping/configure.ac index 888f7ae..f0b4158 100644 --- a/CommonAPI-Echo/configure.ac +++ b/CommonAPI-Ping/configure.ac @@ -1,8 +1,8 @@ AC_PREREQ(2.61) -AC_INIT([GENIVI Common API Echo Tool], +AC_INIT([GENIVI Common API Ping Tool], [1.0], [], - [CommonAPI-Echo]) + [CommonAPI-Ping]) AC_CONFIG_MACRO_DIR([m4]) m4_ifdef([AM_PROG_AR], [AM_PROG_AR]) diff --git a/CommonAPI-Echo/m4/ax_cxx_compile_stdcxx_11.m4 b/CommonAPI-Ping/m4/ax_cxx_compile_stdcxx_11.m4 index 0d96c07..0d96c07 100644 --- a/CommonAPI-Echo/m4/ax_cxx_compile_stdcxx_11.m4 +++ b/CommonAPI-Ping/m4/ax_cxx_compile_stdcxx_11.m4 diff --git a/CommonAPI-Echo/src/Benchmark.cpp b/CommonAPI-Ping/src/Benchmark.cpp index f121fda..a6c6563 100644 --- a/CommonAPI-Echo/src/Benchmark.cpp +++ b/CommonAPI-Ping/src/Benchmark.cpp @@ -10,7 +10,7 @@ #include <functional> -static const std::string serviceAddress = "local:comommonapi.tests.EchoService:commonapi.tests.Echo"; +static const std::string serviceAddress = "local:comommonapi.tests.PingService:commonapi.tests.Ping"; namespace CommonAPI { @@ -22,7 +22,7 @@ Benchmark::Benchmark(SendType sendType, unsigned long sendCount, unsigned long a arraySize_(arraySize), verbose_(verbose), async_(async), - benchmarkStats_("GENIVI_ECHO", sendCount_, verbose_), + benchmarkStats_("GENIVI_PING", sendCount_, verbose_), getEmptyResponseAsyncCallback_(std::bind(&Benchmark::emptyAsyncSendBenchmarkCallback, this, std::placeholders::_1)), getTestDataCopyAsyncCallback_(std::bind(&Benchmark::copyAsyncSendBenchmarkCallback, this, std::placeholders::_1, std::placeholders::_2)), getTestDataArrayCopyAsyncCallback_(std::bind(&Benchmark::copiesAsyncSendBenchmarkCallback, this, std::placeholders::_1, std::placeholders::_2)) { @@ -31,15 +31,15 @@ Benchmark::Benchmark(SendType sendType, unsigned long sendCount, unsigned long a bool Benchmark::run() { std::shared_ptr<CommonAPI::Factory> factory = CommonAPI::Runtime::load()->createFactory(); - echoProxy_ = factory->buildProxy<CommonAPI::tests::EchoProxy>(serviceAddress); + pingProxy_ = factory->buildProxy<CommonAPI::tests::PingProxy>(serviceAddress); - std::cout << "Waiting for EchoService: " << serviceAddress << std::endl; - for (int i = 0; !echoProxy_->isAvailable() && i < 10; i++) { + std::cout << "Waiting for PingService: " << serviceAddress << std::endl; + for (int i = 0; !pingProxy_->isAvailable() && i < 10; i++) { std::this_thread::sleep_for(std::chrono::milliseconds(500)); } - if (!echoProxy_->isAvailable()) { - std::cerr << "EchoService is not available: timed out waiting!\n"; + if (!pingProxy_->isAvailable()) { + std::cerr << "PingService is not available: timed out waiting!\n"; return false; } @@ -75,33 +75,33 @@ bool Benchmark::run() { benchmarkStats_.stop(); - echoProxy_.reset(); + pingProxy_.reset(); return result == CommonAPI::CallStatus::SUCCESS; } -CommonAPI::tests::Echo::TestData Benchmark::createTestData() { +CommonAPI::tests::Ping::TestData Benchmark::createTestData() { if (verbose_) { std::cout << "Creating TestData struct...\n"; } benchmarkStats_.startCreation(); - Echo::TestData testData(1, 12.6, 1e40, "XXXXXXXXXXXXXXXXXXXX"); + Ping::TestData testData(1, 12.6, 1e40, "XXXXXXXXXXXXXXXXXXXX"); benchmarkStats_.stopCreation(); return testData; } -CommonAPI::tests::Echo::TestDataArray Benchmark::createTestDataArray() { +CommonAPI::tests::Ping::TestDataArray Benchmark::createTestDataArray() { if (verbose_) { std::cout << "Creating TestDataArray of size=" << arraySize_ << "...\n"; } benchmarkStats_.startCreation(); - CommonAPI::tests::Echo::TestDataArray testDataArray; + CommonAPI::tests::Ping::TestDataArray testDataArray; for (unsigned long i = 0; i < arraySize_; i++) testDataArray.emplace_back(1, 12.6, 1e40, "XXXXXXXXXXXXXXXXXXXX"); @@ -116,7 +116,7 @@ CommonAPI::CallStatus Benchmark::doEmptySendBenchmark() { for (unsigned long i = 0; i < sendCount_; i++) { benchmarkStats_.startTransport(); - echoProxy_->getEmptyResponse(callStatus); + pingProxy_->getEmptyResponse(callStatus); if (callStatus != CallStatus::SUCCESS) { break; @@ -131,12 +131,12 @@ CommonAPI::CallStatus Benchmark::doEmptySendBenchmark() { CommonAPI::CallStatus Benchmark::doCopySendBenchmark() { CallStatus callStatus; - Echo::TestData testData = createTestData(); - Echo::TestData testDataReply; + Ping::TestData testData = createTestData(); + Ping::TestData testDataReply; for (unsigned long i = 0; i < sendCount_; i++) { benchmarkStats_.startTransport(); - echoProxy_->getTestDataCopy(testData, callStatus, testDataReply); + pingProxy_->getTestDataCopy(testData, callStatus, testDataReply); if (callStatus != CallStatus::SUCCESS) { break; @@ -156,12 +156,12 @@ CommonAPI::CallStatus Benchmark::doCopySendBenchmark() { CommonAPI::CallStatus Benchmark::doCopiesSendBenchmark() { CallStatus callStatus; - Echo::TestDataArray testDataArray = createTestDataArray(); - Echo::TestDataArray testDataArrayReply; + Ping::TestDataArray testDataArray = createTestDataArray(); + Ping::TestDataArray testDataArrayReply; for (unsigned long i = 0; i < sendCount_; i++) { benchmarkStats_.startTransport(); - echoProxy_->getTestDataArrayCopy(testDataArray, callStatus, testDataArrayReply); + pingProxy_->getTestDataArrayCopy(testDataArray, callStatus, testDataArrayReply); if (callStatus != CallStatus::SUCCESS) { break; @@ -180,7 +180,7 @@ CommonAPI::CallStatus Benchmark::doCopiesSendBenchmark() { CommonAPI::CallStatus Benchmark::doEmptyAsyncSendBenchmark() { benchmarkStats_.startTransport(); - echoProxy_->getEmptyResponseAsync(getEmptyResponseAsyncCallback_); + pingProxy_->getEmptyResponseAsync(getEmptyResponseAsyncCallback_); auto asyncFuture = asyncPromise_.get_future(); const CommonAPI::CallStatus& callStatus = asyncFuture.get(); @@ -194,17 +194,17 @@ void Benchmark::emptyAsyncSendBenchmarkCallback(const CommonAPI::CallStatus& cal if (callStatus == CallStatus::SUCCESS && benchmarkStats_.getSendCount() < sendCount_) { benchmarkStats_.startTransport(); - echoProxy_->getEmptyResponseAsync(getEmptyResponseAsyncCallback_); + pingProxy_->getEmptyResponseAsync(getEmptyResponseAsyncCallback_); } else { asyncPromise_.set_value(callStatus); } } CommonAPI::CallStatus Benchmark::doCopyAsyncSendBenchmark() { - Echo::TestData testData = createTestData(); + Ping::TestData testData = createTestData(); benchmarkStats_.startTransport(); - echoProxy_->getTestDataCopyAsync(testData, getTestDataCopyAsyncCallback_); + pingProxy_->getTestDataCopyAsync(testData, getTestDataCopyAsyncCallback_); auto asyncFuture = asyncPromise_.get_future(); const CommonAPI::CallStatus& callStatus = asyncFuture.get(); @@ -212,27 +212,27 @@ CommonAPI::CallStatus Benchmark::doCopyAsyncSendBenchmark() { return callStatus; } -void Benchmark::copyAsyncSendBenchmarkCallback(const CommonAPI::CallStatus& callStatus, const Echo::TestData& testDataReply) { +void Benchmark::copyAsyncSendBenchmarkCallback(const CommonAPI::CallStatus& callStatus, const Ping::TestData& testDataReply) { benchmarkStats_.stopTransport(); benchmarkStats_.addSendReplyDelta(); benchmarkStats_.startCreation(); - Echo::TestData testData = testDataReply; + Ping::TestData testData = testDataReply; benchmarkStats_.stopCreation(); if (callStatus == CallStatus::SUCCESS && benchmarkStats_.getSendCount() < sendCount_) { benchmarkStats_.startTransport(); - echoProxy_->getTestDataCopyAsync(testData, getTestDataCopyAsyncCallback_); + pingProxy_->getTestDataCopyAsync(testData, getTestDataCopyAsyncCallback_); } else { asyncPromise_.set_value(callStatus); } } CommonAPI::CallStatus Benchmark::doCopiesAsyncSendBenchmark() { - Echo::TestDataArray testDataArray = createTestDataArray(); + Ping::TestDataArray testDataArray = createTestDataArray(); benchmarkStats_.startTransport(); - echoProxy_->getTestDataArrayCopyAsync(testDataArray, getTestDataArrayCopyAsyncCallback_); + pingProxy_->getTestDataArrayCopyAsync(testDataArray, getTestDataArrayCopyAsyncCallback_); auto asyncFuture = asyncPromise_.get_future(); const CommonAPI::CallStatus& callStatus = asyncFuture.get(); @@ -240,17 +240,17 @@ CommonAPI::CallStatus Benchmark::doCopiesAsyncSendBenchmark() { return callStatus; } -void Benchmark::copiesAsyncSendBenchmarkCallback(const CommonAPI::CallStatus& callStatus, const Echo::TestDataArray& testDataArrayReply) { +void Benchmark::copiesAsyncSendBenchmarkCallback(const CommonAPI::CallStatus& callStatus, const Ping::TestDataArray& testDataArrayReply) { benchmarkStats_.stopTransport(); benchmarkStats_.addSendReplyDelta(); benchmarkStats_.startCreation(); - Echo::TestDataArray testDataArray = testDataArrayReply; + Ping::TestDataArray testDataArray = testDataArrayReply; benchmarkStats_.stopCreation(); if (callStatus == CallStatus::SUCCESS && benchmarkStats_.getSendCount() < sendCount_) { benchmarkStats_.startTransport(); - echoProxy_->getTestDataArrayCopyAsync(testDataArray, getTestDataArrayCopyAsyncCallback_); + pingProxy_->getTestDataArrayCopyAsync(testDataArray, getTestDataArrayCopyAsyncCallback_); } else { asyncPromise_.set_value(callStatus); } diff --git a/CommonAPI-Echo/src/Benchmark.h b/CommonAPI-Ping/src/Benchmark.h index 7616673..0ed8b08 100644 --- a/CommonAPI-Echo/src/Benchmark.h +++ b/CommonAPI-Ping/src/Benchmark.h @@ -7,7 +7,7 @@ #ifndef COMMONAPI_TESTS_BENCHMARKING_STATS_H_ #define COMMONAPI_TESTS_BENCHMARKING_STATS_H_ -#include <CommonAPI/tests/EchoProxy.h> +#include <CommonAPI/tests/PingProxy.h> #include "BenchmarkStats.h" @@ -30,8 +30,8 @@ class Benchmark { bool run(); private: - Echo::TestData createTestData(); - Echo::TestDataArray createTestDataArray(); + Ping::TestData createTestData(); + Ping::TestDataArray createTestDataArray(); CommonAPI::CallStatus doEmptySendBenchmark(); CommonAPI::CallStatus doCopySendBenchmark(); @@ -41,10 +41,10 @@ class Benchmark { void emptyAsyncSendBenchmarkCallback(const CommonAPI::CallStatus&); CommonAPI::CallStatus doCopyAsyncSendBenchmark(); - void copyAsyncSendBenchmarkCallback(const CommonAPI::CallStatus&, const Echo::TestData&); + void copyAsyncSendBenchmarkCallback(const CommonAPI::CallStatus&, const Ping::TestData&); CommonAPI::CallStatus doCopiesAsyncSendBenchmark(); - void copiesAsyncSendBenchmarkCallback(const CommonAPI::CallStatus&, const Echo::TestDataArray&); + void copiesAsyncSendBenchmarkCallback(const CommonAPI::CallStatus&, const Ping::TestDataArray&); SendType sendType_; @@ -54,11 +54,11 @@ class Benchmark { bool async_; BenchmarkStats benchmarkStats_; - std::shared_ptr<CommonAPI::tests::EchoProxy<> > echoProxy_; + std::shared_ptr<CommonAPI::tests::PingProxy<> > pingProxy_; - EchoProxyBase::GetEmptyResponseAsyncCallback getEmptyResponseAsyncCallback_; - EchoProxyBase::GetTestDataCopyAsyncCallback getTestDataCopyAsyncCallback_; - EchoProxyBase::GetTestDataArrayCopyAsyncCallback getTestDataArrayCopyAsyncCallback_; + PingProxyBase::GetEmptyResponseAsyncCallback getEmptyResponseAsyncCallback_; + PingProxyBase::GetTestDataCopyAsyncCallback getTestDataCopyAsyncCallback_; + PingProxyBase::GetTestDataArrayCopyAsyncCallback getTestDataArrayCopyAsyncCallback_; std::promise<CommonAPI::CallStatus> asyncPromise_; }; diff --git a/CommonAPI-Echo/src/BenchmarkStats.cpp b/CommonAPI-Ping/src/BenchmarkStats.cpp index 4db8c4b..4db8c4b 100644 --- a/CommonAPI-Echo/src/BenchmarkStats.cpp +++ b/CommonAPI-Ping/src/BenchmarkStats.cpp diff --git a/CommonAPI-Echo/src/BenchmarkStats.h b/CommonAPI-Ping/src/BenchmarkStats.h index 054c8c7..054c8c7 100644 --- a/CommonAPI-Echo/src/BenchmarkStats.h +++ b/CommonAPI-Ping/src/BenchmarkStats.h diff --git a/CommonAPI-Echo/src/Echo.fidl b/CommonAPI-Ping/src/Ping.fidl index e9d7967..e7f35fa 100644 --- a/CommonAPI-Echo/src/Echo.fidl +++ b/CommonAPI-Ping/src/Ping.fidl @@ -6,7 +6,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ package CommonAPI.tests -interface Echo { +interface Ping { version { major 1 minor 0 } method getEmptyResponse { diff --git a/CommonAPI-Echo/src/EchoClient.cpp b/CommonAPI-Ping/src/PingClient.cpp index 5e691f4..eb6258e 100644 --- a/CommonAPI-Echo/src/EchoClient.cpp +++ b/CommonAPI-Ping/src/PingClient.cpp @@ -4,7 +4,7 @@ * 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/. */ -#include <CommonAPI/tests/EchoProxy.h> +#include <CommonAPI/tests/PingProxy.h> #include <iostream> #include <cstdlib> diff --git a/CommonAPI-Echo/src/EchoService.cpp b/CommonAPI-Ping/src/PingService.cpp index 1e9b343..4e9415c 100644 --- a/CommonAPI-Echo/src/EchoService.cpp +++ b/CommonAPI-Ping/src/PingService.cpp @@ -5,20 +5,20 @@ * 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/. */ #include <CommonAPI/Factory.h> -#include <CommonAPI/tests/EchoStubDefault.h> +#include <CommonAPI/tests/PingStubDefault.h> #include <iostream> #include <chrono> #include <thread> -class EchoStubBenchmark: public CommonAPI::tests::EchoStubDefault { +class PingStubBenchmark: public CommonAPI::tests::PingStubDefault { public: - virtual void getTestDataCopy(CommonAPI::tests::Echo::TestData testData, CommonAPI::tests::Echo::TestData& testDataCopy) { + virtual void getTestDataCopy(CommonAPI::tests::Ping::TestData testData, CommonAPI::tests::Ping::TestData& testDataCopy) { testDataCopy = testData; } - virtual void getTestDataArrayCopy(CommonAPI::tests::Echo::TestDataArray testDataArray, CommonAPI::tests::Echo::TestDataArray& testDataArrayCopy) { + virtual void getTestDataArrayCopy(CommonAPI::tests::Ping::TestDataArray testDataArray, CommonAPI::tests::Ping::TestDataArray& testDataArrayCopy) { testDataArrayCopy = testDataArray; } }; @@ -26,10 +26,10 @@ class EchoStubBenchmark: public CommonAPI::tests::EchoStubDefault { int main(void) { std::shared_ptr<CommonAPI::Factory> factory = CommonAPI::Runtime::load()->createFactory(); - std::string serviceAddress = "local:comommonapi.tests.EchoService:commonapi.tests.Echo"; - auto echoStub = std::make_shared<EchoStubBenchmark>(); + std::string serviceAddress = "local:comommonapi.tests.PingService:commonapi.tests.Ping"; + auto pingStub = std::make_shared<PingStubBenchmark>(); - bool success = factory->registerService(echoStub, serviceAddress); + bool success = factory->registerService(pingStub, serviceAddress); if (!success) { std::cerr << "Unable to register service!\n"; return -1; |