Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Usability and formatting improvements for codegen-py #46

Merged
merged 19 commits into from
Dec 3, 2024

Conversation

lreiher
Copy link
Member

@lreiher lreiher commented Nov 27, 2024

  • add full generation command to all auto-generated files as a comment
    # --- Auto-generated by https://github.com/ika-rwth-aachen/etsi_its_messages ---
    # python3 \
    #   utils/codegen/codegen-py/asn1ToRosMsg.py \
    #   asn1/raw/cam_en302637_2/CAM-PDU-Descriptions.asn \
    #   asn1/raw/cam_en302637_2/cdd/ITS-Container.asn \
    #   -t \
    #   cam \
    #   -o \
    #   etsi_its_msgs/etsi_its_cam_msgs/msg
    # ------------------------------------------------------------------------------
  • add raw ASN.1 definitions to conversion headers as a comment (already existing in .msg files)
    /** ASN.1 Definition -----------------------------------------------------------
    CAM ::= SEQUENCE {
        header ItsPduHeader,
        cam CoopAwareness
    }
    ----------------------------------------------------------------------------- */
  • add progress bars to code generation scripts
    Parsing ASN.1 files ...
    Generating conversion headers: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 153/153 [00:00<00:00, 899.80it/s, PhoneNumber]
    Removing files not required for top-level message type ...
    Generated 94 conversion headers for CAM
    
  • color warnings in code generation scripts in yellow
  • optimize linebreaks in conversion header templates to remove one empty line after each memset

@lreiher lreiher requested a review from jpbusch November 28, 2024 13:44
@lreiher lreiher marked this pull request as ready for review November 28, 2024 13:44
@lreiher
Copy link
Member Author

lreiher commented Nov 28, 2024

@jpbusch: Please review before I'm pushing all generated code changes.

Copy link
Collaborator

@jpbusch jpbusch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ready for file generation

utils/codegen/asn1ToC/asn1ToC.py Outdated Show resolved Hide resolved
@lreiher lreiher merged commit 954fabf into main Dec 3, 2024
35 checks passed
@lreiher lreiher deleted the improvement/formatting branch December 3, 2024 13:39
@lreiher lreiher mentioned this pull request Dec 3, 2024
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants