24 #ifndef INCLUDED_GR_OSCOPE_GUTS_H
25 #define INCLUDED_GR_OSCOPE_GUTS_H
46 static const int MAX_CHANNELS = 8;
48 enum scope_state { HOLD_OFF, LOOK_FOR_TRIGGER, POST_TRIGGER };
54 int d_trigger_channel;
57 double d_trigger_level;
60 float *d_buffer[MAX_CHANNELS];
63 int d_decimator_count;
64 int d_decimator_count_init;
66 int d_hold_off_count_init;
67 int d_pre_trigger_count;
68 int d_post_trigger_count;
69 int d_post_trigger_count_init;
76 void trigger_changed ();
77 void update_rate_or_decimation_changed ();
78 bool found_trigger ();
79 void write_output_records ();
81 void enter_hold_off ();
82 void enter_look_for_trigger ();
83 void enter_post_trigger ();
96 void process_sample (
const float *channel_data);
98 bool set_update_rate (
double update_rate);
99 bool set_decimation_count (
int decimation_count);
100 bool set_trigger_channel (
int channel);
103 bool set_trigger_level (
double trigger_level);
104 bool set_trigger_level_auto ();
105 bool set_sample_rate(
double sample_rate);
106 bool set_num_channels(
int nchannels);
110 int num_channels ()
const;
111 double sample_rate ()
const;
112 double update_rate ()
const;
113 int get_decimation_count ()
const;
114 int get_trigger_channel ()
const;
117 double get_trigger_level ()
const;
120 int get_samples_per_output_record ()
const;