35#ifndef PacketManager_h
36#define PacketManager_h
38#include "../../lib/scopehal/PacketDecoder.h"
104 bool Validate(
const std::vector<std::string>&
headers);
121 std::string m_identifier;
122 std::string m_string;
137 static void EatSpaces(
const std::string&
str,
size_t&
i);
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()
178 const std::map<Packet*, std::vector<Packet*> >& GetFilteredChildPackets()
186 const std::vector<Packet*>& GetFilteredChildPackets(
Packet*
pack)
211 std::vector<RowData>& GetRows()
217 void OnMarkerChanged();
224 std::lock_guard<std::recursive_mutex>
lock(
m_mutex);
Declaration of TextureManager.
Definition AcceleratorBuffer.h:204
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:88
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:242
std::map< Packet *, bool > m_lastChildOpen
Map of packets to child-open flags from last frame.
Definition PacketManager.h:269
void RefreshRows()
Update the list of rows being displayed.
Definition PacketManager.cpp:74
void Update()
Handle newly arrived waveform data (may be a change to parameters or a freshly arrived waveform)
Definition PacketManager.cpp:217
void RefreshIfPending()
Refresh the list of pending packets.
Definition PacketManager.h:222
void FilterPackets()
Run the filter expression against the packets.
Definition PacketManager.cpp:305
Session & m_session
Parent session object.
Definition PacketManager.h:236
void SetDisplayFilter(std::shared_ptr< ProtocolDisplayFilter > filter)
Sets the current filter expression.
Definition PacketManager.h:197
std::map< Packet *, std::vector< Packet * > > m_childPackets
Merged child packets.
Definition PacketManager.h:248
std::recursive_mutex m_mutex
Mutex controlling access to m_packets.
Definition PacketManager.h:239
std::map< TimePoint, std::vector< Packet * > > m_packets
Our saved packet data.
Definition PacketManager.h:245
std::shared_ptr< ProtocolDisplayFilter > m_filterExpression
Current filter expression.
Definition PacketManager.h:260
bool m_refreshPending
True if we have a refresh pending before we can render (i.e. pending deletion or similar)
Definition PacketManager.h:272
void RemoveHistoryFrom(TimePoint timestamp)
Removes all history from the specified timestamp.
Definition PacketManager.cpp:362
std::map< Packet *, std::vector< Packet * > > m_filteredChildPackets
Subset of m_filteredChildPackets that passed the current filter expression.
Definition PacketManager.h:254
std::map< TimePoint, std::vector< Packet * > > m_filteredPackets
Subset of m_packets that passed the current filter expression.
Definition PacketManager.h:251
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:266
WaveformCacheKey m_cachekey
Cache key for the current waveform.
Definition PacketManager.h:257
Definition PacketDecoder.h:40
Definition PacketManager.h:96
static std::string EatSpaces(const std::string &str)
Returns a copy of the input string with spaces removed.
Definition PacketManager.cpp:680
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:126
A timestamp, measured in seconds + femtoseconds.
Definition Marker.h:42