Main Page | Namespace List | Class Hierarchy | Compound List | File List | Namespace Members | Compound Members | File Members | Related Pages

gr_OscopeGuts Class Reference

guts of oscilloscope trigger and buffer module More...

#include <gr_OscopeGuts.h>

List of all members.

Public Member Functions

 gr_OscopeGuts (int nchannels, double sample_rate, int output_fd)
 ~gr_OscopeGuts ()
void processSample (const float *channel_data)
bool setUpdateRate (double update_rate)
bool setDecimationCount (int decimation_count)
bool setTriggerChannel (int channel)
bool setTriggerMode (gr_TriggerMode mode)
bool setTriggerLevel (double trigger_level)
bool setTriggerLevelAuto ()
int getNumChannels () const
double getSamplingRate () const
double getUpdateRate () const
int getDecimationCount () const
int getTriggerChannel () const
gr_TriggerMode getTriggerMode () const
double getTriggerLevel () const
int getSamplesPerOutputRecord () const

Private Types

enum  ScopeState { HOLD_OFF, LOOK_FOR_TRIGGER, POST_TRIGGER }

Private Member Functions

 gr_OscopeGuts (const gr_OscopeGuts &rhs)
gr_OscopeGutsoperator= (const gr_OscopeGuts &rhs)
void triggerChanged ()
void updateRateOrDecimationChanged ()
int foundTrigger (float sample)
void writeOutputRecords ()
void enterHoldOff ()
void enterLookForTrigger ()
void enterPostTrigger ()

Private Attributes

int d_nchannels
int d_output_fd
gr_TriggerMode d_trigger_mode
int d_trigger_channel
double d_sample_rate
double d_update_rate
double d_trigger_level
int d_obi
float * d_buffer [MAX_CHANNELS]
ScopeState d_state
int d_decimator_count
int d_decimator_count_init
int d_hold_off_count
int d_hold_off_count_init
int d_post_trigger_count
int d_post_trigger_count_init
float d_prev_sample

Static Private Attributes

const int MAX_CHANNELS = 16


Detailed Description

guts of oscilloscope trigger and buffer module

This module processes sets of samples provided the processSample method. When appropriate given the updateRate, sampleRate and trigger conditions, processSample will periodically write output records of captured data to output_fd. For each trigger event, nchannels records will be written. Each record consists of getSamplesPerOutputRecord binary floats. The trigger instant occurs at the 1/2 way point in the buffer. Thus, output records consist of 50% pre-trigger data and 50% post-trigger data.


Member Enumeration Documentation

enum gr_OscopeGuts::ScopeState [private]
 

Enumeration values:
HOLD_OFF 
LOOK_FOR_TRIGGER 
POST_TRIGGER 


Constructor & Destructor Documentation

gr_OscopeGuts::gr_OscopeGuts const gr_OscopeGuts rhs  )  [private]
 

gr_OscopeGuts::gr_OscopeGuts int  nchannels,
double  sample_rate,
int  output_fd
 

gr_OscopeGuts::~gr_OscopeGuts  ) 
 


Member Function Documentation

void gr_OscopeGuts::enterHoldOff  )  [private]
 

void gr_OscopeGuts::enterLookForTrigger  )  [private]
 

void gr_OscopeGuts::enterPostTrigger  )  [private]
 

int gr_OscopeGuts::foundTrigger float  sample  )  [private]
 

int gr_OscopeGuts::getDecimationCount  )  const
 

int gr_OscopeGuts::getNumChannels  )  const
 

int gr_OscopeGuts::getSamplesPerOutputRecord  )  const
 

double gr_OscopeGuts::getSamplingRate  )  const
 

int gr_OscopeGuts::getTriggerChannel  )  const
 

double gr_OscopeGuts::getTriggerLevel  )  const
 

gr_TriggerMode gr_OscopeGuts::getTriggerMode  )  const
 

double gr_OscopeGuts::getUpdateRate  )  const
 

gr_OscopeGuts& gr_OscopeGuts::operator= const gr_OscopeGuts rhs  )  [private]
 

void gr_OscopeGuts::processSample const float *  channel_data  ) 
 

channel_data points to nchannels float values. These are the values for each channel at this sample time.

bool gr_OscopeGuts::setDecimationCount int  decimation_count  ) 
 

bool gr_OscopeGuts::setTriggerChannel int  channel  ) 
 

bool gr_OscopeGuts::setTriggerLevel double  trigger_level  ) 
 

bool gr_OscopeGuts::setTriggerLevelAuto  ) 
 

bool gr_OscopeGuts::setTriggerMode gr_TriggerMode  mode  ) 
 

bool gr_OscopeGuts::setUpdateRate double  update_rate  ) 
 

void gr_OscopeGuts::triggerChanged  )  [private]
 

void gr_OscopeGuts::updateRateOrDecimationChanged  )  [private]
 

void gr_OscopeGuts::writeOutputRecords  )  [private]
 


Member Data Documentation

float* gr_OscopeGuts::d_buffer[MAX_CHANNELS] [private]
 

int gr_OscopeGuts::d_decimator_count [private]
 

int gr_OscopeGuts::d_decimator_count_init [private]
 

int gr_OscopeGuts::d_hold_off_count [private]
 

int gr_OscopeGuts::d_hold_off_count_init [private]
 

int gr_OscopeGuts::d_nchannels [private]
 

int gr_OscopeGuts::d_obi [private]
 

int gr_OscopeGuts::d_output_fd [private]
 

int gr_OscopeGuts::d_post_trigger_count [private]
 

int gr_OscopeGuts::d_post_trigger_count_init [private]
 

float gr_OscopeGuts::d_prev_sample [private]
 

double gr_OscopeGuts::d_sample_rate [private]
 

ScopeState gr_OscopeGuts::d_state [private]
 

int gr_OscopeGuts::d_trigger_channel [private]
 

double gr_OscopeGuts::d_trigger_level [private]
 

gr_TriggerMode gr_OscopeGuts::d_trigger_mode [private]
 

double gr_OscopeGuts::d_update_rate [private]
 

const int gr_OscopeGuts::MAX_CHANNELS = 16 [static, private]
 


The documentation for this class was generated from the following files:
Generated on Tue Mar 30 21:32:08 2004 for GNU Radio by doxygen 1.3.2