gccDppConsole Test C++ SDK  1.0.0.0
DPP C++ Console Demonstration
Public Member Functions | Public Attributes
CConsoleHelper Class Reference

#include <ConsoleHelper.h>

Collaboration diagram for CConsoleHelper:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 CConsoleHelper (void)
 ~CConsoleHelper (void)
bool LibUsb_Connect_Default_DPP ()
 LibUsb connect to the default DPP.
void LibUsb_Close_Connection ()
 LibUsb close the current connection.
bool LibUsb_SendCommand (TRANSMIT_PACKET_TYPE XmtCmd)
 LibUsb send a command that does not require additional processing.
bool LibUsb_SendCommand_Config (TRANSMIT_PACKET_TYPE XmtCmd, CONFIG_OPTIONS CfgOptions)
 LibUsb send a command that requires configuration options processing.
bool LibUsb_ReceiveData ()
 LibUsb receive data.
bool ReceiveData ()
 Processes DPP data from all communication interfaces (USB,RS232,INET)
void ProcessSpectrumEx (Packet_In PIN, DppStateType DppState)
 Processes spectrum packets.
void ClearConfigReadFormatFlags ()
 Clears configuration readback format flags.
void ProcessCfgReadEx (Packet_In PIN, DppStateType DppState)
 Processes configuration packets.
void CreateConfigOptions (CONFIG_OPTIONS *CfgOptions, string strCfg, CDP5Status DP5Stat, bool bUseCoarseFineGain)
 Populates the configuration command options data structure.
void ConsoleGraph (long lData[], long chan, bool bLog, std::string strStatus)
 Provides a low resolution text console graph.
string GetCmdData (string strCmd, string strCfgData)
 Returns the configuration command data from a configuration command string.
