MDF, take a look

1.MDF definition

MDF, the full name (Measurement Data Format), is the measurement data format, which is defined by ASAM (Automation and Measurement Systems Standards Association). The webpage of MDF https://www.asam.net/standards/detail/mdf/. Tools such as INCA and CANape record measurement data in MDF format. INCA changed the file suffix to .dat, but it is still MDF in essence.

2.MDF view

MDF is a binary file that needs to be viewed with a binary file editor. This article recommends using Notepad++ (32-bit https://notepad-plus-plus.org/) combined with the Hex Editor plugin (https://sourceforge.net/projects/npp-plugins/files/Hex%20Editor/). Download the Hex Editor plugin and put it in the plugins folder of Notepad++. Open the MDF file with Notepad++ and click the H character in the toolbar to activate it.

 

3. MDF composition

MDF is composed of a series of data blocks (block), you can refer to the Vector document (reply to "MDF document" to obtain).

 

Due to limited space, this article only introduces IDBLOCK (Identification block). IDBLOCK is the MDF file identifier, which consists of the first 64 bytes of the file, in order:

 

 

4. MDF parsing

Take .NET (C#) language as an example to introduce how to read IDBLOCK.

1) Create a new class IDBLOCK with the following code:

 

 

 

2) Use FileStream to read 64 bytes of the file and convert to IDBLOCK:

 

 

The value of idBlock in debug state:

 

 

 

 

Reply "MDF example" for example code)

 

 

5.MDF open source information

MDF is widely used, and there are many open source codes on github, sourceforge and other websites (reply to "MDF open source" and get it randomly).

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325317467&siteId=291194637