35#ifndef PacketManager_h
36#define PacketManager_h
38#include "../../lib/scopehal/PacketDecoder.h"
104 bool Validate(std::vector<std::string> headers);
106 std::string Evaluate(
const Packet* pack);
108 static std::string
EatSpaces(std::string str);
121 std::string m_identifier;
122 std::string m_string;
137 static void EatSpaces(std::string str,
size_t& i);
139 bool Validate(std::vector<std::string> headers,
bool nakedLiteralOK =
false);
141 bool Match(
const Packet* pack);
142 std::string Evaluate(
const Packet* pack);
145 std::vector<ProtocolDisplayFilterClause*> m_clauses;
146 std::vector<std::string> m_operators;
161 std::recursive_mutex& GetMutex()
164 const std::map<TimePoint, std::vector<Packet*> >& GetPackets()
167 const std::vector<Packet*>& GetChildPackets(
Packet* pack)
170 const std::map<TimePoint, std::vector<Packet*> >& GetFilteredPackets()
173 const std::vector<Packet*>& GetFilteredChildPackets(
Packet* pack)
187 bool IsChildOpen(
Packet* pack)
190 void SetChildOpen(
Packet* pack,
bool open)
193 std::vector<RowData>& GetRows()
196 void OnMarkerChanged();
199 void RemoveChildHistoryFrom(
Packet* pack);
Declaration of TextureManager.
Data for a marker.
Definition: Marker.h:84
Definition: PacketDecoder.h:85
Keeps track of packetized data history from a single protocol analyzer filter.
Definition: PacketManager.h:153
PacketDecoder * m_filter
The filter we're managing.
Definition: PacketManager.h:208
std::map< Packet *, bool > m_lastChildOpen
Map of packets to child-open flags from last frame.
Definition: PacketManager.h:235
void RefreshRows()
Update the list of rows being displayed.
Definition: PacketManager.cpp:68
void Update()
Handle newly arrived waveform data (may be a change to parameters or a freshly arrived waveform)
Definition: PacketManager.cpp:169
void FilterPackets()
Run the filter expression against the packets.
Definition: PacketManager.cpp:253
Session & m_session
Parent session object.
Definition: PacketManager.h:202
void SetDisplayFilter(std::shared_ptr< ProtocolDisplayFilter > filter)
Sets the current filter expression.
Definition: PacketManager.h:179
std::map< Packet *, std::vector< Packet * > > m_childPackets
Merged child packets.
Definition: PacketManager.h:214
std::recursive_mutex m_mutex
Mutex controlling access to m_packets.
Definition: PacketManager.h:205
std::map< TimePoint, std::vector< Packet * > > m_packets
Our saved packet data.
Definition: PacketManager.h:211
std::shared_ptr< ProtocolDisplayFilter > m_filterExpression
Current filter expression.
Definition: PacketManager.h:226
void RemoveHistoryFrom(TimePoint timestamp)
Removes all history from the specified timestamp.
Definition: PacketManager.cpp:311
std::map< Packet *, std::vector< Packet * > > m_filteredChildPackets
Subset of m_filteredChildPackets that passed the current filter expression.
Definition: PacketManager.h:220
std::map< TimePoint, std::vector< Packet * > > m_filteredPackets
Subset of m_packets that passed the current filter expression.
Definition: PacketManager.h:217
std::vector< RowData > m_rows
The set of rows that are to be displayed, based on current tree expansion and filter state.
Definition: PacketManager.h:232
WaveformCacheKey m_cachekey
Cache key for the current waveform.
Definition: PacketManager.h:223
Definition: PacketDecoder.h:40
Definition: PacketManager.h:96
static std::string EatSpaces(std::string str)
Returns a copy of the input string with spaces removed.
Definition: PacketManager.cpp:621
Definition: PacketManager.h:130
Context data for a single row (used for culling)
Definition: PacketManager.h:48
Marker m_marker
The marker in this row (ignored if m_packet is valid)
Definition: PacketManager.h:87
TimePoint m_stamp
Timestamp of the waveform this packet came from.
Definition: PacketManager.h:81
double m_height
Height of this row.
Definition: PacketManager.h:75
std::shared_ptr< Texture > m_texture
Texture containing the scanline image for this row (only valid if m_packet is a VideoScanlinePacket)
Definition: PacketManager.h:90
Packet * m_packet
The packet in this row (null if m_marker is valid)
Definition: PacketManager.h:84
double m_totalHeight
Total height of the entire list up to this point.
Definition: PacketManager.h:78
A Session stores all of the instrument configuration and other state the user has open.
Definition: Session.h:95
A timestamp, measured in seconds + femtoseconds.
Definition: Marker.h:42