void McNackFrame::print_frame() { ROS_ERROR("FRAME PACKET ID[%u] SRC[%s] MC GROUP[%s]", header_.packet_id, hostname_source_.c_str(), mc_group_.c_str()); ROS_ERROR("SRC MAC[%s] DST MAC[%s]", getMacAsStr(eh_h_.eh_source).c_str(), getMacAsStr(eh_h_.eh_dest).c_str()); }
void Logging::logUcLinkTransmission(stc_frame f) { //#time,src,frame_id,mac_src, mac_dst,time_sent,time_ack,retransmissions #ifndef PERFORMANCE_LOGGING_UC_LINK_FRAMES return; #endif string entry = getIntAsString(getMillisecondsTime()) + ","; /* src hostname */ entry += f.hostname_source + ","; /* frame id */ entry += getIntAsString(f.frame_id) + ","; /* mac src */ entry += ","; /* mac dst */ entry += getMacAsStr(f.mac) + ","; /* time_sent*/ entry += getIntAsString(f.ts) + ","; /* time_ack*/ entry += getIntAsString(getMillisecondsTime()) + ","; /*retransmissions*/ entry += getIntAsString(f.retransmitted) + ","; entries_link_frames.push_back(entry); }
void Logging::logRRequestIntermediate(RouteRequest* r) { #ifndef PERFORMANCE_LOGGING return; #endif /*rreq_intermediate.csv (log upon every received route request): #time,rreq_id,src,rcvd_from time : timestamp (ms) rreq_id : ID of the route request src : source of the route request rcvd_from : robot the route request was received from*/ std::string entry = ""; /* time stamp */ entry += getIntAsString(getMillisecondsTime()) + ","; /* rreq_id */ entry += getIntAsString(r->header_.id) + ","; /* src host */ entry += r->hostname_source_ + ","; /* rcvd_from */ entry += getMacAsStr(r->eh_h_.eh_source).c_str(); entries_rreq_interm.push_back(entry); }