Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ HmiStatePtr ApplicationState::GetState(const WindowID window_id,
SDL_LOG_DEBUG("Getting postponed state for window " << window_id);
return PostponedHmiState(window_id);
default:
SDL_LOG_DEBUG("Getting current state for window " << window_id);
SDL_LOG_TRACE("Getting current state for window " << window_id);
return CurrentHmiState(window_id);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1002,7 +1002,7 @@ uint32_t ConnectionHandlerImpl::KeyFromPair(
transport_manager::ConnectionUID connection_handle,
uint8_t session_id) const {
const uint32_t key = connection_handle | (session_id << 16);
SDL_LOG_DEBUG("Key for ConnectionHandle:"
SDL_LOG_TRACE("Key for ConnectionHandle:"
<< static_cast<uint32_t>(connection_handle)
<< " Session:" << static_cast<uint32_t>(session_id) << " is: 0x"
<< std::hex << static_cast<uint32_t>(key));
Expand All @@ -1020,7 +1020,7 @@ void ConnectionHandlerImpl::PairFromKey(
uint8_t* session_id) const {
*connection_handle = key & 0xFF00FFFF;
*session_id = key >> 16;
SDL_LOG_DEBUG("ConnectionHandle: "
SDL_LOG_TRACE("ConnectionHandle: "
<< static_cast<int32_t>(*connection_handle)
<< " Session: " << static_cast<int32_t>(*session_id)
<< " for key: " << static_cast<int32_t>(key));
Expand Down
2 changes: 1 addition & 1 deletion src/components/media_manager/src/file_streamer_adapter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ bool FileStreamerAdapter::FileStreamer::Send(
return false;
}

SDL_LOG_INFO("Streamer::sent " << msg->data_size());
SDL_LOG_TRACE("Streamer::sent " << msg->data_size());
return true;
}

Expand Down
2 changes: 1 addition & 1 deletion src/components/media_manager/src/pipe_streamer_adapter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ bool PipeStreamerAdapter::PipeStreamer::Send(
// Loop to send remaining data if there is any.
} while (data_remaining);

SDL_LOG_INFO("Streamer::sent " << msg->data_size());
SDL_LOG_TRACE("Streamer::sent " << msg->data_size());
return true;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ bool SocketStreamerAdapter::SocketStreamer::Send(
SDL_LOG_WARN("Couldn't send all the data to socket " << send_socket_fd_);
}

SDL_LOG_INFO("Streamer::sent " << msg->data_size());
SDL_LOG_TRACE("Streamer::sent " << msg->data_size());
return true;
}

Expand Down
2 changes: 1 addition & 1 deletion src/components/media_manager/src/streamer_adapter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ void StreamerAdapter::Streamer::threadMain() {
static int32_t messages_for_session = 0;
++messages_for_session;

SDL_LOG_DEBUG("Handling map streaming message. This is "
SDL_LOG_TRACE("Handling map streaming message. This is "
<< messages_for_session << " message for "
<< adapter_->current_application_);
std::set<MediaListenerPtr>::iterator it =
Expand Down
18 changes: 9 additions & 9 deletions src/components/protocol_handler/src/incoming_data_handler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ ProtocolFramePtrList IncomingDataHandler::ProcessData(
out_result = RESULT_FAIL;
return ProtocolFramePtrList();
}
SDL_LOG_INFO("Processing incoming data of size "
<< tm_message_size << " for connection " << connection_id);
SDL_LOG_TRACE("Processing incoming data of size "
<< tm_message_size << " for connection " << connection_id);
ConnectionsDataMap::iterator it = connections_data_.find(connection_id);
if (connections_data_.end() == it) {
SDL_LOG_WARN("ProcessData requested for unknown connection");
Expand All @@ -73,16 +73,16 @@ ProtocolFramePtrList IncomingDataHandler::ProcessData(
}
std::vector<uint8_t>& connection_data = it->second;
connection_data.insert(connection_data.end(), data, data + tm_message_size);
SDL_LOG_DEBUG("Total data size for connection " << connection_id << " is "
SDL_LOG_TRACE("Total data size for connection " << connection_id << " is "
<< connection_data.size());
ProtocolFramePtrList out_frames;
*malformed_occurrence = 0;
out_result = CreateFrame(
connection_data, out_frames, *malformed_occurrence, connection_id);
SDL_LOG_DEBUG("New data size for connection " << connection_id << " is "
SDL_LOG_TRACE("New data size for connection " << connection_id << " is "
<< connection_data.size());
if (!out_frames.empty()) {
SDL_LOG_INFO("Created and passed " << out_frames.size() << " packets");
SDL_LOG_TRACE("Created and passed " << out_frames.size() << " packets");
} else {
if (RESULT_DEFERRED == out_result) {
SDL_LOG_DEBUG(
Expand Down Expand Up @@ -156,7 +156,7 @@ RESULT_CODE IncomingDataHandler::CreateFrame(
<< std::hex << static_cast<const void*>(&*data_it));
continue;
}
SDL_LOG_DEBUG("Payload size " << header_.dataSize);
SDL_LOG_TRACE("Payload size " << header_.dataSize);
const uint32_t packet_size = GetPacketSize(header_);
if (packet_size == 0) {
SDL_LOG_WARN("Null packet size");
Expand All @@ -167,14 +167,14 @@ RESULT_CODE IncomingDataHandler::CreateFrame(
continue;
}
if (data_size < packet_size) {
SDL_LOG_DEBUG("Packet data is not available yet");
SDL_LOG_TRACE("Packet data is not available yet");
incoming_data.erase(incoming_data.begin(), data_it);
return RESULT_DEFERRED;
}
ProtocolFramePtr frame(new protocol_handler::ProtocolPacket(connection_id));
const RESULT_CODE deserialize_result =
frame->deserializePacket(&*data_it, packet_size);
SDL_LOG_DEBUG("Deserialized frame " << frame);
SDL_LOG_TRACE("Deserialized frame " << frame);
if (deserialize_result != RESULT_OK) {
SDL_LOG_WARN("Packet deserialization failed");
incoming_data.erase(incoming_data.begin(), data_it);
Expand All @@ -183,7 +183,7 @@ RESULT_CODE IncomingDataHandler::CreateFrame(

out_frames.push_back(frame);
last_portion_of_data_was_malformed_ = false;
SDL_LOG_DEBUG("Frame added. "
SDL_LOG_TRACE("Frame added. "
<< "Connection ID " << connection_id);

data_it += packet_size;
Expand Down
20 changes: 10 additions & 10 deletions src/components/protocol_handler/src/multiframe_builder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ bool MultiFrameBuilder::RemoveConnection(const ConnectionID connection_id) {
ProtocolFramePtrList MultiFrameBuilder::PopMultiframes() {
SDL_LOG_AUTO_TRACE();
sync_primitives::AutoLock lock(multiframes_map_lock_);
SDL_LOG_DEBUG("Current state is: " << multiframes_map_);
SDL_LOG_DEBUG("Current multiframe map size is: " << multiframes_map_.size());
SDL_LOG_TRACE("Current state is: " << multiframes_map_);
SDL_LOG_TRACE("Current multiframe map size is: " << multiframes_map_.size());
ProtocolFramePtrList outpute_frame_list;
for (MultiFrameMap::iterator connection_it = multiframes_map_.begin();
connection_it != multiframes_map_.end();
Expand All @@ -115,7 +115,7 @@ ProtocolFramePtrList MultiFrameBuilder::PopMultiframes() {

if (frame && frame->frame_data() == FRAME_DATA_LAST_CONSECUTIVE &&
frame->payload_size() > 0u) {
SDL_LOG_DEBUG("Ready frame: " << frame);
SDL_LOG_TRACE("Ready frame: " << frame);
outpute_frame_list.push_back(frame);
messageId_map.erase(messageId_it++);
continue;
Expand All @@ -136,7 +136,7 @@ ProtocolFramePtrList MultiFrameBuilder::PopMultiframes() {
} // iteration over messageId_map
} // iteration over session_map
} // iteration over multiframes_map_
SDL_LOG_DEBUG("Result frames count: " << outpute_frame_list.size());
SDL_LOG_TRACE("Result frames count: " << outpute_frame_list.size());
return outpute_frame_list;
}

Expand Down Expand Up @@ -164,8 +164,8 @@ RESULT_CODE MultiFrameBuilder::AddFrame(const ProtocolFramePtr packet) {
RESULT_CODE MultiFrameBuilder::HandleFirstFrame(const ProtocolFramePtr packet) {
DCHECK_OR_RETURN(packet->frame_type() == FRAME_TYPE_FIRST, RESULT_FAIL);
sync_primitives::AutoLock lock(multiframes_map_lock_);
SDL_LOG_DEBUG("Waiting : " << multiframes_map_);
SDL_LOG_DEBUG("Handling FIRST frame: " << packet);
SDL_LOG_TRACE("Waiting : " << multiframes_map_);
SDL_LOG_TRACE("Handling FIRST frame: " << packet);
if (packet->payload_size() != 0u) {
SDL_LOG_ERROR("First frame shall have no data:" << packet);
return RESULT_FAIL;
Expand Down Expand Up @@ -193,7 +193,7 @@ RESULT_CODE MultiFrameBuilder::HandleFirstFrame(const ProtocolFramePtr packet) {
return RESULT_FAIL;
}

SDL_LOG_DEBUG("Start waiting frames for connection_id: "
SDL_LOG_TRACE("Start waiting frames for connection_id: "
<< connection_id
<< ", session_id: " << static_cast<int>(session_id)
<< ", message_id: " << message_id);
Expand Down Expand Up @@ -240,7 +240,7 @@ RESULT_CODE MultiFrameBuilder::HandleConsecutiveFrame(

if (is_last_consecutive) {
// TODO(EZamakhov): implement count of frames and result size verification
SDL_LOG_DEBUG("Last CONSECUTIVE frame");
SDL_LOG_TRACE("Last CONSECUTIVE frame");
} else {
uint8_t previous_frame_data = assembling_frame->frame_data();
if (previous_frame_data == std::numeric_limits<uint8_t>::max()) {
Expand Down Expand Up @@ -275,8 +275,8 @@ RESULT_CODE MultiFrameBuilder::HandleConsecutiveFrame(
SDL_LOG_ERROR("Failed to append frame for multiframe message.");
return RESULT_FAIL;
}
SDL_LOG_INFO("Assembled frame with payload size: "
<< assembling_frame->payload_size());
SDL_LOG_TRACE("Assembled frame with payload size: "
<< assembling_frame->payload_size());
frame_data.append_time = date_time::getCurrentTime();
return RESULT_OK;
}
Expand Down
16 changes: 8 additions & 8 deletions src/components/protocol_handler/src/protocol_handler_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1021,7 +1021,7 @@ void ProtocolHandlerImpl::OnTMMessageReceived(const RawMessagePtr tm_message) {
}

const uint32_t connection_key = tm_message->connection_key();
SDL_LOG_DEBUG("Received data from TM with connection id "
SDL_LOG_TRACE("Received data from TM with connection id "
<< connection_key << " msg data_size "
<< tm_message->data_size());

Expand All @@ -1030,7 +1030,7 @@ void ProtocolHandlerImpl::OnTMMessageReceived(const RawMessagePtr tm_message) {
const ProtocolFramePtrList protocol_frames =
incoming_data_handler_.ProcessData(
*tm_message, result, &malformed_occurs);
SDL_LOG_DEBUG("Processed " << protocol_frames.size() << " frames");
SDL_LOG_TRACE("Processed " << protocol_frames.size() << " frames");
if (result != RESULT_OK) {
if (result == RESULT_MALFORMED_OCCURS) {
SDL_LOG_WARN("Malformed message occurs, connection id "
Expand Down Expand Up @@ -1464,7 +1464,7 @@ RESULT_CODE ProtocolHandlerImpl::SendMultiFrameMessage(

RESULT_CODE ProtocolHandlerImpl::HandleMessage(const ProtocolFramePtr packet) {
DCHECK_OR_RETURN(packet, RESULT_UNKNOWN);
SDL_LOG_DEBUG("Handling message " << packet);
SDL_LOG_TRACE("Handling message " << packet);
switch (packet->frame_type()) {
case FRAME_TYPE_CONTROL:
SDL_LOG_TRACE("FRAME_TYPE_CONTROL");
Expand All @@ -1488,7 +1488,7 @@ RESULT_CODE ProtocolHandlerImpl::HandleSingleFrameMessage(
const ProtocolFramePtr packet) {
SDL_LOG_AUTO_TRACE();

SDL_LOG_DEBUG(
SDL_LOG_TRACE(
"FRAME_TYPE_SINGLE message of size "
<< packet->data_size() << "; message "
<< utils::ConvertBinaryDataToString(packet->data(), packet->data_size()));
Expand Down Expand Up @@ -2182,7 +2182,7 @@ void ProtocolHandlerImpl::PopValidAndExpiredMultiframes() {

const uint32_t connection_key = session_observer_.KeyFromPair(
frame->connection_id(), frame->session_id());
SDL_LOG_DEBUG("Result frame" << frame << "for connection "
SDL_LOG_TRACE("Result frame" << frame << "for connection "
<< connection_key);
const RawMessagePtr rawMessage(new RawMessage(connection_key,
frame->protocol_version(),
Expand Down Expand Up @@ -2261,7 +2261,7 @@ void ProtocolHandlerImpl::Handle(const impl::RawFordMessageFromMobile message) {
}
} break;
}
SDL_LOG_DEBUG("Message : " << message.get());
SDL_LOG_TRACE("Message : " << message.get());
const uint8_t c_id = message->connection_id();
const uint32_t m_id = message->session_id();

Expand All @@ -2273,7 +2273,7 @@ void ProtocolHandlerImpl::Handle(const impl::RawFordMessageFromMobile message) {
if (((0 != message->data()) && (0 != message->data_size())) ||
FRAME_TYPE_CONTROL == message->frame_type() ||
FRAME_TYPE_FIRST == message->frame_type()) {
SDL_LOG_DEBUG("Packet: dataSize " << message->data_size());
SDL_LOG_TRACE("Packet: dataSize " << message->data_size());
HandleMessage(message);
PopValidAndExpiredMultiframes();
} else {
Expand Down Expand Up @@ -2448,7 +2448,7 @@ RESULT_CODE ProtocolHandlerImpl::DecryptFrame(ProtocolFramePtr packet) {

void ProtocolHandlerImpl::SendFramesNumber(uint32_t connection_key,
int32_t number_of_frames) {
SDL_LOG_DEBUG("SendFramesNumber MobileNaviAck for session "
SDL_LOG_TRACE("SendFramesNumber MobileNaviAck for session "
<< connection_key);

transport_manager::ConnectionUID connection_id = 0;
Expand Down
4 changes: 2 additions & 2 deletions src/components/protocol_handler/src/protocol_packet.cc
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ ProtocolPacket::ProtocolHeaderValidator::max_payload_size_by_service_type(

RESULT_CODE ProtocolPacket::ProtocolHeaderValidator::validate(
const ProtocolHeader& header) const {
SDL_LOG_DEBUG("Validating header - " << header);
SDL_LOG_TRACE("Validating header - " << header);
// expected payload size will be calculated depending
// on used protocol version and service type
size_t payload_size = MAXIMUM_FRAME_DATA_V2_SIZE;
Expand Down Expand Up @@ -390,7 +390,7 @@ RESULT_CODE ProtocolPacket::ProtocolHeaderValidator::validate(
return RESULT_FAIL;
}
}
SDL_LOG_DEBUG("Message header is completely correct.");
SDL_LOG_TRACE("Message header is completely correct.");
return RESULT_OK;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,13 +237,13 @@ void ThreadedSocketConnection::Transmit() {
poll_fds[1].fd = read_fd_;
poll_fds[1].events = POLLIN | POLLPRI;

SDL_LOG_DEBUG("poll " << this);
SDL_LOG_TRACE("poll " << this);
if (-1 == poll(poll_fds, kPollFdsSize, -1)) {
SDL_LOG_ERROR_WITH_ERRNO("poll failed for connection " << this);
Abort();
return;
}
SDL_LOG_DEBUG("poll is ok " << this << " revents0: " << std::hex
SDL_LOG_TRACE("poll is ok " << this << " revents0: " << std::hex
<< poll_fds[0].revents << " revents1:" << std::hex
<< poll_fds[1].revents);
// error check
Expand Down Expand Up @@ -307,7 +307,7 @@ bool ThreadedSocketConnection::Receive() {
bytes_read = recv(socket_, buffer, sizeof(buffer), MSG_DONTWAIT);

if (bytes_read > 0) {
SDL_LOG_DEBUG("Received " << bytes_read << " bytes for connection "
SDL_LOG_TRACE("Received " << bytes_read << " bytes for connection "
<< this);
::protocol_handler::RawMessagePtr frame(
new protocol_handler::RawMessage(0, 0, buffer, bytes_read, false));
Expand Down
12 changes: 6 additions & 6 deletions src/components/transport_manager/src/transport_manager_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -768,7 +768,7 @@ void TransportManagerImpl::PostMessage(

void TransportManagerImpl::PostEvent(const TransportAdapterEvent& event) {
SDL_LOG_AUTO_TRACE();
SDL_LOG_DEBUG("TransportAdapterEvent: " << &event);
SDL_LOG_TRACE("TransportAdapterEvent: " << &event);
event_queue_.PostMessage(event);
}

Expand Down Expand Up @@ -823,12 +823,12 @@ void TransportManagerImpl::DeactivateDeviceConnections(
TransportManagerImpl::ConnectionInternal* TransportManagerImpl::GetConnection(
const ConnectionUID id) {
SDL_LOG_AUTO_TRACE();
SDL_LOG_DEBUG("ConnectionUID: " << id);
SDL_LOG_TRACE("ConnectionUID: " << id);
for (std::vector<ConnectionInternal>::iterator it = connections_.begin();
it != connections_.end();
++it) {
if (it->id == id) {
SDL_LOG_DEBUG("ConnectionInternal. It's address: " << &*it);
SDL_LOG_TRACE("ConnectionInternal. It's address: " << &*it);
return &*it;
}
}
Expand All @@ -838,13 +838,13 @@ TransportManagerImpl::ConnectionInternal* TransportManagerImpl::GetConnection(
TransportManagerImpl::ConnectionInternal* TransportManagerImpl::GetConnection(
const DeviceUID& device, const ApplicationHandle& application) {
SDL_LOG_AUTO_TRACE();
SDL_LOG_DEBUG("DeviceUID: " << device
SDL_LOG_TRACE("DeviceUID: " << device
<< "ApplicationHandle: " << application);
for (std::vector<ConnectionInternal>::iterator it = connections_.begin();
it != connections_.end();
++it) {
if (it->device == device && it->application == application) {
SDL_LOG_DEBUG("ConnectionInternal. It's address: " << &*it);
SDL_LOG_TRACE("ConnectionInternal. It's address: " << &*it);
return &*it;
}
}
Expand Down Expand Up @@ -1297,7 +1297,7 @@ void TransportManagerImpl::Handle(TransportAdapterEvent event) {
#endif // TELEMETRY_MONITOR
RaiseEvent(&TransportManagerListener::OnTMMessageReceived,
event.event_data);
SDL_LOG_DEBUG("event_type = ON_RECEIVED_DONE");
SDL_LOG_TRACE("event_type = ON_RECEIVED_DONE");
break;
}
case EventTypeEnum::ON_RECEIVED_FAIL: {
Expand Down