GenericBoardChannel Class Reference

#include <generic_board_channel.h>

Inheritance diagram for GenericBoardChannel:

PhysicalBoardChannel VirtualBoardChannel V1724BoardChannel List of all members.

Public Types

enum  RECORD_FORMAT_TYPE { HEX = 0, ASCII_DEC, ASCII_HEX }

Public Member Functions

 GenericBoardChannel (GenericBoard *parent, int ch_index, cvt_board_data *p_data, void(*scope_refresh)(int, bool), wxMutex *p_data_mutex, AppSettings *p_app_settings)
virtual ~GenericBoardChannel (void)
virtual void SetEnable (bool enable)
bool SetLinePen (int scope_index, const wxPen *line_pen, const wxPen *trigger_pen=NULL)
virtual bool LoadConfig (wxConfigBase *p_config, const wxString &base_section)
virtual bool SaveConfig (wxConfigBase *p_config, const wxString &base_section)
void SetSec2Pix (int scope_index, double sec_per_div)
int Volt2Pix (int scope_index, double value)
int PixY2Dc (int scope_index, int value)
void SetDiv2Pix (int scope_index, double div_2_pix_Y)
void SetLeftDiv2Pix (int scope_index, double div_2_pix_Y)
int Sec2Pix (int scope_index, double value)
double Sample2Sec (int value)
double Pix2Sec (int scope_index, int value)
int Sec2Sample (double value)
void SetVolt2Div (int scope_index, double volt_2_div)
void SetVolt2Pix (int scope_index, double volt_2_pix)
void SetPix (int scope_index, int pix_X, int pix_Y)
void SetLeftPix (int scope_index, int pix_X, int pix_Y)
void DrawCursor (int scope_index, wxDC &dc)
void DrawSamples (int scope_index, wxDC &dc)
void DrawPosition (int scope_index, wxDC &dc)
bool ToggleRecordStatus (const wxString &path, const wxString &file_name, const wxString &timestamp, bool start)
virtual bool RecordSamples (void)
virtual wxString GetRecordChannelNumber (void)
virtual double GetSampleVolt (int i)=0
virtual int GetSample (int i)=0
virtual UINT32 GetBufferCount (void)=0
virtual void DrawTrigger (int scope_index, wxDC &dc)=0
GenericBoardGetParent ()

Public Attributes

bool m_enabled
bool m_scope_view_enabled [SCOPE_NUM_PANELS]
wxColour m_line_color [SCOPE_NUM_PANELS]
int m_line_width [SCOPE_NUM_PANELS]
int m_record_rate_divider
bool m_record_enabled
RECORD_FORMAT_TYPE m_record_format_type
double m_offset_y [SCOPE_NUM_PANELS]
double m_volt_2_bit
double m_bit_2_volt
double m_volt_2_div [SCOPE_NUM_PANELS]
double m_volt_2_pix [SCOPE_NUM_PANELS]
double m_div_2_pix_X [SCOPE_NUM_PANELS]
double m_div_2_pix_Y [SCOPE_NUM_PANELS]
int m_pix_Y [SCOPE_NUM_PANELS]
int m_pix_X [SCOPE_NUM_PANELS]
double m_left_div_2_pix_Y [SCOPE_NUM_PANELS]
int m_left_pix_Y [SCOPE_NUM_PANELS]
int m_left_pix_X [SCOPE_NUM_PANELS]
int m_cursor_position [SCOPE_NUM_PANELS]
bool m_cursor_enabled [SCOPE_NUM_PANELS]
double m_medium_value
bool m_overload_up
bool m_overload_down
wxPen * m_line_pen [SCOPE_NUM_PANELS]
wxPen * m_trigger_pen [SCOPE_NUM_PANELS]
wxBrush * m_trigger_brush [SCOPE_NUM_PANELS]
RecordChControlm_p_record_ch_control
CommonChControlBasem_p_common_ch_control
CursorChControlm_p_cursor_ch_control [SCOPE_NUM_PANELS]
void(* ScopeRefresh )(int, bool)

Protected Attributes

