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()
199 void OnMarkerChanged();
206 std::lock_guard<std::recursive_mutex> lock(
m_mutex);
215 void RemoveChildHistoryFrom(
Packet* pack);
Declaration of TextureManager.
Data for a marker.
Definition: Marker.h:85
virtual std::string GetDisplayName() override
Gets the human-readable nickname for this channel, as displayed in the GUI.
Definition: OscilloscopeChannel.cpp:261
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:224
std::map< Packet *, bool > m_lastChildOpen
Map of packets to child-open flags from last frame.
Definition: PacketManager.h:251
void RefreshRows()
Update the list of rows being displayed.
Definition: PacketManager.cpp:71
void Update()
Handle newly arrived waveform data (may be a change to parameters or a freshly arrived waveform)
Definition: PacketManager.cpp:186
void RefreshIfPending()
Refresh the list of pending packets.
Definition: PacketManager.h:204
void FilterPackets()
Run the filter expression against the packets.
Definition: PacketManager.cpp:270
Session & m_session
Parent session object.
Definition: PacketManager.h:218
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:230
std::recursive_mutex m_mutex
Mutex controlling access to m_packets.
Definition: PacketManager.h:221
std::map< TimePoint, std::vector< Packet * > > m_packets
Our saved packet data.
Definition: PacketManager.h:227
std::shared_ptr< ProtocolDisplayFilter > m_filterExpression
Current filter expression.
Definition: PacketManager.h:242
bool m_refreshPending
True if we have a refresh pending before we can render (i.e. pending deletion or similar)
Definition: PacketManager.h:254
void RemoveHistoryFrom(TimePoint timestamp)
Removes all history from the specified timestamp.
Definition: PacketManager.cpp:328
std::map< Packet *, std::vector< Packet * > > m_filteredChildPackets
Subset of m_filteredChildPackets that passed the current filter expression.
Definition: PacketManager.h:236
std::map< TimePoint, std::vector< Packet * > > m_filteredPackets
Subset of m_packets that passed the current filter expression.
Definition: PacketManager.h:233
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:248
WaveformCacheKey m_cachekey
Cache key for the current waveform.
Definition: PacketManager.h:239
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:640
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