[cooja] plugins/analyzers/IPHCPacketAnalyzer: More verbose output of IPHC options

This commit is contained in:
Enrico Joerns 2014-06-19 04:29:49 +02:00
parent 5ee8c7e178
commit e556419e37

View file

@ -99,7 +99,7 @@ public class IPHCPacketAnalyzer extends PacketAnalyzer {
int cid = (packet.get(1) >> 7) & 0x01; int cid = (packet.get(1) >> 7) & 0x01;
int sac = (packet.get(1) >> 6) & 0x01; int sac = (packet.get(1) >> 6) & 0x01;
int sam = (packet.get(1) >> 4) & 0x03; int sam = (packet.get(1) >> 4) & 0x03;
int m = (packet.get(1) >> 3) & 0x01; boolean m = ((packet.get(1) >> 3) & 0x01) != 0;
int dac = (packet.get(1) >> 2) & 0x01; int dac = (packet.get(1) >> 2) & 0x01;
int dam = packet.get(1) & 0x03; int dam = packet.get(1) & 0x03;
int sci = 0; int sci = 0;
@ -112,13 +112,13 @@ public class IPHCPacketAnalyzer extends PacketAnalyzer {
/* need to decompress while analyzing - add that later... */ /* need to decompress while analyzing - add that later... */
verbose.append("<b>IPHC HC-06</b><br>"); verbose.append("<b>IPHC HC-06</b><br>");
verbose.append("TF = ").append(tf) verbose.append("TF = ").append(tf)
.append(", NH = ").append(nhc) .append(", NH = ").append(nhc ? "compressed" : "inline")
.append(", HLIM = ").append(hlim) .append(", HLIM = ").append(hlim == 0 ? "inline" : hlim)
.append(", CID = ").append(cid) .append(", CID = ").append(cid)
.append(", SAC = ").append(sac) .append(", SAC = ").append(sac == 1 ? "stateless" : "stateful")
.append(", SAM = ").append(sam) .append(", SAM = ").append(sam)
.append(", MCast = ").append(m) .append(", MCast = ").append(m)
.append(", DAC = ").append(dac) .append(", DAC = ").append(dac == 1 ? "stateless" : "stateful")
.append(", DAM = ").append(dam); .append(", DAM = ").append(dam);
if (cid == 1) { if (cid == 1) {
verbose.append("<br>Contexts: sci=").append(packet.get(2) >> 4). verbose.append("<br>Contexts: sci=").append(packet.get(2) >> 4).