Repository navigation
visualizer: fix: read the dy parameter of PacketDropCanvasVisualizer - #1356
Open
adamgeorge309 wants to merge 1 commit into
Open
adamgeorge309 wants to merge 1 commit into
adamgeorge309 wants to merge 1 commit into
Conversation
PacketDropCanvasVisualizer::initialize() read the dx parameter into both dx and dy, so the dy parameter had no effect, and the drop animation turned over at the height dx: 32 pixels with the defaults instead of the documented 64. setAlpha() moves the icon along a parabola whose turning point is at (dx, dy), as the Network Description (NED) comments of the two parameters say. The line dates from 2525087. initialize() now reads dy from the dy parameter. Every canvas packet drop animation turns over at dy, 64 pixels with the defaults. Simulation results do not change: setAlpha() uses the value only to place the figure, during refreshDisplay(). In a run with Cmdenv's fake graphical user interface and fadeOutMode set to simulationTime, the canvas figure fingerprint (ingredient f) of showcases/visualizer/canvas/packetdrop QueueOverflow is the same for dy = 64 and dy = 1 before this commit and differs after it. The fingerprints recorded in tests/fingerprint do not change: their fake graphical user interface runs (ingredients tyf: simulation time, display strings, canvas figures) set fadeOutMode to animationTime, and the 22 tyf rows of the five showcases that display packet drops compute the same fingerprints before and after this commit. Change: src.visualizer.canvas.PacketDropCanvasVisualizer | behavior.change.fix | whatsnew
This was referenced Oct 16, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PacketDropCanvasVisualizer::initialize()read thedxparameter into bothdxanddy, sodyhad no effect and the packet drop animation turned over at the heightdx, 32 pixels with the defaults instead of the documented 64. It now readsdyfrom thedyparameter.Risk: every canvas packet drop animation changes shape; with the defaults the icon rises 64 pixels instead of 32 before it falls, and falls twice as far. Videos of packet drops in showcase pages show the lower arc until they are re-recorded. Simulation results and the fingerprints recorded in
tests/fingerprintdo not change.Closes #1355
One commit:
visualizer: fix: read the dy parameter of PacketDropCanvasVisualizer.The problem
src/inet/visualizer/canvas/common/PacketDropCanvasVisualizer.cc:36-37on master:The Network Description (NED) file declares
double dx = default(32); // Specifies how far the animation turns over along the X axisanddouble dy = default(64); // Specifies how far the animation turns over along the Y axis.setAlpha()(lines 93-96) moves the icon alongpy = a * px * px + b * pxwitha = dy / -(dx * dx)andb = -2 * a * dx, whose turning point is at (dx,dy). The line dates from2525087caf(2017).No C++ interface, NED parameter, message field or feature descriptor changes.
Verification
The canvas figure fingerprint (ingredient
f) of Cmdenv's fake graphical user interface, which hashes every canvas figure after eachrefreshDisplay(), observes the icon position when the fade-out runs on simulation time:dy4c5c-59b94e12-6fb14c5c-59b98d09-09a9tests/fingerprintdoes not see the change. Its fake graphical user interface runs (ingredientstyf: simulation time, display strings, canvas figures) setfadeOutModetoanimationTime. The 22tyfrows of the five showcases that display packet drops (canvas/packetdrop×5,coexistenceWpanHosts×8,gptpandtas×4,analogmodel×3, of whichRoutingdisplays none,tokenbucket×2), run with./fingerprinttest -s -f tyf -m 'gptpandtas|tokenbucket|analogmodel|coexistence|canvas/packetdrop', compute the same fingerprints on master and with this change; 14 of them do not match their recorded values on master either. The reproduction command withfadeOutModeset toanimationTimegives97fc-2bf8for bothdyvalues with this change. No test is added; a test would have to record a figure fingerprint that depends on simulation-time fade-out. The 3D visualizerPacketDropOsgVisualizerdoes not use these parameters.Release build (
make MODE=releasein the root andtests/module/lib), each suite run on masterbba1db4c81and with this change:tests/fingerprint: ./fingerprinttest -s -F tyftests/fingerprint: ./fingerprinttest -s -m 'canvas/packetdrop', every ingredientQueueOverflowfails ontyf(b74a-11e9, recordeddee8-a7c2)tests/module: inet_run_module_tests -m release --no-build -l ERRORPolyhedron_5, which failed once on master and passed in 3 reruns of masterOf the 289 module failures on master, 274 are
tcp_*tests and 15 areConvolutionalCoder12,ConvolutionalCoder34,DimensionalMediumAnalogModel_PrintAttenuation_1,EtherHost_lifecycle,ExternalProcess_3,Ieee80211BitDomain,Ieee80211SymbolDomain,Ieee8021d-Rstp,Ieee8021d-Stp,IPv6_packet_too_big,LogNormalShadowing_Correlated_4,MIPv6_tcp_handover,PacketGate_1,Polyhedron_5,UDPSocket_1. The 5 fingerprint failures are rows ofmipv6-refactoring.csvwhose recorded~tNlbfingerprints are stale on master; the 62 errors are configurations whose optional features are not built.Gates:
check-pull-request.sh --base origin/master(commits, classification, includes, NED parameters, description),check-source-seals.sh --base origin/masterandcheck-architecture.sh src/inet/visualizerpass.Relationship to other pull requests
#1322, #1324, #1326, #1328, #1334, #1337, #1340 and #1342 also add an entry under "Notable bug fixes" in
WHATSNEW; whichever merges later renumbers.