30#ifndef PacketDecoder_h
31#define PacketDecoder_h
52 std::map<std::string, std::string> m_headers;
55 std::vector<uint8_t> m_headerdata;
58 std::vector<uint8_t> m_data;
61 std::string m_displayForegroundColor;
64 std::string m_displayBackgroundColor;
67 uint32_t m_displayForegroundColorPacked;
68 uint32_t m_displayBackgroundColorPacked;
70 bool m_packedColorsValid;
74 if(m_packedColorsValid)
76 m_packedColorsValid =
true;
78 m_displayForegroundColorPacked = ColorFromString(m_displayForegroundColor);
79 m_displayBackgroundColorPacked = ColorFromString(m_displayBackgroundColor);
93 const std::vector<Packet*>& GetPackets()
96 virtual std::vector<std::string> GetHeaders() =0;
98 virtual bool GetShowDataColumn();
99 virtual bool GetShowImageColumn();
106 {
return pack->m_headers[GetHeaders()[
i]]; }
119 PROTO_COLOR_DATA_READ,
120 PROTO_COLOR_DATA_WRITE,
123 PROTO_STANDARD_COLOR_COUNT
126 static std::string m_backgroundColors[PROTO_STANDARD_COLOR_COUNT];
134 { m_packets.clear(); }
139 std::vector<Packet*> m_packets;
Definition AcceleratorBuffer.h:204
Abstract base class for all filter graph blocks which are not physical instrument channels.
Definition Filter.h:105
Category
Category the filter should be displayed under in the GUI.
Definition Filter.h:118
Definition PacketDecoder.h:88
virtual std::string GetDecodedField(Packet *pack, size_t i)
Transition helper until we deprecate the old header API to get the decoded text of the Nth header.
Definition PacketDecoder.h:105
void ClearPackets()
Destroys all currently attached packets.
Definition PacketDecoder.cpp:84
virtual bool CanMerge(Packet *first, Packet *cur, Packet *next)
Checks if multiple packets can be merged under a single heading in the protocol analyzer view.
Definition PacketDecoder.cpp:114
virtual Packet * CreateMergedHeader(Packet *pack, size_t i)
Creates a summary packet for one or more merged packets.
Definition PacketDecoder.cpp:125
void DetachPackets()
Clears the list of packets attached to this filter without freeing memory.
Definition PacketDecoder.h:133
PacketColor
Standard colors for protocol analyzer lines.
Definition PacketDecoder.h:114
Definition PacketDecoder.h:40
int64_t m_offset
Offset of the packet from the start of the capture (femtoseconds)
Definition PacketDecoder.h:46
int64_t m_len
Duration time of the packet (femtoseconds)
Definition PacketDecoder.h:49