GenericBoardm_parent
bool m_is_recording
wxFile * m_p_record_file
wxMutex * m_p_data_mutex
wxMutex m_samples_mutex
cvt_board_data * m_p_data
int m_ch_index
UINT32 m_record_sample_counter
AppSettingsm_p_app_settings
wxMutex m_record_mutex

Detailed Description

Definition at line 55 of file generic_board_channel.h.


Member Enumeration Documentation

enum GenericBoardChannel::RECORD_FORMAT_TYPE
 

Enumerator:
HEX 
ASCII_DEC 
ASCII_HEX 

Definition at line 58 of file generic_board_channel.h.


Constructor & Destructor Documentation

GenericBoardChannel::GenericBoardChannel GenericBoard parent,
int  ch_index,
cvt_board_data *  p_data,
void(*)(int, bool)  scope_refresh,
wxMutex *  p_data_mutex,
AppSettings p_app_settings
 

Definition at line 37 of file generic_board_channel.cpp.

References m_is_recording, m_medium_value, m_overload_down, m_overload_up, m_parent, and SCOPE_NUM_PANELS.

GenericBoardChannel::~GenericBoardChannel void   )  [virtual]
 

Definition at line 73 of file generic_board_channel.cpp.

References SCOPE_NUM_PANELS.


Member Function Documentation

void GenericBoardChannel::DrawCursor int  scope_index,
wxDC &  dc
 

Definition at line 349 of file generic_board_channel.cpp.

References Sec2Pix().

void GenericBoardChannel::DrawPosition int  scope_index,
wxDC &  dc
 

Definition at line 316 of file generic_board_channel.cpp.

References m_left_div_2_pix_Y, m_offset_y, and DrawingCanvas::NUM_DIV_PER_SCREEN.

void GenericBoardChannel::DrawSamples int  scope_index,
wxDC &  dc
 

Definition at line 365 of file generic_board_channel.cpp.

References GetBufferCount(), GetSample(), GetSampleVolt(), m_cursor_position, m_div_2_pix_Y, AppSettings::m_max_log_X, m_medium_value, AppSettings::m_offset_sec, m_p_app_settings, DrawingCanvas::NUM_DIV_PER_SCREEN, PixY2Dc(), Sec2Pix(), and Sec2Sample().

virtual void GenericBoardChannel::DrawTrigger int  scope_index,
wxDC &  dc
[pure virtual]
 

Implemented in PhysicalBoardChannel, and VirtualBoardChannel.

virtual UINT32 GenericBoardChannel::GetBufferCount void   )  [inline, pure virtual]
 

Implemented in PhysicalBoardChannel, and VirtualBoardChannel.

Referenced by DrawSamples(), and RecordSamples().

GenericBoard* GenericBoardChannel::GetParent  )  [inline]
 

Definition at line 138 of file generic_board_channel.h.

wxString GenericBoardChannel::GetRecordChannelNumber void   )  [virtual]
 

Reimplemented in VirtualBoardChannel.

Definition at line 507 of file generic_board_channel.cpp.

Referenced by ToggleRecordStatus().

virtual int GenericBoardChannel::GetSample int  i  )  [inline, pure virtual]
 

Implemented in PhysicalBoardChannel, and VirtualBoardChannel.

Referenced by DrawSamples().

virtual double GenericBoardChannel::GetSampleVolt int  i  )  [inline, pure virtual]
 

Implemented in PhysicalBoardChannel, and VirtualBoardChannel.

Referenced by DrawSamples().

bool GenericBoardChannel::LoadConfig wxConfigBase *  p_config,
const wxString &  base_section
[virtual]
 

Reimplemented in PhysicalBoardChannel, and VirtualBoardChannel.

Definition at line 101 of file generic_board_channel.cpp.

References m_enabled, m_scope_view_enabled, and SCOPE_NUM_PANELS.

Referenced by VirtualBoardChannel::LoadConfig(), and PhysicalBoardChannel::LoadConfig().

double GenericBoardChannel::Pix2Sec int  scope_index,
int  value
[inline]
 

Definition at line 485 of file generic_board_channel.cpp.

int GenericBoardChannel::PixY2Dc int  scope_index,
int  value
[inline]
 

Definition at line 110 of file generic_board_channel.h.

References m_pix_Y.