string ReplaceCmdDesc (string strCmd, string strCfgData)
 Replaces (or inserts a command decription (comment) in a configuration command string.
string GetCmdDesc (string strCmd)
 Returns the command decription (comment) in a configuration command string.

Public Attributes

CDppLibUsb DppLibUsb
 LibUsb communications class.
bool LibUsb_isConnected
 LibUsb is connected if true.
int LibUsb_NumDevices
 LibUsb number of devices found.
CDP5Protocol DP5Proto
 Defines and implements DPP protocol.
CSendCommand SndCmd
 Generates command packet to be sent.
CParsePacket ParsePkt
 DPP packet parsing.
CDP5Status DP5Stat
 DPP status processing.
string DppStatusString
 DPP status display string.
bool b80MHzMode
 FPGA 80MHz clock when true, 20MHz clock otherwise.
string strMcaMode
 Holds MCA MODE display string. (NORM=MCA, MCS, FAST, etc.)
vector< string > Dp5CmdList
 DPP configuration command array.
bool DisplayCfg
 format configuration for display
bool DisplaySca
 format sca for display (sca config sent separately)
bool CfgReadBack
 format configuration for general readback
bool SaveCfg
 format configuration for file save
bool PrintCfg
 format configuration for print
bool HwCfgReady
 configuration ready flag
bool ScaReadBack
 sca readback ready flag
string HwCfgDP5
 Holds the hardware configuration readback.
int mcaCH
 Number of data channels.
double SlowThresholdPct
 Slow threshold in percent.
int FastChThreshold
 Fast channel threshold.
double RiseUS
 Peaking time value.
string strGainDisplayValue
 Total gain display string.
int AcqMode
 Acquisition mode. (0=MCA, 1=MCS)
int PresetCount
 preset count setting
double PresetAcq
 preset acquisition time setting
double PresetRt
 preset real time setting
string strPresetCmd
 presets mode summary (counts,accum. time,real time)
string strPresetVal
 presets settings summary (preset values, counts,times)
bool UpdateScopeCfg
string strInputOffset
string strAnalogOut
string strOutputOffset
string strTriggerSource
string strTriggerSlope
string strTriggerPosition
string strScopeGain

Detailed Description

CConsoleHelper simplifies DPP spectrum acquisition. Coordinates DPP communications and spectrum acquisition.

Definition at line 16 of file ConsoleHelper.h.


Constructor & Destructor Documentation

Definition at line 10 of file ConsoleHelper.cpp.

Definition at line 18 of file ConsoleHelper.cpp.


Member Function Documentation

Clears configuration readback format flags.

Definition at line 231 of file ConsoleHelper.cpp.

Here is the caller graph for this function:

void CConsoleHelper::ConsoleGraph ( long  lData[],
long  chan,
bool  bLog,
std::string  strStatus 
)

Provides a low resolution text console graph.

Definition at line 579 of file ConsoleHelper.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void CConsoleHelper::CreateConfigOptions ( CONFIG_OPTIONS CfgOptions,
string  strCfg,
CDP5Status  DP5Stat,
bool  bUseCoarseFineGain 
)

Populates the configuration command options data structure.

Definition at line 93 of file ConsoleHelper.cpp.

Here is the caller graph for this function:

string CConsoleHelper::GetCmdData ( string  strCmd,
string  strCfgData 
)

Returns the configuration command data from a configuration command string.

Definition at line 399 of file ConsoleHelper.cpp.

string CConsoleHelper::GetCmdDesc ( string  strCmd)

Returns the command decription (comment) in a configuration command string.

Definition at line 441 of file ConsoleHelper.cpp.

LibUsb close the current connection.

Definition at line 51 of file ConsoleHelper.cpp.

Here is the caller graph for this function:

LibUsb connect to the default DPP.

Definition at line 22 of file ConsoleHelper.cpp.

Here is the caller graph for this function:

LibUsb receive data.

Definition at line 151 of file ConsoleHelper.cpp.

Here is the caller graph for this function:

LibUsb send a command that does not require additional processing.

Definition at line 62 of file ConsoleHelper.cpp.

Here is the caller graph for this function:

LibUsb send a command that requires configuration options processing.

Definition at line 131 of file ConsoleHelper.cpp.

Here is the caller graph for this function:

Processes configuration packets.

Definition at line 244 of file ConsoleHelper.cpp.

Here is the call graph for this function:

Processes spectrum packets.

Definition at line 211 of file ConsoleHelper.cpp.

Processes DPP data from all communication interfaces (USB,RS232,INET)

ReceiveData receives the incoming packet, parses the packet, then routes the packet to its final destination for further processing.

Definition at line 167 of file ConsoleHelper.cpp.

string CConsoleHelper::ReplaceCmdDesc ( string  strCmd,
string  strCfgData 
)

Replaces (or inserts a command decription (comment) in a configuration command string.

Definition at line 418 of file ConsoleHelper.cpp.


Member Data Documentation

Acquisition mode. (0=MCA, 1=MCS)

Definition at line 112 of file ConsoleHelper.h.

FPGA 80MHz clock when true, 20MHz clock otherwise.

Definition at line 73 of file ConsoleHelper.h.

format configuration for general readback

Definition at line 87 of file ConsoleHelper.h.

format configuration for display

Definition at line 83 of file ConsoleHelper.h.

format sca for display (sca config sent separately)

Definition at line 85 of file ConsoleHelper.h.

DPP configuration command array.

Definition at line 77 of file ConsoleHelper.h.

Defines and implements DPP protocol.

Definition at line 42 of file ConsoleHelper.h.

DPP status processing.

Definition at line 48 of file ConsoleHelper.h.

LibUsb communications class.

Definition at line 23 of file ConsoleHelper.h.

DPP status display string.

Definition at line 68 of file ConsoleHelper.h.

Fast channel threshold.

Definition at line 106 of file ConsoleHelper.h.

Holds the hardware configuration readback.

Definition at line 100 of file ConsoleHelper.h.

configuration ready flag

Definition at line 93 of file ConsoleHelper.h.

LibUsb is connected if true.

Definition at line 25 of file ConsoleHelper.h.

LibUsb number of devices found.

Definition at line 27 of file ConsoleHelper.h.

Number of data channels.

Definition at line 102 of file ConsoleHelper.h.

DPP packet parsing.

Definition at line 46 of file ConsoleHelper.h.

preset acquisition time setting

Definition at line 119 of file ConsoleHelper.h.

preset count setting

Definition at line 117 of file ConsoleHelper.h.

preset real time setting

Definition at line 121 of file ConsoleHelper.h.

format configuration for print

Definition at line 91 of file ConsoleHelper.h.

Peaking time value.

Definition at line 108 of file ConsoleHelper.h.

format configuration for file save

Definition at line 89 of file ConsoleHelper.h.

sca readback ready flag

Definition at line 95 of file ConsoleHelper.h.

Slow threshold in percent.

Definition at line 104 of file ConsoleHelper.h.

Generates command packet to be sent.

Definition at line 44 of file ConsoleHelper.h.

Definition at line 141 of file ConsoleHelper.h.

Total gain display string.

Definition at line 110 of file ConsoleHelper.h.

Definition at line 140 of file ConsoleHelper.h.

Holds MCA MODE display string. (NORM=MCA, MCS, FAST, etc.)

Definition at line 75 of file ConsoleHelper.h.

Definition at line 142 of file ConsoleHelper.h.

presets mode summary (counts,accum. time,real time)

Definition at line 123 of file ConsoleHelper.h.

presets settings summary (preset values, counts,times)

Definition at line 125 of file ConsoleHelper.h.

Definition at line 146 of file ConsoleHelper.h.

Definition at line 145 of file ConsoleHelper.h.

Definition at line 144 of file ConsoleHelper.h.

Definition at line 143 of file ConsoleHelper.h.

Definition at line 139 of file ConsoleHelper.h.


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