aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Schink <swo-dev@marcschink.de>2014-12-31 16:20:45 +0100
committerMarc Schink <swo-dev@marcschink.de>2015-01-02 00:48:11 +0100
commit1789cced5ee06bbe658a07a897271252c48fbbf9 (patch)
tree8da69c6b84af06ee4428e4b6ae636b549db757b0
parent812cb452859712c51e61e5dad2c3297439b16102 (diff)
Rearrange packet output.
-rw-r--r--src/main.c25
1 files changed, 13 insertions, 12 deletions
diff --git a/src/main.c b/src/main.c
index 734d211..1c00615 100644
--- a/src/main.c
+++ b/src/main.c
@@ -121,8 +121,8 @@ static void handle_hw_packet(const union libswo_packet *packet)
return;
}
- printf("Hardware source (address = %u, size = %zu bytes, value = %x)\n",
- packet->hw.address, packet->hw.size - 1, packet->hw.value);
+ printf("Hardware source (address = %u, value = %x, size = %zu bytes)\n",
+ packet->hw.address, packet->hw.value, packet->hw.size - 1);
}
static void handle_inst_packet(const union libswo_packet *packet)
@@ -130,9 +130,9 @@ static void handle_inst_packet(const union libswo_packet *packet)
if (!(packet_type_filter & (1 << LIBSWO_PACKET_TYPE_INST)))
return;
- printf("Instrumentation (address = %u, size = %zu bytes, value = %x)\n",
- packet->inst.address, packet->inst.size - 1,
- packet->inst.value);
+ printf("Instrumentation (address = %u, value = %x, size = %zu bytes)\n",
+ packet->inst.address, packet->inst.value,
+ packet->inst.size - 1);
}
static void handle_overflow_packet(const union libswo_packet *packet)
@@ -194,20 +194,21 @@ static void handle_lts_packet(const union libswo_packet *packet)
switch (packet->lts.relation) {
case LIBSWO_LTS_REL_SYNC:
- tc = "";
+ tc = "synchronous";
break;
case LIBSWO_LTS_REL_TS:
- tc = ", timestamp packet delayed";
+ tc = "timestamp delayed";
break;
case LIBSWO_LTS_REL_SRC:
- tc = ", source packet delayed";
+ tc = "data delayed";
break;
case LIBSWO_LTS_REL_BOTH:
- tc = ", source and timestamp packet delayed";
+ tc = "data and timestamp delayed";
break;
}
- printf("Local timestamp (value = %x%s)\n", packet->lts.value, tc);
+ printf("Local timestamp (relation = %s, value = %x)\n", tc,
+ packet->lts.value);
}
static void handle_gts1_packet(const union libswo_packet *packet)
@@ -215,8 +216,8 @@ static void handle_gts1_packet(const union libswo_packet *packet)
if (!(packet_type_filter & (1 << LIBSWO_PACKET_TYPE_GTS1)))
return;
- printf("Global timestamp (GTS1) (value = %x, wrap = %u, clkch = %u)\n",
- packet->gts1.value, packet->gts1.wrap, packet->gts1.clkch);
+ printf("Global timestamp (GTS1) (wrap = %u, clkch = %u, value = %x)\n",
+ packet->gts1.wrap, packet->gts1.clkch, packet->gts1.value);
}
static void handle_gts2_packet(const union libswo_packet *packet)