6 Commits

Author SHA1 Message Date
7eb6a6f7a8 changelog 2025-03-18 14:37:06 +01:00
bb7886f063 bump fsfwgen version 2025-03-18 14:36:22 +01:00
2d7a2a09b8 Merge pull request 'Added new compile time const event parsing' (#4) from baumgartl/events into main
Reviewed-on: #4
Reviewed-by: Robin Müller <muellerr@irs.uni-stuttgart.de>
2025-03-18 14:34:56 +01:00
76139f3934 added new compile time const event parsing 2025-03-14 13:22:10 +01:00
b9c8c9880f prep v0.3.4 2025-01-13 10:40:41 +01:00
7c14b2a2e0 prep v0.3.4 2025-01-13 10:38:07 +01:00
3 changed files with 29 additions and 7 deletions

View File

@ -8,9 +8,18 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
# [unreleased]
# [v0.4.0]
- Update event handling for new `constexpr` templated arguments
# [v0.3.4]
- Hotfixes for pyproject.toml file
# [v0.3.3]
- Fixes for event parsing
- Removed `setup.cfg` and `setup.py`
# [v0.3.2]

View File

@ -186,9 +186,20 @@ class EventParser(FileParser):
r"static const(?:expr)? Event[\s]*([\w]*)[\s]*=[\s]*"
r"MAKE_EVENT\((0x[0-9a-fA-F]+|[0-9]{1,3}),[\s]*severity::([A-Z]*)\)[\s]*;"
)
else:
regex_string = r"static const(?:expr)? Event\s*([\w]+)\s*=\s*event::makeEvent\(([\w:]+),\s*(0x[0-9a-fA-F]+|[0-9]{1,3})\s*,\s*severity::([A-Z]+)\)\s*;"
return re.search(regex_string, full_string)
# Non compiletime const version kept for backwards compatibility
regex_string = r"static const(?:expr)? Event\s*([\w]+)\s*=\s*event::makeEvent\(([\w:]+),\s*(0x[0-9a-fA-F]+|[0-9]{1,3})\s*,\s*severity::([A-Z]+)\)\s*;"
event_full_match = re.search(regex_string, full_string)
# Using old, non compiletime const version
if event_full_match:
return event_full_match
# Using compiletime const version
regex_string = r"static const(?:expr)? Event\s*([\w]+)\s*=\s*event::makeEvent<([\w:]+),\s*(0x[0-9a-fA-F]+|[0-9]{1,3})\s*,\s*severity::([A-Z]+)>\(\)\s*;"
event_full_match = re.search(regex_string, full_string)
return event_full_match
def __build_multi_line_event_string(self, first_line: str, moving_window: List[str]) -> str:

View File

@ -6,15 +6,13 @@ requires = [
build-backend = "setuptools.build_meta"
[project]
name = "fsfwgen"
description = "FSFW Generator Core"
version = "0.3.2"
license = "Apache-2.0"
version = "0.4.0"
license = { text = "Apache-2.0" }
authors = [
{name = "Robin Mueller", email = "robin.mueller.m@gmail.com"}
]
url = "https://egit.irs.uni-stuttgart.de/fsfw/fsfwgen"
classifiers = [
"Development Status :: 5 - Production/Stable",
"License :: OSI Approved :: Apache Software License",
@ -33,6 +31,10 @@ dependencies = [
"colorlog~=6.0"
]
[project.urls]
"Homepage" = "https://egit.irs.uni-stuttgart.de/fsfw/fsfwgen"
[tool.ruff]
exclude = [
".git",