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

NED fieldname in cPatternMatcher is very confusing to use with units #886

Open
edlongman opened this issue Jul 20, 2021 · 1 comment
Open
Labels
new New issue that has not been yet acknowledged

Comments

@edlongman
Copy link
Contributor

Platform

  • OMNeT++ version: 5.4
  • OS: Windows

Describe the bug
When trying to filter packets for the INET Visualizer I applied a filter to the totalLength field to only show if the packet had a certain number of bytes (in it's totalLength field)

  • I tried: networkRouteVisualizer.packetFilter = "totalLength({1..})"; But it needed the unit.
  • So I tried: networkRouteVisualizer.packetFilter = "totalLength({1..}B)";
  • After deep debugging into cmatchexpression I realised that the field with a unit was evaluating as 24 B, so I added a space: networkRouteVisualizer.packetFilter = "totalLength({1..} B)";
  • Still didn't work because the space got stripped! I had to resort to networkRouteVisualizer.packetFilter = "totalLength({1..}*B)";

This whole thing was really confusing and I could only solve it by digging deep into the omnetpp core, which is ok for me, but expects a huge amount of a non c++ competant user. Ideally I wouldn't have to do it either!

To Reproduce
I can provide MWE if required.

@edlongman edlongman added the new New issue that has not been yet acknowledged label Jul 20, 2021
@avarga
Copy link
Contributor

avarga commented Jul 20, 2021

Thanks for the feedback! Actually, we also sort of knew about these kinds of issues, and we started working on a better solution just a couple of days ago. If you'd like a test drive, please ask back next week or so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new New issue that has not been yet acknowledged
Projects
None yet
Development

No branches or pull requests

2 participants