Modified the way to statistic max payload length
This commit is contained in:
parent
809493e134
commit
9c8a7134eb
@ -183,10 +183,6 @@ DLT_Type::DLT_Err DLT_Log::dlt_file_read_header(FILE *p_file, DLT_Type::DLT_Msg
|
|||||||
// 计算Payload长度
|
// 计算Payload长度
|
||||||
Msg->payload_length = Msg->standard_header.len - msg_header_len;
|
Msg->payload_length = Msg->standard_header.len - msg_header_len;
|
||||||
|
|
||||||
// 统计最长长度
|
|
||||||
if (Msg->payload_length > this->max_payload_len)
|
|
||||||
this->max_payload_len = Msg->payload_length;
|
|
||||||
|
|
||||||
return DLT_Type::DLT_ERROR_NONE;
|
return DLT_Type::DLT_ERROR_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -267,6 +263,10 @@ DLT_Type::DLT_Err DLT_Log::load_from_file(const char *file_name_str)
|
|||||||
this->Msg_List_End = p_target_msg;
|
this->Msg_List_End = p_target_msg;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 统计最长长度
|
||||||
|
if (Msg.payload_length > this->max_payload_len)
|
||||||
|
this->max_payload_len = Msg.payload_length;
|
||||||
|
|
||||||
this->loaded_msg_count++;
|
this->loaded_msg_count++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user