Giter Club home page Giter Club logo

flashcontainer's People

Contributors

blueandi avatar hajuschulz avatar ludubies avatar nhjschulz avatar

flashcontainer's Issues

Feature: allow field elements to have a count attribute

Adding a count to an xml field element would introduce the field X times in the struct.
This would allow for the efficient creation of larger arrays without repeating field tags and cluttering the file.

Parsing would only need to handle the additional naming of the singular fields (numbering?)

Refactor: CrcConfig naming

CrcParameter has an attribute crc_cfg that contains a CrcData object that has an attribute crc_cfg that contains a CrcConfig object...........
Look for clearer naming

Refactoring: Work with XmlParser instance

Structs introduce more complexity as parameters need to reference them.
Working only with th XmlParser class leads to bloated function arguments.
Using an XmlParser instance for parsing would allow keeping references in the parser attrs

TODO: integrate CRCs into structs

implement a CRC field, necessary for aurix bootmode headers,

need new XSD, new XML parsing, datamodel extension, writer extension

Review: Fields vs Parameters

With Array, Padding and CRC fields, types have become abundant.

Review current approach (separate implementation for fields and parameters, separation of field types),
with a more generalized approach that implements a more general field class that features different types.

Error: CRC access width is inconsistent on bytes vs bits as unit

XSD and comments define access width in bytes (1, 2, 4, or 8).
Implementation and aurix example handle the access width in bits (8, 16, 32 or 64).

Test cases for CRC also use bits notation, but a CRC with swap and default access width (1) should produce an error at the moment.

This can easily be fixed, but @nhjschulz has to decide which notation is preferred

TYPE_DATA dict in datamodel is nonexhaustive

TYPE_DATA includes info for all basic types, but could be called with GAPFILL or COMPLEX parameter types.
Access the dict through a separate function that can cast paratypes to basic types and handle special types extra.

Refactor: Clean up BasicType, Special Type, ParamType

Extra enums were introduced to ensure the provided dictionaries are only called with valid keys.
But "subclassing" Enums really hinders code readability and clarity.

Better put guards around the TYPE_DICT stuff and have one type enum

TODO: support UTF-8 fields

we dont have char arrays per se
do we need utf-8 fields (they are fixed length)??
can we cope with unint8_t arrays??

maybe just add nice parsing from xml and handle internally as arrayfield of uint8_t

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.