Referenced by DrawSamples(), and PhysicalBoardChannel::DrawTrigger().

bool GenericBoardChannel::RecordSamples void   )  [virtual]
 

Definition at line 574 of file generic_board_channel.cpp.

References ASCII_DEC, ASCII_HEX, GetBufferCount(), m_p_record_file, and m_record_sample_counter.

double GenericBoardChannel::Sample2Sec int  value  )  [inline]
 

Definition at line 481 of file generic_board_channel.cpp.

References m_p_app_settings, and AppSettings::m_sample_2_sec.

Referenced by PhysicalBoardChannel::DrawTrigger(), and CursorChControl::UpdateCursorPosition().

bool GenericBoardChannel::SaveConfig wxConfigBase *  p_config,
const wxString &  base_section
[virtual]
 

Reimplemented in PhysicalBoardChannel, and VirtualBoardChannel.

Definition at line 218 of file generic_board_channel.cpp.

Referenced by VirtualBoardChannel::SaveConfig(), and PhysicalBoardChannel::SaveConfig().

int GenericBoardChannel::Sec2Pix int  scope_index,
double  value
[inline]
 

Definition at line 477 of file generic_board_channel.cpp.

Referenced by DrawCursor(), and DrawSamples().

int GenericBoardChannel::Sec2Sample double  value  )  [inline]
 

Definition at line 489 of file generic_board_channel.cpp.

Referenced by DrawSamples().

void GenericBoardChannel::SetDiv2Pix int  scope_index,
double  div_2_pix_Y
 

Definition at line 493 of file generic_board_channel.cpp.

References m_div_2_pix_Y, m_volt_2_div, and m_volt_2_pix.

void GenericBoardChannel::SetEnable bool  enable  )  [virtual]
 

Definition at line 646 of file generic_board_channel.cpp.

References m_p_common_ch_control, and CommonChControlBase::SetEnable().

void GenericBoardChannel::SetLeftDiv2Pix int  scope_index,
double  div_2_pix_Y
 

Definition at line 500 of file generic_board_channel.cpp.

References m_left_div_2_pix_Y.

void GenericBoardChannel::SetLeftPix int  scope_index,
int  pix_X,
int  pix_Y
[inline]
 

Definition at line 123 of file generic_board_channel.h.

References m_left_pix_X, and m_left_pix_Y.

bool GenericBoardChannel::SetLinePen int  scope_index,
const wxPen *  line_pen,
const wxPen *  trigger_pen = NULL
 

Definition at line 282 of file generic_board_channel.cpp.

References m_line_pen, m_trigger_brush, m_trigger_pen, and ScopeRefresh.

Referenced by ViewChControl::UpdateLinePen().

void GenericBoardChannel::SetPix int  scope_index,
int  pix_X,
int  pix_Y
[inline]
 

Definition at line 122 of file generic_board_channel.h.

References m_pix_X, and m_pix_Y.

void GenericBoardChannel::SetSec2Pix int  scope_index,
double  sec_per_div
 

void GenericBoardChannel::SetVolt2Div int  scope_index,
double  volt_2_div
 

Definition at line 468 of file generic_board_channel.cpp.

References m_div_2_pix_Y, m_volt_2_div, and m_volt_2_pix.

Referenced by ViewChControl::UpdateVoltPerDiv().

void GenericBoardChannel::SetVolt2Pix int  scope_index,
double  volt_2_pix
 

bool GenericBoardChannel::ToggleRecordStatus const wxString &  path,
const wxString &  file_name,
const wxString &  timestamp,
bool  start
 

Definition at line 511 of file generic_board_channel.cpp.

References ASCII_DEC, ASCII_HEX, GetRecordChannelNumber(), HEX, m_p_record_file, m_record_format_type, and m_record_sample_counter.

int GenericBoardChannel::Volt2Pix int  scope_index,
double  value
[inline]
 

Definition at line 109 of file generic_board_channel.h.


Member Data Documentation

double GenericBoardChannel::m_bit_2_volt
 

Definition at line 78 of file generic_board_channel.h.

int GenericBoardChannel::m_ch_index [protected]
 

Definition at line 149 of file generic_board_channel.h.

