您现在的位置:首页 > 产品中心 > 研发管理工具 > Visu-IT > Visu-IT

A2Lib V1.0 – ASAP2/Hex Library

Visu-IT! ASAP2 Library是一个软件组件,它允许: (1)读/写ASAP2文件,(2) 读/写十六进制文件,(3) 把ASAP2信息与十六进制数据相结合,以提供“语义”访问十六进制文件。
The Visu-IT! ASAP2 Library is a software component which allows to:
- Read/Write ASAP2 files
- Read/Write Hex files
- Combine the ASAP2 information with the Hex data in order to provide ‘semantic’ access to the Hex file, e.g.:
  • Hex <-> Phys calculations (based on the COMPU_METHOD in the A2L file)
  • Semantic access to Hex file (based on the RECORD_LAYOUT in the A2L file)
 
Focus: software component (.NET and Java) to semantically access both A2L and Hex file
Scope: integration into customer’s tools
 
Key Features
  • Read/Write ASAP2 files
  • Read/Write Hex files
  • Support of more than one Hex- file (at the same time)
  • Convenience functionality
    • “Hex->Phys” and “Phys->Hex” calculation
    • Semantic access to Hex file, considering:
      1.  record layout
      2.  memory alignment
      3.  byte order (MSB_FIRST vs. MSB_LAST)
Basic Use Cases

The A2Lib supports the following basic use cases:
  • Get (calibration-)data from Hex based on A2L file
  • Write/Update (calibration-)data into Hex based on A2L file
 
Note: Of course, these are the basic use cases of the component itself. For tools using this component, there are additional uses cases like “calibration data management”, “simple calibration”, etc. supposable.
General Information

Main objective of A2Lib is to provide a high level access to A2L- and Hex- files by an easy to use API.
The A2Lib itself is composed of two other components which can be also used standalone:

1、A2HighLevel

ASAP2 High Level component providing access to ASAP2 files -> ASAP2 Parser

2、A2Hex

Component which provides access to Hex file

When using A2Lib, the components “A2HighLevel” and “A2Hex” are implicitly involved.
The following pseudo code snippet shows how the A2Lib could be used to access a characteristic in the Hex file based on the description found in the A2L file.
 
// load A2L file and read the characteristic “myMap”
a2L = A2HighLevel.LoadA2LFile(…)
map = a2L.GetCharacteristic(“myMap”)
 
// load corresponding hex file
hex = A2Hex.LoadFile(…)
 
// link A2L and Hex regarding “myMap”
object = A2Lib(map, hex);
values = object.ReadPhysValues()               // read calibration values from hex
object.WritePhysValue(1.1, 1.2, 1.3)              // write ‘new’ calibration values to hex
 
object.Hex2Phys(values, …)        // convenience functionality: hex -> phys calculation
 
To sum up: A2Lib allows to read/write calibration values from/to hex file considering A2L information like alignment, record layout, size, …
Compatibility

The A2Lib processes and generates ASAP2 files which are compliant with the standard ASAM MCD 2MC V1.x.
The ASAM MCD 2MC description files contain information like:
  • Measurements and calibration variables (parameters, curves, maps)
  • physical addresses, conversion formula, data types, etc…
  • ECU interface description ( XCP on CAN or ETK )
  • Calibration methods ( SERAM, SERAP )
  • Record layouts
  • etc.
Interfaces

 

  • ASAM-MCD-2MC versions 1.6, 1.5.1, 1.4.1, 1.3.1, 1.2.1
  • Intel Hex or Motorola-S-Record
Terminology

ASAM MCD 2MC: Official name of the standardized description exchange file
ASAP2: Common naming of the "ASAM MCD 2MC" standard
A2L: File suffix of "ASAM MCD 2MC" description file (*.a2l). It is also a common naming for "ASAP2"
Hex: Intel Hex or Motorola-S-Record

System Requirements

Operating System: Windows XP/Vista/Windows 7
Environment: .NET Framework V4.0