summaryrefslogtreecommitdiff
path: root/src/appMain
diff options
context:
space:
mode:
authorKozoriz <kozorizandriy@gmail.com>2016-03-10 10:59:30 +0200
committerKozoriz <kozorizandriy@gmail.com>2016-03-10 13:28:45 +0200
commit253f9a224e8e78182b3e5f26c422002a3b581c2c (patch)
tree8cc3351651158b71eb374ec734171df947b131fb /src/appMain
parent358ca6459aa2e9b2fe9ace737cc396937311c014 (diff)
downloadsdl_core-253f9a224e8e78182b3e5f26c422002a3b581c2c.tar.gz
TimeTester refatctoring.
Removed singletone using from TimeTester. TimeTester renamed -> TelemetryMonitor. All files and directories corrected. Tests corrected, all works. Disabled 2 tests(task created). Related to : APPLINK-21915
Diffstat (limited to 'src/appMain')
-rw-r--r--src/appMain/CMakeLists.txt10
-rw-r--r--src/appMain/life_cycle.cc31
-rw-r--r--src/appMain/life_cycle.h12
-rw-r--r--src/appMain/log4cxx.properties4
4 files changed, 29 insertions, 28 deletions
diff --git a/src/appMain/CMakeLists.txt b/src/appMain/CMakeLists.txt
index 41bc6ba281..6d529e1572 100644
--- a/src/appMain/CMakeLists.txt
+++ b/src/appMain/CMakeLists.txt
@@ -51,9 +51,9 @@ set(default_media_inc
)
endif()
-if (TIME_TESTER)
- set(TIME_TESTER_LIB
- TimeTester)
+if (TELEMETRY_MONITOR)
+ set(TELEMETRY_MONITOR_LIB
+ TelemetryMonitor)
endif()
set(LIBRARIES
@@ -64,7 +64,7 @@ set(LIBRARIES
MOBILE_API
v4_protocol_v1_2_no_extra
SmartObjects
- ${TIME_TESTER_LIB}
+ ${TELEMETRY_MONITOR_LIB}
formatters
ProtocolLibrary
ProtocolHandler
@@ -118,7 +118,7 @@ include_directories (
${COMPONENTS_DIR}/request_watchdog/include
${COMPONENTS_DIR}/smart_objects/include/
${COMPONENTS_DIR}/media_manager/include/
- ${COMPONENTS_DIR}/time_tester/include
+ ${COMPONENTS_DIR}/telemetry_monitor/include
${COMPONENTS_DIR}/policy/src/policy/include/
${COMPONENTS_DIR}/policy/src/policy/usage_statistics/include/
${COMPONENTS_DIR}/resumption/include/
diff --git a/src/appMain/life_cycle.cc b/src/appMain/life_cycle.cc
index dadc7081b3..71ca588e65 100644
--- a/src/appMain/life_cycle.cc
+++ b/src/appMain/life_cycle.cc
@@ -72,9 +72,9 @@ LifeCycle::LifeCycle()
, hmi_handler_(NULL)
, hmi_message_adapter_(NULL)
, media_manager_(NULL)
-#ifdef TIME_TESTER
- , time_tester_(NULL)
-#endif // TIME_TESTER
+#ifdef TELEMETRY_MONITOR
+ , telemetry_monitor_(NULL)
+#endif // TELEMETRY_MONITOR
#ifdef DBUS_HMIADAPTER
, dbus_adapter_(NULL)
, dbus_adapter_thread_(NULL)
@@ -161,12 +161,13 @@ bool LifeCycle::StartComponents() {
connection_handler_->set_protocol_handler(protocol_handler_);
connection_handler_->set_connection_handler_observer(app_manager_);
-// it is important to initialise TimeTester before TM to listen TM Adapters
-#ifdef TIME_TESTER
- time_tester_ = new time_tester::TimeManager();
- time_tester_->Start();
- time_tester_->Init(protocol_handler_);
-#endif // TIME_TESTER
+// it is important to initialise TelemetryMonitor before TM to listen TM Adapters
+#ifdef TELEMETRY_MONITOR
+ telemetry_monitor_ = new telemetry_monitor::TelemetryMonitor(profile::Profile::instance()->server_address(),
+ profile::Profile::instance()->time_testing_port());
+ telemetry_monitor_->Start();
+ telemetry_monitor_->Init(protocol_handler_, app_manager_, transport_manager_);
+#endif // TELEMETRY_MONITOR
// It's important to initialise TM after setting up listener chain
// [TM -> CH -> AM], otherwise some events from TM could arrive at nowhere
app_manager_->set_protocol_handler(protocol_handler_);
@@ -451,14 +452,14 @@ void LifeCycle::StopComponents() {
delete hmi_message_adapter_;
hmi_message_adapter_ = NULL;
-#ifdef TIME_TESTER
+#ifdef TELEMETRY_MONITOR
// It's important to delete tester Obcervers after TM adapters destruction
- if (time_tester_) {
- time_tester_->Stop();
- delete time_tester_;
- time_tester_ = NULL;
+ if (telemetry_monitor_) {
+ telemetry_monitor_->Stop();
+ delete telemetry_monitor_;
+ telemetry_monitor_ = NULL;
}
-#endif // TIME_TESTER
+#endif // TELEMETRY_MONITOR
}
} // namespace main_namespace
diff --git a/src/appMain/life_cycle.h b/src/appMain/life_cycle.h
index 57f0c3a03f..7f72786164 100644
--- a/src/appMain/life_cycle.h
+++ b/src/appMain/life_cycle.h
@@ -52,8 +52,8 @@
#include "transport_manager/transport_manager_default.h"
#include "media_manager/media_manager_impl.h"
#include "utils/singleton.h"
-#ifdef TIME_TESTER
-#include "time_tester/time_manager.h"
+#ifdef TELEMETRY_MONITOR
+#include "telemetry_monitor/telemetry_monitor.h"
#endif
//#if ( defined (MESSAGEBROKER_HMIADAPTER) || defined(PASA_HMI) )
@@ -90,7 +90,7 @@ class LifeCycle : public utils::Singleton<LifeCycle> {
private:
LifeCycle();
- transport_manager::TransportManager* transport_manager_;
+ transport_manager::TransportManagerImpl* transport_manager_;
protocol_handler::ProtocolHandlerImpl* protocol_handler_;
connection_handler::ConnectionHandlerImpl* connection_handler_;
application_manager::ApplicationManagerImpl* app_manager_;
@@ -101,9 +101,9 @@ class LifeCycle : public utils::Singleton<LifeCycle> {
hmi_message_handler::HMIMessageHandlerImpl* hmi_handler_;
hmi_message_handler::HMIMessageAdapterImpl* hmi_message_adapter_;
media_manager::MediaManagerImpl* media_manager_;
-#ifdef TIME_TESTER
- time_tester::TimeManager* time_tester_;
-#endif // TIME_TESTER
+#ifdef TELEMETRY_MONITOR
+ telemetry_monitor::TelemetryMonitor* telemetry_monitor_;
+#endif // TELEMETRY_MONITOR
#ifdef DBUS_HMIADAPTER
hmi_message_handler::DBusMessageAdapter* dbus_adapter_;
System::Thread* dbus_adapter_thread_;
diff --git a/src/appMain/log4cxx.properties b/src/appMain/log4cxx.properties
index e78422744d..4153b487fe 100644
--- a/src/appMain/log4cxx.properties
+++ b/src/appMain/log4cxx.properties
@@ -64,5 +64,5 @@ log4j.logger.ConnectionHandler = ALL, ProtocolFordHandlingLogFile
log4j.logger.HeartBeatMonitor = ALL, ProtocolFordHandlingLogFile
log4j.logger.ProtocolHandler = ALL, ProtocolFordHandlingLogFile
log4j.logger.SecurityManager = ALL, ProtocolFordHandlingLogFile
-log4j.logger.TimeManager = ALL
-log4j.logger.TransportManager = ALL, TransportManagerLogFile \ No newline at end of file
+log4j.logger.TelemetryMonitor = ALL
+log4j.logger.TransportManager = ALL, TransportManagerLogFile