Skip to content

Adds event switching function blocks (E_SWITCH_1 to E_SWITCH_4)#2090

Open
franz-hoepfinger-4diac wants to merge 2 commits intoeclipse-4diac:developfrom
franz-hoepfinger-4diac:a8
Open

Adds event switching function blocks (E_SWITCH_1 to E_SWITCH_4)#2090
franz-hoepfinger-4diac wants to merge 2 commits intoeclipse-4diac:developfrom
franz-hoepfinger-4diac:a8

Conversation

@franz-hoepfinger-4diac
Copy link
Copy Markdown
Contributor

No description provided.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Feb 1, 2026

Test Results

  110 files  ±0    110 suites  ±0   1m 9s ⏱️ -2s
6 108 tests ±0  6 108 ✅ ±0  0 💤 ±0  0 ❌ ±0 
6 109 runs  ±0  6 109 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit ec17a3f. ± Comparison against base commit 1ba5714.

This pull request removes 29 and adds 11 tests. Note that renamed tests count towards both.

 
  *
  Multi-line comment
 Multi-line comment
 comment *)->
 comment */->
(*
*)
*/
…
org.eclipse.fordiac.ide.test.model.util.StringTransformTest ‑ transformStringName(String, String) 10: (*
 Multi-line comment
*)
s := "Hello   World!";
->s:="Hello   World!";
org.eclipse.fordiac.ide.test.model.util.StringTransformTest ‑ transformStringName(String, String) 11: /*
 Multi-line comment
*/
s := "Hello   World!";
->s:="Hello   World!";
org.eclipse.fordiac.ide.test.model.util.StringTransformTest ‑ transformStringName(String, String) 15: whitespace at the end 
->whitespace at the end
org.eclipse.fordiac.ide.test.model.util.StringTransformTest ‑ transformStringName(String, String) 22: test unclosed multine comment
(*
  Multi-line comment
  *
->test unclosed multine comment
org.eclipse.fordiac.ide.test.model.util.StringTransformTest ‑ transformStringName(String, String) 23: test unclosed multine comment
(*
  Multi-line comment

->test unclosed multine comment
org.eclipse.fordiac.ide.test.model.util.StringTransformTest ‑ transformStringName(String, String) 24: test unclosed multine comment
/*
  Multi-line comment
  *
->test unclosed multine comment
org.eclipse.fordiac.ide.test.model.util.StringTransformTest ‑ transformStringName(String, String) 25: test unclosed multine comment
/*
  Multi-line comment

->test unclosed multine comment
org.eclipse.fordiac.ide.test.model.util.StringTransformTest ‑ transformStringName(String, String) 5: (* This is a multi-line 
 
 comment *)->
org.eclipse.fordiac.ide.test.model.util.StringTransformTest ‑ transformStringName(String, String) 6: /* This is a multi-line 
 
 comment */->
org.eclipse.fordiac.ide.test.model.util.StringTransformTest ‑ transformStringName(String, String) 8: // This is a single-line  
test->test
…

Copy link
Copy Markdown
Contributor

@azoitl azoitl left a comment

Choose a reason for hiding this comment

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

For me these are very strange FBs. When I read E_SWITCH_3 or E_SWITCH_4 I would have epected that I have an USINT input and 3 or 4 Event outputs to which I switch. Waht you are showing here can be done with n E_SWITCH blocks much cleaner and without filling our lib.

@franz-hoepfinger-4diac
Copy link
Copy Markdown
Contributor Author

For me these are very strange FBs. When I read E_SWITCH_3 or E_SWITCH_4 I would have epected that I have an USINT input and 3 or 4 Event outputs to which I switch.

this would be redundant, as we already have them as E_DEMUX_2 and E_DEMUX_4

Requesting a Review from @oellith

@oellith
Copy link
Copy Markdown

oellith commented Mar 30, 2026

I currently use multiple E_SWITCH blocks to handle this, so for me it would be ok to keep it like this. Or we need a new name when we want a generic function block for this?
Screenshot 2026-03-30 113109

@azoitl
Copy link
Copy Markdown
Contributor

azoitl commented Mar 30, 2026

@franz-hoepfinger-4diac pointed me to the Matrix channel where you started the discussion. As Matrix is not the best tool for keeping track of ideas we have put in our updated contribution guides the suggestion to discuss such things in a Github discussion. This allows to be better track design decisions and refer them from PRs.

I forgot that we also have the E_DEMUX blocks. I think we really need to come up with cleaner names and discuss them better. I know nameing is hard.

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.

3 participants