-
Notifications
You must be signed in to change notification settings - Fork 43
/
AnalyzerChannelData.h
41 lines (30 loc) · 1.54 KB
/
AnalyzerChannelData.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#ifndef ANALYZERCHANNELDATA
#define ANALYZERCHANNELDATA
#include <LogicPublicTypes.h>
struct AnalyzerChannelDataData;
class ChannelData;
class LOGICAPI AnalyzerChannelData
{
public:
AnalyzerChannelData( ChannelData* channel_data );
~AnalyzerChannelData();
//State
U64 GetSampleNumber();
BitState GetBitState();
//Basic:
U32 Advance( U32 num_samples ); //move forward the specified number of samples. Returns the number of times the bit changed state during the move.
U32 AdvanceToAbsPosition( U64 sample_number ); //move forward to the specified sample number. Returns the number of times the bit changed state during the move.
void AdvanceToNextEdge(); //move forward until the bit state changes from what it is now.
//Fancier
U64 GetSampleOfNextEdge(); //without moving, get the sample of the next transition.
bool WouldAdvancingCauseTransition( U32 num_samples ); //if we advanced, would we encounter any transitions?
bool WouldAdvancingToAbsPositionCauseTransition( U64 sample_number ); //if we advanced, would we encounter any transitions?
//minimum pulse tracking. The serial analyzer uses this for auto-baud
void TrackMinimumPulseWidth(); //normally this is not enabled.
U64 GetMinimumPulseWidthSoFar();
//Fancier, part II
bool DoMoreTransitionsExistInCurrentData(); //use this when you have a situation where you have multiple lines, and you need to handle the case where one or the other of them may never change again, and you don't know which.
protected:
AnalyzerChannelDataData* mData;
};
#endif //ANALYZERCHANNELDATA