Referenced by VirtualCommonChControl::SetupBoard(), ViewChControl::SetupBoard(), TriggerChControl::SetupBoard(), RecordChControl::SetupBoard(), CursorChControl::SetupBoard(), and CommonChControl::SetupBoard().

bool GenericBoardChannel::m_cursor_enabled[SCOPE_NUM_PANELS]
 

Definition at line 86 of file generic_board_channel.h.

Referenced by CursorChControl::OnCursorTogglebuttonClick().

int GenericBoardChannel::m_cursor_position[SCOPE_NUM_PANELS]
 

Definition at line 85 of file generic_board_channel.h.

Referenced by DrawSamples(), and CursorChControl::UpdateCursorPosition().

double GenericBoardChannel::m_div_2_pix_X[SCOPE_NUM_PANELS]
 

Definition at line 81 of file generic_board_channel.h.

double GenericBoardChannel::m_div_2_pix_Y[SCOPE_NUM_PANELS]
 

Definition at line 81 of file generic_board_channel.h.

Referenced by DrawSamples(), PhysicalBoardChannel::DrawTrigger(), SetDiv2Pix(), and SetVolt2Div().

bool GenericBoardChannel::m_enabled
 

Definition at line 69 of file generic_board_channel.h.

Referenced by LoadConfig(), CommonChControl::OnEnableTogglebuttonClick(), and VirtualCommonChControl::OnVirtualEnableTogglebuttonClick().

bool GenericBoardChannel::m_is_recording [protected]
 

Definition at line 141 of file generic_board_channel.h.

Referenced by GenericBoardChannel().

double GenericBoardChannel::m_left_div_2_pix_Y[SCOPE_NUM_PANELS]
 

Definition at line 83 of file generic_board_channel.h.

Referenced by DrawPosition(), and SetLeftDiv2Pix().

int GenericBoardChannel::m_left_pix_X[SCOPE_NUM_PANELS]
 

Definition at line 84 of file generic_board_channel.h.

Referenced by SetLeftPix().

int GenericBoardChannel::m_left_pix_Y[SCOPE_NUM_PANELS]
 

Definition at line 84 of file generic_board_channel.h.

Referenced by SetLeftPix().

wxColour GenericBoardChannel::m_line_color[SCOPE_NUM_PANELS]
 

Definition at line 71 of file generic_board_channel.h.

wxPen* GenericBoardChannel::m_line_pen[SCOPE_NUM_PANELS]
 

Definition at line 91 of file generic_board_channel.h.

Referenced by SetLinePen().

int GenericBoardChannel::m_line_width[SCOPE_NUM_PANELS]
 

Definition at line 72 of file generic_board_channel.h.

Referenced by ViewChControl::UpdateLineWidth().

double GenericBoardChannel::m_medium_value
 

Definition at line 88 of file generic_board_channel.h.

Referenced by DrawSamples(), and GenericBoardChannel().

double GenericBoardChannel::m_offset_y[SCOPE_NUM_PANELS]
 

Definition at line 77 of file generic_board_channel.h.

Referenced by DrawPosition(), PhysicalBoardChannel::DrawTrigger(), and ViewChControl::UpdateOffset().

bool GenericBoardChannel::m_overload_down
 

Definition at line 89 of file generic_board_channel.h.

Referenced by GenericBoardChannel().

bool GenericBoardChannel::m_overload_up
 

Definition at line 89 of file generic_board_channel.h.

Referenced by GenericBoardChannel().

AppSettings* GenericBoardChannel::m_p_app_settings [protected]
 

Definition at line 151 of file generic_board_channel.h.

Referenced by DrawSamples(), PhysicalBoardChannel::DrawTrigger(), and Sample2Sec().

CommonChControlBase* GenericBoardChannel::m_p_common_ch_control
 

Definition at line 96 of file generic_board_channel.h.

Referenced by SetEnable().

CursorChControl* GenericBoardChannel::m_p_cursor_ch_control[SCOPE_NUM_PANELS]
 

Definition at line 97 of file generic_board_channel.h.

Referenced by CursorChControl::SetupBoard().

cvt_board_data* GenericBoardChannel::m_p_data [protected]
 

Definition at line 148 of file generic_board_channel.h.

