TOSUN-Shanghai / TSMaster

A powerful open environment for automotive bus monitoring, simulation, testing, diagnostics, calibration and so on. It supports all kinds of mainstream hardware such as TOSUN, Vector, IXXAT, PEAK, Kvaser, Intrepidcs, ZLG, CANable, CandleLight, cantact and so on. Free for research and education purpose for some features.
http://www.tosunai.cn/
GNU Lesser General Public License v2.1
275 stars 43 forks source link

Absolute Timestamp as unix timestamp? #64

Closed Matheus-Garbelini closed 2 years ago

Matheus-Garbelini commented 2 years ago

Hello,

We are trying to save frames using absolute unix timestamp instead of relative, which starts from 0. Is it possible to configure somewhere to absolute timestamp or change this after saving the file log via TSmaster SDK?

XieYY135 commented 2 years ago

You can use the API to read the initial time of the record file, and add the relative time to get the absolute time

Matheus-Garbelini commented 2 years ago

@XieYY135 Thanks, I'll try the API. However, how can I save the absolute hardware timestamp via TSMaster if FTimeUs does not update absolute time? Does TSMaster receive timestamp via the CAN FD structure? It seems that it's not possible to pass the correct timestamp from CAN frames to TSMaster via FTimeUs.

Matheus-Garbelini commented 2 years ago

Hi @XieYY135, any idea if we can use FTimeUs to inform our own hardware timestamp via the API?

XieYY135 commented 2 years ago

Are you developing based on TSMaster API? If it is. Then every time you execute connect command, record current global time as the startup time, and then add ftimeus to startup time will be the target global time

Matheus-Garbelini commented 2 years ago

@XieYY135 I'm using TSMaster GUI and miniprogram, not the standalone SDK API. Is there at least a system variable or miniprogram function that can inform us what is the log file path the user specified in the "Bus Logger" window?

For example: Screenshot_20220526_131237 Example:

const char *log_path = tslog_get_log_path()
// expected output: "\\vmware-host\Shared Folders\home\can\CAN-Messages\data\cm.blf"
freshhope commented 2 years ago

This system var will be available in the next release

Matheus-Garbelini commented 2 years ago

Thanks a lot @freshhope . Will close this issue. Will get back on my previous issue with more information which I think can be solved in the next release.

Matheus-Garbelini commented 2 years ago

Hi @freshhope, @XieYY135 I'm trying to contact TSMaster team to check for the possibility of a collaboration with our university for a CAN FD/LIN hardware that we are developing in-house. Is there any email that I can reach for collaboration inquiries?