Skip to content

Commit

Permalink
Release v3.1
Browse files Browse the repository at this point in the history
Squashed commit of the following:

commit 90e7508
Merge: 1301ed8 ed49930
Author: astand <[email protected]>
Date:   Sun Jun 30 16:01:59 2024 +0300

    Merge release-3.1 preparing to dev

commit ed49930
Author: astand <[email protected]>
Date:   Sun Jun 30 16:01:36 2024 +0300

    Release file updated

commit 1301ed8
Merge: 3223d48 546e76a
Author: astand <[email protected]>
Date:   Sun Jun 30 16:00:05 2024 +0300

    Merge fix-no-comments-for-phys to dev

commit 546e76a
Author: astand <[email protected]>
Date:   Sun Jun 30 15:58:04 2024 +0300

    Fixed missed floating signals comment

commit 3223d48
Merge: c07962e 26945d4
Author: astand <[email protected]>
Date:   Sun Jun 30 15:33:33 2024 +0300

    Merge better-generation-output to dev

commit 26945d4
Author: astand <[email protected]>
Date:   Sun Jun 30 14:42:35 2024 +0300

    Enhanced flexibility in generating output

    All files have initial information comment block

commit c07962e
Merge: 2774fec 213130d
Author: astand <[email protected]>
Date:   Sun Jun 30 14:45:43 2024 +0300

    Merge ISSUE-28/add_more_info_on_generation to dev

commit 213130d
Author: astand <[email protected]>
Date:   Fri Apr 26 09:00:08 2024 +0300

    Generation script modified for release/debug call

    Issue #28 fixed, other fixed and improvements (see changelog)

commit 2774fec
Author: astand <[email protected]>
Date:   Mon Jan 8 06:47:29 2024 +0300

    Readme updated

commit 70662a3
Author: astand <[email protected]>
Date:   Mon Jan 8 06:45:35 2024 +0300

    Fixed windows script for testdb generation

commit acd7b38
Author: astand <[email protected]>
Date:   Mon Jan 8 06:45:14 2024 +0300

    More strict type casts in 'bitext' operation

commit 3499a53
Author: astand <[email protected]>
Date:   Fri Dec 29 08:07:50 2023 +0300

    Fixed issue with using strlen result for constexprt

commit 4d0d2b0
Author: astand <[email protected]>
Date:   Tue Dec 26 21:32:18 2023 +0300

    Added support for CAN FD 64 byte payload length

commit 1918702
Merge: 023fd99 17a7a68
Author: astand <[email protected]>
Date:   Mon Oct 9 18:02:15 2023 +0300

    Merge release v3.0 back

commit 023fd99
Author: astand <[email protected]>
Date:   Mon Oct 9 16:11:57 2023 +0300

    Set version v3.0

commit 1229bd9
Author: astand <[email protected]>
Date:   Tue Aug 15 22:27:22 2023 +0300

    Changed include files quatation (quotes instead of angle brackets)

    Added empty frame to be remove from driver in next commit

    Frames with no signals are almost fully ignored

    New features regarding DLC handling, initial byte value

    Added more explicit type casting

commit cc7b413
Author: astand <[email protected]>
Date:   Wed May 3 22:40:35 2023 +0200

    New release notes format, style config in file.

    Fixed readme

    Include stdint before using uint8_t

    Fix Assertion '!empty()' failed

    Fix Assertion '__pos <= size()' failed

    Fixes from PR#25 updated

commit 4823582
Author: astand <[email protected]>
Date:   Fri Aug 5 11:25:04 2022 +0300

    New readme 1st edition.

    Readme update.

commit 0553e92
Author: astand <[email protected]>
Date:   Sun Feb 26 15:39:50 2023 +0100

    Unique pointers removed.

commit b73bd36
Author: astand <[email protected]>
Date:   Sun Feb 26 14:54:04 2023 +0100

    Comment fixes.

commit 3cd9bb8
Author: astand <[email protected]>
Date:   Mon Jan 30 20:17:41 2023 +0100

    Style and naming improvements.

commit 962d6ed
Merge: 3961129 f419459
Author: astand <[email protected]>
Date:   Thu May 4 21:10:16 2023 +0200

    Merge release v2.9 back

commit 3961129
Author: astand <[email protected]>
Date:   Fri Jan 27 22:28:17 2023 +0100

    Refactored ptr_double.

commit 1f47c93
Author: astand <[email protected]>
Date:   Fri Jan 27 22:20:20 2023 +0100

    Build fixes (v2.8).