wxMutex* GenericBoardChannel::m_p_data_mutex [protected]
 

Definition at line 144 of file generic_board_channel.h.

RecordChControl* GenericBoardChannel::m_p_record_ch_control
 

Definition at line 95 of file generic_board_channel.h.

Referenced by RecordChControl::SetupBoard().

wxFile* GenericBoardChannel::m_p_record_file [protected]
 

Definition at line 142 of file generic_board_channel.h.

Referenced by RecordSamples(), and ToggleRecordStatus().

GenericBoard* GenericBoardChannel::m_parent [protected]
 

Definition at line 138 of file generic_board_channel.h.

Referenced by GenericBoardChannel(), VirtualBoardChannel::GetChannelBufferCount(), VirtualBoardChannel::GetChannelValue(), and VirtualBoardChannel::GetChannelValueVolt().

int GenericBoardChannel::m_pix_X[SCOPE_NUM_PANELS]
 

Definition at line 82 of file generic_board_channel.h.

Referenced by SetPix().

int GenericBoardChannel::m_pix_Y[SCOPE_NUM_PANELS]
 

Definition at line 82 of file generic_board_channel.h.

Referenced by PixY2Dc(), and SetPix().

bool GenericBoardChannel::m_record_enabled
 

Definition at line 74 of file generic_board_channel.h.

Referenced by RecordChControl::OnTogglebuttonClick().

RECORD_FORMAT_TYPE GenericBoardChannel::m_record_format_type
 

Definition at line 75 of file generic_board_channel.h.

Referenced by RecordChControl::OnFormatChoiceSelected(), and ToggleRecordStatus().

wxMutex GenericBoardChannel::m_record_mutex [protected]
 

Definition at line 152 of file generic_board_channel.h.

int GenericBoardChannel::m_record_rate_divider
 

Definition at line 73 of file generic_board_channel.h.

Referenced by RecordChControl::UpdateRateDivider().

UINT32 GenericBoardChannel::m_record_sample_counter [protected]
 

Definition at line 150 of file generic_board_channel.h.

Referenced by RecordSamples(), and ToggleRecordStatus().

wxMutex GenericBoardChannel::m_samples_mutex [protected]
 

Reimplemented in PhysicalBoardChannel.

Definition at line 146 of file generic_board_channel.h.

bool GenericBoardChannel::m_scope_view_enabled[SCOPE_NUM_PANELS]
 

Definition at line 70 of file generic_board_channel.h.

Referenced by LoadConfig(), and ViewChControl::OnViewEnableTogglebuttonClick().

wxBrush* GenericBoardChannel::m_trigger_brush[SCOPE_NUM_PANELS]
 

Definition at line 93 of file generic_board_channel.h.

Referenced by SetLinePen().

wxPen* GenericBoardChannel::m_trigger_pen[SCOPE_NUM_PANELS]
 

Definition at line 92 of file generic_board_channel.h.

Referenced by SetLinePen().

double GenericBoardChannel::m_volt_2_bit
 

Definition at line 78 of file generic_board_channel.h.

Referenced by VirtualBoardChannel::GetSample(), and V1724BoardChannel::WriteChannelTrigger().

double GenericBoardChannel::m_volt_2_div[SCOPE_NUM_PANELS]
 

Definition at line 80 of file generic_board_channel.h.

Referenced by SetDiv2Pix(), SetVolt2Div(), and ViewChControl::UpdateControls().

double GenericBoardChannel::m_volt_2_pix[SCOPE_NUM_PANELS]
 

Definition at line 80 of file generic_board_channel.h.

Referenced by SetDiv2Pix(), and SetVolt2Div().

void(* GenericBoardChannel::ScopeRefresh)(int, bool)
 

Referenced by CursorChControl::OnCursorTogglebuttonClick(), ViewChControl::OnViewEnableTogglebuttonClick(), SetLinePen(), CursorChControl::UpdateCursorPosition(), ViewChControl::UpdateLinePen(), ViewChControl::UpdateOffset(), and ViewChControl::UpdateVoltPerDiv().


The documentation for this class was generated from the following files:
Generated on Mon Mar 19 17:14:09 2007 for CAENScope by  doxygen 1.4.6-NO