diff options
Diffstat (limited to 'src/components/protocol_handler/src')
-rw-r--r-- | src/components/protocol_handler/src/protocol_handler_impl.cc | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/src/components/protocol_handler/src/protocol_handler_impl.cc b/src/components/protocol_handler/src/protocol_handler_impl.cc index e0ab97bdcb..f701fb02e5 100644 --- a/src/components/protocol_handler/src/protocol_handler_impl.cc +++ b/src/components/protocol_handler/src/protocol_handler_impl.cc @@ -74,9 +74,9 @@ ProtocolHandlerImpl::ProtocolHandlerImpl(const ProtocolHandlerSettings& settings threads::ThreadOptions(kStackSize)), raw_ford_messages_to_mobile_("PH ToMobile", this, threads::ThreadOptions(kStackSize)) -#ifdef TIME_TESTER +#ifdef TELEMETRY_MONITOR , metric_observer_(NULL) -#endif // TIME_TESTER +#endif // TELEMETRY_MONITOR { LOG4CXX_AUTO_TRACE(logger_); @@ -320,9 +320,9 @@ void ProtocolHandlerImpl::SendHeartBeat(int32_t connection_id, void ProtocolHandlerImpl::SendMessageToMobileApp(const RawMessagePtr message, bool final_message) { -#ifdef TIME_TESTER +#ifdef TELEMETRY_MONITOR const TimevalStruct start_time = date_time::DateTime::getCurrentTime(); -#endif // TIME_TESTER +#endif // TELEMETRY_MONITOR LOG4CXX_AUTO_TRACE(logger_); if (!message) { LOG4CXX_ERROR(logger_, @@ -334,12 +334,12 @@ void ProtocolHandlerImpl::SendMessageToMobileApp(const RawMessagePtr message, uint8_t sessionID = 0; session_observer_.PairFromKey(message->connection_key(), &connection_handle, &sessionID); -#ifdef TIME_TESTER +#ifdef TELEMETRY_MONITOR uint32_t message_id = message_counters_[sessionID]; if (metric_observer_) { metric_observer_->StartMessageProcess(message_id, start_time); } -#endif // TIME_TESTER +#endif // TELEMETRY_MONITOR const size_t max_frame_size = get_settings().maximum_payload_size(); size_t frame_size = MAXIMUM_FRAME_DATA_V2_SIZE; switch (message->protocol_version()) { @@ -394,10 +394,10 @@ void ProtocolHandlerImpl::SendMessageToMobileApp(const RawMessagePtr message, "ProtocolHandler failed to send multiframe messages."); } } -#ifdef TIME_TESTER +#ifdef TELEMETRY_MONITOR if (metric_observer_) { - PHMetricObserver::MessageMetric *metric - = new PHMetricObserver::MessageMetric(); + PHTelemetryObserver::MessageMetric *metric + = new PHTelemetryObserver::MessageMetric(); metric->message_id = message_id; metric->connection_key = message->connection_key(); metric->raw_msg = message; @@ -448,9 +448,9 @@ void ProtocolHandlerImpl::OnTMMessageReceived(const RawMessagePtr tm_message) { for (ProtocolFramePtrList::const_iterator it = protocol_frames.begin(); it != protocol_frames.end(); ++it) { -#ifdef TIME_TESTER +#ifdef TELEMETRY_MONITOR const TimevalStruct start_time = date_time::DateTime::getCurrentTime(); -#endif // TIME_TESTER +#endif // TELEMETRY_MONITOR ProtocolFramePtr frame = *it; #ifdef ENABLE_SECURITY const RESULT_CODE result = DecryptFrame(frame); @@ -460,11 +460,11 @@ void ProtocolHandlerImpl::OnTMMessageReceived(const RawMessagePtr tm_message) { } #endif // ENABLE_SECURITY impl::RawFordMessageFromMobile msg(frame); -#ifdef TIME_TESTER +#ifdef TELEMETRY_MONITOR if (metric_observer_) { metric_observer_->StartMessageProcess(msg->message_id(), start_time); } -#endif // TIME_TESTER +#endif // TELEMETRY_MONITOR raw_ford_messages_from_mobile_.PostMessage(msg); } @@ -729,10 +729,10 @@ RESULT_CODE ProtocolHandlerImpl::HandleSingleFrameMessage(const ProtocolFramePtr if (!rawMessage) { return RESULT_FAIL; } -#ifdef TIME_TESTER +#ifdef TELEMETRY_MONITOR if (metric_observer_) { - PHMetricObserver::MessageMetric *metric - = new PHMetricObserver::MessageMetric(); + PHTelemetryObserver::MessageMetric *metric + = new PHTelemetryObserver::MessageMetric(); metric->message_id = packet->message_id(); metric->connection_key = connection_key; metric->raw_msg = rawMessage; @@ -1058,14 +1058,14 @@ void ProtocolHandlerImpl::PopValideAndExpirateMultiframes() { frame->payload_size())); DCHECK(rawMessage); -#ifdef TIME_TESTER +#ifdef TELEMETRY_MONITOR if (metric_observer_) { - PHMetricObserver::MessageMetric *metric = - new PHMetricObserver::MessageMetric(); + PHTelemetryObserver::MessageMetric *metric = + new PHTelemetryObserver::MessageMetric(); metric->raw_msg = rawMessage; metric_observer_->EndMessageProcess(metric); } -#endif // TIME_TESTER +#endif // TELEMETRY_MONITOR NotifySubscribers(rawMessage); } } @@ -1296,11 +1296,11 @@ void ProtocolHandlerImpl::SendFramesNumber(uint32_t connection_key, } } -#ifdef TIME_TESTER -void ProtocolHandlerImpl::SetTimeMetricObserver(PHMetricObserver *observer) { +#ifdef TELEMETRY_MONITOR +void ProtocolHandlerImpl::SetTelemetryObserver(PHTelemetryObserver *observer) { metric_observer_ = observer; } -#endif // TIME_TESTER +#endif // TELEMETRY_MONITOR std::string ConvertPacketDataToString(const uint8_t *data, const size_t data_size) { |