zeerd's blog         Search     Categories     Tags     Feed

闲来生雅趣,无事乐逍遥。对窗相望雪,一盏茶香飘。

在进程崩溃退出前输出所有DLT LOG

2017-08-30 @Program #Automotive-DLT #COVESA #DLT

dlt提供了一个函数叫做dlt_user_atexit_blow_out_user_buffer()。这个函数的解释如下: Try to resend log message in the user buffer. Stops if the dlt_uptime is bigger than dlt_uptime() + DLT_USER_ATEXIT_RESEND_BUFFER_EXIT_TIMEOUT. A pause between the resending attempts can be defined with DLT_USER_ATEXIT_RESEND_BUFFER_SLEEP.

虽然其中的DLT_USER_ATEXIT_RESEND_BUFFER_EXIT_TIMEOUT对应的变量可以通过dlt_set_resend_timeout_atexit()函数进行修改,但是程序崩溃前残余的LOG需要多久才可以输出完并不是可控的。

因此,我想了下面的办法来确保LOG的完全输出。

Read more

Prev 9/15 Next