[Die „Produkte“ Seiten sind ausschließlich in englischer Sprache verfügbar!]
A2L-Parser (ASAM MCD-2 MC Parser)
The Visu-IT! A2L-Parser:
- is a generic parser – not fix linked to a certain ASAP2 version
- is very performant
- supports all ASAP2 keys
- fully supports the AML syntax and structures
A typical usage of the A2L-Parser from within C# is like this:
The first step is to create an Asap2Parser object with the new operator.
The next step should be the call to SetKey so that the parser object knows that it is legitimately used.
Then, the Asap2Parser object is configured with several objects that steer the parsing process.
The SkipA2MLBlock(false) method call for example tells the parser to not skip the A2ML section in the ASAP2 file. This is required to allow the parser to interpret the IfDataBlocks that follow in the Asap2File later on.
The call to SkipIfDataBlocks with “false” as parameter lets the parser read also the IF_DATA blocks throughout the ASAP2 file into the DOM.
The example also sets event handler for the OnProgress and OnError events, which get called during parsing in a cyclic manner (OnProgress) to indicate parsing progress, or in case of an occurred warning or error (OnError).
The IgnoreBlockErrors(true) advices the parser to not generate fatal errors in case the block structure contains errors.
The ASAP2Parser is one component of the VITLib (Visu-IT! Component Library).