Skip to content

Commit

Permalink
filter.rejectPacket
Browse files Browse the repository at this point in the history
  • Loading branch information
rusefillc committed Jul 26, 2024
1 parent 1070010 commit 609733c
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
import java.util.*;

public class ByteRateOfChangeReports {
public static Filter filter = packet -> false;

/**
* sweet baby O(n^2)
*/
Expand Down Expand Up @@ -51,8 +53,11 @@ private static void compareTwoReports(DbcFile dbc, String reportDestinationFolde
if (packet != null) {
prefix = packet.getName() + " ";
DbcField field = packet.getFieldAtByte(id.byteIndex);
if (field != null)
if (field != null) {
if (filter.rejectPacket(field))
continue;
prefix += field.getName() + " ";
}
}
}

Expand Down Expand Up @@ -161,4 +166,8 @@ public ByteVariationDifference(int deltaCount, String msg) {
this.msg = msg;
}
}

public interface Filter {
boolean rejectPacket(DbcField dbcField);
}
}

0 comments on commit 609733c

Please sign in to comment.