Logic Analyzer RPi
Logic Analyzer for the Raspberry Pi
 All Classes Files Functions Variables Pages
Public Member Functions | Public Attributes | List of all members
transition Class Reference

class getting LTH (Low To High) and HTL (High To Low) transitions in logic_input More...

#include <transition.h>

Public Member Functions

 transition (logic_input *data=NULL, uint8_t pin_clock=1, activity *cs=NULL)
 Constructor.
void init (logic_input *data, uint8_t pin_clock, activity *cs=NULL)
 Initialization.
 ~transition ()
 Destructor.
float GetStats (activity *cs, char sign='u')
 Get statistics on transition period (min, average and max)
void find_transition (logic_input *data, char sign='u')
 find the transitions from a logic_input object
int Draw (mglGraph *gr)
 Draw statistics on period transitions.
int Draw (mglGraph *gr, char sign, uint8_t subplot)
 Draw vertical arrows at same times as transitions.

Public Attributes

uint32_t ntransition_up
 number of LTH transitions
uint32_t * index_transition_up
 array of index of logic_input measurements corresponding to all LTH transitions.
mglData t_transition_up
 mglData object containing acquisition time corresponding to all LTH transitions.
uint32_t ntransition_down
 number of HTL transitions
uint32_t * index_transition_down
 array of index of logic_input measurements corresponding to all HTL transitions.
mglData t_transition_down
 mglData object containing acquisition time corresponding to all HTL transitions.
uint8_t npin
 number of pin used during acquisition.
uint8_t pin_clock
 index of the pin of the clock
float period
 mean period of the clock measured
float period_min
 min period of the clock measured
float period_max
 max period of the clock measured
float t_first_activity
 time in s where to center the statistic display

Detailed Description

class getting LTH (Low To High) and HTL (High To Low) transitions in logic_input

Constructor & Destructor Documentation

transition::transition ( logic_input data = NULL,
uint8_t  pin_clock = 1,
activity cs = NULL 
)

Constructor.

Calls init() if data is not NULL.

See Also
init()

Member Function Documentation

int transition::Draw ( mglGraph *  gr)

Draw statistics on period transitions.

Parameters
grpointer to a mglData object
int transition::Draw ( mglGraph *  gr,
char  sign,
uint8_t  subplot 
)

Draw vertical arrows at same times as transitions.

Parameters
grpointer to a mglGraph object.
signsign of the transition:
  • \'u\' for getting stats about LTH transitions.
  • \'d\' for getting stats about HTL transitions.
subplotsubplot index where to draw.
void transition::find_transition ( logic_input data,
char  sign = 'u' 
)

find the transitions from a logic_input object

Parameters
datalogic_input source.
signsign of the transition:
  • \'u\' for getting stats about LTH transitions.
  • \'d\' for getting stats about HTL transitions.
float transition::GetStats ( activity cs,
char  sign = 'u' 
)

Get statistics on transition period (min, average and max)

Parameters
cspointer to an activity. Inactive periods are discarded.
signsign of the transition:
  • \'u\' for getting stats about LTH transitions.
  • \'d\' for getting stats about HTL transitions.
void transition::init ( logic_input data,
uint8_t  pin_clock,
activity cs = NULL 
)

Initialization.

Parameters
datalogic_input source. if not NULL call find_transition().
pin_clockindex of the pin of the clock
cspointer to activity. If not NULL GetStats() is called.
See Also
GetStats() find_transition()

Member Data Documentation

float transition::t_first_activity

time in s where to center the statistic display

initialized at the middle of the first active period


The documentation for this class was generated from the following files: