Code Monkey home page Code Monkey logo

a2l-xml's Introduction

a2l-xml

converts A2L-Files [ASAM, CCP, XCP] to some xml and vice versa

syntax converting A2L to XML: a2l2xml input.A2L output.XML

syntax convertion XML to A2L: xml2a2l input.XML output.a2l

The generated xml is very basic and maybe errorprone too.

Maybe someone has some usecase for this software.

a2l-xml's People

Contributors

christiansteffens avatar ebroecker avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

a2l-xml's Issues

Block names with brackets aren't converted

Hi,

first of all: Great script - really helpful for our use case ๐Ÿ‘

Testing it with several a2l files I noticed a problem with MEASUREMENTS blocks that are using names with brackets. Probably the problem occurs with any kind of block that uses brackets in it's name?

Example: Sb177_Div_T [0]

    /begin MEASUREMENT Sb177_Div_T[0] ""
      FLOAT32_IEEE VOID_SCALING 1 100 -2.5 12.4
      BYTE_ORDER MSB_LAST
      ECU_ADDRESS 0x60012514
      ECU_ADDRESS_EXTENSION 0x0
      FORMAT "%12.6"
      SYMBOL_LINK "Sb177_Div_T" 0
    /end MEASUREMENT

At first I thought names with brackets aren't valid - so your script is 'right' - but then I checked the ASAP / A2L specification which says:

Identifiers are random names which may contain characters A through Z,
a through z, underscore (_), numerals 0 through 9, points (.) and brackets ([, ]) .
However, the following limitations apply: the first character must be a letter or an underscore,
brackets must occur in pairs at the end of a partial string and must contain a number
or an alphabetic string (description of the index of an array element).

My knowledge in Python is unfortunately very poor, otherwise I'd like to extend your script to handle this kind of names. But maybe you could take a look? I'm willing to help in any kind (testing it or providing more examples).

Currently the brackets are simply ignored, but this results - in our case - into MEASUREMENT blocks of the same name.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.