commit 5648e4a
Author: Alex Ch <[email protected]>
Date:   Wed Jan 25 21:04:58 2023 +0300

    prt_double fix (#21)

    * prt_double fix (for e.g. '-20.47')

    * generator updated

    * Styling and doxy fixes

    * astyle script corrected

    * RELEASES file updated

    * Rebased with master

    * DBC line test fixed

    Co-authored-by: Alexey Chernobaev <[email protected]>

commit 286b76c
Author: astand <[email protected]>
Date:   Wed Jan 18 20:58:10 2023 +0100

    Style script handles 'src' directory only

commit 17218df
Author: astand <[email protected]>
Date:   Tue Jan 17 22:17:07 2023 +0100

    Fixed bug in prt_double

commit b89d2ee
Author: astand <[email protected]>
Date:   Sun Jan 15 14:55:58 2023 +0100

    Fixed floating parsing, better printing, removed duplication.

commit d63b36a
Author: astand <[email protected]>
Date:   Thu Sep 29 22:40:32 2022 +0300

    Fixed long line reading from istream.

commit 9fbe4fd
Author: Astakhov Andrey <[email protected]>
Date:   Tue Jul 26 22:51:21 2022 +0300

    New monitor impl (#14)

    * Added build configuration for generated files.

    * Hash and SysTick monitor function wrapped to macros.

    * Release editing. App version printing.

commit 5504578
Merge: 4c4bf72 f93b297
Author: Astakhov Andrey <[email protected]>
Date:   Sun Jul 24 23:45:28 2022 +0300

    Merge pull request #13 from astand/gen-options

    Optional sources generation

commit f93b297
Author: astand <[email protected]>
Date:   Sun Jul 24 23:44:55 2022 +0300

    Update release notes.

commit d95209a
Author: astand <[email protected]>
Date:   Sun Jul 24 23:37:24 2022 +0300

    Fixed astyle script.

commit 630e4eb
Author: astand <[email protected]>
Date:   Sun Jul 24 23:36:15 2022 +0300

    Added script to remove all generated code.

commit aad15d4
Author: astand <[email protected]>
Date:   Sun Jul 24 23:36:01 2022 +0300

    Added option to disable some sources generation.

commit 54ff5c0
Author: astand <[email protected]>
Date:   Sun Jul 24 23:01:27 2022 +0300

    Extended bitext test.

commit f8848a3
Author: astand <[email protected]>
Date:   Sat Jul 23 21:28:19 2022 +0300

    Removed unuseful things.

commit c05ee54
Author: astand <[email protected]>
Date:   Sat Jul 23 17:12:25 2022 +0300

    Added versions to FS gen config.

commit 2ae8673
Author: astand <[email protected]>
Date:   Sat Jul 23 16:52:47 2022 +0300

    Removed overhead in fs-creator.

commit 792423e
Author: astand <[email protected]>
Date:   Sat Jul 23 16:33:24 2022 +0300

    Added tests for bitext function (from gen code).

commit e0b0d41
Author: astand <[email protected]>
Date:   Sat Jul 23 15:49:46 2022 +0300

    Small enhancement,

commit 0f95aae
Author: astand <[email protected]>
Date:   Thu Jul 21 22:19:26 2022 +0300

    Tests updated.

commit e3d732f
Author: astand <[email protected]>
Date:   Thu Jul 21 22:06:31 2022 +0300

    New config in new config parser class.

commit 92d1b94
Author: astand <[email protected]>
Date:   Wed Jul 20 23:39:22 2022 +0300

    Arguments parsing in separated class.

commit b6cb000
Author: astand <[email protected]>
Date:   Tue Jul 19 11:39:31 2022 +0300

    New generation options are introduced in help message.

commit 4c4bf72
Author: astand <[email protected]>
Date:   Wed Jul 20 00:16:42 2022 +0300

    Added GTEST support.

commit 677efdf
Merge: f986286 322becf
Author: Astakhov Andrey <[email protected]>
Date:   Tue Jul 19 11:04:37 2022 +0300

    Merge pull request #12 from astand/fix-opt

    Structural refactoring and changes in fmon-* source code for making fmon-* driver's support a bit easier.

commit 322becf
Author: astand <[email protected]>
Date:   Sat Jul 2 21:05:09 2022 +0300

    Updates in fmon-* source code, some inner optimizations etc.

    Some service level improvements.

    New fmon generator and fmon model.

    Config section for MONO fmon mode.

    FS splitted to gen and file settings.

    Direct appending to fwriter.

    Removed useless methods.

    FileWriter API update.

    Mon generator with new FWriter API.

    Update in FWriter API. All users use new API.

    Added main header with empty lines in comments of some signals.

    Ignore vscode config.

    Driver compilation config printer as separated driver.

    AStyle format to all sources.

    Update realese notes.

commit f986286
Merge: 9100dba 2e104d4
Author: Astakhov Andrey <[email protected]>
Date:   Sat May 7 21:05:08 2022 +0300

    Merge pull request #10 from astand/valtables

    Issue#9 and other things

commit 2e104d4
Author: astand <[email protected]>
Date:   Sat May 7 21:01:06 2022 +0300

    Config update for windows using.

commit 6fbb51b
Author: astand <[email protected]>
Date:   Sat May 7 21:00:48 2022 +0300

    Fixed incompleted square brakets migration.

commit 3319138
Author: astand <[email protected]>
Date:   Sat May 7 20:52:09 2022 +0300

    Release notes editing.

commit 4c13d07
Author: astand <[email protected]>
Date:   Sat May 7 20:29:07 2022 +0300

    Test DBC generation with square brakets includes.

commit dcce732
Author: astand <[email protected]>
Date:   Sat May 7 20:28:45 2022 +0300

    Files which is presumed to be in __include__ in square brackets.

commit 1d163c6
Author: astand <[email protected]>
Date:   Sat May 7 13:21:25 2022 +0300

    WTF was that?

commit 500427f
Author: astand <[email protected]>
Date:   Sat May 7 13:21:07 2022 +0300

    Minor style change.

commit a14407a
Author: astand <[email protected]>
Date:   Sat May 7 13:20:28 2022 +0300

    Added test on binutil souce code version (compare with main lib).

commit 556c072
Author: astand <[email protected]>
Date:   Sat May 7 12:44:32 2022 +0300

    Added test on source code versions (main driver h/c).

commit 739870b
Author: astand <[email protected]>
Date:   Sat May 7 12:17:55 2022 +0300

    Remove extra empty comment line generation.

commit 230933f
Author: astand <[email protected]>
Date:   Sat May 7 12:07:25 2022 +0300

    Minor improvement in signal's info comments.

commit e4fd53f
Author: astand <[email protected]>
Date:   Sat May 7 11:58:10 2022 +0300

    Added more info about sign extending function.

commit 013b993
Author: astand <[email protected]>
Date:   Sat May 7 11:57:55 2022 +0300

    Test DBC with new val table macros generated.

commit 6661cdd
Author: astand <[email protected]>
Date:   Sat May 7 11:02:17 2022 +0300

    Added value table's macros printing to main driver header.

commit 961c15b
Author: astand <[email protected]>
Date:   Sat May 7 11:01:19 2022 +0300

    Added more specific value tables handling.

commit cb9137e
Author: astand <[email protected]>
Date:   Fri May 6 22:42:51 2022 +0300

    Main dbc driver name stripped by C-name checker.

commit 3eff250
Author: astand <[email protected]>
Date:   Fri May 6 22:41:47 2022 +0300

    Added helper for valid C-identifier stripper.

commit 9100dba
Author: astand <[email protected]>
Date:   Fri Mar 11 23:10:16 2022 +0300

    Removed unused line.

commit 323d2a8
Author: astand <[email protected]>
Date:   Fri Mar 11 23:06:29 2022 +0300

    Added test DBC CAN matrix and generation scripts.

commit 45209db
Author: astand <[email protected]>
Date:   Fri Mar 11 22:50:17 2022 +0300

    Gitignore and gitattribute unused content removed.

commit 75b5813
Author: astand <[email protected]>
Date:   Sat Feb 19 23:21:41 2022 +0300

    Changelog editing.

commit 634b4b7
Author: astand <[email protected]>
Date:   Sat Feb 19 23:17:11 2022 +0300

    Added signature extension for signed signal types.

commit ad43ded
Author: astand <[email protected]>
Date:   Sat Feb 19 23:16:34 2022 +0300

    Target signals type selection optimized.

commit 83d894d
Author: astand <[email protected]>
Date:   Wed Feb 2 16:10:35 2022 +0300

    Updated docs.

commit bdef03c
Author: astand <[email protected]>
Date:   Wed Feb 2 11:25:02 2022 +0300

    Minor fixes.

commit b29a47a
Author: astand <[email protected]>
Date:   Wed Feb 2 11:18:16 2022 +0300

    Version update (v2.0).

commit f470bbc
Author: astand <[email protected]>
Date:   Wed Feb 2 11:18:09 2022 +0300

    Change way of passing calling arguments.

commit 7d42aec
Author: astand <[email protected]>
Date:   Wed Feb 2 09:28:07 2022 +0300

    Explicit cast from int64 to uint32.

commit 196b17d
Author: astand <[email protected]>
Date:   Wed Feb 2 00:02:39 2022 +0300

    Fixed error in with bitutil wrong dir generation.

commit 770bb9b
Author: astand <[email protected]>
Date:   Tue Feb 1 22:15:23 2022 +0300

    Added filter for local test infrustructure.

commit 57f3863
Author: astand <[email protected]>
Date:   Tue Feb 1 22:15:04 2022 +0300

    Simple fix problem with too long lines.

commit 5d9a5a7
Author: astand <[email protected]>
Date:   Mon Jan 24 11:37:19 2022 +0300

    Changelog editing.

commit d199361
Author: astand <[email protected]>
Date:   Mon Jan 17 21:50:24 2022 +0300

    Added astyle bin and format script.

commit 8526c87
Author: astand <[email protected]>
Date:   Mon Jan 17 09:11:02 2022 +0300

    Enhanced directory structure for generated files.

commit ebe6786
Author: astand <[email protected]>
Date:   Fri Dec 17 23:32:32 2021 +0300

    Fixed extra line for ValTable parsed lines.

commit f80fb2a
Author: Astakhov Andrey <[email protected]>
Date:   Tue Nov 9 21:50:22 2021 +0300

    Update README.md

commit 25eae41
Author: Astakhov Andrey <[email protected]>
Date:   Tue Nov 9 14:45:37 2021 +0300

    Update README.md

commit 4e3f22f
Author: astand <[email protected]>
Date:   Tue Nov 9 13:58:23 2021 +0300

    Updated readme.

commit 2938aa6
Author: astand <[email protected]>
Date:   Tue Nov 9 10:14:23 2021 +0300

    Releases updated for v1.9.

commit 3d3605f
Author: astand <[email protected]>
Date:   Tue Nov 9 09:43:55 2021 +0300

    All sources processed by code style tool.

commit 2f22c2e
Author: astand <[email protected]>
Date:   Tue Nov 9 09:40:12 2021 +0300

    Fixed: closing comment in -config.h, minor code style.

commit 3b6b7bc
Author: astand <[email protected]>
Date:   Mon Nov 1 22:14:28 2021 +0300

    Release updated for v1.8.

commit 906b274
Author: astand <[email protected]>
Date:   Mon Oct 25 20:58:58 2021 +0300

    Fixed wrong way of rewriting CSM signal.

commit 48556b3
Author: astand <[email protected]>
Date:   Sun Oct 10 21:35:48 2021 +0300

    Releases updated for v1.7.

commit c5bbd7f
Author: astand <[email protected]>
Date:   Sun Oct 10 21:32:55 2021 +0300

    Added suppot for multi Transmiters.

commit 02d1e28
Author: astand <[email protected]>
Date:   Sun Oct 10 21:31:36 2021 +0300

    Fixed potential bug. Missing node adding on RecS item matching.

commit 9af49b0
Author: astand <[email protected]>
Date:   Sun Oct 10 21:30:01 2021 +0300

    Changes on style guide.

commit a2c0079
Author: astand <[email protected]>
Date:   Thu Sep 9 22:50:54 2021 +0300

    Releases updated for v1.6.

commit f918d01
Author: astand <[email protected]>
Date:   Thu Sep 9 22:45:43 2021 +0300

    Fixed issue with 1 frame in RX struct.

commit 6439bcc
Author: astand <[email protected]>
Date:   Wed Sep 8 23:19:21 2021 +0300

    Added optional binutil generation for each node in DBC.

commit 6481e7e
Author: astand <[email protected]>
Date:   Thu Aug 26 23:38:09 2021 +0300

    Fixed some issues.

commit 75f0193
Author: astand <[email protected]>
Date:   Tue Jul 13 21:56:13 2021 +0300

    Removed test info. Edited README.md.

commit ff67c1f
Author: astand <[email protected]>
Date:   Sun Jul 11 22:07:48 2021 +0300

    Hotfixed README layout.

commit 002c86b
Author: astand <[email protected]>
Date:   Sun Jul 11 22:04:23 2021 +0300

    v1.3

commit 2ba501e
Author: astand <[email protected]>
Date:   Sun Jul 11 22:04:10 2021 +0300

    Added template file generation. Refactored config comment text.

commit f604b88
Author: astand <[email protected]>
Date:   Sun Jul 11 17:59:17 2021 +0300

    Readme updated.

commit e7a4cab
Author: astand <[email protected]>
Date:   Sun Jul 11 13:19:53 2021 +0300

    v1.2

commit 0ad29f6
Author: astand <[email protected]>
Date:   Sun Jul 11 13:19:39 2021 +0300

    Added LICENSE and README.

commit 0628848
Author: astand <[email protected]>
Date:   Sun Jul 11 13:18:20 2021 +0300

    Improved help message text.

commit 64745a1
Author: astand <[email protected]>
Date:   Sun Jul 11 12:20:54 2021 +0300

    Application executable name changed - coderdbc.

commit 3376c58
Author: astand <[email protected]>
Date:   Sat Jul 10 17:10:18 2021 +0300

    Fixed type casting warning.

commit 84601a9
Author: astand <[email protected]>
Date:   Sat Jul 10 17:05:18 2021 +0300

    Removed useless files and settings.

commit 359da55
Author: astand <[email protected]>
Date:   Sat Jul 10 15:41:38 2021 +0300

    Added help message.

commit eca35e0
Author: astand <[email protected]>
Date:   Sat Jul 10 15:22:25 2021 +0300

    Project became executable (CLI).

commit 1d168d9
Author: astand <[email protected]>
Date:   Sat Jul 10 15:21:30 2021 +0300

    Added option for rewriting source output files.

commit 8456d4c
Author: astand <[email protected]>
Date:   Sat Jul 10 15:20:45 2021 +0300

    Fixed windows related issues.

commit 776a05a
Author: astand <[email protected]>
Date:   Sat May 15 12:59:49 2021 +0300

    Added DBC version info parsing.

commit e06f777
Author: astand <[email protected]>
Date:   Sun Apr 4 13:40:01 2021 +0300

    Added start info as user defined text.

commit 12c735f
Author: astand <[email protected]>
Date:   Thu Apr 1 20:13:05 2021 +0300

    Fixed value table first pair skipping.

commit 1ff121b
Author: astand <[email protected]>
Date:   Tue Mar 30 21:38:02 2021 +0300

    Fixed GetFrameHash call syntax.

commit abfcc41
Author: astand <[email protected]>
Date:   Sat Mar 27 14:17:25 2021 +0300

    True fix issue with big comment section.

commit b714eb0
Author: astand <[email protected]>
Date:   Sun Mar 14 22:50:22 2021 +0300

    Fixed issue with big comment and localization.

commit 2ccb121
Author: astand <[email protected]>
Date:   Sat Mar 6 19:10:51 2021 +0300

    Fixed macros for *_phys <-> *_ro signal conversion.

commit d15afe6
Author: astand <[email protected]>
Date:   Thu Mar 4 13:08:48 2021 +0300

    Updated comment text in drv_conf.h file.

commit b5a687b
Author: astand <[email protected]>
Date:   Thu Mar 4 13:08:31 2021 +0300

    Fixed integer x = ***_toS(x) issue. Added postfix *_ro to non simple signals.

commit 43730ed
Author: astand <[email protected]>
Date:   Thu Mar 4 12:33:20 2021 +0300

    Changed comments in gen code.

commit 1e837ce
Author: astand <[email protected]>
Date:   Thu Mar 4 12:32:55 2021 +0300

    Fixed issue when DLC is less then actual Message layout takes.

commit b67759b
Author: astand <[email protected]>
Date:   Sun Feb 28 16:03:41 2021 +0300

    GetSystemTick func name.

commit ab5ccec
Author: astand <[email protected]>
Date:   Thu Feb 18 22:19:48 2021 +0300

    Fixed grammar errors.

commit 0cc9b3e
Author: astand <[email protected]>
Date:   Wed Feb 17 14:46:17 2021 +0300

    Removed cmake dir.

commit 60abfec
Author: astand <[email protected]>
Date:   Wed Feb 17 14:13:04 2021 +0300

    Added template ***-config.h generation.

commit cf4ac28
Author: astand <[email protected]>
Date:   Wed Feb 17 11:56:42 2021 +0300

    Simple support for multiplexed signals.

commit b952fab
Author: astand <[email protected]>
Date:   Wed Feb 17 10:48:37 2021 +0300

    Fixed issue with comment text for message.

commit 051df8e
Author: astand <[email protected]>
Date:   Wed Feb 17 10:48:17 2021 +0300

    Fixed value table code printing issue.

commit c369336
Author: astand <[email protected]>
Date:   Wed Feb 17 10:38:43 2021 +0300

    resplit has more param - type of pslit strategy. (was only NOT matched).

commit b3af676
Author: astand <[email protected]>
Date:   Sun Feb 14 00:18:39 2021 +0300

    Added cmake building.

commit 4fd5116
Author: astand <[email protected]>
Date:   Sat Feb 13 23:48:24 2021 +0300

    Added util source print.

commit c0bc4b1
Author: astand <[email protected]>
Date:   Wed Feb 10 20:01:58 2021 +0300

    Fixed minor issues (warnings).

commit 147994a
Author: astand <[email protected]>
Date:   Wed Feb 10 19:50:20 2021 +0300

    Removed unused code.

commit 00748b3
Author: astand <[email protected]>
Date:   Wed Feb 10 19:48:11 2021 +0300

    Added util header print. Some additional improvements.

commit ad787bc
Author: astand <[email protected]>
Date:   Wed Feb 10 12:14:09 2021 +0300

    Added first variant of util generator.

commit bc72a4f
Author: astand <[email protected]>
Date:   Wed Feb 10 10:18:36 2021 +0300

    Formatter function for printf.

commit 9e400db
Author: astand <[email protected]>
Date:   Sun Feb 7 17:49:35 2021 +0300

    On ubuntu getline puts (or shows) '\r' at the end of line.

commit 9cd3049
Author: astand <[email protected]>
Date:   Sun Feb 7 17:48:36 2021 +0300

    Fixed some issues.

commit 79fc48e
Author: astand <[email protected]>
Date:   Sun Feb 7 16:41:05 2021 +0300

    Fixed comment printing.

commit 0947ebf
Author: astand <[email protected]>
Date:   Sat Feb 6 14:50:38 2021 +0300

    Added CSM calc and pack in both Pack functions.

commit 6798987
Author: astand <[email protected]>
Date:   Wed Feb 3 18:53:47 2021 +0300

    Added CSM check in unpack function.

commit e56d43c
Author: astand <[email protected]>
Date:   Wed Feb 3 18:41:18 2021 +0300

    Added Checksum signal detection.

commit a7d6cf0
Author: astand <[email protected]>
Date:   Wed Feb 3 17:01:54 2021 +0300

    Common refactoring and bug fix (field width).

commit d7fdcaf
Author: astand <[email protected]>
Date:   Wed Feb 3 16:59:49 2021 +0300

    Added auto rolling handling code.

commit 362a4d1
Author: astand <[email protected]>
Date:   Wed Feb 3 16:57:30 2021 +0300

    Removed empty phys macro in pack functions.

commit 69e9687
Author: astand <[email protected]>
Date:   Sun Jan 31 23:47:51 2021 +0300

    Added changed for Linux building.

commit a719f72
Author: astand <[email protected]>
Date:   Sun Jan 31 18:58:44 2021 +0300

    Added fmon-source file generation.

commit e634227
Author: astand <[email protected]>
Date:   Sun Jan 31 18:37:08 2021 +0300

    Added fmon-header file generation.

commit 25ba556
Author: astand <[email protected]>
Date:   Sun Jan 31 17:46:19 2021 +0300

    Source files filling moved to dedicated functions.

commit d6b8c46
Author: astand <[email protected]>
Date:   Sun Jan 31 17:35:25 2021 +0300

    Small refactoring.

commit ba88964
Author: astand <[email protected]>
Date:   Mon Jan 25 20:55:01 2021 +0300

    Fixed comment style. CYC value bug.

commit 950ed79
Author: astand <[email protected]>
Date:   Mon Jan 25 20:53:37 2021 +0300

    Fixed warning on unused param (dlc) in Unpack function.

commit bd87a48
Author: astand <[email protected]>
Date:   Mon Jan 25 13:17:53 2021 +0300

    Fixed generator formatting bugs.

commit 22ea2f1
Author: astand <[email protected]>
Date:   Mon Jan 25 13:17:35 2021 +0300

    Fixed bug in sign of sigfloat type signal.

commit 2cd8af4
Author: astand <[email protected]>
Date:   Mon Jan 25 11:32:02 2021 +0300

    Added "*_phys" sigs and auto toS/fromS conversion.

commit e95d50a
Author: astand <[email protected]>
Date:   Mon Jan 25 11:31:15 2021 +0300

    Fixed "fromS" macro - type cast must be skipped.

commit d4e1603
Author: astand <[email protected]>
Date:   Mon Jan 25 11:30:17 2021 +0300

    Added more signal type class (3 classes for now).

commit 11426cc
Author: astand <[email protected]>
Date:   Thu Jan 21 21:53:17 2021 +0300

    Added print toS and fromS macros.

commit 3d57bbe
Author: astand <[email protected]>
Date:   Thu Jan 21 21:51:59 2021 +0300

    Do not make signal conversation inside unpack function.

commit b8ad3cb
Author: astand <[email protected]>
Date:   Thu Jan 21 21:51:24 2021 +0300

    Helpers added.

commit 4c18e40
Author: astand <[email protected]>
Date:   Thu Jan 21 21:50:36 2021 +0300

    Fixed minor issues.

commit bdd4061
Author: astand <[email protected]>
Date:   Thu Jan 21 17:26:33 2021 +0300

    Signal type detection refactored.

commit 981b25a
Author: astand <[email protected]>
Date:   Thu Jan 21 11:49:30 2021 +0300

    Added 2-Pack functions bodies.

commit 1557550
Author: astand <[email protected]>
Date:   Mon Jan 11 20:37:43 2021 +0300

    Basic struct and unpack func in -c main source code.

commit bf0ed04
Author: astand <[email protected]>
Date:   Mon Jan 11 20:10:42 2021 +0300

    Fs creator keeps lowcase drvname in separated field.

commit 246a2b9
Author: astand <[email protected]>
Date:   Mon Jan 11 20:09:16 2021 +0300

    Style format.

commit 30edc79
Author: astand <[email protected]>
Date:   Mon Jan 11 20:08:53 2021 +0300

    Renamed variable for clarificatin.

commit c7ae93e
Author: astand <[email protected]>
Date:   Mon Jan 11 20:08:30 2021 +0300

    Fixed unpack sig format bug.

commit ff267a4
Author: astand <[email protected]>
Date:   Mon Jan 11 16:58:20 2021 +0300

    PrintF refactored completely.

commit b0856e0
Author: astand <[email protected]>
Date:   Mon Jan 11 16:46:14 2021 +0300

    Using fsd filelds for #ifdef selection.

commit fc9663a
Author: astand <[email protected]>
Date:   Sun Dec 13 01:08:31 2020 +0300

    Added separated common attributes creator.

commit 74b4b2d
Author: astand <[email protected]>
Date:   Sat Dec 12 00:40:04 2020 +0300

    Added printF optimization.

commit 98c8eda
Author: astand <[email protected]>
Date:   Sat Dec 12 00:30:42 2020 +0300

    Added Functions prototypes printing.

commit c620841
Author: astand <[email protected]>
Date:   Fri Dec 11 23:54:15 2020 +0300

    Added mon1 field if defined setting.

commit 2a2ff62
Author: astand <[email protected]>
Date:   Mon Dec 7 12:58:05 2020 +0300

    Added c++17 in project option.

commit 14f7017
Author: astand <[email protected]>
Date:   Mon Dec 7 12:57:33 2020 +0300

    Added part of main .h file writer. Added filewriter.

commit 7b13500
Author: astand <[email protected]>
Date:   Thu Nov 26 22:17:48 2020 +0300

    Added minimal struct of main code generator.

commit 26cf3f3
Author: astand <[email protected]>
Date:   Thu Nov 26 22:12:57 2020 +0300

    SigPrinter minor refactoring. Income Msgs as const.

commit 44e2db2
Author: astand <[email protected]>
Date:   Thu Nov 26 14:45:56 2020 +0300

    Added offset calculation in to_signal expression.

commit 4915ed1
Author: astand <[email protected]>
Date:   Thu Nov 26 11:58:18 2020 +0300

    Added core signals/message expression printer code.

commit 45a85ac
Author: astand <[email protected]>
Date:   Thu Nov 26 10:12:28 2020 +0300

    Added sig-expression and sig-printer base code.

commit 6350af4
Author: astand <[email protected]>
Date:   Thu Nov 26 10:11:47 2020 +0300

    Code dir migration.

commit ab769a9
Author: astand <[email protected]>
Date:   Sun Nov 22 22:30:17 2020 +0300

    Added value table parsing.

commit 7bd24c5
Author: astand <[email protected]>
Date:   Sat Nov 21 22:44:01 2020 +0300

    Added basic dbcscanner core code.
  • Loading branch information
astand committed Jun 30, 2024
1 parent 17a7a68 commit 04e4c42
Show file tree
Hide file tree
Showing 33 changed files with 341 additions and 99 deletions.
22 changes: 21 additions & 1 deletion docs/RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,25 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

## [Unreleased]


## [v3.1] - 2024-06-30

### Added

- CAN FD frames with max DLC (64 bytes) are supported
- Minor type cast improvements in the sign extension function (\_\_ext_sig\_\_)
- (INFR) Test generation script takes one argument: release/debug to specify particular binary call
- istream handling improved in dbcscanner
- The head information with: coderdbc version, dbc file name ([issue #28](https://github.com/astand/c-coderdbc/issues/28))
- General source file (not driver related) have only coderdbc version and date if enabled (see next chages)
- The generation date can be added to head information with '-gendate' argument
- The final output directory path is extended by the driver name when '-driverdir' argument is passed

### Fixed
- Head part info conversion to source code comments in mon-generator module
- FindVersion function improved
- Missing comments from dbc for signals based on real data types (floating-point variables, denoted by '_ro' and '_phys').

## [v3.0] - 2023-10-09

### Added
Expand Down Expand Up @@ -214,7 +233,8 @@ network node defined in DBC
- Fixed some warnings


[Unreleased]: https://github.com/astand/c-coderdbc/compare/v3.0...HEAD
[Unreleased]: https://github.com/astand/c-coderdbc/compare/v3.1...HEAD
[v3.1]: https://github.com/astand/c-coderdbc/compare/v3.0...v3.1
[v3.0]: https://github.com/astand/c-coderdbc/compare/v2.9...v3.0
[v2.9]: https://github.com/astand/c-coderdbc/compare/v2.8...v2.9
[v2.8]: https://github.com/astand/c-coderdbc/compare/v2.7...v2.8
Expand Down
32 changes: 30 additions & 2 deletions run-test-gen.bat
Original file line number Diff line number Diff line change
@@ -1,2 +1,30 @@
start "coder" "build-win/Release/coderdbc.exe" -dbc test\testdb.dbc -out -out test\gencode -drvname testdb -nodeutils -rw
pause
@echo off

rem The bat file checks the first passed from the caller scope string argument
rem If the argument length is greater than 0 the argument is used in path to the coderdbc.exe
rem Examples:

rem ./run-test-gen.bat release
rem build\release\coderdbc.exe

rem ./run-test-gen.bat debug
rem build\debug\coderdbc.exe

echo Argument passed: %~1

rem Check if an argument is provided
if "%~1"=="" (
rem If no argument is provided, set the path directly to "build\coderdbc.exe"
set "CMD_PATH=build\coderdbc.exe"
) else (
rem If an argument is provided, use it to construct the path
set "CMD_PATH=build\%~1\coderdbc.exe"
)

rem Output the combined path for debugging
echo Combined path: %CMD_PATH%

rem Run the program with the constructed path and other options
"%CMD_PATH%" -dbc test\testdb.dbc -out -out test\gencode -drvname testdb -nodeutils -rw

pause
29 changes: 28 additions & 1 deletion run-test-gen.sh
Original file line number Diff line number Diff line change
@@ -1 +1,28 @@
./build/coderdbc -dbc test/testdb.dbc -out test/gencode -drvname testdb -nodeutils -rw
#!/bin/bash

# The bat file checks the first passed from the caller scope string argument
# If the argument length is greater than 0 the argument is used in path to the coderdbc.exe
# Examples:

# ./run-test-gen.sh release
# build/release/coderdbc

# ./run-test-gen.sh debug
# build/debug/coderdbc

# ATTENTION: this script is not tested in Linux yet!!!

# Check if an argument is provided
if [ -z "$1" ]; then
# If no argument is provided, set the path directly
CMD_PATH="build/coderdbc"
else
# If an argument is provided, use it to construct the path
CMD_PATH="build/$1/coderdbc"
fi

# Output the combined path for debugging
echo "Combined path: $CMD_PATH"

# Run the program with the constructed path and other options
"$CMD_PATH" -dbc test/testdb.dbc -out test/gencode -drvname testdb -nodeutils -rw
101 changes: 95 additions & 6 deletions src/app.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,50 @@
#include <codegen/version.h>
#include <helpers/formatter.h>

/// @brief Function returns filename with extension extracted from full path
/// @param fullfilepath Full file path
/// @return Filename only
std::string ExtractFileName(const std::string& fullfilepath)
{
// find the position of the last path separator
size_t pos = fullfilepath.find_last_of("/\\");

// extract the file name from the full path
std::string filename = (pos == std::string::npos) ? fullfilepath : fullfilepath.substr(pos + 1);

return filename;
}

/// @brief Combines a directory path and a folder name while handling directory separators
/// @param path The initial directory path
/// @param folderName The folder name to append
/// @return The combined path as a string
std::string CombinePath(const std::string& path, const std::string& folderName)
{
// check if path ends with '/' or '\\'
bool pathEndsWithSeparator = !path.empty() && (path.back() == '/' || path.back() == '\\');

// check if folderName starts with '/' or '\\'
bool folderStartsWithSeparator = !folderName.empty() && (folderName.front() == '/' || folderName.front() == '\\');

// combine path and folderName based on separators
if (pathEndsWithSeparator && folderStartsWithSeparator)
{
// both have separators, remove one from folderName
return path + folderName.substr(1);
}
else if (!pathEndsWithSeparator && !folderStartsWithSeparator)
{
// neither has a separator, add one
return path + '/' + folderName;
}
else
{
// exactly one has a separator, just concatenate
return path + folderName;
}
}

void CoderApp::Run()
{
std::cout << "coderdbc v" << CODEGEN_LIB_VERSION_MAJ << "." << CODEGEN_LIB_VERSION_MIN << std::endl << std::endl;
Expand Down Expand Up @@ -48,16 +92,50 @@ void CoderApp::GenerateCode()
return;
}

reader.open(Params.dbc.first);
std::ifstream file(Params.dbc.first);

std::istream& s = reader;
if (!file.is_open())
{
// Pass ifstream as istream to processStream function
std::cerr << "Unable to open DBC file" << std::endl;
exit(1);
}

scanner.TrimDbcText(file);
file.close();

auto filename = ExtractFileName(Params.dbc.first);
// get current time
std::time_t now = std::time(nullptr);
// convert to local time
std::tm* loctime = std::localtime(&now);
// create driver related comment block
std::stringstream driversrcinfo;
driversrcinfo << "// DBC filename : " << filename << "\n";
// create common comment block
std::stringstream commonsrcinfo;
commonsrcinfo << "// Generator version : v" << CODEGEN_LIB_VERSION_MAJ << "." << CODEGEN_LIB_VERSION_MIN << "\n";

if (loctime && Params.add_gen_date)
{
// put the date and time inside common comment block
commonsrcinfo << "// Generation time : " << std::put_time(loctime, "%Y.%m.%d %H:%M:%S") << "\n";
}

scanner.TrimDbcText(s);
std::string finalpath = Params.outdir.first;

std::string info("");
if (Params.is_driver_dir)
{
// append the folder name to the path
finalpath = CombinePath(Params.outdir.first, Params.drvname.first);
}

// create main destination directory
fscreator.Configure(Params.drvname.first, Params.outdir.first, info, scanner.dblist.ver.hi, scanner.dblist.ver.low);
fscreator.Configure(Params.drvname.first, finalpath,
commonsrcinfo.str(),
driversrcinfo.str(),
scanner.dblist.ver.hi,
scanner.dblist.ver.low);

auto ret = fscreator.PrepareDirectory(Params.is_rewrite);

Expand Down Expand Up @@ -169,6 +247,8 @@ void CoderApp::GenerateCode()
ciugen.Generate(scanner.dblist, fscreator.FS, groups, Params.drvname.first);
}
}

std::cout << std::endl << "Source code generation completed." << std::endl;
}

/// @brief Checks if all mandatory configuration parameters are provided
Expand All @@ -192,20 +272,29 @@ void CoderApp::PrintHelp()
std::cout << std::endl;
std::cout << "optional parameters:" << std::endl;
std::cout << " -nodeutils\t will generate specific pairs of binutils drivers for each node" << std::endl;
std::cout << std::endl;
std::cout << " -rw\t\t by default each new generation with previously used params" << std::endl;
std::cout << " \t\t will create new sud-directory with source files (000, 001, ... etc)" << std::endl;
std::cout << " \t\t '-rw' option enables rewriting: all source files previously generated" << std::endl;
std::cout << " \t\t will be replaced by new ones" << std::endl;
std::cout << std::endl;
std::cout << " -noconfig:\t no {drivername}-config and dbccodeconfig generation" << std::endl;
std::cout << " -noinc:\t no canmonitorutil.h generation" << std::endl;
std::cout << " -nofmon:\t no ***-fmon.c generation" << std::endl;
std::cout << std::endl;
std::cout << " -driverdir\t the output path (-out) will be appended by driver name" << std::endl;
std::cout << " -gendate\t the generation date will be included in the header comment section of the source file." <<
std::endl;
std::cout << std::endl;

std::cout << "examples:" << std::endl;
std::cout << std::endl;

std::cout <<
"./dbccoder -dbc /home/user/docs/driveshaft.dbc -out /home/user/docs/gen/ -drvname drivedb -nodeutils -rw" << std::endl;
"./dbccoder -dbc /home/user/docs/driveshaft.dbc -out /home/user/docs/gen/ -drvname drivedb -nodeutils -rw -driverdir -gendate"
<< std::endl;
std::cout << "./dbccoder -dbc /home/user/docs/driveshaft.dbc -out /home/user/docs/gen/ -drvname drivedb -nodeutils -rw"
<< std::endl;

std::cout <<
"./dbccoder -dbc /home/user/docs/driveshaft.dbc -out /home/user/docs/gen/ -drvname drivedb -nodeutils" << std::endl;
Expand Down
34 changes: 12 additions & 22 deletions src/codegen/c-main-generator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,17 @@ const char* ext_sig_func_name = "__ext_sig__";

const char* extend_func_body =
"// This function performs extension of sign for the signals\n"
"// which have non-aligned to power of 2 bit's width.\n"
"// The types 'bitext_t' and 'ubitext_t' define maximal bit width which\n"
"// whose bit width value is not aligned to one of power of 2 or less than 8.\n"
"// The types 'bitext_t' and 'ubitext_t' define the biggest bit width which\n"
"// can be correctly handled. You need to select type which can contain\n"
"// n+1 bits where n is the largest signed signal width. For example if\n"
"// the most wide signed signal has a width of 31 bits you need to set\n"
"// bitext_t as int32_t and ubitext_t as uint32_t\n"
"// Defined these typedefs in @dbccodeconf.h or locally in 'dbcdrvname'-config.h\n"
"static bitext_t %s(ubitext_t val, uint8_t bits)\n"
"{\n"
" ubitext_t const m = 1u << (bits - 1);\n"
" return (val ^ m) - m;\n"
" ubitext_t const m = (ubitext_t) (1u << (bits - 1u));\n"
" return ((val ^ m) - m);\n"
"}\n\n";

void CiMainGenerator::Generate(DbcMessageList_t& dlist, const AppSettings_t& fsd)
Expand Down Expand Up @@ -83,14 +83,8 @@ void CiMainGenerator::Generate(DbcMessageList_t& dlist, const AppSettings_t& fsd
void CiMainGenerator::Gen_MainHeader()
{
std::set<std::string> passed_sigs;

// write comment start text
if (fdesc->gen.start_info.size() > 0)
{
// replace all '\n' on "\n //" for c code comment text
fwriter.Append("// " + std::regex_replace(fdesc->gen.start_info, std::regex("\n"), "\n// "));
}

fwriter.AppendText(fdesc->gen.start_common_info);
fwriter.AppendText(fdesc->gen.start_driver_info);
fwriter.Append("#pragma once");
fwriter.Append();
fwriter.Append("#ifdef __cplusplus\nextern \"C\" {\n#endif");
Expand Down Expand Up @@ -336,12 +330,9 @@ void CiMainGenerator::Gen_MainHeader()

void CiMainGenerator::Gen_MainSource()
{
if (fdesc->gen.start_info.size() > 0)
{
// replace all '\n' on "\n //" for c code comment text
fwriter.Append("// " + std::regex_replace(fdesc->gen.start_info, std::regex("\n"), "\n// "));
}

fwriter.AppendText(fdesc->gen.start_common_info);
fwriter.AppendText(fdesc->gen.start_driver_info);
// include main header file
fwriter.Append("#include \"%s\"", fdesc->file.core_h.fname.c_str());
fwriter.Append(2);
Expand Down Expand Up @@ -443,11 +434,8 @@ void CiMainGenerator::Gen_MainSource()

void CiMainGenerator::Gen_ConfigHeader()
{
if (fdesc->gen.start_info.size() > 0)
{
// replace all '\n' on "\n //" for c code comment text
fwriter.Append("// " + std::regex_replace(fdesc->gen.start_info, std::regex("\n"), "\n// "));
}
fwriter.AppendText(fdesc->gen.start_common_info);
fwriter.AppendText(fdesc->gen.start_driver_info);

ConfigGenerator confgen;
confgen.FillHeader(fwriter, fdesc->gen);
Expand All @@ -471,6 +459,7 @@ void CiMainGenerator::Gen_FMonSource()

void CiMainGenerator::Gen_CanMonUtil()
{
fwriter.AppendText(fdesc->gen.start_common_info);
fwriter.Append("#pragma once");
fwriter.Append("");
fwriter.Append("#include <stdint.h>");
Expand Down Expand Up @@ -530,6 +519,7 @@ void CiMainGenerator::Gen_CanMonUtil()

void CiMainGenerator::Gen_DbcCodeConf()
{
fwriter.AppendText(fdesc->gen.start_common_info);
fwriter.Append("#pragma once");
fwriter.Append("");
fwriter.Append("#include <stdint.h>");
Expand Down
5 changes: 3 additions & 2 deletions src/codegen/c-sigprinter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#include <memory>
#include "c-sigprinter.h"
#include "helpers/formatter.h"
#include "conf-and-limits.h"

// work buffer for all snprintf operations
static const size_t WBUFF_LEN = 2048;
Expand Down Expand Up @@ -190,9 +191,9 @@ std::string CSigPrinter::PrintSignalExpr(const SignalDescriptor_t* sig, std::vec
uint16_t startb = (uint16_t)((sig->Order == BitLayout::kIntel) ?
(sig->StartBit + (sig->LengthBit - 1)) : (sig->StartBit));

if (startb > 63)
if (startb > CONF_LIMIT_HIGHEST_BIT_POSITION)
{
startb = 63;
startb = CONF_LIMIT_HIGHEST_BIT_POSITION;
}

uint32_t bn = (startb / 8);
Expand Down
14 changes: 4 additions & 10 deletions src/codegen/c-util-generator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,8 @@ void CiUtilGenerator::Generate(DbcMessageList_t& dlist, const AppSettings_t& fsd
void CiUtilGenerator::PrintHeader()
{
tof.Flush();

if (gdesc->start_info.size() > 0)
{
tof.Append("// " + std::regex_replace(gdesc->start_info, std::regex("\n"), "\n// "));
}

tof.AppendText(gdesc->start_common_info);
tof.AppendText(gdesc->start_driver_info);
tof.Append("#pragma once");
tof.Append();

Expand Down Expand Up @@ -197,10 +193,8 @@ void CiUtilGenerator::PrintHeader()

void CiUtilGenerator::PrintSource()
{
if (gdesc->start_info.size() > 0)
{
tof.Append("// " + std::regex_replace(gdesc->start_info, std::regex("\n"), "\n// "));
}
tof.AppendText(gdesc->start_common_info);
tof.AppendText(gdesc->start_driver_info);

tof.Append("#include \"%s\"", fdesc->util_h.fname.c_str());
tof.Append();
Expand Down
Loading

0 comments on commit 04e4c42

Please sign in to comment.