summaryrefslogtreecommitdiff
path: root/src/components/protocol_handler/include/protocol_handler
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/components/protocol_handler/include/protocol_handler
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/components/protocol_handler/include/protocol_handler')
-rw-r--r--src/components/protocol_handler/include/protocol_handler/protocol_handler_impl.h26
-rw-r--r--src/components/protocol_handler/include/protocol_handler/telemetry_observer.h (renamed from src/components/protocol_handler/include/protocol_handler/time_metric_observer.h)4
2 files changed, 18 insertions, 12 deletions
diff --git a/src/components/protocol_handler/include/protocol_handler/protocol_handler_impl.h b/src/components/protocol_handler/include/protocol_handler/protocol_handler_impl.h
index 9795adaa54..bda65803e8 100644
--- a/src/components/protocol_handler/include/protocol_handler/protocol_handler_impl.h
+++ b/src/components/protocol_handler/include/protocol_handler/protocol_handler_impl.h
@@ -57,9 +57,10 @@
#include "transport_manager/transport_manager_listener_empty.h"
#include "connection_handler/connection_handler.h"
-#ifdef TIME_TESTER
-#include "protocol_handler/time_metric_observer.h"
-#endif // TIME_TESTER
+#ifdef TELEMETRY_MONITOR
+#include "protocol_handler/telemetry_observer.h"
+#include "telemetry_monitor/telemetry_observable.h"
+#endif // TELEMETRY_MONITOR
#ifdef ENABLE_SECURITY
#include "security_manager/security_manager.h"
@@ -138,7 +139,12 @@ class ProtocolHandlerImpl
: public ProtocolHandler,
public TransportManagerListenerEmpty,
public impl::FromMobileQueue::Handler,
- public impl::ToMobileQueue::Handler {
+ public impl::ToMobileQueue::Handler
+#ifdef TELEMETRY_MONITOR
+ ,
+ public telemetry_monitor::TelemetryObservable<PHTelemetryObserver>
+#endif // TELEMETRY_MONITOR
+ {
public:
/**
* @brief Constructor
@@ -194,14 +200,14 @@ class ProtocolHandlerImpl
*/
void SendFramesNumber(uint32_t connection_key, int32_t number_of_frames);
-#ifdef TIME_TESTER
+#ifdef TELEMETRY_MONITOR
/**
* @brief Setup observer for time metric.
*
* @param observer - pointer to observer
*/
- void SetTimeMetricObserver(PHMetricObserver *observer);
-#endif // TIME_TESTER
+ void SetTelemetryObserver(PHTelemetryObserver *observer);
+#endif // TELEMETRY_MONITOR
/*
* Prepare and send heartbeat message to mobile
@@ -545,9 +551,9 @@ class ProtocolHandlerImpl
sync_primitives::Lock protocol_observers_lock_;
-#ifdef TIME_TESTER
- PHMetricObserver *metric_observer_;
-#endif // TIME_TESTER
+#ifdef TELEMETRY_MONITOR
+ PHTelemetryObserver *metric_observer_;
+#endif // TELEMETRY_MONITOR
};
} // namespace protocol_handler
#endif // SRC_COMPONENTS_PROTOCOL_HANDLER_INCLUDE_PROTOCOL_HANDLER_PROTOCOL_HANDLER_IMPL_H_
diff --git a/src/components/protocol_handler/include/protocol_handler/time_metric_observer.h b/src/components/protocol_handler/include/protocol_handler/telemetry_observer.h
index 1d3d83ea48..f0923623e0 100644
--- a/src/components/protocol_handler/include/protocol_handler/time_metric_observer.h
+++ b/src/components/protocol_handler/include/protocol_handler/telemetry_observer.h
@@ -39,7 +39,7 @@
namespace protocol_handler {
-class PHMetricObserver {
+class PHTelemetryObserver {
public:
struct MessageMetric {
RawMessagePtr raw_msg;
@@ -50,7 +50,7 @@ class PHMetricObserver {
};
virtual void StartMessageProcess(uint32_t message_id, const TimevalStruct &start_time) = 0;
virtual void EndMessageProcess(utils::SharedPtr<MessageMetric> m) = 0;
- virtual ~PHMetricObserver(){}
+ virtual ~PHTelemetryObserver(){}
};
} // protocol_handler
#endif // SRC_COMPONENTS_PROTOCOL_HANDLER_INCLUDE_PROTOCOL_HANDLER_TIME_METRIC_OBSERVER_H_