Removing Events¶
Some changes in the model remove events from the simulation, resulting in changed fingerprints, but don’t necessarily invalidate the model. The methods described in the previous steps involving new events are applicable in this case as well. The workflow is the following:
Create fingerprints which are not sensitive to the removal of the event/doesn’t contain the event (such as filter the module the event takes place in, use ingredients which only take into account network communication, or filter only the event itself)
Make the change in the model
Run the fingerprint tests again
As a simplistic example, we’ll delete the removeNonInterferingTransmissions self message from the RadioMedium module. This message schedules a timer to remove those transmissions from the radio medium which can no longer cause any interference. This change doesn’t alter the simulation, but deletes events from it, thus it would change the baseline fingerprints.
First, we create alternate fingerprints by filtering out the removeNonInterferingTransmissions events.
The fingerprint 0000-0000/tplx is a dummy value. It makes the run fail, and the run prints the calculated value:
$ inet -u Cmdenv -c Wifi -r 0 --sim-time-limit=5s --fingerprint=0000-0000/tplx --fingerprint-events='"not fullName=~removeNonInterferingTransmissions"'
Fingerprint mismatch! calculated: XXXX-XXXX/tplx, expected: 0000-0000/tplx
Note the calculated value. The command does not change the store.
We remove the nonInterferingTransmissions message from the code of RadioMedium.cc; we delete the declaration, and all instances of its scheduling.
We build INET and run the simulation again with the same filter expression and the calculated fingerprint:
$ inet -u Cmdenv -c Wifi -r 0 --sim-time-limit=5s --fingerprint=XXXX-XXXX/tplx --fingerprint-events='"not fullName=~removeNonInterferingTransmissions"'
Fingerprint successfully verified
We can restore the baseline fingerprints. Run the update command without filtering to record the new values in the store. This process is described in more detail in the Accepting Fingerprint Changes step.