decode_packet_trace.py (11828:36b064696175) decode_packet_trace.py (12211:149c9225b7d6)
1#!/usr/bin/env python2
2
3# Copyright (c) 2013-2014 ARM Limited
4# All rights reserved
5#
6# The license below extends only to copyright in the software and shall
7# not be construed as granting a license to any other intellectual
8# property including but not limited to intellectual property relating

--- 91 unchanged lines hidden (view full) ---

100
101 # Add the packet header
102 header = packet_pb2.PacketHeader()
103 protolib.decodeMessage(proto_in, header)
104
105 print "Object id:", header.obj_id
106 print "Tick frequency:", header.tick_freq
107
1#!/usr/bin/env python2
2
3# Copyright (c) 2013-2014 ARM Limited
4# All rights reserved
5#
6# The license below extends only to copyright in the software and shall
7# not be construed as granting a license to any other intellectual
8# property including but not limited to intellectual property relating

--- 91 unchanged lines hidden (view full) ---

100
101 # Add the packet header
102 header = packet_pb2.PacketHeader()
103 protolib.decodeMessage(proto_in, header)
104
105 print "Object id:", header.obj_id
106 print "Tick frequency:", header.tick_freq
107
108 for id_string in header.id_strings:
109 print 'Master id %d: %s' % (id_string.key, id_string.value)
110
108 print "Parsing packets"
109
110 num_packets = 0
111 packet = packet_pb2.Packet()
112
113 # Decode the packet messages until we hit the end of the file
114 while protolib.decodeMessage(proto_in, packet):
115 num_packets += 1

--- 23 unchanged lines hidden ---
111 print "Parsing packets"
112
113 num_packets = 0
114 packet = packet_pb2.Packet()
115
116 # Decode the packet messages until we hit the end of the file
117 while protolib.decodeMessage(proto_in, packet):
118 num_packets += 1

--- 23 unchanged lines hidden ---