mcDatabaseOpenEx
- Updated2023-02-21
- 2 minute(s) read
mcDatabaseOpenEx
Purpose
Opens a specified A2L Database.
Format
mcTypeStatus | mcDatabaseOpenEx(
|
Input
Database
Database is a path to an A2L database file containing the information to access Measurements and Characteristics inside the ECU. The file must use an .A2L extension. You can generate A2L database files with several third-party tools.
You can also create an empty database in memory, then add objects to this database programmatically. For in-memory database use the syntax :<myname>:. You can use multiple databases in memory at the same time (e.g., :MyDatabase1: and :MyDatabase2:).
DBRefNum
DBRefNum is the database reference returned from this function. At the end of the application, the reference must be closed with mcDatabaseClose.
Reserved
Reserved for future use. Set this parameter to empty string "".
Output
Return Value
The return value indicates the status of the function call as a signed 32-bit integer. Zero means the function executed successfully. A negative value specifies an error, which means the function did not perform the expected behavior. A positive value specifies a warning, which means the function performed as expected, but a condition arose that may require attention.
Use the mcStatusToString function of the ECU M&C API to obtain a descriptive string for the return value.
Description
The mcDatabaseOpen and mcDatabaseOpenEx functions open the database but do not start communication. If you are using a path to an existing A2L database with this function, you can query all defined ECU names in the A2L database using the mcGetNames function and select the ECU with mcECUSelect.
If you are using in-memory database (see Database parameter), you can create an ECU object using mcECUCreate, a scaling object using mcConversionCreate, a measurement object using mcMeasurementCreate, and an event using mcEventCreate. Characteristics are currently not supported with in-memory databases.
To use the ECU M&C Toolkit on a LabVIEW RT system with an ASAM MCD 2MC database (*.A2L), you must download your A2L file to the RT target.
![]() |
Note Except for the Reserved parameter, mcDatabaseOpen and mcDatabaseOpenEx are identical. It is recommended to use mcDatabaseOpen function. |