vcDppConsole Test C++ SDK: Main Page

vcDppConsole Test C++ SDK 20170920
DPP C++ Console Demonstration
  • Main Page
  • Namespaces
  • Classes
  • Files
vcDppConsole Test C++ SDK Documentation

vcDppConsole

vcDppConsole is a console application that demonstrates how Amptek DPP communications can be easily integrated into other programs.

What vcDppConsole does.

vcDppConsole communicates to a DPP device and demonstrates a minimal set of acquisition related commands.

vcDppConsole Classes

  • CConsoleHelper (Simplifies function calls.)
  • CDppWinUSB (Windows WinUSB communication class.)
  • CDP5Status (DPP status processing.)
  • CParsePacket (DPP packet parsing.)
  • CDP5Protocol (Defines and implements DPP protocol.)
  • CSendCommand (Generates command packet to be sent.)

vcDppConsole Main Function

  • _tmain (DPP Console Demonstration.)

More Information

http://amptek.com/products/dp5-digital-pulse-processor-software/ Amptek Software Page

Generated on Thu Sep 21 2017 16:01:17 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: stringSplit Namespace Reference

  • Namespaces
  • Classes
  • Files
  • Namespace List
  • Namespace Members
Typedefs | Functions
stringSplit Namespace Reference

Typedefs

typedef string::size_type(string::* | FindToken )(const string &strDelimiter, string::size_type sztOffset) const

Functions

vector< string > | Split (const string &strIn, const string &strDelimiters, bool bRemoveEmpty=false, bool bMatchAll=false)

Typedef Documentation

typedef string::size_type(string::* stringSplit::FindToken)(const string &strDelimiter, string::size_type sztOffset) const

Definition at line 7 of file stringSplit.h.

Function Documentation

vector<string> stringSplit::Split | ( | const string & | strIn,
 |  | const string & | strDelimiters,
 |  | bool | bRemoveEmpty = false,
 |  | bool | bMatchAll = false
 | ) |  |

Definition at line 13 of file stringSplit.h.

Here is the caller graph for this function:

Generated on Thu Sep 21 2017 16:01:17 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: Namespace Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Typedefs
Here is a list of all namespace members with links to the namespace documentation for each member:
  • FindToken : stringSplit
  • Split() : stringSplit
Generated on Thu Sep 21 2017 16:01:17 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: Namespace Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Typedefs
  • Split() : stringSplit
Generated on Thu Sep 21 2017 16:01:17 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: Namespace Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Typedefs
  • FindToken : stringSplit
Generated on Thu Sep 21 2017 16:01:17 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: _CONFIG_OPTIONS Struct Reference

  • Class List
  • Class Index
  • Class Members
Public Attributes
_CONFIG_OPTIONS Struct Reference

#include <SendCommand.h>

List of all members.

Public Attributes

bool | PC5_PRESENT
int | DppType
if true pc5 commands are supported
string | HwCfgDP5Out
device type indicator
bool | SendCoarseFineGain
custom configuration string
bool | isDP5_RevDxGains
false=Send GAIN, true=Send GAIA,GAIF
unsigned char | DPP_ECO
use dp5 dx gains

Detailed Description

Definition at line 6 of file SendCommand.h.

Member Data Documentation

unsigned char _CONFIG_OPTIONS::DPP_ECO

use dp5 dx gains

Definition at line 13 of file SendCommand.h.

int _CONFIG_OPTIONS::DppType

if true pc5 commands are supported

Definition at line 9 of file SendCommand.h.

string _CONFIG_OPTIONS::HwCfgDP5Out

device type indicator

Definition at line 10 of file SendCommand.h.

bool _CONFIG_OPTIONS::isDP5_RevDxGains

false=Send GAIN, true=Send GAIA,GAIF

Definition at line 12 of file SendCommand.h.

bool _CONFIG_OPTIONS::PC5_PRESENT

Definition at line 8 of file SendCommand.h.

bool _CONFIG_OPTIONS::SendCoarseFineGain

custom configuration string

Definition at line 11 of file SendCommand.h.

The documentation for this struct was generated from the following file:
  • DeviceIO/SendCommand.h
Generated on Thu Sep 21 2017 16:01:13 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: Member List

  • Class List
  • Class Index
  • Class Members
_CONFIG_OPTIONS Member List
This is the complete list of members for _CONFIG_OPTIONS, including all inherited members.
DPP_ECO | _CONFIG_OPTIONS
DppType | _CONFIG_OPTIONS
HwCfgDP5Out | _CONFIG_OPTIONS
isDP5_RevDxGains | _CONFIG_OPTIONS
PC5_PRESENT | _CONFIG_OPTIONS
SendCoarseFineGain | _CONFIG_OPTIONS
Generated on Thu Sep 21 2017 16:01:13 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: _DiagDataType Struct Reference

  • Class List
  • Class Index
  • Class Members
Public Attributes
_DiagDataType Struct Reference

#include <DP5Status.h>

List of all members.

Public Attributes

float | ADC_V [12]
float | PC5_V [4]
bool | PC5_PRESENT
long | PC5_SN
unsigned char | Firmware
unsigned char | FPGA
bool | SRAMTestPass
long | SRAMTestData
int | TempOffset
string | strTempRaw
string | strTempCal
bool | PC5Initialized
float | PC5DCAL
bool | IsPosHV
bool | Is8_5VPreAmp
bool | Sup9VOn
bool | PreAmpON
bool | HVOn
bool | TECOn
unsigned char | DiagData [192]

Detailed Description

Definition at line 80 of file DP5Status.h.

Member Data Documentation

float _DiagDataType::ADC_V[12]

Definition at line 82 of file DP5Status.h.

unsigned char _DiagDataType::DiagData[192]

Definition at line 101 of file DP5Status.h.

unsigned char _DiagDataType::Firmware

Definition at line 86 of file DP5Status.h.

unsigned char _DiagDataType::FPGA

Definition at line 87 of file DP5Status.h.

bool _DiagDataType::HVOn

Definition at line 99 of file DP5Status.h.

bool _DiagDataType::Is8_5VPreAmp

Definition at line 96 of file DP5Status.h.

bool _DiagDataType::IsPosHV

Definition at line 95 of file DP5Status.h.

bool _DiagDataType::PC5_PRESENT

Definition at line 84 of file DP5Status.h.

long _DiagDataType::PC5_SN

Definition at line 85 of file DP5Status.h.

float _DiagDataType::PC5_V[4]

Definition at line 83 of file DP5Status.h.

float _DiagDataType::PC5DCAL

Definition at line 94 of file DP5Status.h.

bool _DiagDataType::PC5Initialized

Definition at line 93 of file DP5Status.h.

bool _DiagDataType::PreAmpON

Definition at line 98 of file DP5Status.h.

long _DiagDataType::SRAMTestData

Definition at line 89 of file DP5Status.h.

bool _DiagDataType::SRAMTestPass

Definition at line 88 of file DP5Status.h.

string _DiagDataType::strTempCal

Definition at line 92 of file DP5Status.h.

string _DiagDataType::strTempRaw

Definition at line 91 of file DP5Status.h.

bool _DiagDataType::Sup9VOn

Definition at line 97 of file DP5Status.h.

bool _DiagDataType::TECOn

Definition at line 100 of file DP5Status.h.

int _DiagDataType::TempOffset

Definition at line 90 of file DP5Status.h.

The documentation for this struct was generated from the following file:
  • DeviceIO/DP5Status.h
Generated on Thu Sep 21 2017 16:01:13 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: Member List

  • Class List
  • Class Index
  • Class Members
_DiagDataType Member List
This is the complete list of members for _DiagDataType, including all inherited members.
ADC_V | _DiagDataType
DiagData | _DiagDataType
Firmware | _DiagDataType
FPGA | _DiagDataType
HVOn | _DiagDataType
Is8_5VPreAmp | _DiagDataType
IsPosHV | _DiagDataType
PC5_PRESENT | _DiagDataType
PC5_SN | _DiagDataType
PC5_V | _DiagDataType
PC5DCAL | _DiagDataType
PC5Initialized | _DiagDataType
PreAmpON | _DiagDataType
SRAMTestData | _DiagDataType
SRAMTestPass | _DiagDataType
strTempCal | _DiagDataType
strTempRaw | _DiagDataType
Sup9VOn | _DiagDataType
TECOn | _DiagDataType
TempOffset | _DiagDataType
Generated on Thu Sep 21 2017 16:01:13 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: _DppStateType Struct Reference

  • Class List
  • Class Index
  • Class Members
Public Attributes
_DppStateType Struct Reference

#include <ParsePacket.h>

List of all members.

Public Attributes

CommType Interface
string | strPort
unsigned long | ReqProcess
bool | HaveScopeData
bool | ScopeAutoRearm
bool | ScopeOverFlow

Detailed Description

Definition at line 33 of file ParsePacket.h.

Member Data Documentation

bool _DppStateType::HaveScopeData

Definition at line 37 of file ParsePacket.h.

CommType _DppStateType::Interface

Definition at line 34 of file ParsePacket.h.

unsigned long _DppStateType::ReqProcess

Definition at line 36 of file ParsePacket.h.

bool _DppStateType::ScopeAutoRearm

Definition at line 38 of file ParsePacket.h.

bool _DppStateType::ScopeOverFlow

Definition at line 39 of file ParsePacket.h.

string _DppStateType::strPort

Definition at line 35 of file ParsePacket.h.

The documentation for this struct was generated from the following file:
  • DeviceIO/ParsePacket.h
Generated on Thu Sep 21 2017 16:01:13 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: Member List

  • Class List
  • Class Index
  • Class Members
_DppStateType Member List
This is the complete list of members for _DppStateType, including all inherited members.
HaveScopeData | _DppStateType
Interface | _DppStateType
ReqProcess | _DppStateType
ScopeAutoRearm | _DppStateType
ScopeOverFlow | _DppStateType
strPort | _DppStateType
Generated on Thu Sep 21 2017 16:01:13 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: _Packet_In Struct Reference

  • Class List
  • Class Index
  • Class Members
Public Attributes
_Packet_In Struct Reference

#include <DP5Protocol.h>

List of all members.

Public Attributes

unsigned char | PID1
unsigned char | PID2
unsigned short | LEN
unsigned char | STATUS
unsigned char | DATA [32768]
long | CheckSum

Detailed Description

Definition at line 276 of file DP5Protocol.h.

Member Data Documentation

long _Packet_In::CheckSum

Definition at line 282 of file DP5Protocol.h.

unsigned char _Packet_In::DATA[32768]

Definition at line 281 of file DP5Protocol.h.

unsigned short _Packet_In::LEN

Definition at line 279 of file DP5Protocol.h.

unsigned char _Packet_In::PID1

Definition at line 277 of file DP5Protocol.h.

unsigned char _Packet_In::PID2

Definition at line 278 of file DP5Protocol.h.

unsigned char _Packet_In::STATUS

Definition at line 280 of file DP5Protocol.h.

The documentation for this struct was generated from the following file:
  • DeviceIO/DP5Protocol.h
Generated on Thu Sep 21 2017 16:01:14 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: Member List

  • Class List
  • Class Index
  • Class Members
_Packet_In Member List
This is the complete list of members for _Packet_In, including all inherited members.
CheckSum | _Packet_In
DATA | _Packet_In
LEN | _Packet_In
PID1 | _Packet_In
PID2 | _Packet_In
STATUS | _Packet_In
Generated on Thu Sep 21 2017 16:01:14 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: _SpectrumFileType Struct Reference

  • Class List
  • Class Index
  • Class Members
Public Attributes
_SpectrumFileType Struct Reference

#include <ConsoleHelper.h>

List of all members.

Public Attributes

string | strTag
string | strDescription
short | m_iNumChan
unsigned long | SerialNumber
string | strSpectrumConfig
string | strSpectrumStatus

Detailed Description

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

Definition at line 17 of file ConsoleHelper.h.

Member Data Documentation

short _SpectrumFileType::m_iNumChan

Definition at line 20 of file ConsoleHelper.h.

unsigned long _SpectrumFileType::SerialNumber

Definition at line 21 of file ConsoleHelper.h.

string _SpectrumFileType::strDescription

Definition at line 19 of file ConsoleHelper.h.

string _SpectrumFileType::strSpectrumConfig

Definition at line 22 of file ConsoleHelper.h.

string _SpectrumFileType::strSpectrumStatus

Definition at line 23 of file ConsoleHelper.h.

string _SpectrumFileType::strTag

Definition at line 18 of file ConsoleHelper.h.

The documentation for this struct was generated from the following file:
  • ConsoleHelper.h
Generated on Thu Sep 21 2017 16:01:14 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: Member List

  • Class List
  • Class Index
  • Class Members
_SpectrumFileType Member List
This is the complete list of members for _SpectrumFileType, including all inherited members.
m_iNumChan | _SpectrumFileType
SerialNumber | _SpectrumFileType
strDescription | _SpectrumFileType
strSpectrumConfig | _SpectrumFileType
strSpectrumStatus | _SpectrumFileType
strTag | _SpectrumFileType
Generated on Thu Sep 21 2017 16:01:14 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: _WINUSB_PIPE_INFORMATION Struct Reference

  • Class List
  • Class Index
  • Class Members
Public Attributes
_WINUSB_PIPE_INFORMATION Struct Reference

#include <WINUSBIO.H>

List of all members.

Public Attributes

USBD_PIPE_TYPE | PipeType
UCHAR | PipeId
USHORT | MaximumPacketSize
UCHAR | Interval

Detailed Description

Definition at line 71 of file WINUSBIO.H.

Member Data Documentation

UCHAR _WINUSB_PIPE_INFORMATION::Interval

Definition at line 75 of file WINUSBIO.H.

USHORT _WINUSB_PIPE_INFORMATION::MaximumPacketSize

Definition at line 74 of file WINUSBIO.H.

UCHAR _WINUSB_PIPE_INFORMATION::PipeId

Definition at line 73 of file WINUSBIO.H.

USBD_PIPE_TYPE _WINUSB_PIPE_INFORMATION::PipeType

Definition at line 72 of file WINUSBIO.H.

The documentation for this struct was generated from the following file:
  • DeviceIO/WINUSBIO.H
Generated on Thu Sep 21 2017 16:01:14 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: Member List

  • Class List
  • Class Index
  • Class Members
_WINUSB_PIPE_INFORMATION Member List
This is the complete list of members for _WINUSB_PIPE_INFORMATION, including all inherited members.
Interval | _WINUSB_PIPE_INFORMATION
MaximumPacketSize | _WINUSB_PIPE_INFORMATION
PipeId | _WINUSB_PIPE_INFORMATION
PipeType | _WINUSB_PIPE_INFORMATION
Generated on Thu Sep 21 2017 16:01:14 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: _WINUSB_SETUP_PACKET Struct Reference

  • Class List
  • Class Index
  • Class Members
Public Attributes
_WINUSB_SETUP_PACKET Struct Reference

#include <WINUSB.H>

List of all members.

Public Attributes

UCHAR | RequestType
UCHAR | Request
USHORT | Value
USHORT | Index
USHORT | Length

Detailed Description

Definition at line 50 of file WINUSB.H.

Member Data Documentation

USHORT _WINUSB_SETUP_PACKET::Index

Definition at line 54 of file WINUSB.H.

USHORT _WINUSB_SETUP_PACKET::Length

Definition at line 55 of file WINUSB.H.

UCHAR _WINUSB_SETUP_PACKET::Request

Definition at line 52 of file WINUSB.H.

UCHAR _WINUSB_SETUP_PACKET::RequestType

Definition at line 51 of file WINUSB.H.

USHORT _WINUSB_SETUP_PACKET::Value

Definition at line 53 of file WINUSB.H.

The documentation for this struct was generated from the following file:
  • DeviceIO/WINUSB.H
Generated on Thu Sep 21 2017 16:01:14 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: Member List

  • Class List
  • Class Index
  • Class Members
_WINUSB_SETUP_PACKET Member List
This is the complete list of members for _WINUSB_SETUP_PACKET, including all inherited members.
Index | _WINUSB_SETUP_PACKET
Length | _WINUSB_SETUP_PACKET
Request | _WINUSB_SETUP_PACKET
RequestType | _WINUSB_SETUP_PACKET
Value | _WINUSB_SETUP_PACKET
Generated on Thu Sep 21 2017 16:01:14 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: CAsciiCmdUtilities Class Reference

  • Class List
  • Class Index
  • Class Members
Public Member Functions
CAsciiCmdUtilities Class Reference

#include <AsciiCmdUtilities.h>

List of all members.

Public Member Functions

CAsciiCmdUtilities (void)
~CAsciiCmdUtilities (void)
std::string | MakeUpper (std::string myString)
Forces all characters to uppercase. (All DPP command must be in upper case.)
std::string | RemWhitespace (std::string strLine)
Removes Whitespace characters from a command string.
std::string | GetDP5CfgStr (std::string strFilename)
Reads a DPP configuration from a file.
std::string | GetDP5ScaStr (std::string strFilename)
Reads a SCA configuration from a file.
std::string | CreateResTestReadBackCmd (bool bSendCoarseFineGain, int DppType)
std::string | CreateFullReadBackCmd (bool PC5_PRESENT, int DppType, bool isDP5_RevDxGains, unsigned char DPP_ECO)
Generates a configuration readback command from a list of all commands.
std::string | CreateFullReadBackCmdMCA8000D (int DppType)
Generates a configuration readback command from a list of all commands.
std::string | RemoveCmd (std::string strCmd, std::string strCfgData)
Remove a specified command from the command stream.
std::string | RemoveCmdByDeviceType (std::string strCfgDataIn, bool PC5_PRESENT, int DppType, bool isDP5_RevDxGains, unsigned char DPP_ECO)
Remove illegal commands from the command stream by device type.
std::string | RemoveCmdByDeviceTypeDP5DxK (std::string strCfgDataIn, bool PC5_PRESENT, int DppType)
Remove illegal commands from the command stream by device type.
std::string | Remove_MCA8000D_Cmds (std::string strCfgDataIn, int DppType)
std::string | ReplaceCmdText (std::string strInTextIn, std::string strFrom, std::string strTo)
int | GetCmdChunk (std::string strCmd)
bool | CopyAsciiData (unsigned char Data[], string strCfg, long lLen)
Force string to ASCII bytes.

Detailed Description

Definition at line 18 of file AsciiCmdUtilities.h.

Constructor & Destructor Documentation

CAsciiCmdUtilities::CAsciiCmdUtilities ( void )

Definition at line 3 of file AsciiCmdUtilities.cpp.

CAsciiCmdUtilities::~CAsciiCmdUtilities ( void )

Definition at line 7 of file AsciiCmdUtilities.cpp.

Member Function Documentation

bool CAsciiCmdUtilities::CopyAsciiData | ( | unsigned char | Data[],
 |  | string | strCfg,
 |  | long | lLen
 | ) |  |

Force string to ASCII bytes.

Definition at line 578 of file AsciiCmdUtilities.cpp.

Here is the caller graph for this function:

string CAsciiCmdUtilities::CreateFullReadBackCmd | ( | bool | PC5_PRESENT,
 |  | int | DppType,
 |  | bool | isDP5_RevDxGains,
 |  | unsigned char | DPP_ECO
 | ) |  |

Generates a configuration readback command from a list of all commands.

Definition at line 202 of file AsciiCmdUtilities.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

string CAsciiCmdUtilities::CreateFullReadBackCmdMCA8000D ( int DppType )

Generates a configuration readback command from a list of all commands.

Definition at line 308 of file AsciiCmdUtilities.cpp.

Here is the caller graph for this function:

string CAsciiCmdUtilities::CreateResTestReadBackCmd | ( | bool | bSendCoarseFineGain,
 |  | int | DppType
 | ) |  |

Definition at line 177 of file AsciiCmdUtilities.cpp.

int CAsciiCmdUtilities::GetCmdChunk ( std::string strCmd )

Definition at line 558 of file AsciiCmdUtilities.cpp.

Here is the caller graph for this function:

string CAsciiCmdUtilities::GetDP5CfgStr ( std::string strFilename )

Reads a DPP configuration from a file.

Definition at line 42 of file AsciiCmdUtilities.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

string CAsciiCmdUtilities::GetDP5ScaStr ( std::string strFilename )

Reads a SCA configuration from a file.

Definition at line 97 of file AsciiCmdUtilities.cpp.

Here is the call graph for this function:

string CAsciiCmdUtilities::MakeUpper ( std::string myString )

Forces all characters to uppercase. (All DPP command must be in upper case.)

Definition at line 11 of file AsciiCmdUtilities.cpp.

Here is the caller graph for this function:

string CAsciiCmdUtilities::Remove_MCA8000D_Cmds | ( | std::string | strCfgDataIn,
 |  | int | DppType
 | ) |  |

Definition at line 482 of file AsciiCmdUtilities.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

string CAsciiCmdUtilities::RemoveCmd | ( | std::string | strCmd,
 |  | std::string | strCfgData
 | ) |  |

Remove a specified command from the command stream.

Definition at line 351 of file AsciiCmdUtilities.cpp.

Here is the caller graph for this function:

string CAsciiCmdUtilities::RemoveCmdByDeviceType | ( | std::string | strCfgDataIn,
 |  | bool | PC5_PRESENT,
 |  | int | DppType,
 |  | bool | isDP5_RevDxGains,
 |  | unsigned char | DPP_ECO
 | ) |  |

Remove illegal commands from the command stream by device type.

Definition at line 370 of file AsciiCmdUtilities.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

string CAsciiCmdUtilities::RemoveCmdByDeviceTypeDP5DxK | ( | std::string | strCfgDataIn,
 |  | bool | PC5_PRESENT,
 |  | int | DppType
 | ) |  |

Remove illegal commands from the command stream by device type.

Definition at line 432 of file AsciiCmdUtilities.cpp.

Here is the call graph for this function:

string CAsciiCmdUtilities::RemWhitespace ( std::string strLine )

Removes Whitespace characters from a command string.

Definition at line 21 of file AsciiCmdUtilities.cpp.

Here is the caller graph for this function:

std::string CAsciiCmdUtilities::ReplaceCmdText | ( | std::string | strInTextIn,
 |  | std::string | strFrom,
 |  | std::string | strTo
 | ) |  |

Definition at line 532 of file AsciiCmdUtilities.cpp.

Here is the caller graph for this function:

The documentation for this class was generated from the following files:
  • DeviceIO/AsciiCmdUtilities.h
  • DeviceIO/AsciiCmdUtilities.cpp
Generated on Thu Sep 21 2017 16:01:14 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: Member List

  • Class List
  • Class Index
  • Class Members
CAsciiCmdUtilities Member List
This is the complete list of members for CAsciiCmdUtilities, including all inherited members.
CAsciiCmdUtilities(void) | CAsciiCmdUtilities
CopyAsciiData(unsigned char Data[], string strCfg, long lLen) | CAsciiCmdUtilities
CreateFullReadBackCmd(bool PC5_PRESENT, int DppType, bool isDP5_RevDxGains, unsigned char DPP_ECO) | CAsciiCmdUtilities
CreateFullReadBackCmdMCA8000D(int DppType) | CAsciiCmdUtilities
CreateResTestReadBackCmd(bool bSendCoarseFineGain, int DppType) | CAsciiCmdUtilities
GetCmdChunk(std::string strCmd) | CAsciiCmdUtilities
GetDP5CfgStr(std::string strFilename) | CAsciiCmdUtilities
GetDP5ScaStr(std::string strFilename) | CAsciiCmdUtilities
MakeUpper(std::string myString) | CAsciiCmdUtilities
Remove_MCA8000D_Cmds(std::string strCfgDataIn, int DppType) | CAsciiCmdUtilities
RemoveCmd(std::string strCmd, std::string strCfgData) | CAsciiCmdUtilities
RemoveCmdByDeviceType(std::string strCfgDataIn, bool PC5_PRESENT, int DppType, bool isDP5_RevDxGains, unsigned char DPP_ECO) | CAsciiCmdUtilities
RemoveCmdByDeviceTypeDP5DxK(std::string strCfgDataIn, bool PC5_PRESENT, int DppType) | CAsciiCmdUtilities
RemWhitespace(std::string strLine) | CAsciiCmdUtilities
ReplaceCmdText(std::string strInTextIn, std::string strFrom, std::string strTo) | CAsciiCmdUtilities
~CAsciiCmdUtilities(void) | CAsciiCmdUtilities
Generated on Thu Sep 21 2017 16:01:14 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: CConsoleHelper Class Reference

  • Class List
  • Class Index
  • Class Members
Public Member Functions | Public Attributes
CConsoleHelper Class Reference

#include <ConsoleHelper.h>

Collaboration diagram for CConsoleHelper:
[legend]

List of all members.

Public Member Functions

CConsoleHelper (void)
~CConsoleHelper (void)
bool | WinUSB_Connect_Default_DPP ()
WinUSB connect to the default DPP.
void | WinUSB_Close_Connection ()
WinUSB close the current connection.
bool | WinUSB_SendCommand (TRANSMIT_PACKET_TYPE XmtCmd)
WinUSB send a command that does not require additional processing.
bool | WinUSB_SendCommand_Config (TRANSMIT_PACKET_TYPE XmtCmd, CONFIG_OPTIONS CfgOptions)
WinUSB send a command that requires configuration options processing.
bool | WinUSB_ReceiveData ()
WinUSB 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 description (comment) in a configuration command string.
string | AppendCmdDesc (string strCmd, string strCfgData)
Appends a command description (comment) in a configuration command string.
string | GetCmdDesc (string strCmd)
Returns the command decription (comment) in a configuration command string.
string | CreateMCAData (long m_larDataBuffer[], SpectrumFileType sfInfo, DP4_FORMAT_STATUS cfgStatusLst)
void | SaveSpectrumStringToFile (string strData)
Saves a spectrum data string to a default file (SpectrumData.mca).
string | CreateSpectrumConfig (string strRawCfgIn)
vector< string > | MakeDp5CmdList ()

Public Attributes

CDppWinUSB DppWinUSB
WinUSB communications class.
bool | WinUSB_isConnected
WinUSB is connected if true.
int | WinUSB_NumDevices
WinUSB 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
SpectrumFileType sfInfo

Detailed Description

Definition at line 26 of file ConsoleHelper.h.

Constructor & Destructor Documentation

CConsoleHelper::CConsoleHelper ( void )

Definition at line 8 of file ConsoleHelper.cpp.

CConsoleHelper::~CConsoleHelper ( void )

Definition at line 16 of file ConsoleHelper.cpp.

Member Function Documentation

string CConsoleHelper::AppendCmdDesc | ( | string | strCmd,
 |  | string | strCfgData
 | ) |  |

Appends a command description (comment) in a configuration command string.

Definition at line 432 of file ConsoleHelper.cpp.

void CConsoleHelper::ClearConfigReadFormatFlags ( )

Clears configuration readback format flags.

Definition at line 222 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 592 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 92 of file ConsoleHelper.cpp.

Here is the caller graph for this function:

string CConsoleHelper::CreateMCAData | ( | long | m_larDataBuffer[],
 |  | SpectrumFileType | sfInfo,
 |  | DP4_FORMAT_STATUS | cfgStatusLst
 | ) |  |

Definition at line 674 of file ConsoleHelper.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

string CConsoleHelper::CreateSpectrumConfig ( string strRawCfgIn )

Definition at line 759 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 390 of file ConsoleHelper.cpp.

string CConsoleHelper::GetCmdDesc ( string strCmd )

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

Definition at line 454 of file ConsoleHelper.cpp.

vector< string > CConsoleHelper::MakeDp5CmdList ( )

Definition at line 776 of file ConsoleHelper.cpp.

Here is the caller graph for this function:

void CConsoleHelper::ProcessCfgReadEx | ( | Packet_In | PIN,
 |  | DppStateType | DppState
 | ) |  |

Processes configuration packets.

Definition at line 235 of file ConsoleHelper.cpp.

Here is the call graph for this function:

void CConsoleHelper::ProcessSpectrumEx | ( | Packet_In | PIN,
 |  | DppStateType | DppState
 | ) |  |

Processes spectrum packets.

Definition at line 202 of file ConsoleHelper.cpp.

bool CConsoleHelper::ReceiveData ( )

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 158 of file ConsoleHelper.cpp.

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

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

Definition at line 409 of file ConsoleHelper.cpp.

void CConsoleHelper::SaveSpectrumStringToFile ( string strData )

Saves a spectrum data string to a default file (SpectrumData.mca).

Definition at line 741 of file ConsoleHelper.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void CConsoleHelper::WinUSB_Close_Connection ( )

WinUSB close the current connection.

Definition at line 50 of file ConsoleHelper.cpp.

Here is the caller graph for this function:

bool CConsoleHelper::WinUSB_Connect_Default_DPP ( )

WinUSB connect to the default DPP.

Definition at line 20 of file ConsoleHelper.cpp.

Here is the caller graph for this function:

bool CConsoleHelper::WinUSB_ReceiveData ( )

WinUSB receive data.

Definition at line 142 of file ConsoleHelper.cpp.

Here is the caller graph for this function:

bool CConsoleHelper::WinUSB_SendCommand ( TRANSMIT_PACKET_TYPE XmtCmd )

WinUSB send a command that does not require additional processing.

Definition at line 61 of file ConsoleHelper.cpp.

Here is the caller graph for this function:

bool CConsoleHelper::WinUSB_SendCommand_Config | ( | TRANSMIT_PACKET_TYPE | XmtCmd,
 |  | CONFIG_OPTIONS | CfgOptions
 | ) |  |

WinUSB send a command that requires configuration options processing.

Definition at line 122 of file ConsoleHelper.cpp.

Here is the caller graph for this function:

Member Data Documentation

int CConsoleHelper::AcqMode

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

Definition at line 122 of file ConsoleHelper.h.

bool CConsoleHelper::b80MHzMode

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

Definition at line 83 of file ConsoleHelper.h.

bool CConsoleHelper::CfgReadBack

format configuration for general readback

Definition at line 97 of file ConsoleHelper.h.

bool CConsoleHelper::DisplayCfg

format configuration for display

Definition at line 93 of file ConsoleHelper.h.

bool CConsoleHelper::DisplaySca

format sca for display (sca config sent separately)

Definition at line 95 of file ConsoleHelper.h.

vector<string> CConsoleHelper::Dp5CmdList

DPP configuration command array.

Definition at line 87 of file ConsoleHelper.h.

CDP5Protocol CConsoleHelper::DP5Proto

Defines and implements DPP protocol.

Definition at line 52 of file ConsoleHelper.h.

CDP5Status CConsoleHelper::DP5Stat

DPP status processing.

Definition at line 58 of file ConsoleHelper.h.

string CConsoleHelper::DppStatusString

DPP status display string.

Definition at line 78 of file ConsoleHelper.h.

CDppWinUSB CConsoleHelper::DppWinUSB

WinUSB communications class.

Definition at line 33 of file ConsoleHelper.h.

int CConsoleHelper::FastChThreshold

Fast channel threshold.

Definition at line 116 of file ConsoleHelper.h.

string CConsoleHelper::HwCfgDP5

Holds the hardware configuration readback.

Definition at line 110 of file ConsoleHelper.h.

bool CConsoleHelper::HwCfgReady

configuration ready flag

Definition at line 103 of file ConsoleHelper.h.

int CConsoleHelper::mcaCH

Number of data channels.

Definition at line 112 of file ConsoleHelper.h.

CParsePacket CConsoleHelper::ParsePkt

DPP packet parsing.

Definition at line 56 of file ConsoleHelper.h.

double CConsoleHelper::PresetAcq

preset acquisition time setting

Definition at line 129 of file ConsoleHelper.h.

int CConsoleHelper::PresetCount

preset count setting

Definition at line 127 of file ConsoleHelper.h.

double CConsoleHelper::PresetRt

preset real time setting

Definition at line 131 of file ConsoleHelper.h.

bool CConsoleHelper::PrintCfg

format configuration for print

Definition at line 101 of file ConsoleHelper.h.

double CConsoleHelper::RiseUS

Peaking time value.

Definition at line 118 of file ConsoleHelper.h.

bool CConsoleHelper::SaveCfg

format configuration for file save

Definition at line 99 of file ConsoleHelper.h.

bool CConsoleHelper::ScaReadBack

sca readback ready flag

Definition at line 105 of file ConsoleHelper.h.

SpectrumFileType CConsoleHelper::sfInfo

Definition at line 165 of file ConsoleHelper.h.

double CConsoleHelper::SlowThresholdPct

Slow threshold in percent.

Definition at line 114 of file ConsoleHelper.h.

CSendCommand CConsoleHelper::SndCmd

Generates command packet to be sent.

Definition at line 54 of file ConsoleHelper.h.

string CConsoleHelper::strAnalogOut

Definition at line 153 of file ConsoleHelper.h.

string CConsoleHelper::strGainDisplayValue

Total gain display string.

Definition at line 120 of file ConsoleHelper.h.

string CConsoleHelper::strInputOffset

Definition at line 152 of file ConsoleHelper.h.

string CConsoleHelper::strMcaMode

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

Definition at line 85 of file ConsoleHelper.h.

string CConsoleHelper::strOutputOffset

Definition at line 154 of file ConsoleHelper.h.

string CConsoleHelper::strPresetCmd

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

Definition at line 133 of file ConsoleHelper.h.

string CConsoleHelper::strPresetVal

presets settings summary (preset values, counts,times)

Definition at line 135 of file ConsoleHelper.h.

string CConsoleHelper::strScopeGain

Definition at line 158 of file ConsoleHelper.h.

string CConsoleHelper::strTriggerPosition

Definition at line 157 of file ConsoleHelper.h.

string CConsoleHelper::strTriggerSlope

Definition at line 156 of file ConsoleHelper.h.

string CConsoleHelper::strTriggerSource

Definition at line 155 of file ConsoleHelper.h.

bool CConsoleHelper::UpdateScopeCfg

Definition at line 151 of file ConsoleHelper.h.

bool CConsoleHelper::WinUSB_isConnected

WinUSB is connected if true.

Definition at line 35 of file ConsoleHelper.h.

int CConsoleHelper::WinUSB_NumDevices

WinUSB number of devices found.

Definition at line 37 of file ConsoleHelper.h.

The documentation for this class was generated from the following files:
  • ConsoleHelper.h
  • ConsoleHelper.cpp
Generated on Thu Sep 21 2017 16:01:14 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: Member List

  • Class List
  • Class Index
  • Class Members
CConsoleHelper Member List
This is the complete list of members for CConsoleHelper, including all inherited members.
AcqMode | CConsoleHelper
AppendCmdDesc(string strCmd, string strCfgData) | CConsoleHelper
b80MHzMode | CConsoleHelper
CConsoleHelper(void) | CConsoleHelper
CfgReadBack | CConsoleHelper
ClearConfigReadFormatFlags() | CConsoleHelper
ConsoleGraph(long lData[], long chan, bool bLog, std::string strStatus) | CConsoleHelper
CreateConfigOptions(CONFIG_OPTIONS *CfgOptions, string strCfg, CDP5Status DP5Stat, bool bUseCoarseFineGain) | CConsoleHelper
CreateMCAData(long m_larDataBuffer[], SpectrumFileType sfInfo, DP4_FORMAT_STATUS cfgStatusLst) | CConsoleHelper
CreateSpectrumConfig(string strRawCfgIn) | CConsoleHelper
DisplayCfg | CConsoleHelper
DisplaySca | CConsoleHelper
Dp5CmdList | CConsoleHelper
DP5Proto | CConsoleHelper
DP5Stat | CConsoleHelper
DppStatusString | CConsoleHelper
DppWinUSB | CConsoleHelper
FastChThreshold | CConsoleHelper
GetCmdData(string strCmd, string strCfgData) | CConsoleHelper
GetCmdDesc(string strCmd) | CConsoleHelper
HwCfgDP5 | CConsoleHelper
HwCfgReady | CConsoleHelper
MakeDp5CmdList() | CConsoleHelper
mcaCH | CConsoleHelper
ParsePkt | CConsoleHelper
PresetAcq | CConsoleHelper
PresetCount | CConsoleHelper
PresetRt | CConsoleHelper
PrintCfg | CConsoleHelper
ProcessCfgReadEx(Packet_In PIN, DppStateType DppState) | CConsoleHelper
ProcessSpectrumEx(Packet_In PIN, DppStateType DppState) | CConsoleHelper
ReceiveData() | CConsoleHelper
ReplaceCmdDesc(string strCmd, string strCfgData) | CConsoleHelper
RiseUS | CConsoleHelper
SaveCfg | CConsoleHelper
SaveSpectrumStringToFile(string strData) | CConsoleHelper
ScaReadBack | CConsoleHelper
sfInfo | CConsoleHelper
SlowThresholdPct | CConsoleHelper
SndCmd | CConsoleHelper
strAnalogOut | CConsoleHelper
strGainDisplayValue | CConsoleHelper
strInputOffset | CConsoleHelper
strMcaMode | CConsoleHelper
strOutputOffset | CConsoleHelper
strPresetCmd | CConsoleHelper
strPresetVal | CConsoleHelper
strScopeGain | CConsoleHelper
strTriggerPosition | CConsoleHelper
strTriggerSlope | CConsoleHelper
strTriggerSource | CConsoleHelper
UpdateScopeCfg | CConsoleHelper
WinUSB_Close_Connection() | CConsoleHelper
WinUSB_Connect_Default_DPP() | CConsoleHelper
WinUSB_isConnected | CConsoleHelper
WinUSB_NumDevices | CConsoleHelper
WinUSB_ReceiveData() | CConsoleHelper
WinUSB_SendCommand(TRANSMIT_PACKET_TYPE XmtCmd) | CConsoleHelper
WinUSB_SendCommand_Config(TRANSMIT_PACKET_TYPE XmtCmd, CONFIG_OPTIONS CfgOptions) | CConsoleHelper
~CConsoleHelper(void) | CConsoleHelper
Generated on Thu Sep 21 2017 16:01:14 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: CDP5Protocol Class Reference

  • Class List
  • Class Index
  • Class Members
Public Member Functions | Public Attributes
CDP5Protocol Class Reference

#include <DP5Protocol.h>

Collaboration diagram for CDP5Protocol:
[legend]

List of all members.

Public Member Functions

CDP5Protocol (void)
~CDP5Protocol (void)

Public Attributes

short | InPacketType
Inidicates the incoming packet type;.
unsigned char | PacketIn [24648]
long | RS232BytesInBuffer
Tracks the RS232 number of bytes in the input buffer.
long | RS232_RThreshold
RS232 receive buffer threshold.
bool | RS232HeaderReceived
RS232 header received indicator.
short | RS232PacketPtr
Points to the current incoming data save position in the input buffer.
bool | ScaleAuto
Auto plot scale indicator.
unsigned char | Scope [2048]
Oscilloscope data buffer.
unsigned char | MiscData [512]
Miscellaneous data buffer.
bool | CommError
Communications error indicator.
unsigned char | BufferOUT [520]
Output data buffer.
Spec SPECTRUM
Spectrum data buffer.
Packet_In PIN
Packet input buffer.
bool | ACK_Received
ACK received indicator.
bool | Packet_Received
Packet received indicator.
bool | Timeout_flag
Communication timeout error indicator flag.
int | UDP_offset
bool | Netfinder_active
int | Netfinder_Seq
bool | USB_Default_Timeout
USB default timeout is the longest time period that the USB interface will wait for a transaction.

Detailed Description

Definition at line 302 of file DP5Protocol.h.

Constructor & Destructor Documentation

CDP5Protocol::CDP5Protocol ( void )

Definition at line 3 of file DP5Protocol.cpp.

CDP5Protocol::~CDP5Protocol ( void )

Definition at line 7 of file DP5Protocol.cpp.

Member Data Documentation

bool CDP5Protocol::ACK_Received

ACK received indicator.

Definition at line 338 of file DP5Protocol.h.

unsigned char CDP5Protocol::BufferOUT[520]

Output data buffer.

Definition at line 331 of file DP5Protocol.h.

bool CDP5Protocol::CommError

Communications error indicator.

Definition at line 329 of file DP5Protocol.h.

short CDP5Protocol::InPacketType

Inidicates the incoming packet type;.

Definition at line 309 of file DP5Protocol.h.

unsigned char CDP5Protocol::MiscData[512]

Miscellaneous data buffer.

Definition at line 327 of file DP5Protocol.h.

bool CDP5Protocol::Netfinder_active

Definition at line 345 of file DP5Protocol.h.

int CDP5Protocol::Netfinder_Seq

Definition at line 346 of file DP5Protocol.h.

bool CDP5Protocol::Packet_Received

Packet received indicator.

Definition at line 340 of file DP5Protocol.h.

unsigned char CDP5Protocol::PacketIn[24648]

Definition at line 311 of file DP5Protocol.h.

Packet_In CDP5Protocol::PIN

Packet input buffer.

Definition at line 335 of file DP5Protocol.h.

long CDP5Protocol::RS232_RThreshold

RS232 receive buffer threshold.

Definition at line 316 of file DP5Protocol.h.

long CDP5Protocol::RS232BytesInBuffer

Tracks the RS232 number of bytes in the input buffer.

Definition at line 314 of file DP5Protocol.h.

bool CDP5Protocol::RS232HeaderReceived

RS232 header received indicator.

Definition at line 318 of file DP5Protocol.h.

short CDP5Protocol::RS232PacketPtr

Points to the current incoming data save position in the input buffer.

Definition at line 320 of file DP5Protocol.h.

bool CDP5Protocol::ScaleAuto

Auto plot scale indicator.

Definition at line 323 of file DP5Protocol.h.

unsigned char CDP5Protocol::Scope[2048]

Oscilloscope data buffer.

Definition at line 325 of file DP5Protocol.h.

Spec CDP5Protocol::SPECTRUM

Spectrum data buffer.

Definition at line 333 of file DP5Protocol.h.

bool CDP5Protocol::Timeout_flag

Communication timeout error indicator flag.

Definition at line 342 of file DP5Protocol.h.

int CDP5Protocol::UDP_offset

Definition at line 344 of file DP5Protocol.h.

bool CDP5Protocol::USB_Default_Timeout

USB default timeout is the longest time period that the USB interface will wait for a transaction.

Definition at line 349 of file DP5Protocol.h.

The documentation for this class was generated from the following files:
  • DeviceIO/DP5Protocol.h
  • DeviceIO/DP5Protocol.cpp
Generated on Thu Sep 21 2017 16:01:14 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: Member List

  • Class List
  • Class Index
  • Class Members
CDP5Protocol Member List
This is the complete list of members for CDP5Protocol, including all inherited members.
ACK_Received | CDP5Protocol
BufferOUT | CDP5Protocol
CDP5Protocol(void) | CDP5Protocol
CommError | CDP5Protocol
InPacketType | CDP5Protocol
MiscData | CDP5Protocol
Netfinder_active | CDP5Protocol
Netfinder_Seq | CDP5Protocol
Packet_Received | CDP5Protocol
PacketIn | CDP5Protocol
PIN | CDP5Protocol
RS232_RThreshold | CDP5Protocol
RS232BytesInBuffer | CDP5Protocol
RS232HeaderReceived | CDP5Protocol
RS232PacketPtr | CDP5Protocol
ScaleAuto | CDP5Protocol
Scope | CDP5Protocol
SPECTRUM | CDP5Protocol
Timeout_flag | CDP5Protocol
UDP_offset | CDP5Protocol
USB_Default_Timeout | CDP5Protocol
~CDP5Protocol(void) | CDP5Protocol
Generated on Thu Sep 21 2017 16:01:14 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: CDP5Status Class Reference

  • Class List
  • Class Index
  • Class Members
Public Member Functions | Public Attributes
CDP5Status Class Reference

#include <DP5Status.h>

Collaboration diagram for CDP5Status:
[legend]

List of all members.

Public Member Functions

CDP5Status (void)
~CDP5Status (void)
void | Process_Status (DP4_FORMAT_STATUS *m_DP5_Status)
Convert a DPP status packet into DP4_FORMAT_STATUS data.
string | DP5_Dx_OptionFlags (unsigned char DP5_Dx_Options)
string | ShowStatusValueStrings (DP4_FORMAT_STATUS m_DP5_Status)
Convert DP4_FORMAT_STATUS data into a status display string.
string | PX5_OptionsString (DP4_FORMAT_STATUS m_DP5_Status)
string | GetStatusValueStrings (DP4_FORMAT_STATUS m_DP5_Status)
void | Process_Diagnostics (Packet_In PIN, DiagDataType *dd, int device_type)
Convert a DPP diagnostic data packet into DiagDataType data.
string | DiagnosticsToString (DiagDataType dd, int device_type)
Convert DiagDataType data into a diagnostic display string.
string | DiagStrPX5Option (DiagDataType dd, int device_type)
Convert PX5 Options into a display string.
string | FmtHvPwr (float fVal)
Format a high voltage power value.
string | FmtPc5Pwr (float fVal)
Format a pc5 power value.
string | FmtPc5Temp (float fVal)
Format a pc5 temperature value.
string | FmtHex (long FmtHex, long HexDig)
Format a hexadecimal value.
string | FmtLng (long lVal)
Format a long value.
string | VersionToStr (unsigned char bVersion)
Format a version number value.
string | OnOffStr (bool bOn)
Format an OnOFF indicator value.
string | IsAorB (bool bIsA, string strA, string strB)
Format a boolean indicator value.
string | GetDeviceNameFromVal (int DeviceTypeVal)
Format a device type indicator as a device name string.
string | DisplayBufferArray (unsigned char buffer[], unsigned long bufSizeIn)
Format an string array from a data byte array of values.
void | SaveStringDataToFile (string strData)
Saves a data string to a default file (vcDP5_Data.txt).

Public Attributes

CDppUtilities DppUtil
Utilities to help data processing.
DP4_FORMAT_STATUS m_DP5_Status
DPP status storage.
DiagDataType DiagData
DPP diagnostic data storage.

Detailed Description

Definition at line 104 of file DP5Status.h.

Constructor & Destructor Documentation

CDP5Status::CDP5Status ( void )

Definition at line 9 of file DP5Status.cpp.

CDP5Status::~CDP5Status ( void )

Definition at line 13 of file DP5Status.cpp.

Member Function Documentation

string CDP5Status::DiagnosticsToString | ( | DiagDataType | dd,
 |  | int | device_type
 | ) |  |

Convert DiagDataType data into a diagnostic display string.

Definition at line 447 of file DP5Status.cpp.

Here is the call graph for this function:

string CDP5Status::DiagStrPX5Option | ( | DiagDataType | dd,
 |  | int | device_type
 | ) |  |

Convert PX5 Options into a display string.

Definition at line 535 of file DP5Status.cpp.

Here is the call graph for this function:

string CDP5Status::DisplayBufferArray | ( | unsigned char | buffer[],
 |  | unsigned long | bufSizeIn
 | ) |  |

Format an string array from a data byte array of values.

Definition at line 683 of file DP5Status.cpp.

Here is the call graph for this function:

string CDP5Status::DP5_Dx_OptionFlags ( unsigned char DP5_Dx_Options )

Definition at line 152 of file DP5Status.cpp.

Here is the call graph for this function:

string CDP5Status::FmtHex | ( | long | FmtHex,
 |  | long | HexDig
 | ) |  |

Format a hexadecimal value.

Definition at line 605 of file DP5Status.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

string CDP5Status::FmtHvPwr ( float fVal )

Format a high voltage power value.

Definition at line 581 of file DP5Status.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

string CDP5Status::FmtLng ( long lVal )

Format a long value.

Definition at line 616 of file DP5Status.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

string CDP5Status::FmtPc5Pwr ( float fVal )

Format a pc5 power value.

Definition at line 589 of file DP5Status.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

string CDP5Status::FmtPc5Temp ( float fVal )

Format a pc5 temperature value.

Definition at line 597 of file DP5Status.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

string CDP5Status::GetDeviceNameFromVal ( int DeviceTypeVal )

Format a device type indicator as a device name string.

Definition at line 654 of file DP5Status.cpp.

Here is the caller graph for this function:

string CDP5Status::GetStatusValueStrings ( DP4_FORMAT_STATUS m_DP5_Status )

Definition at line 259 of file DP5Status.cpp.

Here is the call graph for this function:

string CDP5Status::IsAorB | ( | bool | bIsA,
 |  | string | strA,
 |  | string | strB
 | ) |  |

Format a boolean indicator value.

Definition at line 645 of file DP5Status.cpp.

Here is the caller graph for this function:

string CDP5Status::OnOffStr ( bool bOn )

Format an OnOFF indicator value.

Definition at line 636 of file DP5Status.cpp.

Here is the caller graph for this function:

void CDP5Status::Process_Diagnostics | ( | Packet_In | PIN,
 |  | DiagDataType * | dd,
 |  | int | device_type
 | ) |  |

Convert a DPP diagnostic data packet into DiagDataType data.

Definition at line 332 of file DP5Status.cpp.

Here is the call graph for this function:

void CDP5Status::Process_Status ( DP4_FORMAT_STATUS * m_DP5_Status )

Convert a DPP status packet into DP4_FORMAT_STATUS data.

Definition at line 17 of file DP5Status.cpp.

Here is the call graph for this function:

string CDP5Status::PX5_OptionsString ( DP4_FORMAT_STATUS m_DP5_Status )

Definition at line 221 of file DP5Status.cpp.

Here is the caller graph for this function:

void CDP5Status::SaveStringDataToFile ( string strData )

Saves a data string to a default file (vcDP5_Data.txt).

Definition at line 705 of file DP5Status.cpp.

Here is the call graph for this function:

string CDP5Status::ShowStatusValueStrings ( DP4_FORMAT_STATUS m_DP5_Status )

Convert DP4_FORMAT_STATUS data into a status display string.

Definition at line 174 of file DP5Status.cpp.

Here is the call graph for this function:

string CDP5Status::VersionToStr ( unsigned char bVersion )

Format a version number value.

Definition at line 624 of file DP5Status.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

DiagDataType CDP5Status::DiagData

DPP diagnostic data storage.

Definition at line 116 of file DP5Status.h.

CDppUtilities CDP5Status::DppUtil

Utilities to help data processing.

Definition at line 111 of file DP5Status.h.

DP4_FORMAT_STATUS CDP5Status::m_DP5_Status

DPP status storage.

Definition at line 114 of file DP5Status.h.

The documentation for this class was generated from the following files:
  • DeviceIO/DP5Status.h
  • DeviceIO/DP5Status.cpp
Generated on Thu Sep 21 2017 16:01:15 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: Member List

  • Class List
  • Class Index
  • Class Members
CDP5Status Member List
This is the complete list of members for CDP5Status, including all inherited members.
CDP5Status(void) | CDP5Status
DiagData | CDP5Status
DiagnosticsToString(DiagDataType dd, int device_type) | CDP5Status
DiagStrPX5Option(DiagDataType dd, int device_type) | CDP5Status
DisplayBufferArray(unsigned char buffer[], unsigned long bufSizeIn) | CDP5Status
DP5_Dx_OptionFlags(unsigned char DP5_Dx_Options) | CDP5Status
DppUtil | CDP5Status
FmtHex(long FmtHex, long HexDig) | CDP5Status
FmtHvPwr(float fVal) | CDP5Status
FmtLng(long lVal) | CDP5Status
FmtPc5Pwr(float fVal) | CDP5Status
FmtPc5Temp(float fVal) | CDP5Status
GetDeviceNameFromVal(int DeviceTypeVal) | CDP5Status
GetStatusValueStrings(DP4_FORMAT_STATUS m_DP5_Status) | CDP5Status
IsAorB(bool bIsA, string strA, string strB) | CDP5Status
m_DP5_Status | CDP5Status
OnOffStr(bool bOn) | CDP5Status
Process_Diagnostics(Packet_In PIN, DiagDataType *dd, int device_type) | CDP5Status
Process_Status(DP4_FORMAT_STATUS *m_DP5_Status) | CDP5Status
PX5_OptionsString(DP4_FORMAT_STATUS m_DP5_Status) | CDP5Status
SaveStringDataToFile(string strData) | CDP5Status
ShowStatusValueStrings(DP4_FORMAT_STATUS m_DP5_Status) | CDP5Status
VersionToStr(unsigned char bVersion) | CDP5Status
~CDP5Status(void) | CDP5Status
Generated on Thu Sep 21 2017 16:01:15 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: CDppLibUsb Class Reference

  • Class List
  • Class Index
  • Class Members
Public Member Functions | Public Attributes
CDppLibUsb Class Reference

#include <DppLibUsb.h>

List of all members.

Public Member Functions

CDppLibUsb (void)
~CDppLibUsb (void)
int | InitializeLibusb ()
void | DeinitializeLibusb ()
libusb_device_handle * | FindUSBDevice (int idxAmptekDevice)
void | CloseUSBDevice (libusb_device_handle *devh)
int | SendPacketUSB (libusb_device_handle *devh, unsigned char data_out[], unsigned char data_in[])
bool | isAmptekDP5Device (libusb_device_descriptor desc)
int | CountDP5LibusbDevices ()
void | PrintDevices ()
const char * | libusb_strerror (enum libusb_error error_code)

Public Attributes

unsigned char | data_in [MAX_BULK_IN_TRANSFER_SIZE]
unsigned char | data_out [MAX_BULK_OUT_TRANSFER_SIZE]
libusb_device_handle * | DppLibusbHandle
int | NumDevices
int | CurrentDevice
bool | bLibusbReady
bool | bDeviceReady
char | LastLibUsbError [256]
bool | bDeviceConnected

Detailed Description

Definition at line 36 of file DppLibUsb.h.

Constructor & Destructor Documentation

CDppLibUsb::CDppLibUsb ( void )

Definition at line 3 of file DppLibUsb.cpp.

CDppLibUsb::~CDppLibUsb ( void )

Definition at line 7 of file DppLibUsb.cpp.

Member Function Documentation

void CDppLibUsb::CloseUSBDevice ( libusb_device_handle * devh )

Definition at line 91 of file DppLibUsb.cpp.

Here is the call graph for this function:

int CDppLibUsb::CountDP5LibusbDevices ( )

Definition at line 154 of file DppLibUsb.cpp.

Here is the call graph for this function:

void CDppLibUsb::DeinitializeLibusb ( )

Definition at line 25 of file DppLibUsb.cpp.

libusb_device_handle * CDppLibUsb::FindUSBDevice ( int idxAmptekDevice )

Definition at line 32 of file DppLibUsb.cpp.

Here is the call graph for this function:

int CDppLibUsb::InitializeLibusb ( )

Definition at line 13 of file DppLibUsb.cpp.

Here is the call graph for this function:

bool CDppLibUsb::isAmptekDP5Device ( libusb_device_descriptor desc )

Definition at line 142 of file DppLibUsb.cpp.

Here is the caller graph for this function:

const char * CDppLibUsb::libusb_strerror ( enum libusb_error error_code )

Definition at line 207 of file DppLibUsb.cpp.

Here is the caller graph for this function:

void CDppLibUsb::PrintDevices ( )

Definition at line 179 of file DppLibUsb.cpp.

Here is the call graph for this function:

int CDppLibUsb::SendPacketUSB | ( | libusb_device_handle * | devh,
 |  | unsigned char | data_out[],
 |  | unsigned char | data_in[]
 | ) |  |

Definition at line 103 of file DppLibUsb.cpp.

Member Data Documentation

bool CDppLibUsb::bDeviceConnected

Definition at line 51 of file DppLibUsb.h.

bool CDppLibUsb::bDeviceReady

Definition at line 49 of file DppLibUsb.h.

bool CDppLibUsb::bLibusbReady

Definition at line 48 of file DppLibUsb.h.

int CDppLibUsb::CurrentDevice

Definition at line 47 of file DppLibUsb.h.

unsigned char CDppLibUsb::data_in[MAX_BULK_IN_TRANSFER_SIZE]

Definition at line 42 of file DppLibUsb.h.

unsigned char CDppLibUsb::data_out[MAX_BULK_OUT_TRANSFER_SIZE]

Definition at line 43 of file DppLibUsb.h.

libusb_device_handle* CDppLibUsb::DppLibusbHandle

Definition at line 45 of file DppLibUsb.h.

char CDppLibUsb::LastLibUsbError[256]

Definition at line 50 of file DppLibUsb.h.

int CDppLibUsb::NumDevices

Definition at line 46 of file DppLibUsb.h.

The documentation for this class was generated from the following files:
  • DeviceIO/DppLibUsb.h
  • DeviceIO/DppLibUsb.cpp
Generated on Thu Sep 21 2017 16:01:15 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: Member List

  • Class List
  • Class Index
  • Class Members
CDppLibUsb Member List
This is the complete list of members for CDppLibUsb, including all inherited members.
bDeviceConnected | CDppLibUsb
bDeviceReady | CDppLibUsb
bLibusbReady | CDppLibUsb
CDppLibUsb(void) | CDppLibUsb
CloseUSBDevice(libusb_device_handle *devh) | CDppLibUsb
CountDP5LibusbDevices() | CDppLibUsb
CurrentDevice | CDppLibUsb
data_in | CDppLibUsb
data_out | CDppLibUsb
DeinitializeLibusb() | CDppLibUsb
DppLibusbHandle | CDppLibUsb
FindUSBDevice(int idxAmptekDevice) | CDppLibUsb
InitializeLibusb() | CDppLibUsb
isAmptekDP5Device(libusb_device_descriptor desc) | CDppLibUsb
LastLibUsbError | CDppLibUsb
libusb_strerror(enum libusb_error error_code) | CDppLibUsb
NumDevices | CDppLibUsb
PrintDevices() | CDppLibUsb
SendPacketUSB(libusb_device_handle *devh, unsigned char data_out[], unsigned char data_in[]) | CDppLibUsb
~CDppLibUsb(void) | CDppLibUsb
Generated on Thu Sep 21 2017 16:01:15 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: CDppUtilities Class Reference

  • Class List
  • Class Index
  • Class Members
Public Member Functions
CDppUtilities Class Reference

#include <DppUtilities.h>

List of all members.

Public Member Functions

CDppUtilities (void)
~CDppUtilities (void)
double | LongWordToDouble (int lwStart, unsigned char buffer[])
Covert a long word into a double.
double | BYTEVersionToDouble (unsigned char Version)
Convert a byte version value into a double.
string | BYTEVersionToString (unsigned char Version)
Convert a byte version value into a string.

Detailed Description

Definition at line 7 of file DppUtilities.h.

Constructor & Destructor Documentation

CDppUtilities::CDppUtilities ( void )

Definition at line 4 of file DppUtilities.cpp.

CDppUtilities::~CDppUtilities ( void )

Definition at line 8 of file DppUtilities.cpp.

Member Function Documentation

double CDppUtilities::BYTEVersionToDouble ( unsigned char Version )

Convert a byte version value into a double.

Definition at line 29 of file DppUtilities.cpp.

Here is the call graph for this function:

string CDppUtilities::BYTEVersionToString ( unsigned char Version )

Convert a byte version value into a string.

Definition at line 40 of file DppUtilities.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

double CDppUtilities::LongWordToDouble | ( | int | lwStart,
 |  | unsigned char | buffer[]
 | ) |  |

Covert a long word into a double.

Definition at line 15 of file DppUtilities.cpp.

Here is the caller graph for this function:

The documentation for this class was generated from the following files:
  • DeviceIO/DppUtilities.h
  • DeviceIO/DppUtilities.cpp
Generated on Thu Sep 21 2017 16:01:15 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: Member List

  • Class List
  • Class Index
  • Class Members
CDppUtilities Member List
This is the complete list of members for CDppUtilities, including all inherited members.
BYTEVersionToDouble(unsigned char Version) | CDppUtilities
BYTEVersionToString(unsigned char Version) | CDppUtilities
CDppUtilities(void) | CDppUtilities
LongWordToDouble(int lwStart, unsigned char buffer[]) | CDppUtilities
~CDppUtilities(void) | CDppUtilities
Generated on Thu Sep 21 2017 16:01:15 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: CDppWinUSB Class Reference

  • Class List
  • Class Index
  • Class Members
Public Member Functions | Public Attributes
CDppWinUSB Class Reference

#include <DppWinUSB.h>

Collaboration diagram for CDppWinUSB:
[legend]

List of all members.

Public Member Functions

CDppWinUSB (void)
~CDppWinUSB (void)
void | Disable_WinUsb ()
void | InitDeviceInfo ()
Initializes the DEVICE_INFO data.
void | CloseDeviceHandle ()
Closes the system device handle.
void | CloseWinUsbDevice ()
Closes the WinUSB device interface handle and frees the resources.
BOOL | GetDevicePath (LPGUID InterfaceGuid, PCHAR DevicePath, size_t BufLen, DWORD MemberIndex)
Returns the device path string for a selcted device.
HANDLE | OpenDevice (BOOL bSync, DWORD MemberIndex)
Opens a connection to a selected DPP device.
BOOL | Initialize_Device (DWORD MemberIndex)
Initializes the selected DPP device.
DPP_USB_STATUS | FindUSBDevice (DWORD MemberIndex)
Finds a USB DPP device and sets DEVICE_INFO status indicators. DPP_USB_STATUS is not supported for console applications.
int | CountDP5WinusbDevices (void)
Returns the number of USB devices found.
string | DisplayBufferArray (unsigned char buffer[], unsigned long bufSizeIn)
void | SaveStringDataToFile (string strData)
string | USBStatusString (DPP_USB_STATUS USBStatus)
bool | SendPacketUSB (unsigned char Buffer[], DEVICE_INFO TestDevInfo, unsigned char PacketIn[])
Sends a USB buffer and returns any data read back.

Public Attributes

bool | WinUsb_Disabled
DEVICE_INFO devInfo
Holds the current USB device information.
int | NumPipes
Number of endpoints.
HANDLE | PipeId [MAXPIPES]
Pipe ID array for the current pipes.
ULONG | PipeTimeout [MAXPIPES]
Pipe timeout value array for the current pipes.
int | CurrentDevice
USB device index. CurrentDevice index starts at 1 for display purposes. WinUSB device indexes (MemberIndex) start at 0.
int | NumDevices
Number of devices found.
bool | isDppFound
Indicates a DPP device has been found.
bool | USB_Default_Timeout

Detailed Description

Definition at line 68 of file DppWinUSB.h.

Constructor & Destructor Documentation

CDppWinUSB::CDppWinUSB ( void )

Definition at line 4 of file DppWinUSB.cpp.

Here is the call graph for this function:

CDppWinUSB::~CDppWinUSB ( void )

Definition at line 14 of file DppWinUSB.cpp.

Member Function Documentation

void CDppWinUSB::CloseDeviceHandle ( )

Closes the system device handle.

Definition at line 30 of file DppWinUSB.cpp.

Here is the caller graph for this function:

void CDppWinUSB::CloseWinUsbDevice ( )

Closes the WinUSB device interface handle and frees the resources.

Definition at line 38 of file DppWinUSB.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

int CDppWinUSB::CountDP5WinusbDevices ( void )

Returns the number of USB devices found.

Definition at line 217 of file DppWinUSB.cpp.

void CDppWinUSB::Disable_WinUsb ( )

Definition at line 18 of file DppWinUSB.cpp.

string CDppWinUSB::DisplayBufferArray | ( | unsigned char | buffer[],
 |  | unsigned long | bufSizeIn
 | ) |  |

Definition at line 276 of file DppWinUSB.cpp.

Here is the call graph for this function:

DPP_USB_STATUS CDppWinUSB::FindUSBDevice ( DWORD MemberIndex )

Finds a USB DPP device and sets DEVICE_INFO status indicators. DPP_USB_STATUS is not supported for console applications.

Definition at line 183 of file DppWinUSB.cpp.

Here is the call graph for this function:

BOOL CDppWinUSB::GetDevicePath | ( | LPGUID | InterfaceGuid,
 |  | PCHAR | DevicePath,
 |  | size_t | BufLen,
 |  | DWORD | MemberIndex
 | ) |  |

Returns the device path string for a selcted device.

Definition at line 51 of file DppWinUSB.cpp.

Here is the caller graph for this function:

void CDppWinUSB::InitDeviceInfo ( )

Initializes the DEVICE_INFO data.

Definition at line 23 of file DppWinUSB.cpp.

Here is the caller graph for this function:

BOOL CDppWinUSB::Initialize_Device ( DWORD MemberIndex )

Initializes the selected DPP device.

Definition at line 117 of file DppWinUSB.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

HANDLE CDppWinUSB::OpenDevice | ( | BOOL | bSync,
 |  | DWORD | MemberIndex
 | ) |  |

Opens a connection to a selected DPP device.

Definition at line 97 of file DppWinUSB.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void CDppWinUSB::SaveStringDataToFile ( string strData )

Definition at line 295 of file DppWinUSB.cpp.

Here is the call graph for this function:

bool CDppWinUSB::SendPacketUSB | ( | unsigned char | Buffer[],
 |  | DEVICE_INFO | TestDevInfo,
 |  | unsigned char | PacketIn[]
 | ) |  |

Sends a USB buffer and returns any data read back.

Definition at line 313 of file DppWinUSB.cpp.

Here is the call graph for this function:

string CDppWinUSB::USBStatusString ( DPP_USB_STATUS USBStatus )

Definition at line 261 of file DppWinUSB.cpp.

Member Data Documentation

int CDppWinUSB::CurrentDevice

USB device index. CurrentDevice index starts at 1 for display purposes. WinUSB device indexes (MemberIndex) start at 0.

Definition at line 106 of file DppWinUSB.h.

DEVICE_INFO CDppWinUSB::devInfo

Holds the current USB device information.

Definition at line 78 of file DppWinUSB.h.

bool CDppWinUSB::isDppFound

Indicates a DPP device has been found.

Definition at line 110 of file DppWinUSB.h.

int CDppWinUSB::NumDevices

Number of devices found.

Definition at line 108 of file DppWinUSB.h.

int CDppWinUSB::NumPipes

Number of endpoints.

Definition at line 80 of file DppWinUSB.h.

HANDLE CDppWinUSB::PipeId[MAXPIPES]

Pipe ID array for the current pipes.

Definition at line 83 of file DppWinUSB.h.

ULONG CDppWinUSB::PipeTimeout[MAXPIPES]

Pipe timeout value array for the current pipes.

Definition at line 85 of file DppWinUSB.h.

bool CDppWinUSB::USB_Default_Timeout

Definition at line 119 of file DppWinUSB.h.

bool CDppWinUSB::WinUsb_Disabled

Definition at line 74 of file DppWinUSB.h.

The documentation for this class was generated from the following files:
  • DeviceIO/DppWinUSB.h
  • DeviceIO/DppWinUSB.cpp
Generated on Thu Sep 21 2017 16:01:16 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: Member List

  • Class List
  • Class Index
  • Class Members
CDppWinUSB Member List
This is the complete list of members for CDppWinUSB, including all inherited members.
CDppWinUSB(void) | CDppWinUSB
CloseDeviceHandle() | CDppWinUSB
CloseWinUsbDevice() | CDppWinUSB
CountDP5WinusbDevices(void) | CDppWinUSB
CurrentDevice | CDppWinUSB
devInfo | CDppWinUSB
Disable_WinUsb() | CDppWinUSB
DisplayBufferArray(unsigned char buffer[], unsigned long bufSizeIn) | CDppWinUSB
FindUSBDevice(DWORD MemberIndex) | CDppWinUSB
GetDevicePath(LPGUID InterfaceGuid, PCHAR DevicePath, size_t BufLen, DWORD MemberIndex) | CDppWinUSB
InitDeviceInfo() | CDppWinUSB
Initialize_Device(DWORD MemberIndex) | CDppWinUSB
isDppFound | CDppWinUSB
NumDevices | CDppWinUSB
NumPipes | CDppWinUSB
OpenDevice(BOOL bSync, DWORD MemberIndex) | CDppWinUSB
PipeId | CDppWinUSB
PipeTimeout | CDppWinUSB
SaveStringDataToFile(string strData) | CDppWinUSB
SendPacketUSB(unsigned char Buffer[], DEVICE_INFO TestDevInfo, unsigned char PacketIn[]) | CDppWinUSB
USB_Default_Timeout | CDppWinUSB
USBStatusString(DPP_USB_STATUS USBStatus) | CDppWinUSB
WinUsb_Disabled | CDppWinUSB
~CDppWinUSB(void) | CDppWinUSB
Generated on Thu Sep 21 2017 16:01:16 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: CMSecTimer Class Reference

  • Class List
  • Class Index
  • Class Members
Public Member Functions
CMSecTimer Class Reference

#include <MSecTimer.h>

List of all members.

Public Member Functions

CMSecTimer (void)
~CMSecTimer (void)
DWORD | msTimeDiff (DWORD msStartTime, DWORD msTestTime)
BOOL | msTimeExpired (DWORD msStartTime, DWORD msDelay)
BOOL | msTimer (DWORD msDelay)

Detailed Description

Definition at line 6 of file MSecTimer.h.

Constructor & Destructor Documentation

CMSecTimer::CMSecTimer ( void )

Definition at line 3 of file MSecTimer.cpp.

CMSecTimer::~CMSecTimer ( void )

Definition at line 7 of file MSecTimer.cpp.

Member Function Documentation

DWORD CMSecTimer::msTimeDiff | ( | DWORD | msStartTime,
 |  | DWORD | msTestTime
 | ) |  |

Definition at line 11 of file MSecTimer.cpp.

Here is the caller graph for this function:

BOOL CMSecTimer::msTimeExpired | ( | DWORD | msStartTime,
 |  | DWORD | msDelay
 | ) |  |

Definition at line 33 of file MSecTimer.cpp.

Here is the caller graph for this function:

BOOL CMSecTimer::msTimer ( DWORD msDelay )

Definition at line 60 of file MSecTimer.cpp.

Here is the call graph for this function:

The documentation for this class was generated from the following files:
  • DeviceIO/MSecTimer.h
  • DeviceIO/MSecTimer.cpp
Generated on Thu Sep 21 2017 16:01:16 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: Member List

  • Class List
  • Class Index
  • Class Members
CMSecTimer Member List
This is the complete list of members for CMSecTimer, including all inherited members.
CMSecTimer(void) | CMSecTimer
msTimeDiff(DWORD msStartTime, DWORD msTestTime) | CMSecTimer
msTimeExpired(DWORD msStartTime, DWORD msDelay) | CMSecTimer
msTimer(DWORD msDelay) | CMSecTimer
~CMSecTimer(void) | CMSecTimer
Generated on Thu Sep 21 2017 16:01:16 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: CNetFinder Class Reference

  • Class List
  • Class Index
  • Class Members
Public Member Functions | Public Attributes
CNetFinder Class Reference

#include <NetFinder.h>

Collaboration diagram for CNetFinder:
[legend]

List of all members.

Public Member Functions

CNetFinder (void)
~CNetFinder (void)
CString | EntryToStr (NETDISPLAY_ENTRY *pEntry)
CString | EntryToStrRS232 (NETDISPLAY_ENTRY *pEntry, CString strPort)
CString | EntryToStrUSB (NETDISPLAY_ENTRY *pEntry, CString strPort)
COLORREF | AlertEntryToCOLORREF (NETDISPLAY_ENTRY *pEntry)
COLORREF | AlertByteToCOLORREF (BYTE alert_level)
int | FindEntry (ULONG SockAddr)
CString | SockAddr_DlgToStr (CDialog *dlg, int id1, int id2, int id3, int id4)
UINT | SockPort_DlgToUINT (CDialog *dlg, int id1)
in_addr | SockAddr_ByteToInAddr (BYTE *ip)
ULONG | SockAddr_ByteToULong (BYTE *ip)
CString | SockAddr_ByteToStr (BYTE *ip)
in_addr | SockAddr_StrToInAddr (CString cstrSockAddr)
ULONG | SockAddr_StrToULong (CString cstrSockAddr)
in_addr | SockAddr_ULongToInAddr (ULONG SockAddr)
CString | SockAddr_ULongToStr (ULONG SockAddr)
CString | SockAddr_InAddrToStr (in_addr inSockAddr)
void | InitEntry (NETDISPLAY_ENTRY *pEntry)
void | InitAllEntries ()
void | AddEntry (NETDISPLAY_ENTRY *pEntry, BYTE *buffer, UINT destPort)

Public Attributes

int | m_rand
NETDISPLAY_ENTRY DppEntries [MAX_ENTRIES]
int | LastEntry
ULONG | DppSockAddr
int | DppEntryIdx
BOOL | DppFound

Detailed Description

Definition at line 45 of file NetFinder.h.

Constructor & Destructor Documentation

CNetFinder::CNetFinder ( void )

Definition at line 6 of file NetFinder.cpp.

Here is the call graph for this function:

CNetFinder::~CNetFinder ( void )

Definition at line 13 of file NetFinder.cpp.

Member Function Documentation

void CNetFinder::AddEntry | ( | NETDISPLAY_ENTRY * | pEntry,
 |  | BYTE * | buffer,
 |  | UINT | destPort
 | ) |  |

Definition at line 307 of file NetFinder.cpp.

Here is the call graph for this function:

COLORREF CNetFinder::AlertByteToCOLORREF ( BYTE alert_level )

Definition at line 25 of file NetFinder.cpp.

Here is the caller graph for this function:

COLORREF CNetFinder::AlertEntryToCOLORREF ( NETDISPLAY_ENTRY * pEntry )

Definition at line 18 of file NetFinder.cpp.

Here is the call graph for this function:

CString CNetFinder::EntryToStr ( NETDISPLAY_ENTRY * pEntry )

Definition at line 51 of file NetFinder.cpp.

Here is the caller graph for this function:

CString CNetFinder::EntryToStrRS232 | ( | NETDISPLAY_ENTRY * | pEntry,
 |  | CString | strPort
 | ) |  |

Definition at line 114 of file NetFinder.cpp.

CString CNetFinder::EntryToStrUSB | ( | NETDISPLAY_ENTRY * | pEntry,
 |  | CString | strPort
 | ) |  |

Definition at line 178 of file NetFinder.cpp.

int CNetFinder::FindEntry ( ULONG SockAddr )

Definition at line 242 of file NetFinder.cpp.

void CNetFinder::InitAllEntries ( )

Definition at line 298 of file NetFinder.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void CNetFinder::InitEntry ( NETDISPLAY_ENTRY * pEntry )

Definition at line 256 of file NetFinder.cpp.

Here is the caller graph for this function:

in_addr CNetFinder::SockAddr_ByteToInAddr ( BYTE * ip )

Definition at line 412 of file NetFinder.cpp.

Here is the caller graph for this function:

CString CNetFinder::SockAddr_ByteToStr ( BYTE * ip )

Definition at line 429 of file NetFinder.cpp.

ULONG CNetFinder::SockAddr_ByteToULong ( BYTE * ip )

Definition at line 422 of file NetFinder.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

CString CNetFinder::SockAddr_DlgToStr | ( | CDialog * | dlg,
 |  | int | id1,
 |  | int | id2,
 |  | int | id3,
 |  | int | id4
 | ) |  |

Definition at line 374 of file NetFinder.cpp.

CString CNetFinder::SockAddr_InAddrToStr ( in_addr inSockAddr )

Definition at line 468 of file NetFinder.cpp.

in_addr CNetFinder::SockAddr_StrToInAddr ( CString cstrSockAddr )

Definition at line 436 of file NetFinder.cpp.

ULONG CNetFinder::SockAddr_StrToULong ( CString cstrSockAddr )

Definition at line 445 of file NetFinder.cpp.

in_addr CNetFinder::SockAddr_ULongToInAddr ( ULONG SockAddr )

Definition at line 452 of file NetFinder.cpp.

CString CNetFinder::SockAddr_ULongToStr ( ULONG SockAddr )

Definition at line 459 of file NetFinder.cpp.

UINT CNetFinder::SockPort_DlgToUINT | ( | CDialog * | dlg,
 |  | int | id1
 | ) |  |

Definition at line 401 of file NetFinder.cpp.

Member Data Documentation

NETDISPLAY_ENTRY CNetFinder::DppEntries[MAX_ENTRIES]

Definition at line 52 of file NetFinder.h.

int CNetFinder::DppEntryIdx

Definition at line 56 of file NetFinder.h.

BOOL CNetFinder::DppFound

Definition at line 57 of file NetFinder.h.

ULONG CNetFinder::DppSockAddr

Definition at line 55 of file NetFinder.h.

int CNetFinder::LastEntry

Definition at line 53 of file NetFinder.h.

int CNetFinder::m_rand

Definition at line 51 of file NetFinder.h.

The documentation for this class was generated from the following files:
  • DeviceIO/NetFinder.h
  • DeviceIO/NetFinder.cpp
Generated on Thu Sep 21 2017 16:01:16 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: Member List

  • Class List
  • Class Index
  • Class Members
CNetFinder Member List
This is the complete list of members for CNetFinder, including all inherited members.
AddEntry(NETDISPLAY_ENTRY *pEntry, BYTE *buffer, UINT destPort) | CNetFinder
AlertByteToCOLORREF(BYTE alert_level) | CNetFinder
AlertEntryToCOLORREF(NETDISPLAY_ENTRY *pEntry) | CNetFinder
CNetFinder(void) | CNetFinder
DppEntries | CNetFinder
DppEntryIdx | CNetFinder
DppFound | CNetFinder
DppSockAddr | CNetFinder
EntryToStr(NETDISPLAY_ENTRY *pEntry) | CNetFinder
EntryToStrRS232(NETDISPLAY_ENTRY *pEntry, CString strPort) | CNetFinder
EntryToStrUSB(NETDISPLAY_ENTRY *pEntry, CString strPort) | CNetFinder
FindEntry(ULONG SockAddr) | CNetFinder
InitAllEntries() | CNetFinder
InitEntry(NETDISPLAY_ENTRY *pEntry) | CNetFinder
LastEntry | CNetFinder
m_rand | CNetFinder
SockAddr_ByteToInAddr(BYTE *ip) | CNetFinder
SockAddr_ByteToStr(BYTE *ip) | CNetFinder
SockAddr_ByteToULong(BYTE *ip) | CNetFinder
SockAddr_DlgToStr(CDialog *dlg, int id1, int id2, int id3, int id4) | CNetFinder
SockAddr_InAddrToStr(in_addr inSockAddr) | CNetFinder
SockAddr_StrToInAddr(CString cstrSockAddr) | CNetFinder
SockAddr_StrToULong(CString cstrSockAddr) | CNetFinder
SockAddr_ULongToInAddr(ULONG SockAddr) | CNetFinder
SockAddr_ULongToStr(ULONG SockAddr) | CNetFinder
SockPort_DlgToUINT(CDialog *dlg, int id1) | CNetFinder
~CNetFinder(void) | CNetFinder
Generated on Thu Sep 21 2017 16:01:16 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: CParsePacket Class Reference

  • Class List
  • Class Index
  • Class Members
Public Member Functions | Public Attributes
CParsePacket Class Reference

#include <ParsePacket.h>

Collaboration diagram for CParsePacket:
[legend]

List of all members.

Public Member Functions

CParsePacket (void)
~CParsePacket (void)
void | ParsePacketStatus (unsigned char P[], Packet_In *PIN)
Parses DPP packet status, determines further processing.
string | PID2_TextToString (string strPacketSource, unsigned char PID2)
Processes DPP return ACKS, NAKS and errors.
long | ParsePacket (unsigned char P[], Packet_In *PIN)
Parses incoming DPP packet, tests packet, populates packet information, sets packet state.

Public Attributes

DppStateType DppState
DPP packet parser state indicator.

Detailed Description

Definition at line 42 of file ParsePacket.h.

Constructor & Destructor Documentation

CParsePacket::CParsePacket ( void )

Definition at line 3 of file ParsePacket.cpp.

CParsePacket::~CParsePacket ( void )

Definition at line 7 of file ParsePacket.cpp.

Member Function Documentation

long CParsePacket::ParsePacket | ( | unsigned char | P[],
 |  | Packet_In * | PIN
 | ) |  |

Parses incoming DPP packet, tests packet, populates packet information, sets packet state.

Definition at line 117 of file ParsePacket.cpp.

Here is the call graph for this function:

void CParsePacket::ParsePacketStatus | ( | unsigned char | P[],
 |  | Packet_In * | PIN
 | ) |  |

Parses DPP packet status, determines further processing.

Definition at line 11 of file ParsePacket.cpp.

Here is the caller graph for this function:

string CParsePacket::PID2_TextToString | ( | string | strPacketSource,
 |  | unsigned char | PID2
 | ) |  |

Processes DPP return ACKS, NAKS and errors.

Definition at line 49 of file ParsePacket.cpp.

Member Data Documentation

DppStateType CParsePacket::DppState

DPP packet parser state indicator.

Definition at line 48 of file ParsePacket.h.

The documentation for this class was generated from the following files:
  • DeviceIO/ParsePacket.h
  • DeviceIO/ParsePacket.cpp
Generated on Thu Sep 21 2017 16:01:16 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: Member List

  • Class List
  • Class Index
  • Class Members
CParsePacket Member List
This is the complete list of members for CParsePacket, including all inherited members.
CParsePacket(void) | CParsePacket
DppState | CParsePacket
ParsePacket(unsigned char P[], Packet_In *PIN) | CParsePacket
ParsePacketStatus(unsigned char P[], Packet_In *PIN) | CParsePacket
PID2_TextToString(string strPacketSource, unsigned char PID2) | CParsePacket
~CParsePacket(void) | CParsePacket
Generated on Thu Sep 21 2017 16:01:16 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: CSendCommand Class Reference

  • Class List
  • Class Index
  • Class Members
Public Member Functions | Public Attributes
CSendCommand Class Reference

#include <SendCommand.h>

Collaboration diagram for CSendCommand:
[legend]

List of all members.

Public Member Functions

CSendCommand (void)
~CSendCommand (void)
bool | TestPacketCkSumOK (unsigned char Data[])
Packet checksum test for commands with data.
bool | DP5_CMD (unsigned char Buffer[], TRANSMIT_PACKET_TYPE XmtCmd)
Creates a DPP command that does not require additional processing.
bool | DP5_CMD_Config (unsigned char Buffer[], TRANSMIT_PACKET_TYPE XmtCmd, CONFIG_OPTIONS CfgOptions)
Creates a DPP command that requires configuration data options processing.
bool | DP5_CMD_Data (unsigned char Buffer[], TRANSMIT_PACKET_TYPE XmtCmd, unsigned char DataOut[])
Creates a DPP command that requires data.
bool | POUT_Buffer (Packet_Out POUT, unsigned char Buffer[])
Creates a packet output buffer from a command byte data array.

Public Attributes

CAsciiCmdUtilities AsciiCmdUtil

Detailed Description

CSendCommand prepares all command packets to be sent. Call CSendCommand::DP5_CMD, CSendCommand::DP5_CMD_Config or CSendCommand::DP5_CMD_Data along with the TRANSMIT_PACKET_TYPE and any additional data or options.

A command array of 8-bit bytes is generated.

Definition at line 23 of file SendCommand.h.

Constructor & Destructor Documentation

CSendCommand::CSendCommand ( void )

Definition at line 4 of file SendCommand.cpp.

CSendCommand::~CSendCommand ( void )

Definition at line 8 of file SendCommand.cpp.

Member Function Documentation

bool CSendCommand::DP5_CMD | ( | unsigned char | Buffer[],
 |  | TRANSMIT_PACKET_TYPE | XmtCmd
 | ) |  |

Creates a DPP command that does not require additional processing.

Definition at line 42 of file SendCommand.cpp.

Here is the call graph for this function:

bool CSendCommand::DP5_CMD_Config | ( | unsigned char | Buffer[],
 |  | TRANSMIT_PACKET_TYPE | XmtCmd,
 |  | CONFIG_OPTIONS | CfgOptions
 | ) |  |

Creates a DPP command that requires configuration data options processing.

Definition at line 273 of file SendCommand.cpp.

Here is the call graph for this function:

bool CSendCommand::DP5_CMD_Data | ( | unsigned char | Buffer[],
 |  | TRANSMIT_PACKET_TYPE | XmtCmd,
 |  | unsigned char | DataOut[]
 | ) |  |

Creates a DPP command that requires data.

Definition at line 404 of file SendCommand.cpp.

Here is the call graph for this function:

bool CSendCommand::POUT_Buffer | ( | Packet_Out | POUT,
 |  | unsigned char | Buffer[]
 | ) |  |

Creates a packet output buffer from a command byte data array.

Definition at line 446 of file SendCommand.cpp.

Here is the caller graph for this function:

bool CSendCommand::TestPacketCkSumOK ( unsigned char Data[] )

Packet checksum test for commands with data.

Definition at line 12 of file SendCommand.cpp.

Here is the caller graph for this function:

Member Data Documentation

CAsciiCmdUtilities CSendCommand::AsciiCmdUtil

Definition at line 28 of file SendCommand.h.

The documentation for this class was generated from the following files:
  • DeviceIO/SendCommand.h
  • DeviceIO/SendCommand.cpp
Generated on Thu Sep 21 2017 16:01:16 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: Member List

  • Class List
  • Class Index
  • Class Members
CSendCommand Member List
This is the complete list of members for CSendCommand, including all inherited members.
AsciiCmdUtil | CSendCommand
CSendCommand(void) | CSendCommand
DP5_CMD(unsigned char Buffer[], TRANSMIT_PACKET_TYPE XmtCmd) | CSendCommand
DP5_CMD_Config(unsigned char Buffer[], TRANSMIT_PACKET_TYPE XmtCmd, CONFIG_OPTIONS CfgOptions) | CSendCommand
DP5_CMD_Data(unsigned char Buffer[], TRANSMIT_PACKET_TYPE XmtCmd, unsigned char DataOut[]) | CSendCommand
POUT_Buffer(Packet_Out POUT, unsigned char Buffer[]) | CSendCommand
TestPacketCkSumOK(unsigned char Data[]) | CSendCommand
~CSendCommand(void) | CSendCommand
Generated on Thu Sep 21 2017 16:01:16 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: DP5_DP4_FORMAT_STATUS Struct Reference

  • Class List
  • Class Index
  • Class Members
Public Attributes
DP5_DP4_FORMAT_STATUS Struct Reference

#include <DP5Status.h>

List of all members.

Public Attributes

unsigned char | RAW [64]
unsigned long | SerialNumber
double | FastCount
double | SlowCount
unsigned char | FPGA
unsigned char | Firmware
unsigned char | Build
double | AccumulationTime
double | RealTime
double | LiveTime
double | HV
double | DET_TEMP
double | DP5_TEMP
bool | PX4
bool | AFAST_LOCKED
bool | MCA_EN
bool | PRECNT_REACHED
bool | PresetRtDone
bool | PresetLtDone
bool | SUPPLIES_ON
bool | SCOPE_DR
bool | DP5_CONFIGURED
double | GP_COUNTER
bool | AOFFSET_LOCKED
bool | MCS_DONE
bool | RAM_TEST_RUN
bool | RAM_TEST_ERROR
double | DCAL
unsigned char | PZCORR
unsigned char | UC_TEMP_OFFSET
double | AN_IN
double | VREF_IN
unsigned long | PC5_SN
bool | PC5_PRESENT
bool | PC5_HV_POL
bool | PC5_8_5V
double | ADC_GAIN_CAL
unsigned char | ADC_OFFSET_CAL
long | SPECTRUM_OFFSET
bool | b80MHzMode
bool | bFPGAAutoClock
unsigned char | DEVICE_ID
bool | ReBootFlag
unsigned char | DPP_options
bool | HPGe_HV_INH
bool | HPGe_HV_INH_POL
double | TEC_Voltage
unsigned char | DPP_ECO
bool | AU34_2
bool | isAscInstalled
bool | isAscEnabled
bool | bScintHas80MHzOption
bool | isDP5_RevDxGains

Detailed Description

Definition at line 23 of file DP5Status.h.

Member Data Documentation

double DP5_DP4_FORMAT_STATUS::AccumulationTime

Definition at line 32 of file DP5Status.h.

double DP5_DP4_FORMAT_STATUS::ADC_GAIN_CAL

Definition at line 61 of file DP5Status.h.

unsigned char DP5_DP4_FORMAT_STATUS::ADC_OFFSET_CAL

Definition at line 62 of file DP5Status.h.

bool DP5_DP4_FORMAT_STATUS::AFAST_LOCKED

Definition at line 39 of file DP5Status.h.

double DP5_DP4_FORMAT_STATUS::AN_IN

Definition at line 55 of file DP5Status.h.

bool DP5_DP4_FORMAT_STATUS::AOFFSET_LOCKED

Definition at line 48 of file DP5Status.h.

bool DP5_DP4_FORMAT_STATUS::AU34_2

Definition at line 73 of file DP5Status.h.

bool DP5_DP4_FORMAT_STATUS::b80MHzMode

Definition at line 64 of file DP5Status.h.

bool DP5_DP4_FORMAT_STATUS::bFPGAAutoClock

Definition at line 65 of file DP5Status.h.

bool DP5_DP4_FORMAT_STATUS::bScintHas80MHzOption

Definition at line 76 of file DP5Status.h.

unsigned char DP5_DP4_FORMAT_STATUS::Build

Definition at line 31 of file DP5Status.h.

double DP5_DP4_FORMAT_STATUS::DCAL

Definition at line 52 of file DP5Status.h.

double DP5_DP4_FORMAT_STATUS::DET_TEMP

Definition at line 36 of file DP5Status.h.

unsigned char DP5_DP4_FORMAT_STATUS::DEVICE_ID

Definition at line 66 of file DP5Status.h.

bool DP5_DP4_FORMAT_STATUS::DP5_CONFIGURED

Definition at line 46 of file DP5Status.h.

double DP5_DP4_FORMAT_STATUS::DP5_TEMP

Definition at line 37 of file DP5Status.h.

unsigned char DP5_DP4_FORMAT_STATUS::DPP_ECO

Definition at line 72 of file DP5Status.h.

unsigned char DP5_DP4_FORMAT_STATUS::DPP_options

Definition at line 68 of file DP5Status.h.

double DP5_DP4_FORMAT_STATUS::FastCount

Definition at line 27 of file DP5Status.h.

unsigned char DP5_DP4_FORMAT_STATUS::Firmware

Definition at line 30 of file DP5Status.h.

unsigned char DP5_DP4_FORMAT_STATUS::FPGA

Definition at line 29 of file DP5Status.h.

double DP5_DP4_FORMAT_STATUS::GP_COUNTER

Definition at line 47 of file DP5Status.h.

bool DP5_DP4_FORMAT_STATUS::HPGe_HV_INH

Definition at line 69 of file DP5Status.h.

bool DP5_DP4_FORMAT_STATUS::HPGe_HV_INH_POL

Definition at line 70 of file DP5Status.h.

double DP5_DP4_FORMAT_STATUS::HV

Definition at line 35 of file DP5Status.h.

bool DP5_DP4_FORMAT_STATUS::isAscEnabled

Definition at line 75 of file DP5Status.h.

bool DP5_DP4_FORMAT_STATUS::isAscInstalled

Definition at line 74 of file DP5Status.h.

bool DP5_DP4_FORMAT_STATUS::isDP5_RevDxGains

Definition at line 77 of file DP5Status.h.

double DP5_DP4_FORMAT_STATUS::LiveTime

Definition at line 34 of file DP5Status.h.

bool DP5_DP4_FORMAT_STATUS::MCA_EN

Definition at line 40 of file DP5Status.h.

bool DP5_DP4_FORMAT_STATUS::MCS_DONE

Definition at line 49 of file DP5Status.h.

bool DP5_DP4_FORMAT_STATUS::PC5_8_5V

Definition at line 60 of file DP5Status.h.

bool DP5_DP4_FORMAT_STATUS::PC5_HV_POL

Definition at line 59 of file DP5Status.h.

bool DP5_DP4_FORMAT_STATUS::PC5_PRESENT

Definition at line 58 of file DP5Status.h.

unsigned long DP5_DP4_FORMAT_STATUS::PC5_SN

Definition at line 57 of file DP5Status.h.

bool DP5_DP4_FORMAT_STATUS::PRECNT_REACHED

Definition at line 41 of file DP5Status.h.

bool DP5_DP4_FORMAT_STATUS::PresetLtDone

Definition at line 43 of file DP5Status.h.

bool DP5_DP4_FORMAT_STATUS::PresetRtDone

Definition at line 42 of file DP5Status.h.

bool DP5_DP4_FORMAT_STATUS::PX4

Definition at line 38 of file DP5Status.h.

unsigned char DP5_DP4_FORMAT_STATUS::PZCORR

Definition at line 53 of file DP5Status.h.

bool DP5_DP4_FORMAT_STATUS::RAM_TEST_ERROR

Definition at line 51 of file DP5Status.h.

bool DP5_DP4_FORMAT_STATUS::RAM_TEST_RUN

Definition at line 50 of file DP5Status.h.

unsigned char DP5_DP4_FORMAT_STATUS::RAW[64]

Definition at line 25 of file DP5Status.h.

double DP5_DP4_FORMAT_STATUS::RealTime

Definition at line 33 of file DP5Status.h.

bool DP5_DP4_FORMAT_STATUS::ReBootFlag

Definition at line 67 of file DP5Status.h.

bool DP5_DP4_FORMAT_STATUS::SCOPE_DR

Definition at line 45 of file DP5Status.h.

unsigned long DP5_DP4_FORMAT_STATUS::SerialNumber

Definition at line 26 of file DP5Status.h.

double DP5_DP4_FORMAT_STATUS::SlowCount

Definition at line 28 of file DP5Status.h.

long DP5_DP4_FORMAT_STATUS::SPECTRUM_OFFSET

Definition at line 63 of file DP5Status.h.

bool DP5_DP4_FORMAT_STATUS::SUPPLIES_ON

Definition at line 44 of file DP5Status.h.

double DP5_DP4_FORMAT_STATUS::TEC_Voltage

Definition at line 71 of file DP5Status.h.

unsigned char DP5_DP4_FORMAT_STATUS::UC_TEMP_OFFSET

Definition at line 54 of file DP5Status.h.

double DP5_DP4_FORMAT_STATUS::VREF_IN

Definition at line 56 of file DP5Status.h.

The documentation for this struct was generated from the following file:
  • DeviceIO/DP5Status.h
Generated on Thu Sep 21 2017 16:01:16 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: Member List

  • Class List
  • Class Index
  • Class Members
DP5_DP4_FORMAT_STATUS Member List
This is the complete list of members for DP5_DP4_FORMAT_STATUS, including all inherited members.
AccumulationTime | DP5_DP4_FORMAT_STATUS
ADC_GAIN_CAL | DP5_DP4_FORMAT_STATUS
ADC_OFFSET_CAL | DP5_DP4_FORMAT_STATUS
AFAST_LOCKED | DP5_DP4_FORMAT_STATUS
AN_IN | DP5_DP4_FORMAT_STATUS
AOFFSET_LOCKED | DP5_DP4_FORMAT_STATUS
AU34_2 | DP5_DP4_FORMAT_STATUS
b80MHzMode | DP5_DP4_FORMAT_STATUS
bFPGAAutoClock | DP5_DP4_FORMAT_STATUS
bScintHas80MHzOption | DP5_DP4_FORMAT_STATUS
Build | DP5_DP4_FORMAT_STATUS
DCAL | DP5_DP4_FORMAT_STATUS
DET_TEMP | DP5_DP4_FORMAT_STATUS
DEVICE_ID | DP5_DP4_FORMAT_STATUS
DP5_CONFIGURED | DP5_DP4_FORMAT_STATUS
DP5_TEMP | DP5_DP4_FORMAT_STATUS
DPP_ECO | DP5_DP4_FORMAT_STATUS
DPP_options | DP5_DP4_FORMAT_STATUS
FastCount | DP5_DP4_FORMAT_STATUS
Firmware | DP5_DP4_FORMAT_STATUS
FPGA | DP5_DP4_FORMAT_STATUS
GP_COUNTER | DP5_DP4_FORMAT_STATUS
HPGe_HV_INH | DP5_DP4_FORMAT_STATUS
HPGe_HV_INH_POL | DP5_DP4_FORMAT_STATUS
HV | DP5_DP4_FORMAT_STATUS
isAscEnabled | DP5_DP4_FORMAT_STATUS
isAscInstalled | DP5_DP4_FORMAT_STATUS
isDP5_RevDxGains | DP5_DP4_FORMAT_STATUS
LiveTime | DP5_DP4_FORMAT_STATUS
MCA_EN | DP5_DP4_FORMAT_STATUS
MCS_DONE | DP5_DP4_FORMAT_STATUS
PC5_8_5V | DP5_DP4_FORMAT_STATUS
PC5_HV_POL | DP5_DP4_FORMAT_STATUS
PC5_PRESENT | DP5_DP4_FORMAT_STATUS
PC5_SN | DP5_DP4_FORMAT_STATUS
PRECNT_REACHED | DP5_DP4_FORMAT_STATUS
PresetLtDone | DP5_DP4_FORMAT_STATUS
PresetRtDone | DP5_DP4_FORMAT_STATUS
PX4 | DP5_DP4_FORMAT_STATUS
PZCORR | DP5_DP4_FORMAT_STATUS
RAM_TEST_ERROR | DP5_DP4_FORMAT_STATUS
RAM_TEST_RUN | DP5_DP4_FORMAT_STATUS
RAW | DP5_DP4_FORMAT_STATUS
RealTime | DP5_DP4_FORMAT_STATUS
ReBootFlag | DP5_DP4_FORMAT_STATUS
SCOPE_DR | DP5_DP4_FORMAT_STATUS
SerialNumber | DP5_DP4_FORMAT_STATUS
SlowCount | DP5_DP4_FORMAT_STATUS
SPECTRUM_OFFSET | DP5_DP4_FORMAT_STATUS
SUPPLIES_ON | DP5_DP4_FORMAT_STATUS
TEC_Voltage | DP5_DP4_FORMAT_STATUS
UC_TEMP_OFFSET | DP5_DP4_FORMAT_STATUS
VREF_IN | DP5_DP4_FORMAT_STATUS
Generated on Thu Sep 21 2017 16:01:16 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: NETDISPLAY_ENTRY Struct Reference

  • Class List
  • Class Index
  • Class Members
Public Attributes
NETDISPLAY_ENTRY Struct Reference

#include <NetFinder.h>

List of all members.

Public Attributes

BYTE | alert_level
UINT | event1_days
BYTE | event1_hours
BYTE | event1_minutes
UINT | event2_days
BYTE | event2_hours
BYTE | event2_minutes
BYTE | event1_seconds
BYTE | event2_seconds
BYTE | mac [6]
BYTE | ip [4]
USHORT | port
BYTE | subnet [4]
BYTE | gateway [4]
CString | str_type
CString | str_description
CString | str_ev1
CString | str_ev2
CString | str_display
COLORREF | ccConnectRGB
BOOL | HasData
ULONG | SockAddr

Detailed Description

Definition at line 8 of file NetFinder.h.

Member Data Documentation

BYTE NETDISPLAY_ENTRY::alert_level

Definition at line 9 of file NetFinder.h.

COLORREF NETDISPLAY_ENTRY::ccConnectRGB

Definition at line 34 of file NetFinder.h.

UINT NETDISPLAY_ENTRY::event1_days

Definition at line 11 of file NetFinder.h.

BYTE NETDISPLAY_ENTRY::event1_hours

Definition at line 12 of file NetFinder.h.

BYTE NETDISPLAY_ENTRY::event1_minutes

Definition at line 13 of file NetFinder.h.

BYTE NETDISPLAY_ENTRY::event1_seconds

Definition at line 19 of file NetFinder.h.

UINT NETDISPLAY_ENTRY::event2_days

Definition at line 15 of file NetFinder.h.

BYTE NETDISPLAY_ENTRY::event2_hours

Definition at line 16 of file NetFinder.h.

BYTE NETDISPLAY_ENTRY::event2_minutes

Definition at line 17 of file NetFinder.h.

BYTE NETDISPLAY_ENTRY::event2_seconds

Definition at line 20 of file NetFinder.h.

BYTE NETDISPLAY_ENTRY::gateway[4]

Definition at line 26 of file NetFinder.h.

BOOL NETDISPLAY_ENTRY::HasData

Definition at line 36 of file NetFinder.h.

BYTE NETDISPLAY_ENTRY::ip[4]

Definition at line 23 of file NetFinder.h.

BYTE NETDISPLAY_ENTRY::mac[6]

Definition at line 22 of file NetFinder.h.

USHORT NETDISPLAY_ENTRY::port

Definition at line 24 of file NetFinder.h.

ULONG NETDISPLAY_ENTRY::SockAddr

Definition at line 38 of file NetFinder.h.

CString NETDISPLAY_ENTRY::str_description

Definition at line 29 of file NetFinder.h.

CString NETDISPLAY_ENTRY::str_display

Definition at line 33 of file NetFinder.h.

CString NETDISPLAY_ENTRY::str_ev1

Definition at line 30 of file NetFinder.h.

CString NETDISPLAY_ENTRY::str_ev2

Definition at line 31 of file NetFinder.h.

CString NETDISPLAY_ENTRY::str_type

Definition at line 28 of file NetFinder.h.

BYTE NETDISPLAY_ENTRY::subnet[4]

Definition at line 25 of file NetFinder.h.

The documentation for this struct was generated from the following file:
  • DeviceIO/NetFinder.h
Generated on Thu Sep 21 2017 16:01:16 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: Member List

  • Class List
  • Class Index
  • Class Members
NETDISPLAY_ENTRY Member List
This is the complete list of members for NETDISPLAY_ENTRY, including all inherited members.
alert_level | NETDISPLAY_ENTRY
ccConnectRGB | NETDISPLAY_ENTRY
event1_days | NETDISPLAY_ENTRY
event1_hours | NETDISPLAY_ENTRY
event1_minutes | NETDISPLAY_ENTRY
event1_seconds | NETDISPLAY_ENTRY
event2_days | NETDISPLAY_ENTRY
event2_hours | NETDISPLAY_ENTRY
event2_minutes | NETDISPLAY_ENTRY
event2_seconds | NETDISPLAY_ENTRY
gateway | NETDISPLAY_ENTRY
HasData | NETDISPLAY_ENTRY
ip | NETDISPLAY_ENTRY
mac | NETDISPLAY_ENTRY
port | NETDISPLAY_ENTRY
SockAddr | NETDISPLAY_ENTRY
str_description | NETDISPLAY_ENTRY
str_display | NETDISPLAY_ENTRY
str_ev1 | NETDISPLAY_ENTRY
str_ev2 | NETDISPLAY_ENTRY
str_type | NETDISPLAY_ENTRY
subnet | NETDISPLAY_ENTRY
Generated on Thu Sep 21 2017 16:01:16 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: Packet_Out Struct Reference

  • Class List
  • Class Index
  • Class Members
Public Attributes
Packet_Out Struct Reference

#include <DP5Protocol.h>

List of all members.

Public Attributes

unsigned char | PID1
unsigned char | PID2
unsigned short | LEN
unsigned char | EXPECTEDRESPONSE
unsigned char | DATA [514]

Detailed Description

Definition at line 285 of file DP5Protocol.h.

Member Data Documentation

unsigned char Packet_Out::DATA[514]

Definition at line 290 of file DP5Protocol.h.

unsigned char Packet_Out::EXPECTEDRESPONSE

Definition at line 289 of file DP5Protocol.h.

unsigned short Packet_Out::LEN

Definition at line 288 of file DP5Protocol.h.

unsigned char Packet_Out::PID1

Definition at line 286 of file DP5Protocol.h.

unsigned char Packet_Out::PID2

Definition at line 287 of file DP5Protocol.h.

The documentation for this struct was generated from the following file:
  • DeviceIO/DP5Protocol.h
Generated on Thu Sep 21 2017 16:01:16 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: Member List

  • Class List
  • Class Index
  • Class Members
Packet_Out Member List
This is the complete list of members for Packet_Out, including all inherited members.
DATA | Packet_Out
EXPECTEDRESPONSE | Packet_Out
LEN | Packet_Out
PID1 | Packet_Out
PID2 | Packet_Out
Generated on Thu Sep 21 2017 16:01:16 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: Spec Struct Reference

  • Class List
  • Class Index
  • Class Members
Public Attributes
Spec Struct Reference

#include <DP5Protocol.h>

List of all members.

Public Attributes

long | DATA [MAX_BUFFER_DATA]
short | CHANNELS

Detailed Description

Definition at line 297 of file DP5Protocol.h.

Member Data Documentation

short Spec::CHANNELS

Definition at line 299 of file DP5Protocol.h.

long Spec::DATA[MAX_BUFFER_DATA]

Definition at line 298 of file DP5Protocol.h.

The documentation for this struct was generated from the following file:
  • DeviceIO/DP5Protocol.h
Generated on Thu Sep 21 2017 16:01:16 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: Member List

  • Class List
  • Class Index
  • Class Members
Spec Member List
This is the complete list of members for Spec, including all inherited members.
CHANNELS | Spec
DATA | Spec
Generated on Thu Sep 21 2017 16:01:16 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: stringex Class Reference

  • Class List
  • Class Index
  • Class Members
Public Member Functions
stringex Class Reference

#include <stringex.h>

List of all members.

Public Member Functions

stringex (void)
~stringex (void)
std::string | Format (const char *fmt,...)
std::string | MakeUpper (string StdString)
std::string | MakeLower (string StdString)

Detailed Description

Definition at line 16 of file stringex.h.

Constructor & Destructor Documentation

stringex::stringex ( void )

Definition at line 8 of file stringex.cpp.

stringex::~stringex ( void )

Definition at line 12 of file stringex.cpp.

Member Function Documentation

std::string stringex::Format | ( | const char * | fmt,
 |  |  | ...
 | ) |  |

Definition at line 33 of file stringex.cpp.

Here is the caller graph for this function:

std::string stringex::MakeLower ( string StdString )

Definition at line 52 of file stringex.cpp.

std::string stringex::MakeUpper ( string StdString )

Definition at line 42 of file stringex.cpp.

The documentation for this class was generated from the following files:
  • stringex.h
  • stringex.cpp
Generated on Thu Sep 21 2017 16:01:16 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: Member List

  • Class List
  • Class Index
  • Class Members
stringex Member List
This is the complete list of members for stringex, including all inherited members.
Format(const char *fmt,...) | stringex
MakeLower(string StdString) | stringex
MakeUpper(string StdString) | stringex
stringex(void) | stringex
~stringex(void) | stringex
Generated on Thu Sep 21 2017 16:01:16 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: WINUSB_DEVICE_INFO Struct Reference

  • Class List
  • Class Index
  • Class Members
Public Attributes
WINUSB_DEVICE_INFO Struct Reference

Holds WinUSB device information. More...

#include <DppWinUSB.h>

List of all members.

Public Attributes

HANDLE | deviceHandle
System device handle opened with CreateFile using a device path.
WINUSB_INTERFACE_HANDLE winUSBHandle
WinUSB device interface handle opened with WinUsb_Initialize using a CreateFile device handle.
UCHAR | deviceSpeed
USB device speed indicator.
UCHAR | bulkInPipe
Bulk in pipe identifier.
UCHAR | bulkOutPipe
Bulk out pipe identifier.
UCHAR | interruptPipe
Interrupt pipe identifier.
char | devicePath [MAX_DEVPATH_LENGTH]
Device path identifier string used in opening a connection to a USB device.
BOOL | deviceConnected
True if a USB deevice is connected.

Detailed Description

Holds WinUSB device information.

Definition at line 48 of file DppWinUSB.h.

Member Data Documentation

UCHAR WINUSB_DEVICE_INFO::bulkInPipe

Bulk in pipe identifier.

Definition at line 57 of file DppWinUSB.h.

UCHAR WINUSB_DEVICE_INFO::bulkOutPipe

Bulk out pipe identifier.

Definition at line 59 of file DppWinUSB.h.

BOOL WINUSB_DEVICE_INFO::deviceConnected

True if a USB deevice is connected.

Definition at line 65 of file DppWinUSB.h.

HANDLE WINUSB_DEVICE_INFO::deviceHandle

System device handle opened with CreateFile using a device path.

Definition at line 51 of file DppWinUSB.h.

char WINUSB_DEVICE_INFO::devicePath[MAX_DEVPATH_LENGTH]

Device path identifier string used in opening a connection to a USB device.

Definition at line 63 of file DppWinUSB.h.

UCHAR WINUSB_DEVICE_INFO::deviceSpeed

USB device speed indicator.

Definition at line 55 of file DppWinUSB.h.

UCHAR WINUSB_DEVICE_INFO::interruptPipe

Interrupt pipe identifier.

Definition at line 61 of file DppWinUSB.h.

WINUSB_INTERFACE_HANDLE WINUSB_DEVICE_INFO::winUSBHandle

WinUSB device interface handle opened with WinUsb_Initialize using a CreateFile device handle.

Definition at line 53 of file DppWinUSB.h.

The documentation for this struct was generated from the following file:
  • DeviceIO/DppWinUSB.h
Generated on Thu Sep 21 2017 16:01:16 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: Member List

  • Class List
  • Class Index
  • Class Members
WINUSB_DEVICE_INFO Member List
This is the complete list of members for WINUSB_DEVICE_INFO, including all inherited members.
bulkInPipe | WINUSB_DEVICE_INFO
bulkOutPipe | WINUSB_DEVICE_INFO
deviceConnected | WINUSB_DEVICE_INFO
deviceHandle | WINUSB_DEVICE_INFO
devicePath | WINUSB_DEVICE_INFO
deviceSpeed | WINUSB_DEVICE_INFO
interruptPipe | WINUSB_DEVICE_INFO
winUSBHandle | WINUSB_DEVICE_INFO
Generated on Thu Sep 21 2017 16:01:16 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: Class Members

  • Class List
  • Class Index
  • Class Members
  • All
  • Functions
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • ~
Here is a list of all class members with links to the classes they belong to:

- a -

  • AccumulationTime : DP5_DP4_FORMAT_STATUS
  • ACK_Received : CDP5Protocol
  • AcqMode : CConsoleHelper
  • ADC_GAIN_CAL : DP5_DP4_FORMAT_STATUS
  • ADC_OFFSET_CAL : DP5_DP4_FORMAT_STATUS
  • ADC_V : _DiagDataType
  • AddEntry() : CNetFinder
  • AFAST_LOCKED : DP5_DP4_FORMAT_STATUS
  • alert_level : NETDISPLAY_ENTRY
  • AlertByteToCOLORREF() : CNetFinder
  • AlertEntryToCOLORREF() : CNetFinder
  • AN_IN : DP5_DP4_FORMAT_STATUS
  • AOFFSET_LOCKED : DP5_DP4_FORMAT_STATUS
  • AppendCmdDesc() : CConsoleHelper
  • AsciiCmdUtil : CSendCommand
  • AU34_2 : DP5_DP4_FORMAT_STATUS
Generated on Thu Sep 21 2017 16:01:17 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: Class Members

  • Class List
  • Class Index
  • Class Members
  • All
  • Functions
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • ~
Here is a list of all class members with links to the classes they belong to:

- b -

  • b80MHzMode : CConsoleHelper , DP5_DP4_FORMAT_STATUS
  • bDeviceConnected : CDppLibUsb
  • bDeviceReady : CDppLibUsb
  • bFPGAAutoClock : DP5_DP4_FORMAT_STATUS
  • bLibusbReady : CDppLibUsb
  • bScintHas80MHzOption : DP5_DP4_FORMAT_STATUS
  • BufferOUT : CDP5Protocol
  • Build : DP5_DP4_FORMAT_STATUS
  • bulkInPipe : WINUSB_DEVICE_INFO
  • bulkOutPipe : WINUSB_DEVICE_INFO
  • BYTEVersionToDouble() : CDppUtilities
  • BYTEVersionToString() : CDppUtilities
Generated on Thu Sep 21 2017 16:01:17 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: Class Members

  • Class List
  • Class Index
  • Class Members
  • All
  • Functions
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • ~
Here is a list of all class members with links to the classes they belong to:

- c -

  • CAsciiCmdUtilities() : CAsciiCmdUtilities
  • ccConnectRGB : NETDISPLAY_ENTRY
  • CConsoleHelper() : CConsoleHelper
  • CDP5Protocol() : CDP5Protocol
  • CDP5Status() : CDP5Status
  • CDppLibUsb() : CDppLibUsb
  • CDppUtilities() : CDppUtilities
  • CDppWinUSB() : CDppWinUSB
  • CfgReadBack : CConsoleHelper
  • CHANNELS : Spec
  • CheckSum : _Packet_In
  • ClearConfigReadFormatFlags() : CConsoleHelper
  • CloseDeviceHandle() : CDppWinUSB
  • CloseUSBDevice() : CDppLibUsb
  • CloseWinUsbDevice() : CDppWinUSB
  • CMSecTimer() : CMSecTimer
  • CNetFinder() : CNetFinder
  • CommError : CDP5Protocol
  • ConsoleGraph() : CConsoleHelper
  • CopyAsciiData() : CAsciiCmdUtilities
  • CountDP5LibusbDevices() : CDppLibUsb
  • CountDP5WinusbDevices() : CDppWinUSB
  • CParsePacket() : CParsePacket
  • CreateConfigOptions() : CConsoleHelper
  • CreateFullReadBackCmd() : CAsciiCmdUtilities
  • CreateFullReadBackCmdMCA8000D() : CAsciiCmdUtilities
  • CreateMCAData() : CConsoleHelper
  • CreateResTestReadBackCmd() : CAsciiCmdUtilities
  • CreateSpectrumConfig() : CConsoleHelper
  • CSendCommand() : CSendCommand
  • CurrentDevice : CDppWinUSB , CDppLibUsb
Generated on Thu Sep 21 2017 16:01:17 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: Class Members

  • Class List
  • Class Index
  • Class Members
  • All
  • Functions
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • ~
Here is a list of all class members with links to the classes they belong to:

- d -

  • DATA : _Packet_In , Packet_Out , Spec
  • data_in : CDppLibUsb
  • data_out : CDppLibUsb
  • DCAL : DP5_DP4_FORMAT_STATUS
  • DeinitializeLibusb() : CDppLibUsb
  • DET_TEMP : DP5_DP4_FORMAT_STATUS
  • DEVICE_ID : DP5_DP4_FORMAT_STATUS
  • deviceConnected : WINUSB_DEVICE_INFO
  • deviceHandle : WINUSB_DEVICE_INFO
  • devicePath : WINUSB_DEVICE_INFO
  • deviceSpeed : WINUSB_DEVICE_INFO
  • devInfo : CDppWinUSB
  • DiagData : CDP5Status , _DiagDataType
  • DiagnosticsToString() : CDP5Status
  • DiagStrPX5Option() : CDP5Status
  • Disable_WinUsb() : CDppWinUSB
  • DisplayBufferArray() : CDP5Status , CDppWinUSB
  • DisplayCfg : CConsoleHelper
  • DisplaySca : CConsoleHelper
  • DP5_CMD() : CSendCommand
  • DP5_CMD_Config() : CSendCommand
  • DP5_CMD_Data() : CSendCommand
  • DP5_CONFIGURED : DP5_DP4_FORMAT_STATUS
  • DP5_Dx_OptionFlags() : CDP5Status
  • DP5_TEMP : DP5_DP4_FORMAT_STATUS
  • Dp5CmdList : CConsoleHelper
  • DP5Proto : CConsoleHelper
  • DP5Stat : CConsoleHelper
  • DPP_ECO : DP5_DP4_FORMAT_STATUS , _CONFIG_OPTIONS
  • DPP_options : DP5_DP4_FORMAT_STATUS
  • DppEntries : CNetFinder
  • DppEntryIdx : CNetFinder
  • DppFound : CNetFinder
  • DppLibusbHandle : CDppLibUsb
  • DppSockAddr : CNetFinder
  • DppState : CParsePacket
  • DppStatusString : CConsoleHelper
  • DppType : _CONFIG_OPTIONS
  • DppUtil : CDP5Status
  • DppWinUSB : CConsoleHelper
Generated on Thu Sep 21 2017 16:01:18 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: Class Members

  • Class List
  • Class Index
  • Class Members
  • All
  • Functions
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • ~
Here is a list of all class members with links to the classes they belong to:

- e -

  • EntryToStr() : CNetFinder
  • EntryToStrRS232() : CNetFinder
  • EntryToStrUSB() : CNetFinder
  • event1_days : NETDISPLAY_ENTRY
  • event1_hours : NETDISPLAY_ENTRY
  • event1_minutes : NETDISPLAY_ENTRY
  • event1_seconds : NETDISPLAY_ENTRY
  • event2_days : NETDISPLAY_ENTRY
  • event2_hours : NETDISPLAY_ENTRY
  • event2_minutes : NETDISPLAY_ENTRY
  • event2_seconds : NETDISPLAY_ENTRY
  • EXPECTEDRESPONSE : Packet_Out
Generated on Thu Sep 21 2017 16:01:18 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: Class Members

  • Class List
  • Class Index
  • Class Members
  • All
  • Functions
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • ~
Here is a list of all class members with links to the classes they belong to:

- f -

  • FastChThreshold : CConsoleHelper
  • FastCount : DP5_DP4_FORMAT_STATUS
  • FindEntry() : CNetFinder
  • FindUSBDevice() : CDppLibUsb , CDppWinUSB
  • Firmware : DP5_DP4_FORMAT_STATUS , _DiagDataType
  • FmtHex() : CDP5Status
  • FmtHvPwr() : CDP5Status
  • FmtLng() : CDP5Status
  • FmtPc5Pwr() : CDP5Status
  • FmtPc5Temp() : CDP5Status
  • Format() : stringex
  • FPGA : _DiagDataType , DP5_DP4_FORMAT_STATUS
Generated on Thu Sep 21 2017 16:01:18 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: Class Members

  • Class List
  • Class Index
  • Class Members
  • All
  • Functions
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • ~
Here is a list of all class members with links to the classes they belong to:

- g -

  • gateway : NETDISPLAY_ENTRY
  • GetCmdChunk() : CAsciiCmdUtilities
  • GetCmdData() : CConsoleHelper
  • GetCmdDesc() : CConsoleHelper
  • GetDeviceNameFromVal() : CDP5Status
  • GetDevicePath() : CDppWinUSB
  • GetDP5CfgStr() : CAsciiCmdUtilities
  • GetDP5ScaStr() : CAsciiCmdUtilities
  • GetStatusValueStrings() : CDP5Status
  • GP_COUNTER : DP5_DP4_FORMAT_STATUS
Generated on Thu Sep 21 2017 16:01:18 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: Class Members

  • Class List
  • Class Index
  • Class Members
  • All
  • Functions
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • ~
Here is a list of all class members with links to the classes they belong to:

- h -

  • HasData : NETDISPLAY_ENTRY
  • HaveScopeData : _DppStateType
  • HPGe_HV_INH : DP5_DP4_FORMAT_STATUS
  • HPGe_HV_INH_POL : DP5_DP4_FORMAT_STATUS
  • HV : DP5_DP4_FORMAT_STATUS
  • HVOn : _DiagDataType
  • HwCfgDP5 : CConsoleHelper
  • HwCfgDP5Out : _CONFIG_OPTIONS
  • HwCfgReady : CConsoleHelper
Generated on Thu Sep 21 2017 16:01:18 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: Class Members

  • Class List
  • Class Index
  • Class Members
  • All
  • Functions
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • ~
Here is a list of all class members with links to the classes they belong to:

- i -

  • Index : _WINUSB_SETUP_PACKET
  • InitAllEntries() : CNetFinder
  • InitDeviceInfo() : CDppWinUSB
  • InitEntry() : CNetFinder
  • Initialize_Device() : CDppWinUSB
  • InitializeLibusb() : CDppLibUsb
  • InPacketType : CDP5Protocol
  • Interface : _DppStateType
  • interruptPipe : WINUSB_DEVICE_INFO
  • Interval : _WINUSB_PIPE_INFORMATION
  • ip : NETDISPLAY_ENTRY
  • Is8_5VPreAmp : _DiagDataType
  • isAmptekDP5Device() : CDppLibUsb
  • IsAorB() : CDP5Status
  • isAscEnabled : DP5_DP4_FORMAT_STATUS
  • isAscInstalled : DP5_DP4_FORMAT_STATUS
  • isDP5_RevDxGains : _CONFIG_OPTIONS , DP5_DP4_FORMAT_STATUS
  • isDppFound : CDppWinUSB
  • IsPosHV : _DiagDataType
Generated on Thu Sep 21 2017 16:01:18 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: Class Members

  • Class List
  • Class Index
  • Class Members
  • All
  • Functions
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • ~
Here is a list of all class members with links to the classes they belong to:

- l -

  • LastEntry : CNetFinder
  • LastLibUsbError : CDppLibUsb
  • LEN : Packet_Out , _Packet_In
  • Length : _WINUSB_SETUP_PACKET
  • libusb_strerror() : CDppLibUsb
  • LiveTime : DP5_DP4_FORMAT_STATUS
  • LongWordToDouble() : CDppUtilities
Generated on Thu Sep 21 2017 16:01:18 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: Class Members

  • Class List
  • Class Index
  • Class Members
  • All
  • Functions
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • ~
Here is a list of all class members with links to the classes they belong to:

- m -

  • m_DP5_Status : CDP5Status
  • m_iNumChan : _SpectrumFileType
  • m_rand : CNetFinder
  • mac : NETDISPLAY_ENTRY
  • MakeDp5CmdList() : CConsoleHelper
  • MakeLower() : stringex
  • MakeUpper() : stringex , CAsciiCmdUtilities
  • MaximumPacketSize : _WINUSB_PIPE_INFORMATION
  • MCA_EN : DP5_DP4_FORMAT_STATUS
  • mcaCH : CConsoleHelper
  • MCS_DONE : DP5_DP4_FORMAT_STATUS
  • MiscData : CDP5Protocol
  • msTimeDiff() : CMSecTimer
  • msTimeExpired() : CMSecTimer
  • msTimer() : CMSecTimer
Generated on Thu Sep 21 2017 16:01:18 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: Class Members

  • Class List
  • Class Index
  • Class Members
  • All
  • Functions
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • ~
Here is a list of all class members with links to the classes they belong to:

- n -

  • Netfinder_active : CDP5Protocol
  • Netfinder_Seq : CDP5Protocol
  • NumDevices : CDppWinUSB , CDppLibUsb
  • NumPipes : CDppWinUSB
Generated on Thu Sep 21 2017 16:01:18 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: Class Members

  • Class List
  • Class Index
  • Class Members
  • All
  • Functions
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • ~
Here is a list of all class members with links to the classes they belong to:

- o -

  • OnOffStr() : CDP5Status
  • OpenDevice() : CDppWinUSB
Generated on Thu Sep 21 2017 16:01:18 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: Class Members

  • Class List
  • Class Index
  • Class Members
  • All
  • Functions
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • ~
Here is a list of all class members with links to the classes they belong to:

- p -

  • Packet_Received : CDP5Protocol
  • PacketIn : CDP5Protocol
  • ParsePacket() : CParsePacket
  • ParsePacketStatus() : CParsePacket
  • ParsePkt : CConsoleHelper
  • PC5_8_5V : DP5_DP4_FORMAT_STATUS
  • PC5_HV_POL : DP5_DP4_FORMAT_STATUS
  • PC5_PRESENT : DP5_DP4_FORMAT_STATUS , _DiagDataType , _CONFIG_OPTIONS
  • PC5_SN : DP5_DP4_FORMAT_STATUS , _DiagDataType
  • PC5_V : _DiagDataType
  • PC5DCAL : _DiagDataType
  • PC5Initialized : _DiagDataType
  • PID1 : _Packet_In , Packet_Out
  • PID2 : _Packet_In , Packet_Out
  • PID2_TextToString() : CParsePacket
  • PIN : CDP5Protocol
  • PipeId : CDppWinUSB , _WINUSB_PIPE_INFORMATION
  • PipeTimeout : CDppWinUSB
  • PipeType : _WINUSB_PIPE_INFORMATION
  • port : NETDISPLAY_ENTRY
  • POUT_Buffer() : CSendCommand
  • PreAmpON : _DiagDataType
  • PRECNT_REACHED : DP5_DP4_FORMAT_STATUS
  • PresetAcq : CConsoleHelper
  • PresetCount : CConsoleHelper
  • PresetLtDone : DP5_DP4_FORMAT_STATUS
  • PresetRt : CConsoleHelper
  • PresetRtDone : DP5_DP4_FORMAT_STATUS
  • PrintCfg : CConsoleHelper
  • PrintDevices() : CDppLibUsb
  • Process_Diagnostics() : CDP5Status
  • Process_Status() : CDP5Status
  • ProcessCfgReadEx() : CConsoleHelper
  • ProcessSpectrumEx() : CConsoleHelper
  • PX4 : DP5_DP4_FORMAT_STATUS
  • PX5_OptionsString() : CDP5Status
  • PZCORR : DP5_DP4_FORMAT_STATUS
Generated on Thu Sep 21 2017 16:01:18 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: Class Members

  • Class List
  • Class Index
  • Class Members
  • All
  • Functions
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • ~
Here is a list of all class members with links to the classes they belong to:

- r -

  • RAM_TEST_ERROR : DP5_DP4_FORMAT_STATUS
  • RAM_TEST_RUN : DP5_DP4_FORMAT_STATUS
  • RAW : DP5_DP4_FORMAT_STATUS
  • RealTime : DP5_DP4_FORMAT_STATUS
  • ReBootFlag : DP5_DP4_FORMAT_STATUS
  • ReceiveData() : CConsoleHelper
  • Remove_MCA8000D_Cmds() : CAsciiCmdUtilities
  • RemoveCmd() : CAsciiCmdUtilities
  • RemoveCmdByDeviceType() : CAsciiCmdUtilities
  • RemoveCmdByDeviceTypeDP5DxK() : CAsciiCmdUtilities
  • RemWhitespace() : CAsciiCmdUtilities
  • ReplaceCmdDesc() : CConsoleHelper
  • ReplaceCmdText() : CAsciiCmdUtilities
  • ReqProcess : _DppStateType
  • Request : _WINUSB_SETUP_PACKET
  • RequestType : _WINUSB_SETUP_PACKET
  • RiseUS : CConsoleHelper
  • RS232_RThreshold : CDP5Protocol
  • RS232BytesInBuffer : CDP5Protocol
  • RS232HeaderReceived : CDP5Protocol
  • RS232PacketPtr : CDP5Protocol
Generated on Thu Sep 21 2017 16:01:18 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: Class Members

  • Class List
  • Class Index
  • Class Members
  • All
  • Functions
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • ~
Here is a list of all class members with links to the classes they belong to:

- s -

  • SaveCfg : CConsoleHelper
  • SaveSpectrumStringToFile() : CConsoleHelper
  • SaveStringDataToFile() : CDppWinUSB , CDP5Status
  • ScaleAuto : CDP5Protocol
  • ScaReadBack : CConsoleHelper
  • Scope : CDP5Protocol
  • SCOPE_DR : DP5_DP4_FORMAT_STATUS
  • ScopeAutoRearm : _DppStateType
  • ScopeOverFlow : _DppStateType
  • SendCoarseFineGain : _CONFIG_OPTIONS
  • SendPacketUSB() : CDppLibUsb , CDppWinUSB
  • SerialNumber : _SpectrumFileType , DP5_DP4_FORMAT_STATUS
  • sfInfo : CConsoleHelper
  • ShowStatusValueStrings() : CDP5Status
  • SlowCount : DP5_DP4_FORMAT_STATUS
  • SlowThresholdPct : CConsoleHelper
  • SndCmd : CConsoleHelper
  • SockAddr : NETDISPLAY_ENTRY
  • SockAddr_ByteToInAddr() : CNetFinder
  • SockAddr_ByteToStr() : CNetFinder
  • SockAddr_ByteToULong() : CNetFinder
  • SockAddr_DlgToStr() : CNetFinder
  • SockAddr_InAddrToStr() : CNetFinder
  • SockAddr_StrToInAddr() : CNetFinder
  • SockAddr_StrToULong() : CNetFinder
  • SockAddr_ULongToInAddr() : CNetFinder
  • SockAddr_ULongToStr() : CNetFinder
  • SockPort_DlgToUINT() : CNetFinder
  • SPECTRUM : CDP5Protocol
  • SPECTRUM_OFFSET : DP5_DP4_FORMAT_STATUS
  • SRAMTestData : _DiagDataType
  • SRAMTestPass : _DiagDataType
  • STATUS : _Packet_In
  • str_description : NETDISPLAY_ENTRY
  • str_display : NETDISPLAY_ENTRY
  • str_ev1 : NETDISPLAY_ENTRY
  • str_ev2 : NETDISPLAY_ENTRY
  • str_type : NETDISPLAY_ENTRY
  • strAnalogOut : CConsoleHelper
  • strDescription : _SpectrumFileType
  • strGainDisplayValue : CConsoleHelper
  • stringex() : stringex
  • strInputOffset : CConsoleHelper
  • strMcaMode : CConsoleHelper
  • strOutputOffset : CConsoleHelper
  • strPort : _DppStateType
  • strPresetCmd : CConsoleHelper
  • strPresetVal : CConsoleHelper
  • strScopeGain : CConsoleHelper
  • strSpectrumConfig : _SpectrumFileType
  • strSpectrumStatus : _SpectrumFileType
  • strTag : _SpectrumFileType
  • strTempCal : _DiagDataType
  • strTempRaw : _DiagDataType
  • strTriggerPosition : CConsoleHelper
  • strTriggerSlope : CConsoleHelper
  • strTriggerSource : CConsoleHelper
  • subnet : NETDISPLAY_ENTRY
  • Sup9VOn : _DiagDataType
  • SUPPLIES_ON : DP5_DP4_FORMAT_STATUS
Generated on Thu Sep 21 2017 16:01:18 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: Class Members

  • Class List
  • Class Index
  • Class Members
  • All
  • Functions
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • ~
Here is a list of all class members with links to the classes they belong to:

- t -

  • TEC_Voltage : DP5_DP4_FORMAT_STATUS
  • TECOn : _DiagDataType
  • TempOffset : _DiagDataType
  • TestPacketCkSumOK() : CSendCommand
  • Timeout_flag : CDP5Protocol
Generated on Thu Sep 21 2017 16:01:18 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: Class Members

  • Class List
  • Class Index
  • Class Members
  • All
  • Functions
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • ~
Here is a list of all class members with links to the classes they belong to:

- u -

  • UC_TEMP_OFFSET : DP5_DP4_FORMAT_STATUS
  • UDP_offset : CDP5Protocol
  • UpdateScopeCfg : CConsoleHelper
  • USB_Default_Timeout : CDP5Protocol , CDppWinUSB
  • USBStatusString() : CDppWinUSB
Generated on Thu Sep 21 2017 16:01:18 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: Class Members

  • Class List
  • Class Index
  • Class Members
  • All
  • Functions
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • ~
Here is a list of all class members with links to the classes they belong to:

- v -

  • Value : _WINUSB_SETUP_PACKET
  • VersionToStr() : CDP5Status
  • VREF_IN : DP5_DP4_FORMAT_STATUS
Generated on Thu Sep 21 2017 16:01:18 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: Class Members

  • Class List
  • Class Index
  • Class Members
  • All
  • Functions
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • ~
Here is a list of all class members with links to the classes they belong to:

- w -

  • WinUSB_Close_Connection() : CConsoleHelper
  • WinUSB_Connect_Default_DPP() : CConsoleHelper
  • WinUsb_Disabled : CDppWinUSB
  • WinUSB_isConnected : CConsoleHelper
  • WinUSB_NumDevices : CConsoleHelper
  • WinUSB_ReceiveData() : CConsoleHelper
  • WinUSB_SendCommand() : CConsoleHelper
  • WinUSB_SendCommand_Config() : CConsoleHelper
  • winUSBHandle : WINUSB_DEVICE_INFO
Generated on Thu Sep 21 2017 16:01:18 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: Class Members

  • Class List
  • Class Index
  • Class Members
  • All
  • Functions
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • ~
Here is a list of all class members with links to the classes they belong to:

- ~ -

  • ~CAsciiCmdUtilities() : CAsciiCmdUtilities
  • ~CConsoleHelper() : CConsoleHelper
  • ~CDP5Protocol() : CDP5Protocol
  • ~CDP5Status() : CDP5Status
  • ~CDppLibUsb() : CDppLibUsb
  • ~CDppUtilities() : CDppUtilities
  • ~CDppWinUSB() : CDppWinUSB
  • ~CMSecTimer() : CMSecTimer
  • ~CNetFinder() : CNetFinder
  • ~CParsePacket() : CParsePacket
  • ~CSendCommand() : CSendCommand
  • ~stringex() : stringex
Generated on Thu Sep 21 2017 16:01:18 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: Class Members - Functions

  • Class List
  • Class Index
  • Class Members
  • All
  • Functions
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • i
  • l
  • m
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • ~

- a -

  • AddEntry() : CNetFinder
  • AlertByteToCOLORREF() : CNetFinder
  • AlertEntryToCOLORREF() : CNetFinder
  • AppendCmdDesc() : CConsoleHelper

- b -

  • BYTEVersionToDouble() : CDppUtilities
  • BYTEVersionToString() : CDppUtilities

- c -

  • CAsciiCmdUtilities() : CAsciiCmdUtilities
  • CConsoleHelper() : CConsoleHelper
  • CDP5Protocol() : CDP5Protocol
  • CDP5Status() : CDP5Status
  • CDppLibUsb() : CDppLibUsb
  • CDppUtilities() : CDppUtilities
  • CDppWinUSB() : CDppWinUSB
  • ClearConfigReadFormatFlags() : CConsoleHelper
  • CloseDeviceHandle() : CDppWinUSB
  • CloseUSBDevice() : CDppLibUsb
  • CloseWinUsbDevice() : CDppWinUSB
  • CMSecTimer() : CMSecTimer
  • CNetFinder() : CNetFinder
  • ConsoleGraph() : CConsoleHelper
  • CopyAsciiData() : CAsciiCmdUtilities
  • CountDP5LibusbDevices() : CDppLibUsb
  • CountDP5WinusbDevices() : CDppWinUSB
  • CParsePacket() : CParsePacket
  • CreateConfigOptions() : CConsoleHelper
  • CreateFullReadBackCmd() : CAsciiCmdUtilities
  • CreateFullReadBackCmdMCA8000D() : CAsciiCmdUtilities
  • CreateMCAData() : CConsoleHelper
  • CreateResTestReadBackCmd() : CAsciiCmdUtilities
  • CreateSpectrumConfig() : CConsoleHelper
  • CSendCommand() : CSendCommand

- d -

  • DeinitializeLibusb() : CDppLibUsb
  • DiagnosticsToString() : CDP5Status
  • DiagStrPX5Option() : CDP5Status
  • Disable_WinUsb() : CDppWinUSB
  • DisplayBufferArray() : CDP5Status , CDppWinUSB
  • DP5_CMD() : CSendCommand
  • DP5_CMD_Config() : CSendCommand
  • DP5_CMD_Data() : CSendCommand
  • DP5_Dx_OptionFlags() : CDP5Status

- e -

  • EntryToStr() : CNetFinder
  • EntryToStrRS232() : CNetFinder
  • EntryToStrUSB() : CNetFinder

- f -

  • FindEntry() : CNetFinder
  • FindUSBDevice() : CDppLibUsb , CDppWinUSB
  • FmtHex() : CDP5Status
  • FmtHvPwr() : CDP5Status
  • FmtLng() : CDP5Status
  • FmtPc5Pwr() : CDP5Status
  • FmtPc5Temp() : CDP5Status
  • Format() : stringex

- g -

  • GetCmdChunk() : CAsciiCmdUtilities
  • GetCmdData() : CConsoleHelper
  • GetCmdDesc() : CConsoleHelper
  • GetDeviceNameFromVal() : CDP5Status
  • GetDevicePath() : CDppWinUSB
  • GetDP5CfgStr() : CAsciiCmdUtilities
  • GetDP5ScaStr() : CAsciiCmdUtilities
  • GetStatusValueStrings() : CDP5Status

- i -

  • InitAllEntries() : CNetFinder
  • InitDeviceInfo() : CDppWinUSB
  • InitEntry() : CNetFinder
  • Initialize_Device() : CDppWinUSB
  • InitializeLibusb() : CDppLibUsb
  • isAmptekDP5Device() : CDppLibUsb
  • IsAorB() : CDP5Status

- l -

  • libusb_strerror() : CDppLibUsb
  • LongWordToDouble() : CDppUtilities

- m -

  • MakeDp5CmdList() : CConsoleHelper
  • MakeLower() : stringex
  • MakeUpper() : stringex , CAsciiCmdUtilities
  • msTimeDiff() : CMSecTimer
  • msTimeExpired() : CMSecTimer
  • msTimer() : CMSecTimer

- o -

  • OnOffStr() : CDP5Status
  • OpenDevice() : CDppWinUSB

- p -

  • ParsePacket() : CParsePacket
  • ParsePacketStatus() : CParsePacket
  • PID2_TextToString() : CParsePacket
  • POUT_Buffer() : CSendCommand
  • PrintDevices() : CDppLibUsb
  • Process_Diagnostics() : CDP5Status
  • Process_Status() : CDP5Status
  • ProcessCfgReadEx() : CConsoleHelper
  • ProcessSpectrumEx() : CConsoleHelper
  • PX5_OptionsString() : CDP5Status

- r -

  • ReceiveData() : CConsoleHelper
  • Remove_MCA8000D_Cmds() : CAsciiCmdUtilities
  • RemoveCmd() : CAsciiCmdUtilities
  • RemoveCmdByDeviceType() : CAsciiCmdUtilities
  • RemoveCmdByDeviceTypeDP5DxK() : CAsciiCmdUtilities
  • RemWhitespace() : CAsciiCmdUtilities
  • ReplaceCmdDesc() : CConsoleHelper
  • ReplaceCmdText() : CAsciiCmdUtilities

- s -

  • SaveSpectrumStringToFile() : CConsoleHelper
  • SaveStringDataToFile() : CDP5Status , CDppWinUSB
  • SendPacketUSB() : CDppLibUsb , CDppWinUSB
  • ShowStatusValueStrings() : CDP5Status
  • SockAddr_ByteToInAddr() : CNetFinder
  • SockAddr_ByteToStr() : CNetFinder
  • SockAddr_ByteToULong() : CNetFinder
  • SockAddr_DlgToStr() : CNetFinder
  • SockAddr_InAddrToStr() : CNetFinder
  • SockAddr_StrToInAddr() : CNetFinder
  • SockAddr_StrToULong() : CNetFinder
  • SockAddr_ULongToInAddr() : CNetFinder
  • SockAddr_ULongToStr() : CNetFinder
  • SockPort_DlgToUINT() : CNetFinder
  • stringex() : stringex

- t -

  • TestPacketCkSumOK() : CSendCommand

- u -

  • USBStatusString() : CDppWinUSB

- v -

  • VersionToStr() : CDP5Status

- w -

  • WinUSB_Close_Connection() : CConsoleHelper
  • WinUSB_Connect_Default_DPP() : CConsoleHelper
  • WinUSB_ReceiveData() : CConsoleHelper
  • WinUSB_SendCommand() : CConsoleHelper
  • WinUSB_SendCommand_Config() : CConsoleHelper

- ~ -

  • ~CAsciiCmdUtilities() : CAsciiCmdUtilities
  • ~CConsoleHelper() : CConsoleHelper
  • ~CDP5Protocol() : CDP5Protocol
  • ~CDP5Status() : CDP5Status
  • ~CDppLibUsb() : CDppLibUsb
  • ~CDppUtilities() : CDppUtilities
  • ~CDppWinUSB() : CDppWinUSB
  • ~CMSecTimer() : CMSecTimer
  • ~CNetFinder() : CNetFinder
  • ~CParsePacket() : CParsePacket
  • ~CSendCommand() : CSendCommand
  • ~stringex() : stringex
Generated on Thu Sep 21 2017 16:01:18 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: Class Members - Variables

  • Class List
  • Class Index
  • Class Members
  • All
  • Functions
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- a -

  • AccumulationTime : DP5_DP4_FORMAT_STATUS
  • ACK_Received : CDP5Protocol
  • AcqMode : CConsoleHelper
  • ADC_GAIN_CAL : DP5_DP4_FORMAT_STATUS
  • ADC_OFFSET_CAL : DP5_DP4_FORMAT_STATUS
  • ADC_V : _DiagDataType
  • AFAST_LOCKED : DP5_DP4_FORMAT_STATUS
  • alert_level : NETDISPLAY_ENTRY
  • AN_IN : DP5_DP4_FORMAT_STATUS
  • AOFFSET_LOCKED : DP5_DP4_FORMAT_STATUS
  • AsciiCmdUtil : CSendCommand
  • AU34_2 : DP5_DP4_FORMAT_STATUS
Generated on Thu Sep 21 2017 16:01:18 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: Class Members - Variables

  • Class List
  • Class Index
  • Class Members
  • All
  • Functions
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- b -

  • b80MHzMode : CConsoleHelper , DP5_DP4_FORMAT_STATUS
  • bDeviceConnected : CDppLibUsb
  • bDeviceReady : CDppLibUsb
  • bFPGAAutoClock : DP5_DP4_FORMAT_STATUS
  • bLibusbReady : CDppLibUsb
  • bScintHas80MHzOption : DP5_DP4_FORMAT_STATUS
  • BufferOUT : CDP5Protocol
  • Build : DP5_DP4_FORMAT_STATUS
  • bulkInPipe : WINUSB_DEVICE_INFO
  • bulkOutPipe : WINUSB_DEVICE_INFO
Generated on Thu Sep 21 2017 16:01:18 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: Class Members - Variables

  • Class List
  • Class Index
  • Class Members
  • All
  • Functions
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- c -

  • ccConnectRGB : NETDISPLAY_ENTRY
  • CfgReadBack : CConsoleHelper
  • CHANNELS : Spec
  • CheckSum : _Packet_In
  • CommError : CDP5Protocol
  • CurrentDevice : CDppLibUsb , CDppWinUSB
Generated on Thu Sep 21 2017 16:01:18 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: Class Members - Variables

  • Class List
  • Class Index
  • Class Members
  • All
  • Functions
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- d -

  • DATA : _Packet_In , Packet_Out , Spec
  • data_in : CDppLibUsb
  • data_out : CDppLibUsb
  • DCAL : DP5_DP4_FORMAT_STATUS
  • DET_TEMP : DP5_DP4_FORMAT_STATUS
  • DEVICE_ID : DP5_DP4_FORMAT_STATUS
  • deviceConnected : WINUSB_DEVICE_INFO
  • deviceHandle : WINUSB_DEVICE_INFO
  • devicePath : WINUSB_DEVICE_INFO
  • deviceSpeed : WINUSB_DEVICE_INFO
  • devInfo : CDppWinUSB
  • DiagData : _DiagDataType , CDP5Status
  • DisplayCfg : CConsoleHelper
  • DisplaySca : CConsoleHelper
  • DP5_CONFIGURED : DP5_DP4_FORMAT_STATUS
  • DP5_TEMP : DP5_DP4_FORMAT_STATUS
  • Dp5CmdList : CConsoleHelper
  • DP5Proto : CConsoleHelper
  • DP5Stat : CConsoleHelper
  • DPP_ECO : _CONFIG_OPTIONS , DP5_DP4_FORMAT_STATUS
  • DPP_options : DP5_DP4_FORMAT_STATUS
  • DppEntries : CNetFinder
  • DppEntryIdx : CNetFinder
  • DppFound : CNetFinder
  • DppLibusbHandle : CDppLibUsb
  • DppSockAddr : CNetFinder
  • DppState : CParsePacket
  • DppStatusString : CConsoleHelper
  • DppType : _CONFIG_OPTIONS
  • DppUtil : CDP5Status
  • DppWinUSB : CConsoleHelper
Generated on Thu Sep 21 2017 16:01:18 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: Class Members - Variables

  • Class List
  • Class Index
  • Class Members
  • All
  • Functions
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- e -

  • event1_days : NETDISPLAY_ENTRY
  • event1_hours : NETDISPLAY_ENTRY
  • event1_minutes : NETDISPLAY_ENTRY
  • event1_seconds : NETDISPLAY_ENTRY
  • event2_days : NETDISPLAY_ENTRY
  • event2_hours : NETDISPLAY_ENTRY
  • event2_minutes : NETDISPLAY_ENTRY
  • event2_seconds : NETDISPLAY_ENTRY
  • EXPECTEDRESPONSE : Packet_Out
Generated on Thu Sep 21 2017 16:01:18 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: Class Members - Variables

  • Class List
  • Class Index
  • Class Members
  • All
  • Functions
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- f -

  • FastChThreshold : CConsoleHelper
  • FastCount : DP5_DP4_FORMAT_STATUS
  • Firmware : _DiagDataType , DP5_DP4_FORMAT_STATUS
  • FPGA : _DiagDataType , DP5_DP4_FORMAT_STATUS
Generated on Thu Sep 21 2017 16:01:18 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: Class Members - Variables

  • Class List
  • Class Index
  • Class Members
  • All
  • Functions
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- g -

  • gateway : NETDISPLAY_ENTRY
  • GP_COUNTER : DP5_DP4_FORMAT_STATUS
Generated on Thu Sep 21 2017 16:01:18 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: Class Members - Variables

  • Class List
  • Class Index
  • Class Members
  • All
  • Functions
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- h -

  • HasData : NETDISPLAY_ENTRY
  • HaveScopeData : _DppStateType
  • HPGe_HV_INH : DP5_DP4_FORMAT_STATUS
  • HPGe_HV_INH_POL : DP5_DP4_FORMAT_STATUS
  • HV : DP5_DP4_FORMAT_STATUS
  • HVOn : _DiagDataType
  • HwCfgDP5 : CConsoleHelper
  • HwCfgDP5Out : _CONFIG_OPTIONS
  • HwCfgReady : CConsoleHelper
Generated on Thu Sep 21 2017 16:01:18 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: Class Members - Variables

  • Class List
  • Class Index
  • Class Members
  • All
  • Functions
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- i -

  • Index : _WINUSB_SETUP_PACKET
  • InPacketType : CDP5Protocol
  • Interface : _DppStateType
  • interruptPipe : WINUSB_DEVICE_INFO
  • Interval : _WINUSB_PIPE_INFORMATION
  • ip : NETDISPLAY_ENTRY
  • Is8_5VPreAmp : _DiagDataType
  • isAscEnabled : DP5_DP4_FORMAT_STATUS
  • isAscInstalled : DP5_DP4_FORMAT_STATUS
  • isDP5_RevDxGains : _CONFIG_OPTIONS , DP5_DP4_FORMAT_STATUS
  • isDppFound : CDppWinUSB
  • IsPosHV : _DiagDataType
Generated on Thu Sep 21 2017 16:01:18 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: Class Members - Variables

  • Class List
  • Class Index
  • Class Members
  • All
  • Functions
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- l -

  • LastEntry : CNetFinder
  • LastLibUsbError : CDppLibUsb
  • LEN : Packet_Out , _Packet_In
  • Length : _WINUSB_SETUP_PACKET
  • LiveTime : DP5_DP4_FORMAT_STATUS
Generated on Thu Sep 21 2017 16:01:18 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: Class Members - Variables

  • Class List
  • Class Index
  • Class Members
  • All
  • Functions
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- m -

  • m_DP5_Status : CDP5Status
  • m_iNumChan : _SpectrumFileType
  • m_rand : CNetFinder
  • mac : NETDISPLAY_ENTRY
  • MaximumPacketSize : _WINUSB_PIPE_INFORMATION
  • MCA_EN : DP5_DP4_FORMAT_STATUS
  • mcaCH : CConsoleHelper
  • MCS_DONE : DP5_DP4_FORMAT_STATUS
  • MiscData : CDP5Protocol
Generated on Thu Sep 21 2017 16:01:18 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: Class Members - Variables

  • Class List
  • Class Index
  • Class Members
  • All
  • Functions
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- n -

  • Netfinder_active : CDP5Protocol
  • Netfinder_Seq : CDP5Protocol
  • NumDevices : CDppWinUSB , CDppLibUsb
  • NumPipes : CDppWinUSB
Generated on Thu Sep 21 2017 16:01:18 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: Class Members - Variables

  • Class List
  • Class Index
  • Class Members
  • All
  • Functions
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- p -

  • Packet_Received : CDP5Protocol
  • PacketIn : CDP5Protocol
  • ParsePkt : CConsoleHelper
  • PC5_8_5V : DP5_DP4_FORMAT_STATUS
  • PC5_HV_POL : DP5_DP4_FORMAT_STATUS
  • PC5_PRESENT : _CONFIG_OPTIONS , DP5_DP4_FORMAT_STATUS , _DiagDataType
  • PC5_SN : DP5_DP4_FORMAT_STATUS , _DiagDataType
  • PC5_V : _DiagDataType
  • PC5DCAL : _DiagDataType
  • PC5Initialized : _DiagDataType
  • PID1 : _Packet_In , Packet_Out
  • PID2 : _Packet_In , Packet_Out
  • PIN : CDP5Protocol
  • PipeId : CDppWinUSB , _WINUSB_PIPE_INFORMATION
  • PipeTimeout : CDppWinUSB
  • PipeType : _WINUSB_PIPE_INFORMATION
  • port : NETDISPLAY_ENTRY
  • PreAmpON : _DiagDataType
  • PRECNT_REACHED : DP5_DP4_FORMAT_STATUS
  • PresetAcq : CConsoleHelper
  • PresetCount : CConsoleHelper
  • PresetLtDone : DP5_DP4_FORMAT_STATUS
  • PresetRt : CConsoleHelper
  • PresetRtDone : DP5_DP4_FORMAT_STATUS
  • PrintCfg : CConsoleHelper
  • PX4 : DP5_DP4_FORMAT_STATUS
  • PZCORR : DP5_DP4_FORMAT_STATUS
Generated on Thu Sep 21 2017 16:01:18 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: Class Members - Variables

  • Class List
  • Class Index
  • Class Members
  • All
  • Functions
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- r -

  • RAM_TEST_ERROR : DP5_DP4_FORMAT_STATUS
  • RAM_TEST_RUN : DP5_DP4_FORMAT_STATUS
  • RAW : DP5_DP4_FORMAT_STATUS
  • RealTime : DP5_DP4_FORMAT_STATUS
  • ReBootFlag : DP5_DP4_FORMAT_STATUS
  • ReqProcess : _DppStateType
  • Request : _WINUSB_SETUP_PACKET
  • RequestType : _WINUSB_SETUP_PACKET
  • RiseUS : CConsoleHelper
  • RS232_RThreshold : CDP5Protocol
  • RS232BytesInBuffer : CDP5Protocol
  • RS232HeaderReceived : CDP5Protocol
  • RS232PacketPtr : CDP5Protocol
Generated on Thu Sep 21 2017 16:01:18 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: Class Members - Variables

  • Class List
  • Class Index
  • Class Members
  • All
  • Functions
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- s -

  • SaveCfg : CConsoleHelper
  • ScaleAuto : CDP5Protocol
  • ScaReadBack : CConsoleHelper
  • Scope : CDP5Protocol
  • SCOPE_DR : DP5_DP4_FORMAT_STATUS
  • ScopeAutoRearm : _DppStateType
  • ScopeOverFlow : _DppStateType
  • SendCoarseFineGain : _CONFIG_OPTIONS
  • SerialNumber : _SpectrumFileType , DP5_DP4_FORMAT_STATUS
  • sfInfo : CConsoleHelper
  • SlowCount : DP5_DP4_FORMAT_STATUS
  • SlowThresholdPct : CConsoleHelper
  • SndCmd : CConsoleHelper
  • SockAddr : NETDISPLAY_ENTRY
  • SPECTRUM : CDP5Protocol
  • SPECTRUM_OFFSET : DP5_DP4_FORMAT_STATUS
  • SRAMTestData : _DiagDataType
  • SRAMTestPass : _DiagDataType
  • STATUS : _Packet_In
  • str_description : NETDISPLAY_ENTRY
  • str_display : NETDISPLAY_ENTRY
  • str_ev1 : NETDISPLAY_ENTRY
  • str_ev2 : NETDISPLAY_ENTRY
  • str_type : NETDISPLAY_ENTRY
  • strAnalogOut : CConsoleHelper
  • strDescription : _SpectrumFileType
  • strGainDisplayValue : CConsoleHelper
  • strInputOffset : CConsoleHelper
  • strMcaMode : CConsoleHelper
  • strOutputOffset : CConsoleHelper
  • strPort : _DppStateType
  • strPresetCmd : CConsoleHelper
  • strPresetVal : CConsoleHelper
  • strScopeGain : CConsoleHelper
  • strSpectrumConfig : _SpectrumFileType
  • strSpectrumStatus : _SpectrumFileType
  • strTag : _SpectrumFileType
  • strTempCal : _DiagDataType
  • strTempRaw : _DiagDataType
  • strTriggerPosition : CConsoleHelper
  • strTriggerSlope : CConsoleHelper
  • strTriggerSource : CConsoleHelper
  • subnet : NETDISPLAY_ENTRY
  • Sup9VOn : _DiagDataType
  • SUPPLIES_ON : DP5_DP4_FORMAT_STATUS
Generated on Thu Sep 21 2017 16:01:18 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: Class Members - Variables

  • Class List
  • Class Index
  • Class Members
  • All
  • Functions
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- t -

  • TEC_Voltage : DP5_DP4_FORMAT_STATUS
  • TECOn : _DiagDataType
  • TempOffset : _DiagDataType
  • Timeout_flag : CDP5Protocol
Generated on Thu Sep 21 2017 16:01:18 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: Class Members - Variables

  • Class List
  • Class Index
  • Class Members
  • All
  • Functions
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- u -

  • UC_TEMP_OFFSET : DP5_DP4_FORMAT_STATUS
  • UDP_offset : CDP5Protocol
  • UpdateScopeCfg : CConsoleHelper
  • USB_Default_Timeout : CDP5Protocol , CDppWinUSB
Generated on Thu Sep 21 2017 16:01:18 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: Class Members - Variables

  • Class List
  • Class Index
  • Class Members
  • All
  • Functions
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- v -

  • Value : _WINUSB_SETUP_PACKET
  • VREF_IN : DP5_DP4_FORMAT_STATUS
Generated on Thu Sep 21 2017 16:01:18 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: Class Members - Variables

  • Class List
  • Class Index
  • Class Members
  • All
  • Functions
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- w -

  • WinUsb_Disabled : CDppWinUSB
  • WinUSB_isConnected : CConsoleHelper
  • WinUSB_NumDevices : CConsoleHelper
  • winUSBHandle : WINUSB_DEVICE_INFO
Generated on Thu Sep 21 2017 16:01:18 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: ConsoleHelper.cpp File Reference

  • File List
  • File Members
ConsoleHelper.cpp File Reference
#include "StdAfx.h"
#include "ConsoleHelper.h"
#include "stringSplit.h"
#include "stringex.h"
Include dependency graph for ConsoleHelper.cpp:

Go to the source code of this file.

Generated on Thu Sep 21 2017 16:01:13 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: ConsoleHelper.cpp Source File

  • File List
  • File Members
ConsoleHelper.cpp
Go to the documentation of this file.
00001
00002 #include "StdAfx.h"
00003 #include "ConsoleHelper.h"
00004 #include "stringSplit.h"
00005 #include "stringex.h"
00006 using namespace stringSplit;
00007
00008 CConsoleHelper::CConsoleHelper(void)
00009 {
00010         DppWinUSB.NumDevices = 0;
00011         WinUSB_isConnected = false;
00012         WinUSB_NumDevices = 0;
00013         DppStatusString = "";
00014 }
00015
00016 CConsoleHelper::~CConsoleHelper(void)
00017 {
00018 }
00019
00020 bool CConsoleHelper::WinUSB_Connect_Default_DPP()
00021 {
00022
00023         // flag is for notifications, if already connect will return dusbStatNoAction
00024         // use devInfo.deviceConnected to detect connection
00025         DPP_USB_STATUS USBStatus;       //0=do nothing, 1=new connect, 2=cannot connect
00026         WinUSB_isConnected = false;
00027         WinUSB_NumDevices = 0;
00028         USBStatus = dusbStatNoAction;
00029         DppWinUSB.NumDevices = DppWinUSB.CountDP5WinusbDevices();
00030         if (DppWinUSB.NumDevices > 1) {
00031                 // choose dpp device here or default to first device
00032         } else if (DppWinUSB.NumDevices == 1) {
00033                 // default to first device
00034         } else {
00035         }
00036         if (DppWinUSB.NumDevices > 0) {
00037                 DppWinUSB.CurrentDevice = 1;    // set to default device
00038                 USBStatus = DppWinUSB.FindUSBDevice(DppWinUSB.CurrentDevice - 1); //connect
00039                 if (DppWinUSB.devInfo.deviceConnected) { // connection detected
00040                         WinUSB_isConnected = true;
00041                         WinUSB_NumDevices = DppWinUSB.NumDevices;
00042                 }
00043         } else {
00044                 WinUSB_isConnected = false;
00045                 WinUSB_NumDevices = 0;
00046         }
00047         return (WinUSB_isConnected);
00048 }
00049
00050 void CConsoleHelper::WinUSB_Close_Connection()
00051 {
00052         if (DppWinUSB.devInfo.deviceConnected) { // clean-up: close usb connection
00053                 DppWinUSB.devInfo.deviceConnected = false;
00054                 DppWinUSB.CloseWinUsbDevice();
00055                 DppWinUSB.isDppFound = false;
00056                 WinUSB_isConnected = false;
00057                 WinUSB_NumDevices = 0;
00058         }
00059 }
00060
00061 bool CConsoleHelper::WinUSB_SendCommand(TRANSMIT_PACKET_TYPE XmtCmd)
00062 {
00063     bool bHaveBuffer;
00064     bool bSentPkt;
00065         bool bMessageSent;
00066
00067         bMessageSent = false;
00068         if (DppWinUSB.devInfo.deviceConnected) {
00069                 bHaveBuffer = (bool) SndCmd.DP5_CMD(DP5Proto.BufferOUT, XmtCmd);
00070                 if (bHaveBuffer) {
00071                         DP5Proto.PIN.STATUS = 0xFF;   // packet invalid - will be overwritten soon by response/ACK packet
00072                         bSentPkt = DppWinUSB.SendPacketUSB(DP5Proto.BufferOUT, DppWinUSB.devInfo, DP5Proto.PacketIn);
00073                         if (bSentPkt) {
00074                     bMessageSent = true;
00075                         }
00076                 }
00077         }
00078         return (bMessageSent);
00079 }
00080
00081 // COMMAND (CONFIG_OPTIONS Needed)
00082 //                                      Command Description
00083 //
00084 // XMTPT_SEND_CONFIG_PACKET_TO_HW (HwCfgDP5Out,SendCoarseFineGain,PC5_PRESENT,DppType)
00085 //                                      Processes a configuration string for errors before sending
00086 //                                                      Allows only one gain setting type (coarse,fine OR total gain)
00087 //                                                      Removes commands from string that should not be sent to device type
00088 // XMTPT_SEND_CONFIG_PACKET_EX (HwCfgDP5Out)
00089 //                                      Sends the a configuration with minimal error checking
00090 // XMTPT_FULL_READ_CONFIG_PACKET (PC5_PRESENT,DppType)
00091 //                                      Creates and sends a full readback command
00092 void CConsoleHelper::CreateConfigOptions(CONFIG_OPTIONS *CfgOptions, string strCfg, CDP5Status DP5Stat, bool bUseCoarseFineGain)
00093 {
00094         // ==== ==== This application supports Communications for DPP Devices Below
00095         //DEVICE_ID==0; //DP5
00096         //DEVICE_ID==1; //PX5
00097         //DEVICE_ID==2; //DP5G
00098         //DEVICE_ID==3; //MCA8000D
00099         //DEVICE_ID==4; //TB5
00100         //DEVICE_ID==5; //DP5X
00101         CfgOptions->DppType = DP5Stat.m_DP5_Status.DEVICE_ID;           // DPP id to test for supported options
00102         CfgOptions->HwCfgDP5Out = strCfg;                                                       //configuration, if being sent, empty otherwise
00103         CfgOptions->PC5_PRESENT = DP5Stat.m_DP5_Status.PC5_PRESENT; //PC5 present indicator (accepts pc5 cfg commands)
00104         // bUseCoarseFineGain=true;  //uses GAIA,GAIF (coarse with fine gain);
00105         // bUseCoarseFineGain=false; //uses GAIN (total gain);
00106         CfgOptions->SendCoarseFineGain = bUseCoarseFineGain;            //select gain configuration control commands
00107         CfgOptions->isDP5_RevDxGains = DP5Stat.m_DP5_Status.isDP5_RevDxGains;
00108         CfgOptions->DPP_ECO = DP5Stat.m_DP5_Status.DPP_ECO;
00109 }
00110
00111 // COMMAND (CONFIG_OPTIONS Needed)
00112 //                                      Command Description
00113 //
00114 // XMTPT_SEND_CONFIG_PACKET_TO_HW (HwCfgDP5Out,SendCoarseFineGain,PC5_PRESENT,DppType)
00115 //                                      Processes a configuration string for errors before sending
00116 //                                                      Allows only one gain setting type (coarse,fine OR total gain)
00117 //                                                      Removes commands from string that should not be sent to device type
00118 // XMTPT_SEND_CONFIG_PACKET_EX (HwCfgDP5Out)
00119 //                                      Sends the a configuration with minimal error checking
00120 // XMTPT_FULL_READ_CONFIG_PACKET (PC5_PRESENT,DppType)
00121 //                                      Creates and sends a full readback command
00122 bool CConsoleHelper::WinUSB_SendCommand_Config(TRANSMIT_PACKET_TYPE XmtCmd, CONFIG_OPTIONS CfgOptions)
00123 {
00124     bool bHaveBuffer;
00125     bool bSentPkt;
00126         bool bMessageSent;
00127
00128         bMessageSent = false;
00129         if (DppWinUSB.devInfo.deviceConnected) {
00130                 bHaveBuffer = (bool) SndCmd.DP5_CMD_Config(DP5Proto.BufferOUT, XmtCmd, CfgOptions);
00131                 if (bHaveBuffer) {
00132                         DP5Proto.PIN.STATUS = 0xFF;   // packet invalid - will be overwritten soon by response/ACK packet
00133                         bSentPkt = DppWinUSB.SendPacketUSB(DP5Proto.BufferOUT, DppWinUSB.devInfo, DP5Proto.PacketIn);
00134                         if (bSentPkt) {
00135                     bMessageSent = true;
00136                         }
00137                 }
00138         }
00139         return (bMessageSent);
00140 }
00141
00142 bool CConsoleHelper::WinUSB_ReceiveData()
00143 {
00144         bool bDataReceived;
00145
00146         bDataReceived = true;
00147         if (DppWinUSB.devInfo.deviceConnected) {
00148                 bDataReceived = ReceiveData();
00149         }
00150         return (bDataReceived);
00151 }
00152
00158 bool CConsoleHelper::ReceiveData()
00159 {
00160         bool bDataReceived;
00161
00162         bDataReceived = true;
00163         ParsePkt.DppState.ReqProcess = ParsePkt.ParsePacket(DP5Proto.PacketIn, &DP5Proto.PIN);
00164         switch (ParsePkt.DppState.ReqProcess) {
00165                 case preqProcessStatus:
00166                         long idxStatus;
00167                         for(idxStatus=0;idxStatus<64;idxStatus++) {
00168                                 DP5Stat.m_DP5_Status.RAW[idxStatus] = DP5Proto.PIN.DATA[idxStatus];
00169                         }
00170                         DP5Stat.Process_Status(&DP5Stat.m_DP5_Status);
00171                         DppStatusString = DP5Stat.ShowStatusValueStrings(DP5Stat.m_DP5_Status);
00172                         break;
00173                 case preqProcessSpectrum:
00174                         ProcessSpectrumEx(DP5Proto.PIN, ParsePkt.DppState);
00175                         break;
00176                 //case preqProcessScopeData:
00177                 //      ProcessScopeDataEx(DP5Proto.PIN, ParsePkt.DppState);
00178                 //      break;
00179                 //case preqProcessTextData:
00180                 //      ProcessTextDataEx(DP5Proto.PIN, ParsePkt.DppState);
00181                 //      break;
00182                 //case preqProcessDiagData:
00183                 //      ProcessDiagDataEx(DP5Proto.PIN, ParsePkt.DppState);
00184                 //      break;
00185                 case preqProcessCfgRead:
00186                         ProcessCfgReadEx(DP5Proto.PIN, ParsePkt.DppState);
00187                         break;
00188                 //case preqProcessAck:
00189                 //      ProcessAck(DP5Proto.PIN.PID2);
00190                 //      break;
00191                 //case preqProcessError:
00192                 //      DisplayError(DP5Proto.PIN, ParsePkt.DppState);
00193                 //      break;
00194                 default:
00195                         bDataReceived = false;
00196                         break;
00197         }
00198         return (bDataReceived);
00199 }
00200
00201 //processes spectrum and spectrum+status
00202 void CConsoleHelper::ProcessSpectrumEx(Packet_In PIN, DppStateType DppState)
00203 {
00204         long idxSpectrum;
00205         long idxStatus;
00206
00207         DP5Proto.SPECTRUM.CHANNELS = (short)(256 * pow(2.0,(((PIN.PID2 - 1) & 14) / 2)));
00208
00209         for(idxSpectrum=0;idxSpectrum<DP5Proto.SPECTRUM.CHANNELS;idxSpectrum++) {
00210         DP5Proto.SPECTRUM.DATA[idxSpectrum] = (long)(PIN.DATA[idxSpectrum * 3]) + (long)(PIN.DATA[idxSpectrum * 3 + 1]) * 256 + (long)(PIN.DATA[idxSpectrum * 3 + 2]) * 65536;
00211         }
00212
00213     if ((PIN.PID2 & 1) == 0) {    // spectrum + status
00214                 for(idxStatus=0;idxStatus<64;idxStatus++) {
00215                         DP5Stat.m_DP5_Status.RAW[idxStatus] = PIN.DATA[idxStatus + DP5Proto.SPECTRUM.CHANNELS * 3];
00216                 }
00217         DP5Stat.Process_Status(&DP5Stat.m_DP5_Status);
00218                 DppStatusString = DP5Stat.ShowStatusValueStrings(DP5Stat.m_DP5_Status);
00219     }
00220 }
00221
00222 void CConsoleHelper::ClearConfigReadFormatFlags()
00223 {
00224         // configuration readback format control flags
00225         // these flags control how the configuration readback is formatted and processed
00226         DisplayCfg = false;                     // format configuration for display
00227         DisplaySca = false;                     // format sca for display (sca config sent separately)
00228         CfgReadBack = false;            // format configuration for general readback
00229         SaveCfg = false;                        // format configuration for file save
00230         PrintCfg = false;                       // format configuration for print
00231         HwCfgReady = false;                     // configuration ready flag
00232         ScaReadBack = false;            // sca readback ready flag
00233 }
00234
00235 void CConsoleHelper::ProcessCfgReadEx(Packet_In PIN, DppStateType DppState)
00236 {
00237         string strRawCfgIn;
00238         string strRawCfgOut;
00239         string strCh;
00240         string strCmdData;
00241         strRawCfgIn = "";
00242         string strCmdD;
00243         string strCfg;
00244         bool isScaCfg = false;
00245         string strDisplayCfgOut;
00246         stringex strfn;
00247
00248         strRawCfgOut = "";
00249         // ==========================================================
00250         // ===== Create Raw Configuration Buffer From Hardware ======
00251         for (int idxCfg=0;idxCfg<PIN.LEN;idxCfg++) {
00252                 strCh = strfn.Format("%c",PIN.DATA[idxCfg]);
00253                 strRawCfgIn += strCh;
00254                 strRawCfgOut += strCh;
00255                 if (PIN.DATA[idxCfg] == ';') {
00256                         strRawCfgIn += "\r\n";
00257                 }
00258         }
00259
00260         // ==========================================================
00261         if (DisplayCfg) {
00262                 DisplayCfg = false;
00263                 strCfg = strRawCfgIn;
00264                 strDisplayCfgOut = strRawCfgIn;
00265                 if (Dp5CmdList.size() > 0) {
00266                         for (unsigned int idxCmd=0;idxCmd<=Dp5CmdList.size();idxCmd++) {
00267                                 strCmdD = Dp5CmdList[idxCmd];
00268                                 if (strCmdD.length() > 0) {
00269                                         strDisplayCfgOut = ReplaceCmdDesc(strCmdD,strDisplayCfgOut);
00270                                 }
00271                         }
00272                 }
00273                 return;
00274         } else if (CfgReadBack) {
00275                 CfgReadBack = false;
00276                 HwCfgDP5 = strRawCfgIn;
00277                 HwCfgReady = true;
00278         }
00279         SaveCfg = false;
00280         PrintCfg = false;
00281         DisplayCfg = false;
00282         CfgReadBack = false;
00283
00284         isScaCfg = (bool)(ScaReadBack || DisplaySca);
00285         ScaReadBack = false;
00286         DisplaySca = false;
00287         if (isScaCfg) {
00288                 return;
00289         }
00290         strCmdData = GetCmdData("MCAS",strRawCfgIn); // mca mode
00291         strCmdData = GetCmdData("MCAC",strRawCfgIn); // channels
00292         if ((atoi(strCmdData.c_str()) > 0) && (atoi(strCmdData.c_str()) <= 8192)) {
00293                 mcaCH = atoi(strCmdData.c_str());
00294         } else {
00295                 mcaCH = 1024;
00296         }
00297
00298         strCmdData = GetCmdData("THSL",strRawCfgIn); // LLD thresh
00299         SlowThresholdPct = atof(strCmdData.c_str());
00300
00301         strCmdData = GetCmdData("THFA",strRawCfgIn); // fast thresh
00302         FastChThreshold = atoi(strCmdData.c_str());
00303
00304         strCmdData = GetCmdData("TPEA",strRawCfgIn); // peak time
00305         RiseUS = atof(strCmdData.c_str());
00306
00307         strCmdData = GetCmdData("GAIN",strRawCfgIn); // gain
00308         strGainDisplayValue = strCmdData + "x";
00309
00310         strPresetCmd = "";
00311         strPresetVal = "";
00312
00313         strCmdData = GetCmdData("PREC",strRawCfgIn); //preset count
00314         PresetCount = atoi(strCmdData.c_str());
00315         if (PresetCount > 0) {
00316                 if (strPresetCmd.length() > 0) { strPresetCmd += "/"; }
00317                 if (strPresetVal.length() > 0) { strPresetVal += "/"; }
00318                 strPresetCmd += "Cnt";
00319                 strPresetVal += strCmdData;
00320         }
00321
00322         strCmdData = GetCmdData("PRET",strRawCfgIn); //preset actual time
00323         PresetAcq = atof(strCmdData.c_str());
00324         if (PresetAcq > 0) {
00325                 if (strPresetCmd.length() > 0) { strPresetCmd += "/"; }
00326                 if (strPresetVal.length() > 0) { strPresetVal += "/"; }
00327                 strPresetCmd += "Acq";
00328                 strPresetVal += strCmdData;
00329         }
00330
00331         strCmdData = GetCmdData("PRER",strRawCfgIn); // preset real time
00332         PresetRt = atof(strCmdData.c_str());
00333         if (PresetRt > 0) {
00334                 if (strPresetCmd.length() > 0) { strPresetCmd += "/"; }
00335                 if (strPresetVal.length() > 0) { strPresetVal += "/"; }
00336                 strPresetCmd += "Real";
00337                 strPresetVal += strCmdData;
00338         }
00339
00340         if (strPresetCmd.length() == 0) {
00341                 strPresetCmd += "None";
00342         }
00343         if (strPresetVal.length() == 0) {
00344                 //strPresetVal += "";
00345         }
00346
00347         strCmdData = GetCmdData("CLCK",strRawCfgIn); // fpga clock mode
00348         if (atoi(strCmdData.c_str()) == 80) {
00349                 b80MHzMode = true;
00350         } else {
00351                 b80MHzMode = false;
00352         }
00353
00354         // DP5 oscilloscope support
00355         strCmdData = GetCmdData("INOF",strRawCfgIn); // osc. Input offset
00356         strInputOffset = strCmdData;
00357
00358         strCmdData = GetCmdData("DACO",strRawCfgIn); // osc. DAC output
00359         strAnalogOut = strCmdData;
00360
00361         strCmdData = GetCmdData("DACF",strRawCfgIn); // osc. DAC offset
00362         strOutputOffset = strCmdData;
00363
00364         strCmdData = GetCmdData("AUO1",strRawCfgIn); // osc. AUX_OUT1
00365         strTriggerSource = strCmdData;
00366
00367         strCmdData = GetCmdData("SCOE",strRawCfgIn); // osc. Scope trigger edge
00368         strTriggerSlope = strCmdData;
00369
00370         strCmdData = GetCmdData("SCOT",strRawCfgIn); // osc. Scope trigger position
00371         strTriggerPosition = strCmdData;
00372
00373         strCmdData = GetCmdData("SCOG",strRawCfgIn); // osc. Scope gain
00374         strScopeGain = strCmdData;
00375
00376         strCmdData = GetCmdData("MCAS",strRawCfgIn); // Acq Mode
00377         AcqMode = 0;
00378         strMcaMode = "MCA";
00379         if (strCmdData == "NORM") {
00380                 strMcaMode = "MCA";
00381         } else if (strCmdData == "MCS") {
00382                 strMcaMode = "MCS";
00383                 AcqMode = 1;
00384         } else if (strCmdData.length() > 0) {
00385                 strMcaMode = strCmdData;
00386         }
00387         UpdateScopeCfg = true;
00388 }
00389
00390 string CConsoleHelper::GetCmdData(string strCmd, string strCfgData)
00391 {
00392         int iStart,iEnd,iCmd;
00393         string strCmdData;
00394
00395         strCmdData = "";
00396         if (strCfgData.length() < 7) { return strCmdData; }     // no data
00397         if (strCmd.length() != 4) {     return strCmdData; }            // bad command
00398         iCmd = (int)strCfgData.find(strCmd+"=",0);
00399         if (iCmd == -1) { return strCmdData; }                  // cmd not found
00400         iStart = (int)strCfgData.find("=",iCmd);
00401         if (iStart == -1) { return strCmdData; }                // data start not found
00402         iEnd = (int)strCfgData.find(";",iCmd);
00403         if (iEnd == -1) {return strCmdData; }                   // data end found
00404         if (iStart >= iEnd) { return strCmdData; }              // data error
00405         strCmdData = strCfgData.substr(iStart+1,(iEnd - (iStart+1)));
00406         return strCmdData;
00407 }
00408
00409 string CConsoleHelper::ReplaceCmdDesc(string strCmd, string strCfgData)
00410 {
00411         int iStart,iCmd;        //iEnd,
00412         string strNew;
00413         string strDesc;
00414
00415         strNew = "";
00416         if (strCfgData.length() < 7) { return strCfgData; }     // no data
00417         if (strCmd.length() != 4) {     return strCfgData; }            // bad command
00418         iCmd = (int)strCfgData.find(strCmd+"=",0);
00419         if (iCmd == -1) { return strCfgData; }                                          // cmd not found
00420
00421         strDesc = GetCmdDesc(strCmd);
00422         if (strDesc.length() == 0) { return strCfgData; }               // cmd desc  not found
00423         iStart = (int)strCfgData.find("=",iCmd);
00424         if (iStart != (iCmd + 4)) { return strCfgData; }                        // data start not found
00425         if (iCmd <= 0) {        // usually left string has iCmd-1
00426                 iCmd = 1;               // in this case left has 0 chars, set offset
00427         }
00428         strNew = strCfgData.substr(0,iCmd-1) + strDesc + strCfgData.substr(iStart);
00429         return strNew;
00430 }
00431
00432 string CConsoleHelper::AppendCmdDesc(string strCmd, string strCfgData)
00433 {
00434         int iStart,iEnd,iCmd;
00435         string strNew;
00436         string strDesc;
00437
00438         strNew = "";
00439         if (strCfgData.length() < 7) { return strCfgData; }     // no data
00440         if (strCmd.length() != 4) {     return strCfgData; }            // bad command
00441         iCmd = (int)strCfgData.find(strCmd+"=",0);
00442         if (iCmd == -1) { return strCfgData; }                                          // cmd not found
00443         iEnd = (int)strCfgData.find(";",iCmd);
00444         if (iEnd == -1) {return strCfgData; }                   // data end found
00445         iStart = (int)strCfgData.find("=",iCmd);
00446         if (iStart != (iCmd + 4)) { return strCfgData; }                        // data start not found
00447         if (iStart >= iEnd) { return strCfgData; }              // data error
00448         strDesc = GetCmdDesc(strCmd);
00449         if (strDesc.length() == 0) { return strCfgData; }               // cmd desc  not found
00450         strNew = strCfgData.substr(0,iEnd+1) + "    " + strDesc + strCfgData.substr(iEnd+1);
00451         return strNew;
00452 }
00453
00454 string CConsoleHelper::GetCmdDesc(string strCmd)
00455 {
00456         string strCmdName = "";
00457         if (strCmd == "RESC") {
00458                 strCmdName = "Reset Configuration";
00459         } else if (strCmd == "CLCK") {
00460                 strCmdName = "20MHz/80MHz";
00461         } else if (strCmd == "TPEA") {
00462                 strCmdName = "peaking time";
00463         } else if (strCmd == "GAIF") {
00464                 strCmdName = "Fine gain";
00465         } else if (strCmd == "GAIN") {
00466                 strCmdName = "Total Gain (analog * fine)";
00467         } else if (strCmd == "RESL") {
00468                 strCmdName = "Detector Reset lockout";
00469         } else if (strCmd == "TFLA") {
00470                 strCmdName = "Flat top";
00471         } else if (strCmd == "TPFA") {
00472                 strCmdName = "Fast channel peaking time";
00473         } else if (strCmd == "RTDE") {
00474                 strCmdName = "RTD on/off";
00475         } else if (strCmd == "MCAS") {
00476                 strCmdName = "MCA Source";
00477         } else if (strCmd == "RTDD") {
00478                 strCmdName = "Custom RTD oneshot delay";
00479         } else if (strCmd == "RTDW") {
00480                 strCmdName = "Custom RTD oneshot width";
00481         } else if (strCmd == "PURE") {
00482                 strCmdName = "PUR interval on/off";
00483         } else if (strCmd == "SOFF") {
00484                 strCmdName = "Set spectrum offset";
00485         } else if (strCmd == "INOF") {
00486                 strCmdName = "Input offset";
00487         } else if (strCmd == "ACKE") {
00488                 strCmdName = "ACK / Don't ACK packets with errors";
00489         } else if (strCmd == "AINP") {
00490                 strCmdName = "Analog input pos/neg";
00491         } else if (strCmd == "AUO1") {
00492                 strCmdName = "AUX_OUT selection";
00493         } else if (strCmd == "AUO2") {
00494                 strCmdName = "AUX_OUT2 selection";
00495         } else if (strCmd == "BLRD") {
00496                 strCmdName = "BLR down correction";
00497         } else if (strCmd == "BLRM") {
00498                 strCmdName = "BLR mode";
00499         } else if (strCmd == "BLRU") {
00500                 strCmdName = "BLR up correction";
00501         } else if (strCmd == "BOOT") {
00502                 strCmdName = "Turn supplies on/off at power up";
00503         } else if (strCmd == "CUSP") {
00504                 strCmdName = "Non-trapezoidal shaping";
00505         } else if (strCmd == "DACF") {
00506                 strCmdName = "DAC offset";
00507         } else if (strCmd == "DACO") {
00508                 strCmdName = "DAC output";
00509         } else if (strCmd == "GAIA") {
00510                 strCmdName = "Analog gain index";
00511         } else if (strCmd == "GATE") {
00512                 strCmdName = "Gate control";
00513         } else if (strCmd == "GPED") {
00514                 strCmdName = "G.P. counter edge";
00515         } else if (strCmd == "GPGA") {
00516                 strCmdName = "G.P. counter uses GATE?";
00517         } else if (strCmd == "GPIN") {
00518                 strCmdName = "G.P. counter input";
00519         } else if (strCmd == "GPMC") {
00520                 strCmdName = "G.P. counter cleared with MCA counters?";
00521         } else if (strCmd == "GPME") {
00522                 strCmdName = "G.P. counter uses MCA_EN?";
00523         } else if (strCmd == "HVSE") {
00524                 strCmdName = "HV set";
00525         } else if (strCmd == "MCAC") {
00526                 strCmdName = "MCA/MCS channels";
00527         } else if (strCmd == "MCAE") {
00528                 strCmdName = "MCA/MCS enable";
00529         } else if (strCmd == "MCSL") {
00530                 strCmdName = "MCS low threshold";
00531         } else if (strCmd == "MCSH") {
00532                 strCmdName = "MCS high threshold";
00533         } else if (strCmd == "MCST") {
00534                 strCmdName = "MCS timebase";
00535         } else if (strCmd == "PAPS") {
00536                 strCmdName = "preamp 8.5/5 (N/A)";
00537         } else if (strCmd == "PAPZ") {
00538                 strCmdName = "Pole-Zero";
00539         } else if (strCmd == "PDMD") {
00540                 strCmdName = "Peak detect mode (min/max)";
00541         } else if (strCmd == "PRCL") {
00542                 strCmdName = "Preset counts low threshold";
00543         } else if (strCmd == "PRCH") {
00544                 strCmdName = "Preset counts high threshold";
00545         } else if (strCmd == "PREC") {
00546                 strCmdName = "Preset counts";
00547         } else if (strCmd == "PRER") {
00548                 strCmdName = "Preset Real Time";
00549         } else if (strCmd == "PRET") {
00550                 strCmdName = "Preset time";
00551         } else if (strCmd == "RTDS") {
00552                 strCmdName = "RTD sensitivity";
00553         } else if (strCmd == "RTDT") {
00554                 strCmdName = "RTD threshold";
00555         } else if (strCmd == "SCAH") {
00556                 strCmdName = "SCAx high threshold";
00557         } else if (strCmd == "SCAI") {
00558                 strCmdName = "SCA index";
00559         } else if (strCmd == "SCAL") {
00560                 strCmdName = "SCAx low theshold";
00561         } else if (strCmd == "SCAO") {
00562                 strCmdName = "SCAx output (SCA1-8 only)";
00563         } else if (strCmd == "SCAW") {
00564                 strCmdName = "SCA pulse width (not indexed - SCA1-8)";
00565         } else if (strCmd == "SCOE") {
00566                 strCmdName = "Scope trigger edge";
00567         } else if (strCmd == "SCOG") {
00568                 strCmdName = "Digital scope gain";
00569         } else if (strCmd == "SCOT") {
00570                 strCmdName = "Scope trigger position";
00571         } else if (strCmd == "TECS") {
00572                 strCmdName = "TEC set";
00573         } else if (strCmd == "THFA") {
00574                 strCmdName = "Fast threshold";
00575         } else if (strCmd == "THSL") {
00576                 strCmdName = "Slow threshold";
00577         } else if (strCmd == "TLLD") {
00578                 strCmdName = "LLD threshold";
00579         } else if (strCmd == "TPMO") {
00580                 strCmdName = "Test pulser on/off";
00581         } else if (strCmd == "VOLU") {
00582                 strCmdName = "Speaker On/Off";
00583         } else if (strCmd == "CON1") {
00584                 strCmdName = "Connector 1";
00585         } else if (strCmd == "CON2") {
00586                 strCmdName = "Connector 2";
00587         }
00588         return strCmdName;
00589 }
00590
00591 //lData=spectrum data,chan=numberof channels,bLog=display as log
00592 void CConsoleHelper::ConsoleGraph(long lData[], long chan, bool bLog, std::string strStatus)
00593 {
00594         const int ScreenW = 80;
00595         const int ScreenH = 24;
00596         char plot[ScreenW][ScreenH];
00597         char chEmpty = char(32);
00598         char chBlock = char(219);
00599         //long xMax;
00600         long yMax;
00601         long idxX;
00602         long idxY;
00603         double xM;
00604         double yM;
00605         long i;
00606         long x;
00607         long y;
00608         double logY;
00609         long logYLong;
00610
00611         yMax = 0;
00612         for(i=0;i<chan;i++) {
00613                 if (bLog) {
00614                         logY = log(1.0 + lData[i]);
00615                         if (yMax < (long)logY) {
00616                                 yMax = (long)logY;
00617                         }
00618                 } else {
00619                         if (yMax < lData[i]) {
00620                                 yMax = lData[i];
00621                         }
00622                 }
00623         }
00624
00625         xM = (double)ScreenW / (double)chan;
00626         if (yMax < 1) yMax = 1;
00627         yM = (double)(((double)(ScreenH)-(double)2.0) / (double)yMax);
00628
00629         for (i=0;i<chan;i++) {
00630                 idxX = (long)((double)i * xM);
00631                 if (idxX >= ScreenW) idxX = ScreenW-1;
00632
00633                 if (bLog) {
00634                         logY = log(1.0  + lData[i]);
00635                         logYLong = (long)logY;
00636                         idxY = (long)((double)logYLong * yM);
00637                 } else {
00638                         idxY = (long)((double)lData[i] * yM);
00639                 }
00640                 if (idxY >= ScreenH) idxY = ScreenH-2;
00641
00642                 for(y=0;y<ScreenH;y++) {
00643                         if (y <= idxY) {
00644                                 plot[idxX][y] = chBlock;
00645                         } else {
00646                                 plot[idxX][y] = chEmpty;
00647                         }
00648                 }
00649         }
00650
00651         unsigned int iRow=0;
00652         unsigned int iCol=0;
00653         unsigned int iRowLen;
00654         std::string strRow;
00655
00656         if (strStatus.length() > 0) {
00657                 std::vector<string> vstr = Split(strStatus,"\r\n",true,true);   // create rows
00658                 for(iRow=0;iRow<(size_t)vstr.size();iRow++) {                                   // copy to plot
00659                         strRow = vstr[iRow];
00660                         iRowLen = (unsigned int)strRow.length();
00661                         for(iCol=0;iCol<iRowLen;iCol++){
00662                                 plot[iCol][(ScreenH-2)-iRow] = strRow.at(iCol);
00663                         }
00664                 }
00665         }
00666
00667         for (y=0;y<ScreenH;y++){
00668                 for (x=0;x<ScreenW;x++){
00669                         cout << plot[x][(ScreenH-1)-y];
00670                 }
00671         }
00672 }
00673
00674 string CConsoleHelper::CreateMCAData(long m_larDataBuffer[], SpectrumFileType sfInfo, DP4_FORMAT_STATUS cfgStatusLst)
00675 {
00676         string strMCA;
00677         string strText;
00678         string strADC;
00679         long idxChan;
00680         string strData;
00681         stringex strfn;
00682
00683         if (cfgStatusLst.SerialNumber <= 0)
00684         {
00685                 return ("");
00686         }
00687         strText = "";
00688         strMCA = "";
00689     switch(sfInfo.m_iNumChan){
00690         case 16384:
00691             strADC = "6";
00692                                 break;
00693         case 8192:
00694             strADC = "5";
00695                                 break;
00696         case 4096:
00697             strADC = "4";
00698                                 break;
00699         case 2048:
00700             strADC = "3";
00701                                 break;
00702         case 1024:
00703             strADC = "2";
00704                                 break;
00705         case 512:
00706             strADC = "1";
00707                                 break;
00708         case 256:
00709             strADC = "0";
00710                                 break;
00711     }
00712     strMCA += "<<PMCA SPECTRUM>>\r\n";
00713     strMCA += "TAG - " + sfInfo.strTag + "\r\n";
00714     strMCA += "DESCRIPTION - " + sfInfo.strDescription + "\r\n";
00715     strMCA += "GAIN - " + strADC + "\r\n";
00716     strMCA += "THRESHOLD - 0\r\n";
00717     strMCA += "LIVE_MODE - 0\r\n";
00718     strMCA += "PRESET_TIME - \r\n";
00719         strText = strfn.Format("%lf", cfgStatusLst.AccumulationTime);
00720     strMCA += "LIVE_TIME - " + strText + "\r\n";
00721         strText = strfn.Format("%lf", cfgStatusLst.RealTime);
00722     strMCA += "REAL_TIME - " + strText + "\r\n";
00723     strMCA += "START_TIME - \r\n";
00724         strText = strfn.Format("%i", sfInfo.SerialNumber);
00725     strMCA += "SERIAL_NUMBER - " + strText + "\r\n";
00726     strMCA += "<<DATA>>\r\n";
00727         for (idxChan=0;idxChan<sfInfo.m_iNumChan;idxChan++) {
00728                 strData = strfn.Format("%i", m_larDataBuffer[idxChan]);
00729                 strMCA += strData + "\r\n";
00730         }
00731     strMCA += "<<END>>\r\n";
00732         strMCA += "<<DP5 CONFIGURATION>>\r\n";
00733         strMCA += sfInfo.strSpectrumConfig;
00734         strMCA += "<<DP5 CONFIGURATION END>>\r\n";
00735         strMCA += "<<DPP STATUS>>\r\n";
00736         strMCA += sfInfo.strSpectrumStatus;     // this functin is included in most examples
00737         strMCA += "<<DPP STATUS END>>\r\n";
00738         return (strMCA);
00739 }
00740
00741 void CConsoleHelper::SaveSpectrumStringToFile(string strData)
00742 {
00743         FILE  *out;
00744         string strFilename;
00745         string strError;
00746         stringex strfn;
00747
00748         strFilename = "SpectrumData.mca";
00749
00750         if ( (out = fopen(strFilename.c_str(),"wb")) == (FILE *) NULL)
00751                 strError = strfn.Format("Couldn't open %s for writing.\n", strFilename.c_str());
00752         else
00753         {
00754                 fprintf(out,"%s",strData.c_str());
00755         }
00756         fclose(out);
00757 }
00758
00759 string CConsoleHelper::CreateSpectrumConfig(string strRawCfgIn)
00760 {
00761         string strDisplayCfgOut;
00762         string strCmdD;
00763
00764         strDisplayCfgOut = strRawCfgIn;
00765         if (Dp5CmdList.size() > 0) {
00766                 for (unsigned int idxCmd=0;idxCmd<Dp5CmdList.size();idxCmd++) {
00767                         strCmdD = Dp5CmdList[idxCmd];
00768                         if (strCmdD.length() > 0) {
00769                                 strDisplayCfgOut = AppendCmdDesc(strCmdD,strDisplayCfgOut);
00770                         }
00771                 }
00772         }
00773         return strDisplayCfgOut;
00774 }
00775
00776 vector<string> CConsoleHelper::MakeDp5CmdList()
00777 {
00778         vector<string> strCfgArr;
00779         strCfgArr.clear();
00780         strCfgArr.push_back("RESC");
00781         strCfgArr.push_back("CLCK");
00782         strCfgArr.push_back("TPEA");
00783         strCfgArr.push_back("GAIF");
00784         strCfgArr.push_back("GAIN");
00785         strCfgArr.push_back("RESL");
00786         strCfgArr.push_back("TFLA");
00787         strCfgArr.push_back("TPFA");
00788         strCfgArr.push_back("PURE");
00789         strCfgArr.push_back("RTDE");
00790         strCfgArr.push_back("MCAS");
00791         strCfgArr.push_back("MCAC");
00792         strCfgArr.push_back("SOFF");
00793         strCfgArr.push_back("AINP");
00794         strCfgArr.push_back("INOF");
00795         strCfgArr.push_back("GAIA");
00796         strCfgArr.push_back("CUSP");
00797         strCfgArr.push_back("PDMD");
00798         strCfgArr.push_back("THSL");
00799         strCfgArr.push_back("TLLD");
00800         strCfgArr.push_back("THFA");
00801         strCfgArr.push_back("DACO");
00802         strCfgArr.push_back("DACF");
00803         strCfgArr.push_back("RTDS");
00804         strCfgArr.push_back("RTDT");
00805         strCfgArr.push_back("BLRM");
00806         strCfgArr.push_back("BLRD");
00807         strCfgArr.push_back("BLRU");
00808         strCfgArr.push_back("GATE");
00809         strCfgArr.push_back("AUO1");
00810         strCfgArr.push_back("PRET");
00811         strCfgArr.push_back("PRER");
00812         strCfgArr.push_back("PREL");
00813         strCfgArr.push_back("PREC");
00814         strCfgArr.push_back("PRCL");
00815         strCfgArr.push_back("PRCH");
00816         strCfgArr.push_back("HVSE");
00817         strCfgArr.push_back("TECS");
00818         strCfgArr.push_back("PAPZ");
00819         strCfgArr.push_back("PAPS");
00820         strCfgArr.push_back("SCOE");
00821         strCfgArr.push_back("SCOT");
00822         strCfgArr.push_back("SCOG");
00823         strCfgArr.push_back("MCSL");
00824         strCfgArr.push_back("MCSH");
00825         strCfgArr.push_back("MCST");
00826         strCfgArr.push_back("AUO2");
00827         strCfgArr.push_back("TPMO");
00828         strCfgArr.push_back("GPED");
00829         strCfgArr.push_back("GPIN");
00830         strCfgArr.push_back("GPME");
00831         strCfgArr.push_back("GPGA");
00832         strCfgArr.push_back("GPMC");
00833         strCfgArr.push_back("MCAE");
00834         strCfgArr.push_back("VOLU");
00835         strCfgArr.push_back("CON1");
00836         strCfgArr.push_back("CON2");
00837         strCfgArr.push_back("BOOT");
00838         return strCfgArr;
00839 }
Generated on Thu Sep 21 2017 16:01:12 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: ConsoleHelper.h File Reference

  • File List
  • File Members
Classes | Typedefs
ConsoleHelper.h File Reference
#include <string>
#include <vector>
#include "DppWinUSB.h"
#include "DP5Protocol.h"
#include "ParsePacket.h"
#include "SendCommand.h"
#include "DP5Status.h"
#include <time.h>
Include dependency graph for ConsoleHelper.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct | _SpectrumFileType
class | CConsoleHelper

Typedefs

typedef struct _SpectrumFileType | SpectrumFileType

Typedef Documentation

typedef struct _SpectrumFileType SpectrumFileType

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

Generated on Thu Sep 21 2017 16:01:13 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: ConsoleHelper.h Source File

  • File List
  • File Members
ConsoleHelper.h
Go to the documentation of this file.
00001
00006 #pragma once
00007
00008 #include <string>
00009 #include <vector>
00010 #include "DppWinUSB.h"                  // WinUSB Support
00011 #include "DP5Protocol.h"                // DPP Protocol Support
00012 #include "ParsePacket.h"                // Packet Parser
00013 #include "SendCommand.h"                // Command Generator
00014 #include "DP5Status.h"                  // Status Decoder
00015 #include <time.h>                               // time library for rand seed
00016
00017 typedef struct _SpectrumFileType {
00018     string strTag;
00019     string strDescription;
00020     short m_iNumChan;
00021         unsigned long SerialNumber;
00022         string strSpectrumConfig;
00023         string strSpectrumStatus;
00024 } SpectrumFileType;
00025
00026 class CConsoleHelper
00027 {
00028 public:
00029         CConsoleHelper(void);
00030         ~CConsoleHelper(void);
00031
00033         CDppWinUSB DppWinUSB;
00035         bool WinUSB_isConnected;
00037         int  WinUSB_NumDevices;
00039         bool WinUSB_Connect_Default_DPP();
00041         void WinUSB_Close_Connection();
00043         bool WinUSB_SendCommand(TRANSMIT_PACKET_TYPE XmtCmd);
00045         bool WinUSB_SendCommand_Config(TRANSMIT_PACKET_TYPE XmtCmd, CONFIG_OPTIONS CfgOptions);
00047         bool WinUSB_ReceiveData();
00048
00049         // communications helper functions
00050
00052         CDP5Protocol DP5Proto;
00054         CSendCommand SndCmd;
00056         CParsePacket ParsePkt;
00058         CDP5Status DP5Stat;
00059
00060         // DPP packet processing functions.
00061
00063         bool ReceiveData();
00065         void ProcessSpectrumEx(Packet_In PIN, DppStateType DppState);
00067         void ClearConfigReadFormatFlags();
00069         void ProcessCfgReadEx(Packet_In PIN, DppStateType DppState);
00071         void CreateConfigOptions(CONFIG_OPTIONS *CfgOptions, string strCfg, CDP5Status DP5Stat, bool bUseCoarseFineGain);
00072
00073         //display support
00074
00076         void ConsoleGraph(long lData[], long chan, bool bLog, std::string strStatus);
00078         string DppStatusString;
00079
00080         // DPP configuration information variables
00081
00083         bool b80MHzMode;
00085         string strMcaMode;
00087         vector<string> Dp5CmdList;
00088
00089         // configuration readback format control flags
00090         // these flags control how the configuration readback is formatted and processed
00091
00093         bool DisplayCfg;
00095         bool DisplaySca;
00097         bool CfgReadBack;
00099         bool SaveCfg;
00101         bool PrintCfg;
00103         bool HwCfgReady;
00105         bool ScaReadBack;
00106
00107         // Tuning and display variables.
00108
00110         string HwCfgDP5;
00112         int mcaCH;
00114         double SlowThresholdPct;
00116         int FastChThreshold;
00118         double RiseUS;
00120         string strGainDisplayValue;
00122         int AcqMode;
00123
00124         // configuration presets for display (status updates preset progress)
00125
00127         int PresetCount;
00129         double PresetAcq;
00131         double PresetRt;
00133         string strPresetCmd;
00135         string strPresetVal;
00136
00137         // configuration support functions
00138
00140         string GetCmdData(string strCmd, string strCfgData);
00142         string ReplaceCmdDesc(string strCmd, string strCfgData);
00144         string AppendCmdDesc(string strCmd, string strCfgData);
00146         string GetCmdDesc(string strCmd);
00147
00148         // oscilloscope support
00149
00150
00151         bool UpdateScopeCfg;
00152         string strInputOffset;
00153         string strAnalogOut;
00154         string strOutputOffset;
00155         string strTriggerSource;
00156         string strTriggerSlope;
00157         string strTriggerPosition;
00158         string strScopeGain;
00159
00160     string CreateMCAData(long m_larDataBuffer[], SpectrumFileType sfInfo, DP4_FORMAT_STATUS cfgStatusLst);
00162         void SaveSpectrumStringToFile(string strData);
00163     string CreateSpectrumConfig(string strRawCfgIn) ;
00164         vector<string> MakeDp5CmdList();
00165         SpectrumFileType sfInfo;
00166
00167 };
00168
00169
00170
00171
00172
00173
00174
00175
00176
00177
00178
00179
00180
00181
00182
00183
00184
00185
00186
00187
00188
00189
Generated on Thu Sep 21 2017 16:01:12 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: stdafx.cpp File Reference

  • File List
  • File Members
stdafx.cpp File Reference
#include "stdafx.h"
Include dependency graph for stdafx.cpp:

Go to the source code of this file.

Generated on Thu Sep 21 2017 16:01:13 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: stdafx.cpp Source File

  • File List
  • File Members
stdafx.cpp
Go to the documentation of this file.
00001 // stdafx.cpp : source file that includes just the standard includes
00002 // vcDppConsole.pch will be the pre-compiled header
00003 // stdafx.obj will contain the pre-compiled type information
00004
00005 #include "stdafx.h"
00006
00007 // TODO: reference any additional headers you need in STDAFX.H
00008 // and not in this file
Generated on Thu Sep 21 2017 16:01:13 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: stdafx.h File Reference

  • File List
  • File Members
stdafx.h File Reference
#include <iostream>
#include <tchar.h>
Include dependency graph for stdafx.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Generated on Thu Sep 21 2017 16:01:13 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: stdafx.h Source File

  • File List
  • File Members
stdafx.h
Go to the documentation of this file.
00001 // stdafx.h : include file for standard system include files,
00002 // or project specific include files that are used frequently, but
00003 // are changed infrequently
00004 //
00005
00006 #pragma warning(disable:4995)
00007 #pragma once
00008
00009 #include <iostream>
00010 #include <tchar.h>
00011
00012 // TODO: reference additional headers your program requires here
Generated on Thu Sep 21 2017 16:01:13 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: stringex.cpp File Reference

  • File List
  • File Members
stringex.cpp File Reference
#include "stringex.h"
Include dependency graph for stringex.cpp:

Go to the source code of this file.

Generated on Thu Sep 21 2017 16:01:13 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: stringex.cpp Source File

  • File List
  • File Members
stringex.cpp
Go to the documentation of this file.
00001 #include "stringex.h"
00002
00003 #ifdef _MSC_VER
00004         #pragma warning(disable:4996)
00005         #define vsnprintf _vsnprintf
00006 #endif
00007
00008 stringex::stringex(void)
00009 {
00010 }
00011
00012 stringex::~stringex(void)
00013 {
00014 }
00015
00016 std::string stringex::vformat (const char *fmt, va_list ap)
00017 {
00018     size_t size = 1024;
00019     char stackbuf[1024];
00020     std::vector<char> dynamicbuf;
00021     char *buf = &stackbuf[0];
00022     while (1) {
00023         int needed = vsnprintf (buf, size, fmt, ap);
00024         if (needed <= (int)size && needed >= 0) {
00025             return std::string (buf, (size_t) needed);
00026         }
00027         size = (needed > 0) ? (needed+1) : (size*2);
00028         dynamicbuf.resize (size);
00029         buf = &dynamicbuf[0];
00030     }
00031 }
00032
00033 std::string stringex::Format (const char *fmt, ...)
00034 {
00035     va_list ap;
00036     va_start (ap, fmt);
00037     std::string buf = vformat (fmt, ap);
00038     va_end (ap);
00039     return buf;
00040 }
00041
00042 std::string stringex::MakeUpper(string StdString)
00043 {
00044   const int length = (int)StdString.length();
00045   for(int i=0; i<length ; ++i)
00046   {
00047           StdString[i] = std::toupper(StdString[i]);
00048   }
00049   return StdString;
00050 }
00051
00052 std::string stringex::MakeLower(string StdString)
00053 {
00054   const int length = (int)StdString.length();
00055   for(int i=0; i<length ; ++i)
00056   {
00057           StdString[i] = std::tolower(StdString[i]);
00058   }
00059   return StdString;
00060 }
Generated on Thu Sep 21 2017 16:01:13 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: stringex.h File Reference

  • File List
  • File Members
Classes
stringex.h File Reference
#include <stdio.h>
#include <stdarg.h>
#include <cstdarg>
#include <vector>
#include <string>
#include <cctype>
Include dependency graph for stringex.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class stringex
Generated on Thu Sep 21 2017 16:01:13 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: stringex.h Source File

  • File List
  • File Members
stringex.h
Go to the documentation of this file.
00001 #pragma once
00002 #ifndef STRINGEX_H
00003 #define STRINGEX_H
00004 #ifdef _MSC_VER
00005         #pragma warning(disable:4996)  // uses _vsnprintf, disable warning, can use _CRT_SECURE_NO_WARNINGS
00006 //      #define _CRT_SECURE_NO_WARNINGS
00007 #endif
00008 #include <stdio.h>
00009 #include <stdarg.h>
00010 #include <cstdarg>
00011 #include <vector>
00012 #include <string>
00013 #include <cctype> // std::toupper, std::tolower
00014 using namespace std;
00015
00016 class stringex
00017 {
00018 public:
00019         stringex(void);
00020         ~stringex(void);
00021         std::string Format (const char *fmt, ...);
00022         std::string MakeUpper(string StdString);
00023         std::string MakeLower(string StdString);
00024
00025 private:
00026         std::string vformat (const char *fmt, va_list ap);
00027
00028 };
00029
00030 #endif
Generated on Thu Sep 21 2017 16:01:13 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: vcDppConsole.cpp File Reference

  • File List
  • File Members
Functions | Variables
vcDppConsole.cpp File Reference
#include "stdafx.h"
#include "ConsoleHelper.h"
#include "stringex.h"
Include dependency graph for vcDppConsole.cpp:

Go to the source code of this file.

Functions

void | ConnectToDefaultDPP ()
void | GetDppStatus ()
void | ReadDppConfigurationFromHardware (bool bDisplayCfg)
void | DisplayPresets ()
void | SendPresetAcquisitionTime (string strPRET)
void | AcquireSpectrum ()
void | ReadConfigFile ()
bool | SendCommandString (string strCMD)
std::string | ShortenCfgCmds (std::string strCfgIn)
bool | SendConfigFileToDpp (string strFilename)
void | CloseConnection ()
void | SaveSpectrumConfig ()
void | SaveSpectrumFile ()
int | _tmain (int argc, _TCHAR *argv[])

Variables

CConsoleHelper chdpp
bool | bRunSpectrumTest = false
bool | bRunConfigurationTest = false
bool | bHaveStatusResponse = false
bool | bHaveConfigFromHW = false

Function Documentation

int _tmain | ( | int | argc,
 |  | _TCHAR * | argv[]
 | ) |  |

_tmain

Definition at line 310 of file vcDppConsole.cpp.

Here is the call graph for this function:

void AcquireSpectrum ( )

Definition at line 139 of file vcDppConsole.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void CloseConnection ( )

Definition at line 275 of file vcDppConsole.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void ConnectToDefaultDPP ( )

Definition at line 17 of file vcDppConsole.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void DisplayPresets ( )

Definition at line 103 of file vcDppConsole.cpp.

Here is the caller graph for this function:

void GetDppStatus ( )

Definition at line 37 of file vcDppConsole.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void ReadConfigFile ( )

Definition at line 181 of file vcDppConsole.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void ReadDppConfigurationFromHardware ( bool bDisplayCfg )

Definition at line 68 of file vcDppConsole.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void SaveSpectrumConfig ( )

Definition at line 286 of file vcDppConsole.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void SaveSpectrumFile ( )

Definition at line 295 of file vcDppConsole.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool SendCommandString ( string strCMD )

Definition at line 196 of file vcDppConsole.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool SendConfigFileToDpp ( string strFilename )

Definition at line 226 of file vcDppConsole.cpp.

Here is the call graph for this function:

void SendPresetAcquisitionTime ( string strPRET )

Definition at line 116 of file vcDppConsole.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

std::string ShortenCfgCmds ( std::string strCfgIn )

Definition at line 210 of file vcDppConsole.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Variable Documentation

bool bHaveConfigFromHW = false

Definition at line 13 of file vcDppConsole.cpp.

bool bHaveStatusResponse = false

Definition at line 12 of file vcDppConsole.cpp.

bool bRunConfigurationTest = false

Definition at line 11 of file vcDppConsole.cpp.

bool bRunSpectrumTest = false

Definition at line 10 of file vcDppConsole.cpp.

CConsoleHelper chdpp

Definition at line 9 of file vcDppConsole.cpp.

Generated on Thu Sep 21 2017 16:01:13 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: vcDppConsole.cpp Source File

  • File List
  • File Members
vcDppConsole.cpp
Go to the documentation of this file.
00001
00003 // vcDppConsole.cpp : Defines the entry point for the console application.
00004 #include "stdafx.h"
00005 using namespace std;
00006 #include "ConsoleHelper.h"
00007 #include "stringex.h"
00008
00009 CConsoleHelper chdpp;                                   // DPP communications functions
00010 bool bRunSpectrumTest = false;                  // run spectrum test
00011 bool bRunConfigurationTest = false;             // run configuration test
00012 bool bHaveStatusResponse = false;               // have status response
00013 bool bHaveConfigFromHW = false;                 // have configuration from hardware
00014
00015 // connect to default dpp
00016 //              CConsoleHelper::WinUSB_Connect_Default_DPP      // WinUSB connect to default DPP
00017 void ConnectToDefaultDPP()
00018 {
00019         cout << endl;
00020         cout << "Running DPP WinUSB tests from console..." << endl;
00021         cout << endl;
00022         cout << "\tConnecting to default WinUSB device..." << endl;
00023         if (chdpp.WinUSB_Connect_Default_DPP()) {
00024                 cout << "\t\tWinUSB DPP device connected." << endl;
00025                 cout << "\t\tWinUSB DPP devices present: "  << chdpp.WinUSB_NumDevices << endl;
00026         } else {
00027                 cout << "\t\tWinUSB DPP device not connected." << endl;
00028                 cout << "\t\tNo WinUSB DPP device present." << endl;
00029         }
00030 }
00031
00032 // Get DPP Status
00033 //              CConsoleHelper::WinUSB_isConnected                                              // check if DPP is connected
00034 //              CConsoleHelper::WinUSB_SendCommand(XMTPT_SEND_STATUS)   // request status
00035 //              CConsoleHelper::WinUSB_ReceiveData()                                    // parse the status
00036 //              CConsoleHelper::DppStatusString                                                 // display status string
00037 void GetDppStatus()
00038 {
00039         if (chdpp.WinUSB_isConnected) { // send and receive status
00040                 cout << endl;
00041                 cout << "\tRequesting Status..." << endl;
00042                 if (chdpp.WinUSB_SendCommand(XMTPT_SEND_STATUS)) {      // request status
00043                         cout << "\t\tStatus sent." << endl;
00044                         cout << "\t\tReceiving status..." << endl;
00045                         if (chdpp.WinUSB_ReceiveData()) {
00046                                 cout << "\t\t\tStatus received..." << endl;
00047                                 cout << chdpp.DppStatusString << endl;
00048                                 bRunSpectrumTest = true;
00049                                 bHaveStatusResponse = true;
00050                                 bRunConfigurationTest = true;
00051                         } else {
00052                                 cout << "\t\tError receiving status." << endl;
00053                         }
00054                 } else {
00055                         cout << "\t\tError sending status." << endl;
00056                 }
00057         }
00058 }
00059
00060 // Read Full DPP Configuration From Hardware                    // request status before sending/receiving configurations
00061 //              CONFIG_OPTIONS                                                                  // holds configuration command options
00062 //              CConsoleHelper::CreateConfigOptions                             // creates configuration options from last status read
00063 //      CConsoleHelper::ClearConfigReadFormatFlags();   // clear configuration format flags, for cfg readback
00064 //      CConsoleHelper::CfgReadBack = true;                             // requesting general readback format
00065 //              CConsoleHelper::WinUSB_SendCommand_Config               // send command with options
00066 //              CConsoleHelper::WinUSB_ReceiveData()                    // parse the configuration
00067 //              CConsoleHelper::HwCfgReady                                              // config is ready
00068 void ReadDppConfigurationFromHardware(bool bDisplayCfg)
00069 {
00070         CONFIG_OPTIONS CfgOptions;
00071         if (bHaveStatusResponse && bRunConfigurationTest) {
00072                 //test configuration functions
00073                 // Set options for XMTPT_FULL_READ_CONFIG_PACKET
00074                 chdpp.CreateConfigOptions(&CfgOptions, "", chdpp.DP5Stat, false);
00075                 cout << endl;
00076                 cout << "\tRequesting Full Configuration..." << endl;
00077                 chdpp.ClearConfigReadFormatFlags();     // clear all flags, set flags only for specific readback properties
00078                 //chdpp.DisplayCfg = false;     // DisplayCfg format overrides general readback format
00079                 chdpp.CfgReadBack = true;       // requesting general readback format
00080                 if (chdpp.WinUSB_SendCommand_Config(XMTPT_FULL_READ_CONFIG_PACKET, CfgOptions)) {       // request full configuration
00081                         if (chdpp.WinUSB_ReceiveData()) {
00082                                 if (chdpp.HwCfgReady) {         // config is ready
00083                                         bHaveConfigFromHW = true;
00084                                         if (bDisplayCfg) {
00085                                                 cout << "\t\t\tConfiguration Length: " << (unsigned int)chdpp.HwCfgDP5.length() << endl;
00086                                                 cout << "\t================================================================" << endl;
00087                                                 cout << chdpp.HwCfgDP5 << endl;
00088                                                 cout << "\t================================================================" << endl;
00089                                                 cout << "\t\t\tScroll up to see configuration settings." << endl;
00090                                                 cout << "\t================================================================" << endl;
00091                                         } else {
00092                                                 cout << "\t\tFull configuration received." << endl;
00093                                         }
00094                                 }
00095                         }
00096                 }
00097         }
00098 }
00099
00100 // Display Preset Settings
00101 //              CConsoleHelper::strPresetCmd    // preset mode
00102 //              CConsoleHelper::strPresetVal    // preset setting
00103 void DisplayPresets()
00104 {
00105         if (bHaveConfigFromHW) {
00106                 cout << "\t\t\tPreset Mode: " << chdpp.strPresetCmd << endl;
00107                 cout << "\t\t\tPreset Settings: " << chdpp.strPresetVal << endl;
00108         }
00109 }
00110
00111 // Display Preset Settings
00112 //              CONFIG_OPTIONS                                                          // holds configuration command options
00113 //              CConsoleHelper::CreateConfigOptions                     // creates configuration options from last status read
00114 //              CConsoleHelper::HwCfgDP5Out                                     // preset setting
00115 //              CConsoleHelper::WinUSB_SendCommand_Config       // send command with options
00116 void SendPresetAcquisitionTime(string strPRET)
00117 {
00118         CONFIG_OPTIONS CfgOptions;
00119         cout << "\tSetting Preset Acquisition Time..." << strPRET << endl;
00120         chdpp.CreateConfigOptions(&CfgOptions, "", chdpp.DP5Stat, false);
00121         CfgOptions.HwCfgDP5Out = strPRET;
00122         // send PresetAcquisitionTime string, bypass any filters, read back the mode and settings
00123         if (chdpp.WinUSB_SendCommand_Config(XMTPT_SEND_CONFIG_PACKET_EX, CfgOptions)) {
00124                 ReadDppConfigurationFromHardware(false);        // read setting back
00125                 DisplayPresets();                                                       // display new presets
00126         } else {
00127                 cout << "\t\tPreset Acquisition Time NOT SET" << strPRET << endl;
00128         }
00129 }
00130
00131 // Acquire Spectrum
00132 //              CConsoleHelper::WinUSB_SendCommand(XMTPT_DISABLE_MCA_MCS)               //disable for data/status clear
00133 //              CConsoleHelper::WinUSB_SendCommand(XMTPT_SEND_CLEAR_SPECTRUM_STATUS)  //clear spectrum/status
00134 //              CConsoleHelper::WinUSB_SendCommand(XMTPT_ENABLE_MCA_MCS);               // enabling MCA for spectrum acquisition
00135 //              CConsoleHelper::WinUSB_SendCommand(XMTPT_SEND_SPECTRUM_STATUS)) // request spectrum+status
00136 //              CConsoleHelper::WinUSB_ReceiveData()                                                    // process spectrum and data
00137 //              CConsoleHelper::ConsoleGraph()  (low resolution display)                // graph data on console with status
00138 //              CConsoleHelper::WinUSB_SendCommand(XMTPT_DISABLE_MCA_MCS)               // disable mca after acquisition
00139 void AcquireSpectrum()
00140 {
00141         int MaxMCA = 11;
00142         bool bDisableMCA;
00143
00144         //bRunSpectrumTest = false;             // disable test
00145         if (bRunSpectrumTest) {
00146                 cout << "\tRunning spectrum test..." << endl;
00147                 cout << "\t\tDisabling MCA for spectrum data/status clear." << endl;
00148                 chdpp.WinUSB_SendCommand(XMTPT_DISABLE_MCA_MCS);
00149                 Sleep(1000);
00150                 cout << "\t\tClearing spectrum data/status." << endl;
00151                 chdpp.WinUSB_SendCommand(XMTPT_SEND_CLEAR_SPECTRUM_STATUS);
00152                 Sleep(1000);
00153                 cout << "\t\tEnabling MCA for spectrum data acquisition with status ." << endl;
00154                 chdpp.WinUSB_SendCommand(XMTPT_ENABLE_MCA_MCS);
00155                 Sleep(1000);
00156                 for(int idxSpectrum=0;idxSpectrum<MaxMCA;idxSpectrum++) {
00157                         //cout << "\t\tAcquiring spectrum data set " << (idxSpectrum+1) << " of " << MaxMCA << endl;
00158                         if (chdpp.WinUSB_SendCommand(XMTPT_SEND_SPECTRUM_STATUS)) {     // request spectrum+status
00159                                 if (chdpp.WinUSB_ReceiveData()) {
00160                                         bDisableMCA = true;                             // we are aquiring data, disable mca when done
00161                                         system("cls");
00162                                         chdpp.ConsoleGraph(chdpp.DP5Proto.SPECTRUM.DATA,chdpp.DP5Proto.SPECTRUM.CHANNELS,true,chdpp.DppStatusString);
00163                                         Sleep(2000);
00164                                 }
00165                         } else {
00166                                 cout << "\t\tProblem acquiring spectrum." << endl;
00167                                 break;
00168                         }
00169                 }
00170                 if (bDisableMCA) {
00171                         //system("Pause");
00172                         //cout << "\t\tSpectrum acquisition with status done. Disabling MCA." << endl;
00173                         chdpp.WinUSB_SendCommand(XMTPT_DISABLE_MCA_MCS);
00174                         Sleep(1000);
00175                 }
00176         }
00177 }
00178
00179 // Read Configuration File
00180 //              CConsoleHelper::SndCmd.GetDP5CfgStr("PX5_Console_Test.txt");
00181 void ReadConfigFile()
00182 {
00183         std::string strCfg;
00184         strCfg = chdpp.SndCmd.AsciiCmdUtil.GetDP5CfgStr("PX5_Console_Test.txt");
00185         cout << "\t\t\tConfiguration Length: " << (unsigned int)strCfg.length() << endl;
00186         cout << "\t================================================================" << endl;
00187         cout << strCfg << endl;
00188         cout << "\t================================================================" << endl;
00189 }
00190
00191 //Following is an example of loading a configuration from file
00192 //then sending the configuration to the DPP device.
00193 //      SendConfigFileToDpp("NaI_detector_cfg.txt");    // calls SendCommandString
00194 //      AcquireSpectrum();
00195 //
00196 bool SendCommandString(string strCMD) {
00197     CONFIG_OPTIONS CfgOptions;
00198     chdpp.CreateConfigOptions(&CfgOptions, "", chdpp.DP5Stat, false);
00199     CfgOptions.HwCfgDP5Out = strCMD;
00200     // send ASCII command string, bypass any filters, read back the mode and settings
00201     if (chdpp.WinUSB_SendCommand_Config(XMTPT_SEND_CONFIG_PACKET_EX, CfgOptions)) {
00202         // command sent
00203     } else {
00204         cout << "\t\tASCII Command String NOT SENT" << strCMD << endl;
00205         return false;
00206     }
00207     return true;
00208 }
00209
00210 std::string ShortenCfgCmds(std::string strCfgIn) {
00211     std::string strCfg("");
00212         strCfg = strCfgIn;
00213         long lCfgLen=0;                                         //ASCII Configuration Command String Length
00214     lCfgLen = (long)strCfg.length();
00215         if (lCfgLen > 0) {
00216         strCfg = chdpp.SndCmd.AsciiCmdUtil.ReplaceCmdText(strCfg, "US;", ";");
00217         strCfg = chdpp.SndCmd.AsciiCmdUtil.ReplaceCmdText(strCfg, "OFF;", "OF;");
00218         strCfg = chdpp.SndCmd.AsciiCmdUtil.ReplaceCmdText(strCfg, "RISING;", "RI;");
00219         strCfg = chdpp.SndCmd.AsciiCmdUtil.ReplaceCmdText(strCfg, "FALLING;", "FA;");
00220         }
00221         return strCfg;
00222 }
00223
00224 // run GetDppStatus(); first to get PC5_PRESENT, DppType
00225 // Includes Configuration Oversize Fix 20141224
00226 bool SendConfigFileToDpp(string strFilename){
00227     std::string strCfg;
00228         long lCfgLen=0;                                         //ASCII Configuration Command String Length
00229     bool bCommandSent=false;
00230         bool isPC5Present=false;
00231         int DppType=0;
00232         int idxSplitCfg=0;                                      //Configuration split position, only if necessary
00233         bool bSplitCfg=false;                           //Configuration split flag
00234         std::string strSplitCfg("");            //Configuration split string second buffer
00235         bool isDP5_RevDxGains;
00236         unsigned char DPP_ECO;
00237
00238         isPC5Present = chdpp.DP5Stat.m_DP5_Status.PC5_PRESENT;
00239         DppType = chdpp.DP5Stat.m_DP5_Status.DEVICE_ID;
00240         isDP5_RevDxGains = chdpp.DP5Stat.m_DP5_Status.isDP5_RevDxGains;
00241         DPP_ECO = chdpp.DP5Stat.m_DP5_Status.DPP_ECO;
00242
00243     strCfg = chdpp.SndCmd.AsciiCmdUtil.GetDP5CfgStr(strFilename);
00244         strCfg = chdpp.SndCmd.AsciiCmdUtil.RemoveCmdByDeviceType(strCfg,isPC5Present,DppType,isDP5_RevDxGains,DPP_ECO);
00245     lCfgLen = (long)strCfg.length();
00246     if ((lCfgLen > 0) && (lCfgLen <= 512)) {            // command length ok
00247         cout << "\t\t\tConfiguration Length: " << lCfgLen << endl;
00248     } else if (lCfgLen > 512) { // configuration too large, needs fix
00249                 cout << "\t\t\tConfiguration Length (Will Shorten): " << lCfgLen << endl;
00250                 strCfg = ShortenCfgCmds(strCfg);
00251                 lCfgLen = (long)strCfg.length();
00252                 if (lCfgLen > 512) {    // configuration still too large, split config
00253                         cout << "\t\t\tConfiguration Length (Will Split): " << lCfgLen << endl;
00254             bSplitCfg = true;
00255             idxSplitCfg = chdpp.SndCmd.AsciiCmdUtil.GetCmdChunk(strCfg);
00256                         cout << "\t\t\tConfiguration Split at: " << idxSplitCfg << endl;
00257             strSplitCfg = strCfg.substr(idxSplitCfg);
00258                         strCfg = strCfg.substr(0, idxSplitCfg);
00259                 }
00260     } else {
00261         cout << "\t\t\tConfiguration Length Error: " << lCfgLen << endl;
00262         return false;
00263     }
00264         bCommandSent = SendCommandString(strCfg);
00265         if (bSplitCfg) {
00266                 // Sleep(40);                   // may need delay here
00267                 bCommandSent = SendCommandString(strSplitCfg);
00268         }
00269     return bCommandSent;
00270 }
00271
00272 // Close Connection
00273 //              CConsoleHelper::WinUSB_isConnected                      // WinUSB DPP connection indicator
00274 //              CConsoleHelper::WinUSB_Close_Connection()       // close connection
00275 void CloseConnection()
00276 {
00277         if (chdpp.WinUSB_isConnected) { // send and receive status
00278                 cout << endl;
00279                 cout << "\tClosing connection to default WinUSB device..." << endl;
00280                 chdpp.WinUSB_Close_Connection();
00281                 cout << "\t\tDPP device connection closed." << endl;
00282         }
00283 }
00284
00285 // Helper functions for saving spectrum files
00286 void SaveSpectrumConfig()
00287 {
00288         string strSpectrumConfig;
00289         chdpp.Dp5CmdList = chdpp.MakeDp5CmdList();      // ascii text command list for adding comments
00290         strSpectrumConfig = chdpp.CreateSpectrumConfig(chdpp.HwCfgDP5); // append configuration comments
00291         chdpp.sfInfo.strSpectrumConfig = strSpectrumConfig;
00292 }
00293
00294 // Saving spectrum file
00295 void SaveSpectrumFile()
00296 {
00297         string strSpectrum;                                                                                     // holds final spectrum file
00298         chdpp.sfInfo.strSpectrumStatus = chdpp.DppStatusString;         // save last status after acquisition
00299         chdpp.sfInfo.m_iNumChan = chdpp.mcaCH;                                          // number channels in spectrum
00300         chdpp.sfInfo.SerialNumber = chdpp.DP5Stat.m_DP5_Status.SerialNumber;    // dpp serial number
00301         chdpp.sfInfo.strDescription = "Amptek Spectrum File";                                   // description
00302     chdpp.sfInfo.strTag = "TestTag";                                                                            // tag
00303         // create spectrum file, save file to string
00304     strSpectrum = chdpp.CreateMCAData(chdpp.DP5Proto.SPECTRUM.DATA,chdpp.sfInfo,chdpp.DP5Stat.m_DP5_Status);
00305         chdpp.SaveSpectrumStringToFile(strSpectrum);    // save spectrum file string to file
00306 }
00307
00310 int _tmain(int argc, _TCHAR* argv[])
00311 {
00312
00313         system("cls");
00314         ConnectToDefaultDPP();
00315         system("Pause");
00316
00317         if(!chdpp.WinUSB_isConnected) { return 1; }
00318
00319         system("cls");
00320         chdpp.DP5Stat.m_DP5_Status.SerialNumber = 0;
00321         GetDppStatus();
00322         system("Pause");
00323
00324         if (chdpp.DP5Stat.m_DP5_Status.SerialNumber == 0) { return 1; }
00325
00329
00330         system("cls");
00331         ReadDppConfigurationFromHardware(true);
00332         system("Pause");
00333
00334         system("cls");
00335         DisplayPresets();
00336         system("Pause");
00337
00338         system("cls");
00339         SendPresetAcquisitionTime("PRET=20;");
00340         SaveSpectrumConfig();
00341         system("Pause");
00342
00343         system("cls");
00344         AcquireSpectrum();
00345         SaveSpectrumFile();
00346         system("Pause");
00347
00348         system("cls");
00349         SendPresetAcquisitionTime("PRET=OFF;");
00350         system("Pause");
00351
00352         system("cls");
00353         ReadConfigFile();
00354         system("Pause");
00355
00356         system("cls");
00357         CloseConnection();
00358         system("Pause");
00359
00360         return 0;
00361 }
00362
00363
00364
00365
00366
00367
00368
00369
00370
00371
00372
00373
00374
00375
00376
00377
00378
00379
00380
00381
00382
Generated on Thu Sep 21 2017 16:01:13 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: DeviceIO/AsciiCmdUtilities.cpp File Reference

  • File List
  • File Members
DeviceIO/AsciiCmdUtilities.cpp File Reference
#include "AsciiCmdUtilities.h"
Include dependency graph for AsciiCmdUtilities.cpp:

Go to the source code of this file.

Generated on Thu Sep 21 2017 16:01:13 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: DeviceIO/AsciiCmdUtilities.cpp Source File

  • File List
  • File Members
DeviceIO/AsciiCmdUtilities.cpp
Go to the documentation of this file.
00001 #include "AsciiCmdUtilities.h"
00002
00003 CAsciiCmdUtilities::CAsciiCmdUtilities(void)
00004 {
00005 }
00006
00007 CAsciiCmdUtilities::~CAsciiCmdUtilities(void)
00008 {
00009 }
00010
00011 string CAsciiCmdUtilities::MakeUpper(string StdString)
00012 {
00013   const int length = (int)StdString.length();
00014   for(int i=0; i<length ; ++i)
00015   {
00016     StdString[i] = std::toupper(StdString[i]);
00017   }
00018   return StdString;
00019 }
00020
00021 string CAsciiCmdUtilities::RemWhitespace(string strLine)
00022 {
00023         unsigned int idxCh;
00024         string strCh;
00025         string strNoWSp;
00026
00027         strNoWSp = "";
00028         if (strLine.find_first_of(Whitespace, 0) == std::string::npos) {                // string has no whitespace
00029                 return strLine;
00030         } else {                        // remove whitespace
00031                 for (idxCh=0;idxCh<strLine.length();idxCh++) {
00032                         strCh = strLine.substr(idxCh,1);
00033                         if (strCh.find_first_of(Whitespace, 0) == std::string::npos) {          // char is not whitespace
00034                                 strNoWSp += strCh;
00035                         }
00036                 }
00037                 return strNoWSp;
00038         }
00039 }
00040
00041 //read and format [DP5 Configuration File]
00042 string CAsciiCmdUtilities::GetDP5CfgStr(string strFilename)
00043 {
00044         FILE *txtFile;
00045         char chLine[LINE_MAX];
00046         string strCfg;
00047         string strLine;
00048         long lPos;
00049         char ch;
00050         bool bCfgSection;
00051         int iCmpCfg;
00052         long lPosCfg;
00053         stringex strfn;
00054
00055         bCfgSection = false;
00056         iCmpCfg = 1;
00057         if (( txtFile = fopen(strFilename.c_str(), "r")) == NULL) {  // Can't open input file
00058                 return "";
00059         }
00060         strCfg = "";
00061         while((fgets(chLine, LINE_MAX, txtFile)) != NULL) {
00062                 strLine = strfn.Format("%s",chLine);
00063                 lPosCfg = (long)strLine.find('[');                              // find a section (-1=not found,0=section found,>0=undefined)
00064                 if (lPosCfg == 0) {                                                             // Locate DP5 Configuration Section
00065                         iCmpCfg = (long)strLine.find("[DP5 Configuration File]");
00066                         if (iCmpCfg == 0) {                                                     // Configuration Section Found
00067                                 bCfgSection = true;
00068                         } else {                                                                        // Non-Configuration Section Found
00069                                 bCfgSection = false;
00070                         }
00071                 }
00072                 if (bCfgSection) {                                                              // Save Configuration Section Only
00073                         strLine = MakeUpper(strLine);                           // make all uppercase
00074                         lPos = (long)strLine.find(';');                         // find the delimiter (-1=not found,0=commented line)
00075                         if (lPos > 0) {                                                         // if has delimiter that is not first char
00076                                 strLine = strLine.substr(0,lPos + 1);   // remove string right of delimiter
00077                                 ch = strLine.at(0);
00078                                 if ((ch >= 'A') && (ch <= 'Z')) {               // if is valid value
00079                                         strLine = RemWhitespace(strLine);       // remove whitespace in command sequence
00080                                         if (strLine.length() > 1) {                     // check if command w/delimiter left
00081                                                 strCfg += strLine;                              // add to command string
00082                                         }
00083                                 }
00084                         }
00085                 }
00086                 strLine = "";
00087         }
00088         fclose(txtFile);
00089         if (strCfg.length() > 0) {
00090                 return strCfg;
00091         } else {
00092                 return "";
00093         }
00094 }
00095
00096 //read and format [DP5 SCA Configuration]
00097 string CAsciiCmdUtilities::GetDP5ScaStr(string strFilename)
00098 {
00099         FILE *txtFile;
00100         char chLine[LINE_MAX];
00101         string strCfg;
00102         string strLine;
00103         long lPos;
00104         char ch;
00105         bool bCfgSection;
00106         int iCmpCfg;
00107         long lPosCfg;
00108         stringex strfn;
00109         char chScaOld;
00110         char chSCA;
00111         int iScaBytes;
00112         string strScaIdx;
00113         string strScaCmd = "";
00114
00115         bCfgSection = false;
00116         iCmpCfg = 1;
00117         if (( txtFile = fopen(strFilename.c_str(), "r")) == NULL) {  // Can't open input file
00118                 return "";
00119         }
00120         chScaOld = '0';
00121         chSCA = '9';
00122         strCfg = "";
00123         while((fgets(chLine, LINE_MAX, txtFile)) != NULL) {
00124                 strLine = strfn.Format("%s",chLine);
00125                 lPosCfg = (long)strLine.find('[');                              // find a section (-1=not found,0=section found,>0=undefined)
00126                 if (lPosCfg == 0) {                                                             // Locate DP5 Configuration Section
00127                         iCmpCfg = (long)strLine.find("[DP5 SCA Configuration]");
00128                         if (iCmpCfg == 0) {                                                     // Configuration Section Found
00129                                 bCfgSection = true;
00130                         } else {                                                                        // Non-Configuration Section Found
00131                                 bCfgSection = false;
00132                         }
00133                 }
00134                 if (bCfgSection) {                                                              // Save Configuration Section Only
00135                         strLine = MakeUpper(strLine);                           // make all uppercase
00136                         lPos = (long)strLine.find(';');                         // find the delimiter (-1=not found,0=commented line)
00137                         if (lPos > 0) {                                                         // if has delimiter that is not first char
00138                                 strLine = strLine.substr(0,lPos + 1);   // remove string right of delimiter
00139                                 ch = strLine.at(0);
00140                                 if ((ch >= 'A') && (ch <= 'Z')) {               // if is valid value
00141                                         strLine = RemWhitespace(strLine);       // remove whitespace in command sequence
00142                                         if (strLine.length() > 1) {                     // check if command w/delimiter left
00143                                                 //strCfg += strLine;                            // add to command string
00144                                                 //strcat(strCfg,chLine);                                // add to command string
00145                                                 chSCA = strLine.at(4);                          // determine SCA Index
00146                                                 // remove index from SCA Command to create DPP ASCII Command format
00147                                                 if ((chSCA > '0') && (chSCA < '9')) {
00148                                                         if (chSCA != chScaOld) {                // Is same as current index?
00149                                                                 chScaOld = chSCA;                       // if no, save current index
00150                                                                 // insert index command into string (SCAI=%c;)
00151                                                                 strScaIdx = strfn.Format("SCAI=%c;",chSCA);
00152                                                                 strCfg += strScaIdx;                            // add sca index command to string
00153                                                                 strScaIdx = "";
00154                                                         }
00155                                                         strScaCmd = strLine.substr(0,4);
00156                                                         for (iScaBytes=5;iScaBytes<=lPos;iScaBytes++) {
00157                                                                 strScaCmd += strLine.at(iScaBytes);
00158                                                         }
00159                                                         strCfg += strScaCmd;                            // add to command string
00160                                                 } else {        // no index to remove, cmd was saved with SCAI command
00161                                                         strCfg += strLine;                                      // add to command string
00162                                                 }
00163                                         }
00164                                 }
00165                         }
00166                 }
00167                 strLine = "";
00168         }
00169         fclose(txtFile);
00170         if (strCfg.length() > 0) {
00171                 return strCfg;
00172         } else {
00173                 return "";
00174         }
00175 }
00176
00177 string CAsciiCmdUtilities::CreateResTestReadBackCmd(bool bSendCoarseFineGain, int DppType)
00178 {
00179         string strCfg("");
00180     bool isINOF;
00181
00182     isINOF = (DppType != dppDP5G) && (DppType != dppTB5);
00183         strCfg = "";
00184         strCfg += "CLCK=?;";
00185         strCfg += "TPEA=?;";
00186         if (bSendCoarseFineGain) { strCfg += "GAIF=?;"; }
00187         if (!bSendCoarseFineGain) { strCfg += "GAIN=?;"; }
00188         strCfg += "RESL=?;";
00189         strCfg += "TFLA=?;";
00190         strCfg += "TPFA=?;";
00191         strCfg += "PURE=?;";
00192         strCfg += "RTDE=?;";
00193         strCfg += "MCAS=?;";
00194         strCfg += "MCAC=?;";
00195         strCfg += "SOFF=?;";
00196         strCfg += "AINP=?;";
00197         if (isINOF) { strCfg += "INOF=?;"; }
00198         if (bSendCoarseFineGain) { strCfg += "GAIA=?;"; }
00199         return strCfg;
00200 }
00201
00202 string CAsciiCmdUtilities::CreateFullReadBackCmd(bool PC5_PRESENT, int DppType, bool isDP5_RevDxGains, unsigned char DPP_ECO)
00203 {
00204         string strCfg("");
00205     bool isHVSE;
00206     bool isPAPS;
00207     bool isTECS;
00208     bool isVOLU;
00209         bool isCON1;
00210         bool isCON2;
00211     bool isINOF;
00212     bool isBOOT;
00213         bool isGATE;
00214     bool isPAPZ;
00215         bool isSCTC;
00216         bool isDP5_DxK=false;
00217         bool isDP5_DxL=false;
00218
00219         if (DppType == dppMCA8000D) {
00220                 strCfg = CreateFullReadBackCmdMCA8000D(DppType);
00221                 return strCfg;
00222         }
00223
00224         // DP5 Rev Dx K,L needs PAPZ
00225         if ((DppType == dppDP5) && isDP5_RevDxGains) {
00226                 if ((DPP_ECO & 0x0F) == 0x0A) {
00227                         isDP5_DxK = true;
00228                 }
00229                 if ((DPP_ECO & 0x0F) == 0x0B) {
00230                         isDP5_DxL = true;
00231                 }
00232         }
00233
00234     isHVSE = (((DppType != dppPX5) && PC5_PRESENT) || DppType == dppPX5);
00235     isPAPS = (DppType != dppDP5G) && (DppType != dppTB5);
00236     isTECS = (((DppType == dppDP5) && PC5_PRESENT) || (DppType == dppPX5) || (DppType == dppDP5X));
00237     isVOLU = (DppType == dppPX5);
00238     isCON1 = ((DppType != dppDP5) && (DppType != dppDP5X));
00239     isCON2 = ((DppType != dppDP5) && (DppType != dppDP5X));
00240     isINOF = (DppType != dppDP5G) && (DppType != dppTB5);
00241     isSCTC = (DppType == dppDP5G) || (DppType == dppTB5);
00242     isBOOT = ((DppType == dppDP5) || (DppType == dppDP5X));
00243         isGATE = ((DppType == dppDP5) || (DppType == dppDP5X));
00244         isPAPZ = (DppType == dppPX5) || isDP5_DxK || isDP5_DxL;
00245
00246         strCfg = "";
00247         strCfg += "RESC=?;";
00248         strCfg += "CLCK=?;";
00249         strCfg += "TPEA=?;";
00250         strCfg += "GAIF=?;";
00251         strCfg += "GAIN=?;";
00252         strCfg += "RESL=?;";
00253         strCfg += "TFLA=?;";
00254         strCfg += "TPFA=?;";
00255         strCfg += "PURE=?;";
00256         if (isSCTC) { strCfg += "SCTC=?;"; }
00257         strCfg += "RTDE=?;";
00258         strCfg += "MCAS=?;";
00259         strCfg += "MCAC=?;";
00260         strCfg += "SOFF=?;";
00261         strCfg += "AINP=?;";
00262         if (isINOF) { strCfg += "INOF=?;"; }
00263         strCfg += "GAIA=?;";
00264         strCfg += "CUSP=?;";
00265         strCfg += "PDMD=?;";
00266         strCfg += "THSL=?;";
00267         strCfg += "TLLD=?;";
00268         strCfg += "THFA=?;";
00269         strCfg += "DACO=?;";
00270         strCfg += "DACF=?;";
00271         strCfg += "RTDS=?;";
00272         strCfg += "RTDT=?;";
00273         strCfg += "BLRM=?;";
00274         strCfg += "BLRD=?;";
00275         strCfg += "BLRU=?;";
00276         if (isGATE) { strCfg += "GATE=?;"; }
00277         strCfg += "AUO1=?;";
00278         strCfg += "PRET=?;";
00279         strCfg += "PRER=?;";
00280         strCfg += "PREC=?;";
00281         strCfg += "PRCL=?;";
00282         strCfg += "PRCH=?;";
00283         if (isHVSE) { strCfg += "HVSE=?;"; }
00284         if (isTECS) { strCfg += "TECS=?;"; }
00285         if (isPAPZ) { strCfg += "PAPZ=?;"; }
00286         if (isPAPS) { strCfg += "PAPS=?;"; }
00287         strCfg += "SCOE=?;";
00288         strCfg += "SCOT=?;";
00289         strCfg += "SCOG=?;";
00290         strCfg += "MCSL=?;";
00291         strCfg += "MCSH=?;";
00292         strCfg += "MCST=?;";
00293         strCfg += "AUO2=?;";
00294         strCfg += "TPMO=?;";
00295         strCfg += "GPED=?;";
00296         strCfg += "GPIN=?;";
00297         strCfg += "GPME=?;";
00298         strCfg += "GPGA=?;";
00299         strCfg += "GPMC=?;";
00300         strCfg += "MCAE=?;";
00301         if (isVOLU) { strCfg += "VOLU=?;"; }
00302         if (isCON1) { strCfg += "CON1=?;"; }
00303         if (isCON2) { strCfg += "CON2=?;"; }
00304         if (isBOOT) { strCfg += "BOOT=?;"; }
00305         return strCfg;
00306 }
00307
00308 string CAsciiCmdUtilities::CreateFullReadBackCmdMCA8000D(int DppType)
00309 {
00310         string strCfg("");
00311
00312         if (DppType == dppMCA8000D) {
00313                 strCfg += "RESC=?;";
00314                 strCfg += "PURE=?;";
00315                 strCfg += "MCAS=?;";
00316                 strCfg += "MCAC=?;";
00317                 strCfg += "SOFF=?;";
00318                 strCfg += "GAIA=?;";
00319                 strCfg += "PDMD=?;";
00320                 strCfg += "THSL=?;";
00321                 strCfg += "TLLD=?;";
00322                 strCfg += "GATE=?;";
00323                 strCfg += "AUO1=?;";
00324                 //strCfg += "PRET=?;";
00325                 strCfg += "PRER=?;";
00326                 strCfg += "PREL=?;";
00327                 strCfg += "PREC=?;";
00328                 strCfg += "PRCL=?;";
00329                 strCfg += "PRCH=?;";
00330                 strCfg += "SCOE=?;";
00331                 strCfg += "SCOT=?;";
00332                 strCfg += "SCOG=?;";
00333                 strCfg += "MCSL=?;";
00334                 strCfg += "MCSH=?;";
00335                 strCfg += "MCST=?;";
00336                 strCfg += "AUO2=?;";
00337                 strCfg += "GPED=?;";
00338                 strCfg += "GPIN=?;";
00339                 strCfg += "GPME=?;";
00340                 strCfg += "GPGA=?;";
00341                 strCfg += "GPMC=?;";
00342                 strCfg += "MCAE=?;";
00343                 //strCfg += "VOLU=?;";
00344                 //strCfg += "CON1=?;";
00345                 //strCfg += "CON2=?;";
00346                 strCfg += "PDMD=?;";
00347         }
00348         return strCfg;
00349 }
00350
00351 string CAsciiCmdUtilities::RemoveCmd(string strCmd, string strCfgData)
00352 {
00353         int iStart,iEnd,iCmd;
00354         string strNew;
00355
00356         strNew = "";
00357         if (strCfgData.length() < 7) { return strCfgData; }     // no data
00358         if (strCmd.length() != 4) {     return strCfgData; }            // bad command
00359         iCmd = (int)strCfgData.find(strCmd+"=",0);
00360         if (iCmd == -1) { return strCfgData; }                                          // cmd not found
00361         iStart = iCmd;
00362         iEnd = (int)strCfgData.find(";",iCmd);
00363         if (iEnd == -1) { return strCfgData; }                                          // end not found
00364         if (iEnd <= iStart) { return strCfgData; }                                      // unknown error
00365         strNew = strCfgData.substr(0,iStart) + strCfgData.substr(iEnd+1);
00366         return strNew;
00367 }
00368
00370 string CAsciiCmdUtilities::RemoveCmdByDeviceType(string strCfgDataIn, bool PC5_PRESENT, int DppType, bool isDP5_RevDxGains, unsigned char DPP_ECO)
00371 {
00372         string strCfgData;
00373     bool isHVSE;
00374     bool isPAPS;
00375     bool isTECS;
00376     bool isVOLU;
00377         bool isCON1;
00378         bool isCON2;
00379     bool isINOF;
00380     bool isBOOT;
00381         bool isGATE;
00382         bool isPAPZ;
00383         bool isSCTC;
00384         bool isPREL;
00385         bool isDP5_DxK=false;
00386         bool isDP5_DxL=false;
00387
00388         strCfgData = strCfgDataIn;
00389         if (DppType == dppMCA8000D) {
00390                 strCfgData = Remove_MCA8000D_Cmds(strCfgData,DppType);
00391                 return strCfgData;
00392         }
00393
00394         // DP5 Rev Dx K,L needs PAPZ
00395         if ((DppType == dppDP5) && isDP5_RevDxGains) {
00396                 if ((DPP_ECO & 0x0F) == 0x0A) {
00397                         isDP5_DxK = true;
00398                 }
00399                 if ((DPP_ECO & 0x0F) == 0x0B) {
00400                         isDP5_DxL = true;
00401                 }
00402         }
00403
00404     isHVSE = (((DppType != dppPX5) && PC5_PRESENT) || DppType == dppPX5);
00405     isPAPS = (DppType != dppDP5G) && (DppType != dppTB5);
00406     isTECS = (((DppType == dppDP5) && PC5_PRESENT) || (DppType == dppPX5) || (DppType == dppDP5X));
00407     isVOLU = (DppType == dppPX5);
00408     isCON1 = ((DppType != dppDP5) && (DppType != dppDP5X));
00409     isCON2 = ((DppType != dppDP5) && (DppType != dppDP5X));
00410     isINOF = (DppType != dppDP5G) && (DppType != dppTB5);
00411         isSCTC = (DppType == dppDP5G) || (DppType == dppTB5);
00412     isBOOT = ((DppType == dppDP5) || (DppType == dppDP5X));
00413         isGATE = ((DppType == dppDP5) || (DppType == dppDP5X));
00414         isPAPZ = (DppType == dppPX5) || isDP5_DxK || isDP5_DxL;
00415         isPREL = (DppType == dppMCA8000D);
00416         if (!isHVSE) { strCfgData = RemoveCmd("HVSE", strCfgData); }  //High Voltage Bias
00417         if (!isPAPS) { strCfgData = RemoveCmd("PAPS", strCfgData); }  //Preamp Voltage
00418         if (!isTECS) { strCfgData = RemoveCmd("TECS", strCfgData); }  //Cooler Temperature
00419         if (!isVOLU) { strCfgData = RemoveCmd("VOLU", strCfgData); }  //px5 speaker
00420         if (!isCON1) { strCfgData = RemoveCmd("CON1", strCfgData); }  //connector 1
00421         if (!isCON2) { strCfgData = RemoveCmd("CON2", strCfgData); }  //connector 2
00422         if (!isINOF) { strCfgData = RemoveCmd("INOF", strCfgData); }  //input offset
00423         if (!isBOOT) { strCfgData = RemoveCmd("BOOT", strCfgData); }  //PC5 On At StartUp
00424         if (!isGATE) { strCfgData = RemoveCmd("GATE", strCfgData); }  //Gate input
00425         if (!isPAPZ) { strCfgData = RemoveCmd("PAPZ", strCfgData); }  //Pole-Zero
00426         if (!isSCTC) { strCfgData = RemoveCmd("SCTC", strCfgData); }  //Scintillator Time Constant
00427         if (!isPREL) { strCfgData = RemoveCmd("PREL", strCfgData); }  //Preset Live Time
00428         return strCfgData;
00429 }
00430
00432 string CAsciiCmdUtilities::RemoveCmdByDeviceTypeDP5DxK(string strCfgDataIn, bool PC5_PRESENT, int DppType)
00433 {
00434         string strCfgData;
00435     bool isHVSE;
00436     bool isPAPS;
00437     bool isTECS;
00438     bool isVOLU;
00439         bool isCON1;
00440         bool isCON2;
00441     bool isINOF;
00442     bool isBOOT;
00443         bool isGATE;
00444         bool isPAPZ;
00445         bool isSCTC;
00446         bool isPREL;
00447
00448         strCfgData = strCfgDataIn;
00449         //if (DppType == dppMCA8000D) {
00450         //      strCfgData = Remove_MCA8000D_Cmds(strCfgData,DppType);
00451         //      return strCfgData;
00452         //}
00453     isHVSE = (((DppType != dppPX5) && PC5_PRESENT) || DppType == dppPX5);
00454     isPAPS = (DppType != dppDP5G) && (DppType != dppTB5);
00455     isTECS = (((DppType == dppDP5) && PC5_PRESENT) || (DppType == dppPX5) || (DppType == dppDP5X));
00456     isVOLU = (DppType == dppPX5);
00457     isCON1 = ((DppType != dppDP5) && (DppType != dppDP5X));
00458     isCON2 = ((DppType != dppDP5) && (DppType != dppDP5X));
00459     isINOF = (DppType != dppDP5G) && (DppType != dppTB5);
00460         isSCTC = (DppType == dppDP5G) || (DppType == dppTB5);
00461     isBOOT = ((DppType == dppDP5) || (DppType == dppDP5X));
00462         isGATE = ((DppType == dppDP5) || (DppType == dppDP5X));
00463         //isPAPZ = (DppType == dppPX5);         // DP5 Rev Dx K,L needs PAPZ
00464         isPAPZ = true;                                                  // DP5 Rev Dx K,L needs PAPZ
00465         isPREL = (DppType == dppMCA8000D);
00466         if (!isHVSE) { strCfgData = RemoveCmd("HVSE", strCfgData); }  //High Voltage Bias
00467         if (!isPAPS) { strCfgData = RemoveCmd("PAPS", strCfgData); }  //Preamp Voltage
00468         if (!isTECS) { strCfgData = RemoveCmd("TECS", strCfgData); }  //Cooler Temperature
00469         if (!isVOLU) { strCfgData = RemoveCmd("VOLU", strCfgData); }  //px5 speaker
00470         if (!isCON1) { strCfgData = RemoveCmd("CON1", strCfgData); }  //connector 1
00471         if (!isCON2) { strCfgData = RemoveCmd("CON2", strCfgData); }  //connector 2
00472         if (!isINOF) { strCfgData = RemoveCmd("INOF", strCfgData); }  //input offset
00473         if (!isBOOT) { strCfgData = RemoveCmd("BOOT", strCfgData); }  //PC5 On At StartUp
00474         if (!isGATE) { strCfgData = RemoveCmd("GATE", strCfgData); }  //Gate input
00475         if (!isPAPZ) { strCfgData = RemoveCmd("PAPZ", strCfgData); }  //Pole-Zero
00476         if (!isSCTC) { strCfgData = RemoveCmd("SCTC", strCfgData); }  //Scintillator Time Constant
00477         if (!isPREL) { strCfgData = RemoveCmd("PREL", strCfgData); }  //Preset Live Time
00478         return strCfgData;
00479 }
00480
00482 string CAsciiCmdUtilities::Remove_MCA8000D_Cmds(string strCfgDataIn, int DppType)
00483 {
00484         string strCfgData;
00485
00486         strCfgData = strCfgDataIn;
00487         if (DppType == dppMCA8000D) {
00488                 strCfgData = RemoveCmd("CLCK", strCfgData);
00489                 strCfgData = RemoveCmd("TPEA", strCfgData);
00490                 strCfgData = RemoveCmd("GAIF", strCfgData);
00491                 strCfgData = RemoveCmd("GAIN", strCfgData);
00492                 strCfgData = RemoveCmd("RESL", strCfgData);
00493                 strCfgData = RemoveCmd("TFLA", strCfgData);
00494                 strCfgData = RemoveCmd("TPFA", strCfgData);
00495                 //strCfgData = RemoveCmd("PURE", strCfgData);
00496                 strCfgData = RemoveCmd("RTDE", strCfgData);
00497                 strCfgData = RemoveCmd("AINP", strCfgData);
00498                 strCfgData = RemoveCmd("INOF", strCfgData);
00499                 strCfgData = RemoveCmd("CUSP", strCfgData);
00500                 strCfgData = RemoveCmd("THFA", strCfgData);
00501                 strCfgData = RemoveCmd("DACO", strCfgData);
00502                 strCfgData = RemoveCmd("DACF", strCfgData);
00503                 strCfgData = RemoveCmd("RTDS", strCfgData);
00504                 strCfgData = RemoveCmd("RTDT", strCfgData);
00505                 strCfgData = RemoveCmd("BLRM", strCfgData);
00506                 strCfgData = RemoveCmd("BLRD", strCfgData);
00507                 strCfgData = RemoveCmd("BLRU", strCfgData);
00508                 strCfgData = RemoveCmd("PRET", strCfgData);
00509                 strCfgData = RemoveCmd("HVSE", strCfgData);
00510                 strCfgData = RemoveCmd("TECS", strCfgData);
00511                 strCfgData = RemoveCmd("PAPZ", strCfgData);
00512                 strCfgData = RemoveCmd("PAPS", strCfgData);
00513                 strCfgData = RemoveCmd("TPMO", strCfgData);
00514                 strCfgData = RemoveCmd("SCAH", strCfgData);
00515                 strCfgData = RemoveCmd("SCAI", strCfgData);
00516                 strCfgData = RemoveCmd("SCAL", strCfgData);
00517                 strCfgData = RemoveCmd("SCAO", strCfgData);
00518                 strCfgData = RemoveCmd("SCAW", strCfgData);
00519                 strCfgData = RemoveCmd("BOOT", strCfgData);
00520
00521                 // added to list late, recheck at later date 20120817
00522                 strCfgData = RemoveCmd("CON1", strCfgData);
00523                 strCfgData = RemoveCmd("CON2", strCfgData);
00524
00525                 // not implemented as of 20120817, will be implemented at some time
00526                 strCfgData = RemoveCmd("VOLU", strCfgData);
00527         }
00528         return strCfgData;
00529 }
00530
00531 // replaces all occurrences of substring in string
00532 std::string CAsciiCmdUtilities::ReplaceCmdText(std::string strInTextIn, std::string strFrom, std::string strTo)
00533 {
00534         std::string strReplaceText;
00535         std::string strInText;
00536         std::string strOutText;
00537         int lFromLen;
00538         int lMatchPos;
00539
00540         strInText = strInTextIn;
00541         strOutText = "";
00542         lFromLen = (int)strFrom.length();
00543         while (strInText.length()>0) {
00544                 lMatchPos = (1+(int)strInText.find(strFrom));
00545                 if (lMatchPos==0) {
00546                         strOutText = strOutText+strInText;
00547                         strInText = "";
00548                 } else {
00549                         strOutText = strOutText+strInText.substr(0,lMatchPos-1)+strTo;
00550                         strInText = std::string(strInText).substr(lMatchPos+lFromLen-1);
00551                 }
00552         }
00553         strReplaceText = strOutText;
00554         return strReplaceText;
00555 }
00556
00557 // breaks ASCII Command string into two chuncks, returns split position
00558 int CAsciiCmdUtilities::GetCmdChunk(std::string strCmd)
00559 {
00560         int GetCmdChunk = 0;
00561         int idxCfg;
00562         int lChunk;
00563         int lEnd;
00564         GetCmdChunk = 0;
00565         lChunk = 0;
00566         lEnd = 0;
00567         for(idxCfg=1; idxCfg<=(int)strCmd.length();idxCfg++) {
00568                 lChunk = (int)(1+strCmd.find(";", lEnd));
00569                 if ((lChunk==0) || (lChunk>512)) {
00570                         break;
00571                 }
00572                 lEnd = lChunk;
00573         }
00574         GetCmdChunk = lEnd;
00575         return GetCmdChunk;
00576 }
00577
00578 bool CAsciiCmdUtilities::CopyAsciiData(unsigned char Data[], string strCfg, long lLen)
00579 {
00580         long idxData;
00581         const char *c_str1 = strCfg.c_str();
00582
00583         if (lLen > 0) {
00584                 for(idxData=0;idxData<lLen;idxData++) {
00585                         Data[idxData] = c_str1[idxData];
00586                 }
00587                 return true;
00588         } else {
00589                 return false;
00590         }
00591         return false;
00592 }
Generated on Thu Sep 21 2017 16:01:12 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: DeviceIO/AsciiCmdUtilities.h File Reference

  • File List
  • File Members
Classes | Defines
DeviceIO/AsciiCmdUtilities.h File Reference
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <string>
#include <cctype>
#include "stringex.h"
#include "DppConst.h"
Include dependency graph for AsciiCmdUtilities.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class | CAsciiCmdUtilities

Defines

#define | DP4_PX4_OLD_CFG_SIZE 64
#define | DP5_MAX_CFG_SIZE 512
#define | Whitespace "\t\n\v\f\r\0x20"

Define Documentation

#define DP4_PX4_OLD_CFG_SIZE 64

Definition at line 14 of file AsciiCmdUtilities.h.

#define DP5_MAX_CFG_SIZE 512

Definition at line 15 of file AsciiCmdUtilities.h.

#define Whitespace "\t\n\v\f\r\0x20"

Definition at line 16 of file AsciiCmdUtilities.h.

Generated on Thu Sep 21 2017 16:01:13 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: DeviceIO/AsciiCmdUtilities.h Source File

  • File List
  • File Members
DeviceIO/AsciiCmdUtilities.h
Go to the documentation of this file.
00001 #pragma once
00002 #include <stdlib.h>
00003 #include <stdio.h>
00004 #include <math.h>
00005 #include <string>
00006 #include <cctype> // std::toupper, std::tolower
00007 using namespace std;
00008 #include "stringex.h"
00009 #include "DppConst.h"
00010
00011 #ifndef LINE_MAX
00012         #define LINE_MAX 256
00013 #endif
00014 #define DP4_PX4_OLD_CFG_SIZE 64
00015 #define DP5_MAX_CFG_SIZE 512            /// 512 + 8 Bytes (2 SYNC,2 PID,2 LEN,2 CHKSUM)
00016 #define Whitespace "\t\n\v\f\r\0x20"    /// $ = Chr$(0) + Chr$(9) + Chr$(10) + Chr$(11) + Chr$(12) + Chr$(13) + Chr$(32)
00017
00018 class CAsciiCmdUtilities
00019 {
00020 public:
00021         CAsciiCmdUtilities(void);
00022         ~CAsciiCmdUtilities(void);
00024         std::string MakeUpper(std::string myString);
00026         std::string RemWhitespace(std::string strLine);
00028         std::string GetDP5CfgStr(std::string strFilename);
00030         std::string GetDP5ScaStr(std::string strFilename);
00031         std::string CreateResTestReadBackCmd(bool bSendCoarseFineGain, int DppType);
00033         std::string CreateFullReadBackCmd(bool PC5_PRESENT, int DppType, bool isDP5_RevDxGains, unsigned char DPP_ECO);
00035         std::string CreateFullReadBackCmdMCA8000D(int DppType);
00037         std::string RemoveCmd(std::string strCmd, std::string strCfgData);
00039         std::string RemoveCmdByDeviceType(std::string strCfgDataIn, bool PC5_PRESENT, int DppType, bool isDP5_RevDxGains, unsigned char DPP_ECO);
00041         std::string RemoveCmdByDeviceTypeDP5DxK(std::string strCfgDataIn, bool PC5_PRESENT, int DppType);
00043         std::string Remove_MCA8000D_Cmds(std::string strCfgDataIn, int DppType);
00044         // replaces all occurrences of substring in string
00045         std::string ReplaceCmdText(std::string strInTextIn, std::string strFrom, std::string strTo);
00046         // breaks ASCII Command string into two chuncks, returns split position
00047         int GetCmdChunk(std::string strCmd);
00049         bool CopyAsciiData(unsigned char Data[], string strCfg, long lLen);
00050 };
Generated on Thu Sep 21 2017 16:01:12 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: DeviceIO/DP5Protocol.cpp File Reference

  • File List
  • File Members
DeviceIO/DP5Protocol.cpp File Reference
#include "DP5Protocol.h"
Include dependency graph for DP5Protocol.cpp:

Go to the source code of this file.

Generated on Thu Sep 21 2017 16:01:13 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: DeviceIO/DP5Protocol.cpp Source File

  • File List
  • File Members
DeviceIO/DP5Protocol.cpp
Go to the documentation of this file.
00001 #include "DP5Protocol.h"
00002
00003 CDP5Protocol::CDP5Protocol(void)
00004 {
00005 }
00006
00007 CDP5Protocol::~CDP5Protocol(void)
00008 {
00009 }
00010
Generated on Thu Sep 21 2017 16:01:13 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: DeviceIO/DP5Protocol.h File Reference

  • File List
  • File Members
Classes | Defines | Typedefs | Enumerations
DeviceIO/DP5Protocol.h File Reference
#include <math.h>
Include dependency graph for DP5Protocol.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct | _Packet_In
struct | Packet_Out
struct | Spec
class | CDP5Protocol

Defines

#define | ACK 0
#define | SYNC1_ 0xF5
#define | SYNC2_ 0xFA
#define | RS232 0
#define | USB 1
#define | ETHERNET 2
#define | ETHERNET_TIMEOUT 1000
#define | RS232_TIMEOUT 2500
#define | USB_TIMEOUT 500
#define | Retries 2
#define | MAX_BUFFER_DATA 8192
#define | MAX_SCOPE_DATA 2048
#define | USB_DiagDataDelayMS 2500

Typedefs

typedef struct _Packet_In | Packet_In

Enumerations

enum TRANSMIT_PACKET_TYPE {
XMTPT_SEND_STATUS, XMTPT_SEND_SPECTRUM,
XMTPT_SEND_CLEAR_SPECTRUM, XMTPT_SEND_SPECTRUM_STATUS,
XMTPT_SEND_CLEAR_SPECTRUM_STATUS, XMTPT_BUFFER_SPECTRUM,
XMTPT_BUFFER_CLEAR_SPECTRUM, XMTPT_SEND_BUFFER,
XMTPT_SEND_DP4_STYLE_STATUS, XMTPT_SEND_PX4_CONFIG,
XMTPT_SEND_SCOPE_DATA, XMTPT_SEND_512_BYTE_MISC_DATA,
XMTPT_SEND_SCOPE_DATA_REARM, XMTPT_SEND_ETHERNET_SETTINGS,
XMTPT_SEND_DIAGNOSTIC_DATA, XMTPT_SEND_NETFINDER_PACKET,
XMTPT_SEND_HARDWARE_DESCRIPTION, XMTPT_SEND_SCA,
XMTPT_LATCH_SEND_SCA, XMTPT_LATCH_CLEAR_SEND_SCA,
XMTPT_SEND_ROI_OR_FIXED_BLOCK, XMTPT_PX4_STYLE_CONFIG_PACKET,
XMTPT_SEND_CONFIG_PACKET_EX, XMTPT_SEND_CONFIG_PACKET_TO_HW,
XMTPT_READ_CONFIG_PACKET, XMTPT_READ_CONFIG_PACKET_EX,
XMTPT_FULL_READ_CONFIG_PACKET, XMTPT_SCA_READ_CONFIG_PACKET,
XMTPT_ERASE_FPGA_IMAGE, XMTPT_UPLOAD_PACKET_FPGA,
XMTPT_REINITIALIZE_FPGA, XMTPT_ERASE_UC_IMAGE_0,
XMTPT_ERASE_UC_IMAGE_1, XMTPT_ERASE_UC_IMAGE_2,
XMTPT_UPLOAD_PACKET_UC, XMTPT_SWITCH_TO_UC_IMAGE_0,
XMTPT_SWITCH_TO_UC_IMAGE_1, XMTPT_SWITCH_TO_UC_IMAGE_2,
XMTPT_UC_FPGA_CHECKSUMS, XMTPT_CLEAR_SPECTRUM_BUFFER_A,
XMTPT_ENABLE_MCA_MCS, XMTPT_DISABLE_MCA_MCS,
XMTPT_ARM_DIGITAL_OSCILLOSCOPE, XMTPT_AUTOSET_INPUT_OFFSET,
XMTPT_AUTOSET_FAST_THRESHOLD, XMTPT_READ_IO3_0,
XMTPT_WRITE_IO3_0, XMTPT_WRITE_512_BYTE_MISC_DATA,
XMTPT_SET_DCAL, XMTPT_SET_PZ_CORRECTION_UC_TEMP_CAL_PZ,
XMTPT_SET_PZ_CORRECTION_UC_TEMP_CAL_UC, XMTPT_SET_BOOT_FLAGS,
XMTPT_SET_HV_DP4_EMULATION, XMTPT_SET_TEC_DP4_EMULATION,
XMTPT_SET_INPUT_OFFSET_DP4_EMULATION, XMTPT_SET_ADC_CAL_GAIN_OFFSET,
XMTPT_SET_SPECTRUM_OFFSET, XMTPT_REQ_SCOPE_DATA_MISC_DATA_SCA_PACKETS,
XMTPT_SET_SERIAL_NUMBER, XMTPT_CLEAR_GP_COUNTER,
XMTPT_SWITCH_SUPPLIES, XMTPT_SEND_TEST_PACKET,
XMTPT_REQ_ACK_PACKET, XMTPT_FORCE_SCOPE_TRIGGER,
XMTPT_READ_MCA8000D_OPTION_PA_CAL, XMTPT_AU34_2_RESTART
}
enum PID1_TYPE {
PID1_REQ_STATUS = 0x01, PID1_REQ_SPECTRUM = 0x02,
PID1_REQ_SCOPE_MISC = 0x03, PID1_REQ_SCA = 0x04,
PID1_REQ_CONFIG = 0x20, PID1_REQ_FPGA_UC = 0x30,
PID1_RCV_STATUS = 0x80, PID1_RCV_SPECTRUM = 0x81,
PID1_RCV_SCOPE_MISC = 0x82, PID1_RCV_SCA = 0x83,
PID1_VENDOR_REQ = 0xF0, PID1_COMM_TEST = 0xF1,
PID1_ACK = 0xFF
}
enum | PID2_REQ_STATUS_TYPE { PID2_SEND_DP4_STYLE_STATUS = 0x01 }
enum PID2_REQ_SPECTRUM_TYPE {
PID2_SEND_SPECTRUM = 0x01, PID2_SEND_CLEAR_SPECTRUM = 0x02,
PID2_SEND_SPECTRUM_STATUS = 0x03, PID2_SEND_CLEAR_SPECTRUM_STATUS = 0x04
}
enum PID2_REQ_SCOPE_MISC_TYPE {
PID2_SEND_SCOPE_DATA = 0x01, PID2_SEND_512_BYTE_MISC_DATA = 0x02,
PID2_SEND_SCOPE_DATA_REARM = 0x03, PID2_SEND_ETHERNET_SETTINGS = 0x04,
PID2_SEND_DIAGNOSTIC_DATA = 0x05, PID2_SEND_HARDWARE_DESCRIPTION = 0x06,
PID2_SEND_NETFINDER_READBACK = 0x07, PID2_SEND_I2C_DATA = 0x08,
PID2_SEND_LIST_MODE_DATA = 0x09, PID2_SEND_OPTION_PA_CALIBRATION = 0x0A
}
enum PID2_REQ_SCA_TYPE {
PID2_SEND_SCA = 0x01, PID2_LATCH_SEND_SCA = 0x02,
PID2_LATCH_CLEAR_SEND_SCA = 0x03
}
enum PID2_REQ_CONFIG_TYPE {
PID2_PX4_STYLE_CONFIG_PACKET = 0x01, PID2_TEXT_CONFIG_PACKET = 0x02,
PID2_CONFIG_READBACK_PACKET = 0x03
}
enum PID2_REQ_FPGA_UC_TYPE {
PID2_ERASE_FPGA_IMAGE = 0x01, PID2_UPLOAD_PACKET_FPGA = 0x02,
PID2_REINITIALIZE_FPGA = 0x03, PID2_ERASE_UC_IMAGE_0 = 0x04,
PID2_ERASE_UC_IMAGE_1 = 0x05, PID2_ERASE_UC_IMAGE_2 = 0x06,
PID2_UPLOAD_PACKET_UC = 0x07, PID2_SWITCH_TO_UC_IMAGE_0 = 0x08,
PID2_SWITCH_TO_UC_IMAGE_1 = 0x09, PID2_SWITCH_TO_UC_IMAGE_2 = 0x0A
}
enum PID2_VENDOR_REQ_TYPE {
PID2_CLEAR_SPECTRUM_BUFFER_A = 0x01, PID2_ENABLE_MCA_MCS = 0x02,
PID2_DISABLE_MCA_MCS = 0x03, PID2_ARM_DIGITAL_OSCILLOSCOPE = 0x04,
PID2_AUTOSET_INPUT_OFFSET = 0x05, PID2_AUTOSET_FAST_THRESHOLD = 0x06,
PID2_READ_IO3_0 = 0x07, PID2_WRITE_IO3_0 = 0x08,
PID2_WRITE_512_BYTE_MISC_DATA = 0x09, PID2_SET_DCAL = 0x0A,
PID2_SET_PZ_CORRECTION_UC_TEMP_CAL_PZ = 0x0B, PID2_SET_PZ_CORRECTION_UC_TEMP_CAL_UC = 0x0C,
PID2_SET_BOOT_FLAGS = 0x0D, PID2_SET_ADC_CAL_GAIN_OFFSET = 0x0E,
PID2_SET_SERIAL_NUMBER = 0x0F, PID2_CLEAR_GP_COUNTER = 0x10,
PID2_SET_ETHERNET_SETTINGS = 0x11, PID2_ETHERNET_ALLOW_SHAREING = 0x20,
PID2_ETHERNET_NO_SHARING = 0x21, PID2_ETHERNET_LOCK_IP = 0x22,
PID2_GENERIC_FPGA_WRITE = 0x89
}
enum | PID2_RCV_STATUS_TYPE { RCVPT_DP4_STYLE_STATUS = 0x01 }
enum PID2_RCV_SPECTRUM_TYPE {
RCVPT_256_CHANNEL_SPECTRUM = 0x01, RCVPT_256_CHANNEL_SPECTRUM_STATUS = 0x02,
RCVPT_512_CHANNEL_SPECTRUM = 0x03, RCVPT_512_CHANNEL_SPECTRUM_STATUS = 0x04,
RCVPT_1024_CHANNEL_SPECTRUM = 0x05, RCVPT_1024_CHANNEL_SPECTRUM_STATUS = 0x06,
RCVPT_2048_CHANNEL_SPECTRUM = 0x07, RCVPT_2048_CHANNEL_SPECTRUM_STATUS = 0x08,
RCVPT_4096_CHANNEL_SPECTRUM = 0x09, RCVPT_4096_CHANNEL_SPECTRUM_STATUS = 0x0A,
RCVPT_8192_CHANNEL_SPECTRUM = 0x0B, RCVPT_8192_CHANNEL_SPECTRUM_STATUS = 0x0C
}
enum PID2_RCV_SCOPE_MISC_TYPE {
RCVPT_SCOPE_DATA = 0x01, RCVPT_512_BYTE_MISC_DATA = 0x02,
RCVPT_SCOPE_DATA_WITH_OVERFLOW = 0x03, RCVPT_ETHERNET_SETTINGS = 0x04,
RCVPT_DIAGNOSTIC_DATA = 0x05, RCVPT_HARDWARE_DESCRIPTION = 0x06,
RCVPT_CONFIG_READBACK = 0x07, RCVPT_NETFINDER_READBACK = 0x08,
RCVPT_I2C_DATA = 0x09, RCVPT_LIST_MODE_DATA = 0x0A,
RCVPT_LIST_MODE_DATA_FIFO_FULL = 0x0B, RCVPT_OPTION_PA_CALIBRATION = 0x0C
}
enum | PID2_RCV_SCA_TYPE { RCVPT_SCA = 0x01 }
enum PID2_ACK_TYPE {
PID2_ACK_OK = 0x00, PID2_ACK_SYNC_ERROR = 0x01,
PID2_ACK_PID_ERROR = 0x02, PID2_ACK_LEN_ERROR = 0x03,
PID2_ACK_CHECKSUM_ERROR = 0x04, PID2_ACK_BAD_PARAM = 0x05,
PID2_ACK_BAD_HEX_REC = 0x06, PID2_ACK_UNRECOG = 0x07,
PID2_ACK_FPGA_ERROR = 0x08, PID2_ACK_CP2201_NOT_FOUND = 0x09,
PID2_ACK_SCOPE_DATA_NOT_AVAIL = 0x0A, PID2_ACK_PC5_NOT_PRESENT = 0x0B,
PID2_ACK_OK_ETHERNET_SHARE_REQ = 0x0C, PID2_ACK_ETHERNET_BUSY = 0x0D,
PID2_ACK_I2C_ERROR = 0x0E, PID2_ACK_OK_FPGA_UPLOAD_ADDR = 0x0F,
PID2_ACK_FEATURE_NOT_FPGA_SUPPORTED = 0x10, PID2_ACK_CAL_DATA_NOT_PRESENT = 0x11
}

Define Documentation

#define ACK 0

Definition at line 260 of file DP5Protocol.h.

#define ETHERNET 2

Definition at line 268 of file DP5Protocol.h.

#define ETHERNET_TIMEOUT 1000

Definition at line 270 of file DP5Protocol.h.

#define MAX_BUFFER_DATA 8192

Definition at line 293 of file DP5Protocol.h.

#define MAX_SCOPE_DATA 2048

Definition at line 294 of file DP5Protocol.h.

#define Retries 2

Definition at line 274 of file DP5Protocol.h.

#define RS232 0

Definition at line 266 of file DP5Protocol.h.

#define RS232_TIMEOUT 2500

Definition at line 271 of file DP5Protocol.h.

#define SYNC1_ 0xF5

Definition at line 263 of file DP5Protocol.h.

#define SYNC2_ 0xFA

Definition at line 264 of file DP5Protocol.h.

#define USB 1

Definition at line 267 of file DP5Protocol.h.

#define USB_DiagDataDelayMS 2500

Definition at line 295 of file DP5Protocol.h.

#define USB_TIMEOUT 500

Definition at line 272 of file DP5Protocol.h.

Typedef Documentation

typedef struct _Packet_In Packet_In

Enumeration Type Documentation

enum PID1_TYPE
Enumerator:
PID1_REQ_STATUS
PID1_REQ_SPECTRUM
PID1_REQ_SCOPE_MISC
PID1_REQ_SCA
PID1_REQ_CONFIG
PID1_REQ_FPGA_UC
PID1_RCV_STATUS
PID1_RCV_SPECTRUM
PID1_RCV_SCOPE_MISC
PID1_RCV_SCA
PID1_VENDOR_REQ
PID1_COMM_TEST
PID1_ACK

Definition at line 98 of file DP5Protocol.h.

enum PID2_ACK_TYPE
Enumerator:
PID2_ACK_OK
PID2_ACK_SYNC_ERROR
PID2_ACK_PID_ERROR
PID2_ACK_LEN_ERROR
PID2_ACK_CHECKSUM_ERROR
PID2_ACK_BAD_PARAM
PID2_ACK_BAD_HEX_REC
PID2_ACK_UNRECOG
PID2_ACK_FPGA_ERROR
PID2_ACK_CP2201_NOT_FOUND
PID2_ACK_SCOPE_DATA_NOT_AVAIL
PID2_ACK_PC5_NOT_PRESENT
PID2_ACK_OK_ETHERNET_SHARE_REQ
PID2_ACK_ETHERNET_BUSY
PID2_ACK_I2C_ERROR
PID2_ACK_OK_FPGA_UPLOAD_ADDR
PID2_ACK_FEATURE_NOT_FPGA_SUPPORTED
PID2_ACK_CAL_DATA_NOT_PRESENT

Definition at line 237 of file DP5Protocol.h.

enum PID2_RCV_SCA_TYPE
Enumerator:
RCVPT_SCA

Definition at line 233 of file DP5Protocol.h.

enum PID2_RCV_SCOPE_MISC_TYPE
Enumerator:
RCVPT_SCOPE_DATA
RCVPT_512_BYTE_MISC_DATA
RCVPT_SCOPE_DATA_WITH_OVERFLOW
RCVPT_ETHERNET_SETTINGS
RCVPT_DIAGNOSTIC_DATA
RCVPT_HARDWARE_DESCRIPTION
RCVPT_CONFIG_READBACK
RCVPT_NETFINDER_READBACK
RCVPT_I2C_DATA
RCVPT_LIST_MODE_DATA
RCVPT_LIST_MODE_DATA_FIFO_FULL
RCVPT_OPTION_PA_CALIBRATION

Definition at line 218 of file DP5Protocol.h.

enum PID2_RCV_SPECTRUM_TYPE
Enumerator:
RCVPT_256_CHANNEL_SPECTRUM
RCVPT_256_CHANNEL_SPECTRUM_STATUS
RCVPT_512_CHANNEL_SPECTRUM
RCVPT_512_CHANNEL_SPECTRUM_STATUS
RCVPT_1024_CHANNEL_SPECTRUM
RCVPT_1024_CHANNEL_SPECTRUM_STATUS
RCVPT_2048_CHANNEL_SPECTRUM
RCVPT_2048_CHANNEL_SPECTRUM_STATUS
RCVPT_4096_CHANNEL_SPECTRUM
RCVPT_4096_CHANNEL_SPECTRUM_STATUS
RCVPT_8192_CHANNEL_SPECTRUM
RCVPT_8192_CHANNEL_SPECTRUM_STATUS

Definition at line 203 of file DP5Protocol.h.

enum PID2_RCV_STATUS_TYPE
Enumerator:
RCVPT_DP4_STYLE_STATUS

Definition at line 199 of file DP5Protocol.h.

enum PID2_REQ_CONFIG_TYPE
Enumerator:
PID2_PX4_STYLE_CONFIG_PACKET
PID2_TEXT_CONFIG_PACKET
PID2_CONFIG_READBACK_PACKET

Definition at line 149 of file DP5Protocol.h.

enum PID2_REQ_FPGA_UC_TYPE
Enumerator:
PID2_ERASE_FPGA_IMAGE
PID2_UPLOAD_PACKET_FPGA
PID2_REINITIALIZE_FPGA
PID2_ERASE_UC_IMAGE_0
PID2_ERASE_UC_IMAGE_1
PID2_ERASE_UC_IMAGE_2
PID2_UPLOAD_PACKET_UC
PID2_SWITCH_TO_UC_IMAGE_0
PID2_SWITCH_TO_UC_IMAGE_1
PID2_SWITCH_TO_UC_IMAGE_2

Definition at line 155 of file DP5Protocol.h.

enum PID2_REQ_SCA_TYPE
Enumerator:
PID2_SEND_SCA
PID2_LATCH_SEND_SCA
PID2_LATCH_CLEAR_SEND_SCA

Definition at line 143 of file DP5Protocol.h.

enum PID2_REQ_SCOPE_MISC_TYPE
Enumerator:
PID2_SEND_SCOPE_DATA
PID2_SEND_512_BYTE_MISC_DATA
PID2_SEND_SCOPE_DATA_REARM
PID2_SEND_ETHERNET_SETTINGS
PID2_SEND_DIAGNOSTIC_DATA
PID2_SEND_HARDWARE_DESCRIPTION
PID2_SEND_NETFINDER_READBACK
PID2_SEND_I2C_DATA
PID2_SEND_LIST_MODE_DATA
PID2_SEND_OPTION_PA_CALIBRATION

Definition at line 130 of file DP5Protocol.h.

enum PID2_REQ_SPECTRUM_TYPE
Enumerator:
PID2_SEND_SPECTRUM
PID2_SEND_CLEAR_SPECTRUM
PID2_SEND_SPECTRUM_STATUS
PID2_SEND_CLEAR_SPECTRUM_STATUS

Definition at line 118 of file DP5Protocol.h.

enum PID2_REQ_STATUS_TYPE
Enumerator:
PID2_SEND_DP4_STYLE_STATUS

Definition at line 114 of file DP5Protocol.h.

enum PID2_VENDOR_REQ_TYPE
Enumerator:
PID2_CLEAR_SPECTRUM_BUFFER_A
PID2_ENABLE_MCA_MCS
PID2_DISABLE_MCA_MCS
PID2_ARM_DIGITAL_OSCILLOSCOPE
PID2_AUTOSET_INPUT_OFFSET
PID2_AUTOSET_FAST_THRESHOLD
PID2_READ_IO3_0
PID2_WRITE_IO3_0
PID2_WRITE_512_BYTE_MISC_DATA
PID2_SET_DCAL
PID2_SET_PZ_CORRECTION_UC_TEMP_CAL_PZ
PID2_SET_PZ_CORRECTION_UC_TEMP_CAL_UC
PID2_SET_BOOT_FLAGS
PID2_SET_ADC_CAL_GAIN_OFFSET
PID2_SET_SERIAL_NUMBER
PID2_CLEAR_GP_COUNTER
PID2_SET_ETHERNET_SETTINGS
PID2_ETHERNET_ALLOW_SHAREING
PID2_ETHERNET_NO_SHARING
PID2_ETHERNET_LOCK_IP
PID2_GENERIC_FPGA_WRITE

Definition at line 169 of file DP5Protocol.h.

enum TRANSMIT_PACKET_TYPE

CDP5Protocol CDP5Protocol

Enumerator:
XMTPT_SEND_STATUS
XMTPT_SEND_SPECTRUM
XMTPT_SEND_CLEAR_SPECTRUM
XMTPT_SEND_SPECTRUM_STATUS
XMTPT_SEND_CLEAR_SPECTRUM_STATUS
XMTPT_BUFFER_SPECTRUM
XMTPT_BUFFER_CLEAR_SPECTRUM
XMTPT_SEND_BUFFER
XMTPT_SEND_DP4_STYLE_STATUS
XMTPT_SEND_PX4_CONFIG
XMTPT_SEND_SCOPE_DATA
XMTPT_SEND_512_BYTE_MISC_DATA
XMTPT_SEND_SCOPE_DATA_REARM
XMTPT_SEND_ETHERNET_SETTINGS
XMTPT_SEND_DIAGNOSTIC_DATA
XMTPT_SEND_NETFINDER_PACKET
XMTPT_SEND_HARDWARE_DESCRIPTION
XMTPT_SEND_SCA
XMTPT_LATCH_SEND_SCA
XMTPT_LATCH_CLEAR_SEND_SCA
XMTPT_SEND_ROI_OR_FIXED_BLOCK
XMTPT_PX4_STYLE_CONFIG_PACKET
XMTPT_SEND_CONFIG_PACKET_EX
XMTPT_SEND_CONFIG_PACKET_TO_HW
XMTPT_READ_CONFIG_PACKET
XMTPT_READ_CONFIG_PACKET_EX
XMTPT_FULL_READ_CONFIG_PACKET
XMTPT_SCA_READ_CONFIG_PACKET
XMTPT_ERASE_FPGA_IMAGE
XMTPT_UPLOAD_PACKET_FPGA
XMTPT_REINITIALIZE_FPGA
XMTPT_ERASE_UC_IMAGE_0
XMTPT_ERASE_UC_IMAGE_1
XMTPT_ERASE_UC_IMAGE_2
XMTPT_UPLOAD_PACKET_UC
XMTPT_SWITCH_TO_UC_IMAGE_0
XMTPT_SWITCH_TO_UC_IMAGE_1
XMTPT_SWITCH_TO_UC_IMAGE_2
XMTPT_UC_FPGA_CHECKSUMS
XMTPT_CLEAR_SPECTRUM_BUFFER_A
XMTPT_ENABLE_MCA_MCS
XMTPT_DISABLE_MCA_MCS
XMTPT_ARM_DIGITAL_OSCILLOSCOPE
XMTPT_AUTOSET_INPUT_OFFSET
XMTPT_AUTOSET_FAST_THRESHOLD
XMTPT_READ_IO3_0
XMTPT_WRITE_IO3_0
XMTPT_WRITE_512_BYTE_MISC_DATA
XMTPT_SET_DCAL
XMTPT_SET_PZ_CORRECTION_UC_TEMP_CAL_PZ
XMTPT_SET_PZ_CORRECTION_UC_TEMP_CAL_UC
XMTPT_SET_BOOT_FLAGS
XMTPT_SET_HV_DP4_EMULATION
XMTPT_SET_TEC_DP4_EMULATION
XMTPT_SET_INPUT_OFFSET_DP4_EMULATION
XMTPT_SET_ADC_CAL_GAIN_OFFSET
XMTPT_SET_SPECTRUM_OFFSET
XMTPT_REQ_SCOPE_DATA_MISC_DATA_SCA_PACKETS
XMTPT_SET_SERIAL_NUMBER
XMTPT_CLEAR_GP_COUNTER
XMTPT_SWITCH_SUPPLIES
XMTPT_SEND_TEST_PACKET
XMTPT_REQ_ACK_PACKET
XMTPT_FORCE_SCOPE_TRIGGER
XMTPT_READ_MCA8000D_OPTION_PA_CAL
XMTPT_AU34_2_RESTART

Definition at line 5 of file DP5Protocol.h.

Generated on Thu Sep 21 2017 16:01:13 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: DeviceIO/DP5Protocol.h Source File

  • File List
  • File Members
DeviceIO/DP5Protocol.h
Go to the documentation of this file.
00001
00002 #pragma once
00003 #include <math.h>
00004
00005 enum TRANSMIT_PACKET_TYPE {
00006      //REQUEST_PACKETS_TO_DP5
00007         XMTPT_SEND_STATUS,
00008     XMTPT_SEND_SPECTRUM,
00009     XMTPT_SEND_CLEAR_SPECTRUM,
00010     XMTPT_SEND_SPECTRUM_STATUS,
00011     XMTPT_SEND_CLEAR_SPECTRUM_STATUS,
00012     XMTPT_BUFFER_SPECTRUM,
00013     XMTPT_BUFFER_CLEAR_SPECTRUM,
00014     XMTPT_SEND_BUFFER,
00015     XMTPT_SEND_DP4_STYLE_STATUS,
00016     XMTPT_SEND_PX4_CONFIG,
00017     XMTPT_SEND_SCOPE_DATA,
00018     XMTPT_SEND_512_BYTE_MISC_DATA,
00019     XMTPT_SEND_SCOPE_DATA_REARM,
00020     XMTPT_SEND_ETHERNET_SETTINGS,
00021     XMTPT_SEND_DIAGNOSTIC_DATA,
00022         XMTPT_SEND_NETFINDER_PACKET,
00023     XMTPT_SEND_HARDWARE_DESCRIPTION,
00024     XMTPT_SEND_SCA,
00025     XMTPT_LATCH_SEND_SCA,
00026     XMTPT_LATCH_CLEAR_SEND_SCA,
00027     XMTPT_SEND_ROI_OR_FIXED_BLOCK,
00028     XMTPT_PX4_STYLE_CONFIG_PACKET,
00029     XMTPT_SEND_CONFIG_PACKET_EX,
00030         XMTPT_SEND_CONFIG_PACKET_TO_HW,
00031     XMTPT_READ_CONFIG_PACKET,
00032     XMTPT_READ_CONFIG_PACKET_EX,
00033     XMTPT_FULL_READ_CONFIG_PACKET,
00034     XMTPT_SCA_READ_CONFIG_PACKET,
00035     XMTPT_ERASE_FPGA_IMAGE,
00036     XMTPT_UPLOAD_PACKET_FPGA,
00037     XMTPT_REINITIALIZE_FPGA,
00038     XMTPT_ERASE_UC_IMAGE_0,
00039     XMTPT_ERASE_UC_IMAGE_1,
00040     XMTPT_ERASE_UC_IMAGE_2,
00041     XMTPT_UPLOAD_PACKET_UC,
00042     XMTPT_SWITCH_TO_UC_IMAGE_0,
00043     XMTPT_SWITCH_TO_UC_IMAGE_1,
00044     XMTPT_SWITCH_TO_UC_IMAGE_2,
00045     XMTPT_UC_FPGA_CHECKSUMS,
00046
00047     //VENDOR_REQUESTS_TO_DP5
00048     XMTPT_CLEAR_SPECTRUM_BUFFER_A,
00049     XMTPT_ENABLE_MCA_MCS,
00050     XMTPT_DISABLE_MCA_MCS,
00051     XMTPT_ARM_DIGITAL_OSCILLOSCOPE,
00052     XMTPT_AUTOSET_INPUT_OFFSET,
00053     XMTPT_AUTOSET_FAST_THRESHOLD,
00054     XMTPT_READ_IO3_0,
00055     XMTPT_WRITE_IO3_0,
00056     XMTPT_WRITE_512_BYTE_MISC_DATA,
00057     XMTPT_SET_DCAL,
00058     XMTPT_SET_PZ_CORRECTION_UC_TEMP_CAL_PZ,
00059     XMTPT_SET_PZ_CORRECTION_UC_TEMP_CAL_UC,
00060     XMTPT_SET_BOOT_FLAGS,
00061     XMTPT_SET_HV_DP4_EMULATION,
00062     XMTPT_SET_TEC_DP4_EMULATION,
00063     XMTPT_SET_INPUT_OFFSET_DP4_EMULATION,
00064     XMTPT_SET_ADC_CAL_GAIN_OFFSET,
00065     XMTPT_SET_SPECTRUM_OFFSET,
00066     XMTPT_REQ_SCOPE_DATA_MISC_DATA_SCA_PACKETS,
00067     XMTPT_SET_SERIAL_NUMBER,
00068     XMTPT_CLEAR_GP_COUNTER,
00069     XMTPT_SWITCH_SUPPLIES,
00070
00071     XMTPT_SEND_TEST_PACKET,
00072         XMTPT_REQ_ACK_PACKET,
00073         XMTPT_FORCE_SCOPE_TRIGGER,
00074         XMTPT_READ_MCA8000D_OPTION_PA_CAL,
00075         XMTPT_AU34_2_RESTART
00076 };  //TRANSMIT_PACKET_TYPE
00077
00078 //enum RECEIVE_PACKET_TYPE {
00079 //     //RESPONSE_PACKETS_FROM_DP5
00080 //    RCVPT_DP4_STYLE_STATUS,
00081 //    RCVPT_256_CHANNEL_SPECTRUM,
00082 //    RCVPT_256_CHANNEL_SPECTRUM_STATUS,
00083 //    RCVPT_512_CHANNEL_SPECTRUM,
00084 //    RCVPT_512_CHANNEL_SPECTRUM_STATUS,
00085 //    RCVPT_1024_CHANNEL_SPECTRUM,
00086 //    RCVPT_1024_CHANNEL_SPECTRUM_STATUS,
00087 //    RCVPT_2048_CHANNEL_SPECTRUM,
00088 //    RCVPT_2048_CHANNEL_SPECTRUM_STATUS,
00089 //    RCVPT_4096_CHANNEL_SPECTRUM,
00090 //    RCVPT_4096_CHANNEL_SPECTRUM_STATUS,
00091 //    RCVPT_8192_CHANNEL_SPECTRUM,
00092 //    RCVPT_8192_CHANNEL_SPECTRUM_STATUS,
00093 //    RCVPT_SCOPE_DATA,
00094 //    RCVPT_512_BYTE_MISC_DATA,
00095 //    RCVPT_IO3_0_STATE
00096 //};  //RECEIVE_PACKET_TYPE
00097
00098 enum PID1_TYPE {
00099     PID1_REQ_STATUS = 0x01,
00100     PID1_REQ_SPECTRUM = 0x02,
00101     PID1_REQ_SCOPE_MISC = 0x03,
00102     PID1_REQ_SCA = 0x04,
00103     PID1_REQ_CONFIG = 0x20,
00104     PID1_REQ_FPGA_UC = 0x30,
00105     PID1_RCV_STATUS = 0x80,
00106     PID1_RCV_SPECTRUM = 0x81,
00107     PID1_RCV_SCOPE_MISC = 0x82,
00108     PID1_RCV_SCA = 0x83,
00109     PID1_VENDOR_REQ = 0xF0,
00110         PID1_COMM_TEST = 0xF1,
00111     PID1_ACK = 0xFF
00112 };  //PID1_TYPE
00113
00114 enum PID2_REQ_STATUS_TYPE {
00115     PID2_SEND_DP4_STYLE_STATUS = 0x01
00116 };  //PID2_REQ_STATUS_TYPE
00117
00118 enum PID2_REQ_SPECTRUM_TYPE {
00119     // REQUEST_PACKETS_TO_DP5
00120     PID2_SEND_SPECTRUM = 0x01,
00121     PID2_SEND_CLEAR_SPECTRUM = 0x02,
00122     PID2_SEND_SPECTRUM_STATUS = 0x03,
00123     PID2_SEND_CLEAR_SPECTRUM_STATUS = 0x04
00124     //PID2_BUFFER_SPECTRUM,
00125     //PID2_BUFFER_CLEAR_SPECTRUM,
00126     //PID2_SEND_BUFFER,
00127     //PID2_SEND_CONFIG
00128 };  //PID2_REQ_SPECTRUM_TYPE
00129
00130 enum PID2_REQ_SCOPE_MISC_TYPE {
00131     PID2_SEND_SCOPE_DATA = 0x01,
00132     PID2_SEND_512_BYTE_MISC_DATA = 0x02,
00133     PID2_SEND_SCOPE_DATA_REARM = 0x03,
00134     PID2_SEND_ETHERNET_SETTINGS = 0x04,
00135     PID2_SEND_DIAGNOSTIC_DATA = 0x05,
00136     PID2_SEND_HARDWARE_DESCRIPTION = 0x06,
00137         PID2_SEND_NETFINDER_READBACK = 0x07,
00138         PID2_SEND_I2C_DATA = 0x08,
00139         PID2_SEND_LIST_MODE_DATA = 0x09,
00140         PID2_SEND_OPTION_PA_CALIBRATION = 0x0A
00141 };  //PID2_REQ_SCOPE_MISC_TYPE
00142
00143 enum PID2_REQ_SCA_TYPE {
00144     PID2_SEND_SCA = 0x01,
00145     PID2_LATCH_SEND_SCA = 0x02,
00146     PID2_LATCH_CLEAR_SEND_SCA = 0x03
00147 };  //PID2_REQ_SCA_TYPE
00148
00149 enum PID2_REQ_CONFIG_TYPE {
00150     PID2_PX4_STYLE_CONFIG_PACKET = 0x01,
00151     PID2_TEXT_CONFIG_PACKET = 0x02,
00152     PID2_CONFIG_READBACK_PACKET = 0x03
00153 };  //PID2_SEND_CONFIG_TYPE
00154
00155 enum PID2_REQ_FPGA_UC_TYPE {
00156     PID2_ERASE_FPGA_IMAGE = 0x01,
00157     PID2_UPLOAD_PACKET_FPGA = 0x02,
00158     PID2_REINITIALIZE_FPGA = 0x03,
00159     PID2_ERASE_UC_IMAGE_0 = 0x04,
00160     PID2_ERASE_UC_IMAGE_1 = 0x05,
00161     PID2_ERASE_UC_IMAGE_2 = 0x06,
00162     PID2_UPLOAD_PACKET_UC = 0x07,
00163     PID2_SWITCH_TO_UC_IMAGE_0 = 0x08,
00164     PID2_SWITCH_TO_UC_IMAGE_1 = 0x09,
00165     PID2_SWITCH_TO_UC_IMAGE_2 = 0x0A
00166     //PID2_UC_FPGA_CHECKSUMS
00167 };  //PID2_REQ_FPGA_UC_TYPE
00168
00169 enum PID2_VENDOR_REQ_TYPE {
00170     PID2_CLEAR_SPECTRUM_BUFFER_A = 0x01,
00171     PID2_ENABLE_MCA_MCS = 0x02,
00172     PID2_DISABLE_MCA_MCS = 0x03,
00173     PID2_ARM_DIGITAL_OSCILLOSCOPE = 0x04,
00174     PID2_AUTOSET_INPUT_OFFSET = 0x05,
00175     PID2_AUTOSET_FAST_THRESHOLD = 0x06,
00176     PID2_READ_IO3_0 = 0x07,
00177     PID2_WRITE_IO3_0 = 0x08,
00178     PID2_WRITE_512_BYTE_MISC_DATA = 0x09,
00179     PID2_SET_DCAL = 0x0A,
00180     PID2_SET_PZ_CORRECTION_UC_TEMP_CAL_PZ = 0x0B,
00181     PID2_SET_PZ_CORRECTION_UC_TEMP_CAL_UC = 0x0C,
00182     PID2_SET_BOOT_FLAGS = 0x0D,
00183     //PID2_SET_HV_DP4_EMULATION
00184     //PID2_SET_TEC_DP4_EMULATION
00185     //PID2_SET_INPUT_OFFSET_DP4_EMULATION
00186     PID2_SET_ADC_CAL_GAIN_OFFSET = 0x0E,
00187     //PID2_SET_SPECTRUM_OFFSET
00188     //PID2_REQ_SCOPE_DATA_MISC_DATA_SCA_PACKETS
00189     PID2_SET_SERIAL_NUMBER = 0x0F,
00190     PID2_CLEAR_GP_COUNTER = 0x10,
00191     PID2_SET_ETHERNET_SETTINGS = 0x11,
00192     //PID2_SWITCH_SUPPLIES
00193     PID2_ETHERNET_ALLOW_SHAREING = 0x20,
00194     PID2_ETHERNET_NO_SHARING = 0x21,
00195     PID2_ETHERNET_LOCK_IP = 0x22,
00196         PID2_GENERIC_FPGA_WRITE = 0x89
00197 };  //PID2_VENDOR_REQ_TYPE
00198
00199 enum PID2_RCV_STATUS_TYPE {
00200     RCVPT_DP4_STYLE_STATUS = 0x01
00201 };  //PID2_RCV_STATUS_TYPE
00202
00203 enum PID2_RCV_SPECTRUM_TYPE {
00204     RCVPT_256_CHANNEL_SPECTRUM = 0x01,
00205     RCVPT_256_CHANNEL_SPECTRUM_STATUS = 0x02,
00206     RCVPT_512_CHANNEL_SPECTRUM = 0x03,
00207     RCVPT_512_CHANNEL_SPECTRUM_STATUS = 0x04,
00208     RCVPT_1024_CHANNEL_SPECTRUM = 0x05,
00209     RCVPT_1024_CHANNEL_SPECTRUM_STATUS = 0x06,
00210     RCVPT_2048_CHANNEL_SPECTRUM = 0x07,
00211     RCVPT_2048_CHANNEL_SPECTRUM_STATUS = 0x08,
00212     RCVPT_4096_CHANNEL_SPECTRUM = 0x09,
00213     RCVPT_4096_CHANNEL_SPECTRUM_STATUS = 0x0A,
00214     RCVPT_8192_CHANNEL_SPECTRUM = 0x0B,
00215     RCVPT_8192_CHANNEL_SPECTRUM_STATUS = 0x0C
00216 };  //PID2_RCV_SPECTRUM_TYPE
00217
00218 enum PID2_RCV_SCOPE_MISC_TYPE {
00219     RCVPT_SCOPE_DATA = 0x01,
00220     RCVPT_512_BYTE_MISC_DATA = 0x02,
00221     RCVPT_SCOPE_DATA_WITH_OVERFLOW = 0x03,
00222     RCVPT_ETHERNET_SETTINGS = 0x04,
00223     RCVPT_DIAGNOSTIC_DATA = 0x05,
00224     RCVPT_HARDWARE_DESCRIPTION = 0x06,
00225         RCVPT_CONFIG_READBACK = 0x07,
00226         RCVPT_NETFINDER_READBACK = 0x08,
00227         RCVPT_I2C_DATA = 0x09,
00228         RCVPT_LIST_MODE_DATA = 0x0A,
00229         RCVPT_LIST_MODE_DATA_FIFO_FULL = 0x0B,
00230         RCVPT_OPTION_PA_CALIBRATION = 0x0C
00231 };  //PID2_REQ_SCOPE_MISC_TYPE
00232
00233 enum PID2_RCV_SCA_TYPE {
00234     RCVPT_SCA = 0x01
00235 };  //PID2_REQ_SCA_TYPE
00236
00237 enum PID2_ACK_TYPE {  //PID1_ACK, PID2_ACK_TYPE)
00238     PID2_ACK_OK = 0x00,
00239     PID2_ACK_SYNC_ERROR = 0x01,
00240     PID2_ACK_PID_ERROR = 0x02,
00241     PID2_ACK_LEN_ERROR = 0x03,
00242     PID2_ACK_CHECKSUM_ERROR = 0x04,
00243     PID2_ACK_BAD_PARAM = 0x05,
00244     PID2_ACK_BAD_HEX_REC = 0x06,
00245     PID2_ACK_UNRECOG = 0x07,
00246     PID2_ACK_FPGA_ERROR = 0x08,
00247     PID2_ACK_CP2201_NOT_FOUND = 0x09,
00248     PID2_ACK_SCOPE_DATA_NOT_AVAIL = 0x0A,
00249     PID2_ACK_PC5_NOT_PRESENT = 0x0B,
00250     PID2_ACK_OK_ETHERNET_SHARE_REQ = 0x0C,
00251         PID2_ACK_ETHERNET_BUSY = 0x0D,
00252         PID2_ACK_I2C_ERROR = 0x0E,
00253         PID2_ACK_OK_FPGA_UPLOAD_ADDR = 0x0F,
00254         PID2_ACK_FEATURE_NOT_FPGA_SUPPORTED = 0x10,
00255         PID2_ACK_CAL_DATA_NOT_PRESENT = 0x11
00256 };  //PID2_ACK_TYPE
00257
00258 //#define PID1_ACK 0xFF
00259
00260 #define ACK 0
00261 //#define STATUS 1
00262 //#define SPECTRUM 2
00263 #define SYNC1_ 0xF5
00264 #define SYNC2_ 0xFA
00265
00266 #define RS232 0
00267 #define USB 1
00268 #define ETHERNET 2
00269
00270 #define ETHERNET_TIMEOUT 1000   // default timeout of 1000mS
00271 #define RS232_TIMEOUT 2500      // default timeout of 2500mS (8K spectrum ~2.2s)
00272 #define USB_TIMEOUT 500         // default timeout of 500mS
00273
00274 #define Retries 2   // total of 3 attempts
00275
00276 typedef struct _Packet_In {
00277     unsigned char PID1;
00278     unsigned char PID2;
00279     unsigned short LEN;  // signed, but data payload always less than 32768
00280     unsigned char STATUS;
00281     unsigned char DATA[32768];
00282     long CheckSum;
00283 } Packet_In;
00284
00285 struct Packet_Out {
00286     unsigned char PID1;
00287     unsigned char PID2;
00288     unsigned short LEN;  // signed, but data payload always less than 32768
00289     unsigned char EXPECTEDRESPONSE;
00290     unsigned char DATA[514];
00291 };
00292
00293 #define MAX_BUFFER_DATA         8192
00294 #define MAX_SCOPE_DATA          2048
00295 #define USB_DiagDataDelayMS 2500
00296
00297 struct Spec {
00298         long DATA[MAX_BUFFER_DATA];   // this keeps total of static data under 64K VB limit
00299         short CHANNELS;
00300 };
00301
00302 class CDP5Protocol
00303 {
00304 public:
00305         CDP5Protocol(void);
00306         ~CDP5Protocol(void);
00307
00309         short InPacketType;
00310         // Incoming packet buffer. (24648==largest possible IN packet.)
00311         unsigned char PacketIn[24648];
00312
00314         long RS232BytesInBuffer;
00316         long RS232_RThreshold;
00318         bool RS232HeaderReceived;
00320         short RS232PacketPtr;
00321
00323         bool ScaleAuto;
00325         unsigned char Scope[2048];
00327         unsigned char MiscData[512];
00329         bool CommError;
00331         unsigned char BufferOUT[520];
00333         Spec SPECTRUM;
00335         Packet_In PIN;
00336
00338         bool ACK_Received;
00340         bool Packet_Received;
00342         bool Timeout_flag;
00343
00344         int UDP_offset;
00345         bool Netfinder_active;
00346         int Netfinder_Seq;
00347
00349         bool USB_Default_Timeout;
00350 };
00351
Generated on Thu Sep 21 2017 16:01:13 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: DeviceIO/DP5Status.cpp File Reference

  • File List
  • File Members
DeviceIO/DP5Status.cpp File Reference
#include "DP5Status.h"
#include "stringex.h"
#include "DppConst.h"
Include dependency graph for DP5Status.cpp:

Go to the source code of this file.

Generated on Thu Sep 21 2017 16:01:13 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: DeviceIO/DP5Status.cpp Source File

  • File List
  • File Members
DeviceIO/DP5Status.cpp
Go to the documentation of this file.
00001
00002 #include "DP5Status.h"
00003 #include "stringex.h"
00004 #include "DppConst.h"
00005 #ifdef _MSC_VER
00006     #pragma warning(disable:4996)
00007 #endif
00008
00009 CDP5Status::CDP5Status(void)
00010 {
00011 }
00012
00013 CDP5Status::~CDP5Status(void)
00014 {
00015 }
00016
00017 void CDP5Status::Process_Status(DP4_FORMAT_STATUS *m_DP5_Status)
00018 {
00019         bool bDMCA_LiveTime = false;
00020         unsigned int uiFwBuild = 0;
00021
00022         m_DP5_Status->DEVICE_ID = m_DP5_Status->RAW[39];
00023     m_DP5_Status->FastCount = DppUtil.LongWordToDouble(0, m_DP5_Status->RAW);
00024     m_DP5_Status->SlowCount = DppUtil.LongWordToDouble(4, m_DP5_Status->RAW);
00025     m_DP5_Status->GP_COUNTER = DppUtil.LongWordToDouble(8, m_DP5_Status->RAW);
00026     m_DP5_Status->AccumulationTime = (float)m_DP5_Status->RAW[12] * 0.001 + (float)(m_DP5_Status->RAW[13] + (float)m_DP5_Status->RAW[14] * 256.0 + (float)m_DP5_Status->RAW[15] * 65536.0) * 0.1;
00027         m_DP5_Status->RealTime = ((double)m_DP5_Status->RAW[20] + ((double)m_DP5_Status->RAW[21] * 256.0) + ((double)m_DP5_Status->RAW[22] * 65536.0) + ((double)m_DP5_Status->RAW[23] * 16777216.0)) * 0.001;
00028
00029         m_DP5_Status->Firmware = m_DP5_Status->RAW[24];
00030     m_DP5_Status->FPGA = m_DP5_Status->RAW[25];
00031
00032         if (m_DP5_Status->Firmware > 0x65) {
00033                 m_DP5_Status->Build = m_DP5_Status->RAW[37] & 0xF;              //Build # added in FW6.06
00034         } else {
00035                 m_DP5_Status->Build = 0;
00036         }
00037
00038         //Firmware Version:  6.07  Build:  0 has LiveTime and PREL
00039         //DEVICE_ID 0=DP5,1=PX5,2=DP5G,3=MCA8000D,4=TB5
00040         if (m_DP5_Status->DEVICE_ID == dppMCA8000D) {
00041                 if (m_DP5_Status->Firmware >= 0x67) {
00042                         bDMCA_LiveTime = true;
00043                 }
00044         }
00045
00046         if (bDMCA_LiveTime) {
00047                 m_DP5_Status->LiveTime = ((double)m_DP5_Status->RAW[16] + ((double)m_DP5_Status->RAW[17] * 256.0) + ((double)m_DP5_Status->RAW[18] * 65536.0) + ((double)m_DP5_Status->RAW[19] * 16777216.0)) * 0.001;
00048         } else {
00049                 m_DP5_Status->LiveTime = 0;
00050         }
00051
00052     if (m_DP5_Status->RAW[29] < 128) {
00053         m_DP5_Status->SerialNumber = (unsigned long)DppUtil.LongWordToDouble(26, m_DP5_Status->RAW);
00054     } else {
00055         m_DP5_Status->SerialNumber = -1;
00056     }
00057
00058         // m_DP5_Status->HV = (double)(m_DP5_Status->RAW[31] + (m_DP5_Status->RAW[30] & 15) * 256) * 0.5;                                       // 0.5V/count
00059
00060         if (m_DP5_Status->RAW[30] < 128)  {    // not negative
00061         m_DP5_Status->HV = ((double)m_DP5_Status->RAW[31] + ((double)m_DP5_Status->RAW[30] * 256.0)) * 0.5;  // 0.5V/count
00062         } else {
00063                 m_DP5_Status->HV = (((double)m_DP5_Status->RAW[31] + ((double)m_DP5_Status->RAW[30] * 256)) - 65536.0) * 0.5; // 0.5V/count
00064         }
00065
00066         m_DP5_Status->DET_TEMP = (double)((m_DP5_Status->RAW[33]) + (m_DP5_Status->RAW[32] & 15) * 256) * 0.1; // - 273.16;             // 0.1K/count
00067     m_DP5_Status->DP5_TEMP = m_DP5_Status->RAW[34] - ((m_DP5_Status->RAW[34] & 128) * 2);
00068
00069     m_DP5_Status->PresetRtDone = ((m_DP5_Status->RAW[35] & 128) == 128);
00070
00071         //unsigned char:35 BIT:D6
00072         // == Preset LiveTime Done for MCA8000D
00073         // == FAST Thresh locked for other dpp devices
00074         m_DP5_Status->PresetLtDone = false;
00075         m_DP5_Status->AFAST_LOCKED = false;
00076         if (bDMCA_LiveTime) {           // test for MCA8000D
00077                 m_DP5_Status->PresetLtDone = ((m_DP5_Status->RAW[35] & 64) == 64);
00078         } else {
00079                 m_DP5_Status->AFAST_LOCKED = ((m_DP5_Status->RAW[35] & 64) == 64);
00080         }
00081     m_DP5_Status->MCA_EN = ((m_DP5_Status->RAW[35] & 32) == 32);
00082     m_DP5_Status->PRECNT_REACHED = ((m_DP5_Status->RAW[35] & 16) == 16);
00083     m_DP5_Status->SCOPE_DR = ((m_DP5_Status->RAW[35] & 4) == 4);
00084     m_DP5_Status->DP5_CONFIGURED = ((m_DP5_Status->RAW[35] & 2) == 2);
00085
00086     m_DP5_Status->AOFFSET_LOCKED = ((m_DP5_Status->RAW[36] & 128) == 0);  // 0=locked, 1=searching
00087     m_DP5_Status->MCS_DONE = ((m_DP5_Status->RAW[36] & 64) == 64);
00088
00089     m_DP5_Status->b80MHzMode = ((m_DP5_Status->RAW[36] & 2) == 2);
00090     m_DP5_Status->bFPGAAutoClock = ((m_DP5_Status->RAW[36] & 1) == 1);
00091
00092     m_DP5_Status->PC5_PRESENT = ((m_DP5_Status->RAW[38] & 128) == 128);
00093     if  (m_DP5_Status->PC5_PRESENT) {
00094         m_DP5_Status->PC5_HV_POL = ((m_DP5_Status->RAW[38] & 64) == 64);
00095         m_DP5_Status->PC5_8_5V = ((m_DP5_Status->RAW[38] & 32) == 32);
00096     } else {
00097         m_DP5_Status->PC5_HV_POL = false;
00098         m_DP5_Status->PC5_8_5V = false;
00099     }
00100
00101         if (m_DP5_Status->Firmware >= 0x65) {           // reboot flag added FW6.05
00102                 if ((m_DP5_Status->RAW[36] & 32) == 32) {
00103             m_DP5_Status->ReBootFlag = true;
00104                 } else {
00105                         m_DP5_Status->ReBootFlag = false;
00106                 }
00107         } else {
00108         m_DP5_Status->ReBootFlag = false;
00109         }
00110
00111         m_DP5_Status->TEC_Voltage = (((double)(m_DP5_Status->RAW[40] & 15) * 256.0) + (double)(m_DP5_Status->RAW[41])) / 758.5;
00112         m_DP5_Status->DPP_ECO = m_DP5_Status->RAW[49];
00113         m_DP5_Status->bScintHas80MHzOption = false;
00114         m_DP5_Status->DPP_options = (m_DP5_Status->RAW[42] & 15);
00115         m_DP5_Status->HPGe_HV_INH = false;
00116         m_DP5_Status->HPGe_HV_INH_POL = false;
00117         m_DP5_Status->AU34_2 = false;
00118         m_DP5_Status->isAscInstalled = false;
00119         m_DP5_Status->isDP5_RevDxGains = false;
00120         if (m_DP5_Status->DEVICE_ID == dppPX5) {
00121                 if (m_DP5_Status->DPP_options == PX5_OPTION_HPGe_HVPS) {
00122                         m_DP5_Status->HPGe_HV_INH = ((m_DP5_Status->RAW[42] & 32) == 32);
00123                         m_DP5_Status->HPGe_HV_INH_POL = ((m_DP5_Status->RAW[42] & 16) == 16);
00124                         if (m_DP5_Status->DPP_ECO == 1) {
00125                                 m_DP5_Status->isAscInstalled = true;
00126                                 m_DP5_Status->AU34_2 = ((m_DP5_Status->RAW[42] & 64) == 64);
00127                         }
00128                 }
00129         } else if ((m_DP5_Status->DEVICE_ID == dppDP5G) || (m_DP5_Status->DEVICE_ID == dppTB5)) {
00130                 if ((m_DP5_Status->DPP_ECO == 1) || (m_DP5_Status->DPP_ECO == 2)) {
00131                         // DPP_ECO == 2 80MHz option added 20150409
00132                         m_DP5_Status->bScintHas80MHzOption = true;
00133                 }
00134         } else if (m_DP5_Status->DEVICE_ID == dppDP5) {
00135                 uiFwBuild = m_DP5_Status->Firmware;
00136                 uiFwBuild = uiFwBuild << 8;
00137                 uiFwBuild = uiFwBuild + m_DP5_Status->Build;
00138                 // uiFwBuild - firmware with build for comparison
00139                 if (uiFwBuild >= 0x686) {
00140                         // 0xFF Value indicates old Analog Gain Count of 16
00141                         // Values < 0xFF indicate new gain count of 24 and new board rev
00142                         // "DP5 G3 Configuration P" will not be used (==0xFF)
00143                         if (m_DP5_Status->DPP_ECO < 0xFF) {
00144                                 m_DP5_Status->isDP5_RevDxGains = true;
00145                         }
00146
00147                 }
00148
00149         }
00150 }
00151
00152 string CDP5Status::DP5_Dx_OptionFlags(unsigned char DP5_Dx_Options) {
00153         unsigned char D7D6;
00154         unsigned char D5D4;
00155         unsigned char D3D0;
00156         string strRev("");
00157         stringex strfn;
00158
00159         //D7-D6: 0 = DP5 Rev D
00160         //       1 = DP5 Rev E (future)
00161         //       2 = DP5 Rev F (future)
00162         //       3 = DP5 Rev G (future)
00163         D7D6 = ((DP5_Dx_Options >> 6) & 0x03) + 'D';
00164         //D5-D4: minor rev, 0-3 (i.e. Rev D0, D1 etc.)
00165         D5D4 = ((DP5_Dx_Options >> 4) & 0x03);
00166         //D3-D0: Configuration 0 = A, 1=B, 2=C... 15=P.
00167         D3D0 = (DP5_Dx_Options & 0x0F) + 'A';
00168
00169         strRev = strfn.Format("DP5 Rev %c%d Configuration %c",D7D6,D5D4,D3D0);
00170         return(strRev);
00171
00172 }
00173
00174 string CDP5Status::ShowStatusValueStrings(DP4_FORMAT_STATUS m_DP5_Status)
00175 {
00176     string strConfig("");
00177     string strTemp;
00178         string strIntPart;
00179         string strFracPart;
00180         stringex strfn;
00181
00182         strTemp = GetDeviceNameFromVal(m_DP5_Status.DEVICE_ID);
00183         strConfig = "Device Type: " + strTemp + "\r\n";
00184         strTemp = strfn.Format("Serial Number: %lu\r\n",m_DP5_Status.SerialNumber);     //SerialNumber
00185         strConfig += strTemp;
00186         strTemp = "Firmware: " + DppUtil.BYTEVersionToString(m_DP5_Status.Firmware);
00187         strConfig += strTemp;
00188         if (m_DP5_Status.Firmware > 0x65) {
00189                 strTemp = strfn.Format("  Build:  %d\r\n", m_DP5_Status.Build);
00190                 strConfig += strTemp;
00191         } else {
00192                 strConfig += "\r\n";
00193         }
00194         strTemp = "FPGA: " + DppUtil.BYTEVersionToString(m_DP5_Status.FPGA) + "\r\n";
00195         strConfig += strTemp;
00196         if (m_DP5_Status.DEVICE_ID != dppMCA8000D) {
00197                 strTemp = strfn.Format("Fast Count: %.0f\r\n",m_DP5_Status.FastCount);          //FastCount
00198                 strConfig += strTemp;
00199         }
00200         strTemp = strfn.Format("Slow Count: %.0f\r\n",m_DP5_Status.SlowCount);          //SlowCount
00201         strConfig += strTemp;
00202         strTemp = strfn.Format("GP Count: %.0f\r\n",m_DP5_Status.GP_COUNTER);           //GP Count
00203         strConfig += strTemp;
00204
00205         if (m_DP5_Status.DEVICE_ID != dppMCA8000D) {
00206                 strTemp = strfn.Format("Accumulation Time: %.0f\r\n",m_DP5_Status.AccumulationTime);        //AccumulationTime
00207                 strConfig += strTemp;
00208         }
00209
00210         strTemp = strfn.Format("Real Time: %.0f\r\n",m_DP5_Status.RealTime);        //RealTime
00211         strConfig += strTemp;
00212
00213         if (m_DP5_Status.DEVICE_ID == dppMCA8000D) {
00214                 strTemp = strfn.Format("Live Time: %.0f\r\n",m_DP5_Status.LiveTime);        //RealTime
00215                 strConfig += strTemp;
00216         }
00217
00218         return strConfig;
00219 }
00220
00221 string CDP5Status::PX5_OptionsString(DP4_FORMAT_STATUS m_DP5_Status)
00222 {
00223         string strOptions("");
00224         string strValue("");
00225
00226         if (m_DP5_Status.DEVICE_ID == dppPX5) {
00227         //m_DP5_Status.DPP_options = 1;
00228         //m_DP5_Status.HPGe_HV_INH = true;
00229         //m_DP5_Status.HPGe_HV_INH_POL = true;
00230         if (m_DP5_Status.DPP_options > 0) {
00231             //===============PX5 Options==================
00232             strOptions += "PX5 Options: ";
00233             if ((m_DP5_Status.DPP_options & 1) == 1) {
00234                 strOptions += "HPGe HVPS\r\n";
00235             } else {
00236                 strOptions += "Unknown\r\n";
00237             }
00238             //===============HPGe HVPS HV Status==================
00239             strOptions += "HPGe HV: ";
00240             if (m_DP5_Status.HPGe_HV_INH) {
00241                 strOptions += "not inhibited\r\n";
00242             } else {
00243                 strOptions += "inhibited\r\n";
00244             }
00245             //===============HPGe HVPS Inhibit Status==================
00246             strOptions += "INH Polarity: ";
00247             if (m_DP5_Status.HPGe_HV_INH_POL) {
00248                 strOptions += "high\r\n";
00249             } else {
00250                 strOptions += "low\r\n";
00251             }
00252         } else {
00253             strOptions += "PX5 Options: None\r\n";  //           strOptions += "No Options Installed"
00254         }
00255     }
00256         return strOptions;
00257 }
00258
00259 string CDP5Status::GetStatusValueStrings(DP4_FORMAT_STATUS m_DP5_Status)
00260 {
00261     string strConfig("");
00262     string strTemp;
00263         string strIntPart;
00264         string strFracPart;
00265         stringex strfn;
00266
00267         strTemp = GetDeviceNameFromVal(m_DP5_Status.DEVICE_ID);
00268         strConfig = "Device Type: " + strTemp + "\r\n";
00269         strTemp = strfn.Format("Serial Number: %lu\r\n",m_DP5_Status.SerialNumber);     //SerialNumber
00270         strConfig += strTemp;
00271         strTemp = "Firmware: " + DppUtil.BYTEVersionToString(m_DP5_Status.Firmware);
00272         strConfig += strTemp;
00273         if (m_DP5_Status.Firmware > 0x65) {
00274                 strTemp = strfn.Format("  Build:  %d\r\n", m_DP5_Status.Build);
00275                 strConfig += strTemp;
00276         } else {
00277                 strConfig += "\r\n";
00278         }
00279         strTemp = "FPGA: " + DppUtil.BYTEVersionToString(m_DP5_Status.FPGA) + "\r\n";
00280         strConfig += strTemp;
00281         if (m_DP5_Status.DEVICE_ID != dppMCA8000D) {
00282                 strTemp = strfn.Format("Fast Count: %.0f\r\n",m_DP5_Status.FastCount);          //FastCount
00283                 strConfig += strTemp;
00284         }
00285         strTemp = strfn.Format("Slow Count: %.0f\r\n",m_DP5_Status.SlowCount);          //SlowCount
00286         strConfig += strTemp;
00287         strTemp = strfn.Format("GP Count: %.0f\r\n",m_DP5_Status.GP_COUNTER);           //GP Count
00288         strConfig += strTemp;
00289
00290         if (m_DP5_Status.DEVICE_ID != dppMCA8000D) {
00291                 strTemp = strfn.Format("Accumulation Time: %.0f\r\n",m_DP5_Status.AccumulationTime);        //AccumulationTime
00292                 strConfig += strTemp;
00293         }
00294
00295         strTemp = strfn.Format("Real Time: %.0f\r\n",m_DP5_Status.RealTime);        //RealTime
00296         strConfig += strTemp;
00297
00298         if (m_DP5_Status.DEVICE_ID == dppMCA8000D) {
00299                 strTemp = strfn.Format("Live Time: %.0f\r\n",m_DP5_Status.LiveTime);        //RealTime
00300                 strConfig += strTemp;
00301         }
00302
00303    if ((m_DP5_Status.DEVICE_ID != dppDP5G) && (m_DP5_Status.DEVICE_ID != dppTB5) && (m_DP5_Status.DEVICE_ID != dppMCA8000D)) {
00304         strTemp = strfn.Format("Detector Temp: %.0fK\r\n",m_DP5_Status.DET_TEMP);               //"##0°C") ' round to nearest degree
00305                 strConfig += strTemp;
00306                 strTemp = strfn.Format("Detector HV: %.0fV\r\n",m_DP5_Status.HV);
00307                 strConfig += strTemp;
00308                 strTemp = strfn.Format("Board Temp: %d°C\r\n",(int)m_DP5_Status.DP5_TEMP);
00309                 strConfig += strTemp;
00310         } else if ((m_DP5_Status.DEVICE_ID == dppDP5G) || (m_DP5_Status.DEVICE_ID == dppTB5)) {         // GAMMARAD5,TB5
00311                 if (m_DP5_Status.DET_TEMP > 0) {
00312                         strTemp = strfn.Format("Detector Temp: %.1fK\r\n",m_DP5_Status.DET_TEMP);
00313                         strConfig += strTemp;
00314                 } else {
00315                         strConfig += "";
00316                 }
00317                 strTemp = strfn.Format("HV Set: %.0fV\r\n",m_DP5_Status.HV);
00318                 strConfig += strTemp;
00319         } else if (m_DP5_Status.DEVICE_ID == dppMCA8000D) {             // Digital MCA
00320                 strTemp = strfn.Format("Board Temp: %d°C\r\n",(int)m_DP5_Status.DP5_TEMP);
00321                 strConfig += strTemp;
00322         }
00323         if (m_DP5_Status.DEVICE_ID == dppPX5) {
00324                 strTemp = PX5_OptionsString(m_DP5_Status);
00325                 strConfig += strTemp;
00326                 strTemp = strfn.Format("TEC V: %.3fV\r\n",m_DP5_Status.TEC_Voltage);
00327                 strConfig += strTemp;
00328         }
00329         return strConfig;
00330 }
00331
00332 void CDP5Status::Process_Diagnostics(Packet_In PIN, DiagDataType *dd, int device_type)
00333 {
00334     long idxVal;
00335     string strVal;
00336         double DP5_ADC_Gain[10];  // convert each ADC count to engineering units - values calculated in FORM.LOAD
00337         double PC5_ADC_Gain[3];
00338         double PX5_ADC_Gain[12];
00339     stringex strfn;
00340
00341     DP5_ADC_Gain[0] = 1.0 / 0.00286;                // 2.86mV/C
00342     DP5_ADC_Gain[1] = 1.0;                          // Vdd mon (out-of-scale)
00343     DP5_ADC_Gain[2] = (30.1 + 20.0) / 20.0;           // PWR
00344     DP5_ADC_Gain[3] = (13.0 + 20.0) / 20.0;            // 3.3V
00345     DP5_ADC_Gain[4] = (4.99 + 20.0) / 20.0;         // 2.5V
00346     DP5_ADC_Gain[5] = 1.0;                          // 1.2V
00347     DP5_ADC_Gain[6] = (35.7 + 20.0) / 20.0;          // 5.5V
00348     DP5_ADC_Gain[7] = (35.7 + 75.0) / 35.7;        // -5.5V (this one is tricky)
00349     DP5_ADC_Gain[8] = 1.0;                          // AN_IN
00350     DP5_ADC_Gain[9] = 1.0;                          // VREF_IN
00351
00352     PC5_ADC_Gain[0] = 500.0;                        // HV: 1500V/3V
00353     PC5_ADC_Gain[1] = 100.0;                        // TEC: 300K/3V
00354     PC5_ADC_Gain[2] = (20.0 + 10.0) / 10.0;            // +8.5/5V
00355
00356         //PX5_ADC_Gain[0] = (30.1 + 20.0) / 20.0;          // PWR
00357         PX5_ADC_Gain[0] = (69.8 + 20.0) / 20.0;          // 9V (was originally PWR)
00358     PX5_ADC_Gain[1] = (13.0 + 20.0) / 20.0;            // 3.3V
00359     PX5_ADC_Gain[2] = (4.99 + 20.0) / 20.0;          // 2.5V
00360     PX5_ADC_Gain[3] = 1.0;                         // 1.2V
00361     PX5_ADC_Gain[4] = (30.1 + 20.0) / 20.0;          // 5V
00362     PX5_ADC_Gain[5] = (10.7 + 75.0) / 10.7;         // -5V (this one is tricky)
00363     PX5_ADC_Gain[6] = (64.9 + 20.0) / 20.0;          // +PA
00364     PX5_ADC_Gain[7] = (10.7 + 75) / 10.7;        // -PA
00365     PX5_ADC_Gain[8] = (16.0 + 20.0) / 20.0;            // +TEC
00366     PX5_ADC_Gain[9] = 500.0;                       // HV: 1500V/3V
00367     PX5_ADC_Gain[10] = 100.0;                       // TEC: 300K/3V
00368     PX5_ADC_Gain[11] = 1.0 / 0.00286;               // 2.86mV/C
00369
00370     dd->Firmware = PIN.DATA[0];
00371     dd->FPGA = PIN.DATA[1];
00372     strVal = "0x0" + FmtHex(PIN.DATA[2], 2) + FmtHex(PIN.DATA[3], 2) + FmtHex(PIN.DATA[4], 2);
00373     dd->SRAMTestData = strtol(strVal.c_str(),NULL,0);
00374     dd->SRAMTestPass = (dd->SRAMTestData == 0xFFFFFF);
00375     dd->TempOffset = PIN.DATA[180] + 256 * (PIN.DATA[180] > 127);  // 8-bit signed value
00376
00377         if ((device_type == dppDP5) || (device_type == dppDP5X)) {
00378                 for(idxVal=0;idxVal<10;idxVal++){
00379                         dd->ADC_V[idxVal] = (float)((((PIN.DATA[5 + idxVal * 2] & 3) * 256) + PIN.DATA[6 + idxVal * 2]) * 2.44 / 1024.0 * DP5_ADC_Gain[idxVal]); // convert counts to engineering units (C or V)
00380                 }
00381                 dd->ADC_V[7] = dd->ADC_V[7] + dd->ADC_V[6] * (float)(1.0 - DP5_ADC_Gain[7]);  // -5.5V is a function of +5.5V
00382                 dd->strTempRaw = strfn.Format("%   #.0f0C", dd->ADC_V[0] - 271.3);
00383                 dd->strTempCal = strfn.Format("%   #.0f0C", (dd->ADC_V[0] - 280.0 + dd->TempOffset));
00384         } else if (device_type == dppPX5) {
00385         for(idxVal=0;idxVal<11;idxVal++){
00386             dd->ADC_V[idxVal] = (float)((((PIN.DATA[5 + idxVal * 2] & 15) * 256) + PIN.DATA[6 + idxVal * 2]) * 3.0 / 4096.0 * PX5_ADC_Gain[idxVal]);   // convert counts to engineering units (C or V)
00387                 }
00388         dd->ADC_V[11] = (float)((((PIN.DATA[5 + 11 * 2] & 3) * 256) + PIN.DATA[6 + 11 * 2]) * 3.0 / 1024.0 * PX5_ADC_Gain[11]);  // convert counts to engineering units (C or V)
00389         dd->ADC_V[5] = (float)(dd->ADC_V[5] - (3.0 * PX5_ADC_Gain[5]) + 3.0); // -5V uses +3VR
00390         dd->ADC_V[7] = (float)(dd->ADC_V[7] - (3.0 * PX5_ADC_Gain[7]) + 3.0); // -PA uses +3VR
00391                 dd->strTempRaw = strfn.Format("%#.1fC", dd->ADC_V[11] - 271.3);
00392                 dd->strTempCal = strfn.Format("%#.1fC", (dd->ADC_V[11] - 280.0 + dd->TempOffset));
00393         }
00394
00395     dd->PC5_PRESENT = false;  // assume no PC5, then check to see if there are any non-zero bytes
00396         for(idxVal=25;idxVal<=38;idxVal++) {
00397                 if (PIN.DATA[idxVal] > 0) {
00398             dd->PC5_PRESENT = true;
00399             break;
00400         }
00401     }
00402
00403     if (dd->PC5_PRESENT) {
00404                 for(idxVal=0;idxVal<=2;idxVal++) {
00405                         dd->PC5_V[idxVal] = (float)((((PIN.DATA[25 + idxVal * 2] & 15) * 256) + PIN.DATA[26 + idxVal * 2]) * 3.0 / 4096.0 * PC5_ADC_Gain[idxVal]); // convert counts to engineering units (C or V)
00406                 }
00407                 if (PIN.DATA[34] < 128) {
00408                         dd->PC5_SN = (unsigned long)DppUtil.LongWordToDouble(31, PIN.DATA);
00409                 } else {
00410                         dd->PC5_SN = -1; // no PC5 S/N
00411                 }
00412                 if ((PIN.DATA[35] == 255) && (PIN.DATA[36] == 255)) {
00413                         dd->PC5Initialized = false;
00414                         dd->PC5DCAL = 0;
00415                 } else {
00416                         dd->PC5Initialized = true;
00417                         dd->PC5DCAL = (float)(((float)(PIN.DATA[35]) * 256.0 + (float)(PIN.DATA[36])) * 3.0 / 4096.0);
00418                 }
00419                 dd->IsPosHV = ((PIN.DATA[37] & 128) == 128);
00420                 dd->Is8_5VPreAmp = ((PIN.DATA[37] & 64) == 64);
00421                 dd->Sup9VOn = ((PIN.DATA[38] & 8) == 8);
00422                 dd->PreAmpON = ((PIN.DATA[38] & 4) == 4);
00423                 dd->HVOn = ((PIN.DATA[38] & 2) == 2);
00424                 dd->TECOn = ((PIN.DATA[38] & 1) == 1);
00425         } else {
00426         for(idxVal=0;idxVal<=2;idxVal++) {
00427             dd->PC5_V[idxVal] = 0;
00428                 }
00429         dd->PC5_SN = -1; // no PC5 S/N
00430         dd->PC5Initialized = false;
00431         dd->PC5DCAL = 0;
00432         dd->IsPosHV = false;
00433         dd->Is8_5VPreAmp = false;
00434         dd->Sup9VOn = false;
00435         dd->PreAmpON = false;
00436         dd->HVOn = false;
00437         dd->TECOn = false;
00438     }
00439         for(idxVal=0;idxVal<=191;idxVal++) {
00440         dd->DiagData[idxVal] = PIN.DATA[idxVal + 39];
00441     }
00442         //string strData;
00443         //strData = DisplayBufferArray(PIN.DATA, 256);
00444         //SaveStringDataToFile(strData);
00445 }
00446
00447 string CDP5Status::DiagnosticsToString(DiagDataType dd, int device_type)
00448 {
00449     long idxVal;
00450         string strVal;
00451     string strDiag;
00452         stringex strfn;
00453
00454     strDiag = "Firmware: " + VersionToStr(dd.Firmware) + "\r\n";
00455     strDiag += "FPGA: " + VersionToStr(dd.FPGA) + "\r\n";
00456     strDiag += "SRAM Test: ";
00457     if (dd.SRAMTestPass) {
00458         strDiag += "PASS\r\n";
00459     } else {
00460         strDiag += "ERROR @ 0x" + FmtHex(dd.SRAMTestData, 6) + "\r\n";
00461     }
00462
00463         if ((device_type == dppDP5) || (device_type == dppDP5X)) {
00464                 strDiag += "DP5 Temp (raw): " + dd.strTempRaw + "\r\n";
00465                 strDiag += "DP5 Temp (cal'd): " + dd.strTempCal + "\r\n";
00466                 strDiag += "PWR: " + FmtPc5Pwr(dd.ADC_V[2]) + "\r\n";
00467                 strDiag += "3.3V: " + FmtPc5Pwr(dd.ADC_V[3]) + "\r\n";
00468                 strDiag += "2.5V: " + FmtPc5Pwr(dd.ADC_V[4]) + "\r\n";
00469                 strDiag += "1.2V: " + FmtPc5Pwr(dd.ADC_V[5]) + "\r\n";
00470                 strDiag += "+5.5V: " + FmtPc5Pwr(dd.ADC_V[6]) + "\r\n";
00471                 strDiag += "-5.5V: " + FmtPc5Pwr(dd.ADC_V[7]) + "\r\n";
00472                 strDiag += "AN_IN: " + FmtPc5Pwr(dd.ADC_V[8]) + "\r\n";
00473                 strDiag += "VREF_IN: " + FmtPc5Pwr(dd.ADC_V[9]) + "\r\n";
00474
00475                 strDiag += "\r\n";
00476                 if (dd.PC5_PRESENT) {
00477                         strDiag += "PC5: Present\r\n";
00478                         strVal = strfn.Format("%dV",(int)(dd.PC5_V[0]));
00479                         strDiag += "HV: " + strVal + "\r\n";
00480                         strVal = strfn.Format("%#.1fK",dd.PC5_V[1]);
00481                         strDiag += "Detector Temp: " + strVal + "\r\n";
00482                         strDiag += "+8.5/5V: " + FmtPc5Pwr(dd.PC5_V[2]) + "\r\n";
00483                         if (dd.PC5_SN > -1) {
00484                                 strDiag += "PC5 S/N: " + FmtLng(dd.PC5_SN) + "\r\n";
00485                         } else {
00486                                 strDiag += "PC5 S/N: none\r\n";
00487                         }
00488                         if (dd.PC5Initialized) {
00489                                 strDiag += "PC5 DCAL: " + FmtPc5Pwr(dd.PC5DCAL) + "\r\n";
00490                         } else {
00491                                 strDiag += "PC5 DCAL: Uninitialized\r\n";
00492                         }
00493                         strDiag += "PC5 Flavor: ";
00494                         strDiag += IsAorB(dd.IsPosHV, "+HV, ", "-HV, ");
00495                         strDiag += IsAorB(dd.Is8_5VPreAmp, "8.5V preamp", "5V preamp") + "\r\n";
00496                         strDiag += "PC5 Supplies:\r\n";
00497                         strDiag += "9V: " + OnOffStr(dd.Sup9VOn) + "\r\n";
00498                         strDiag += "Preamp: " + OnOffStr(dd.PreAmpON) + "\r\n";
00499                         strDiag += "HV: " + OnOffStr(dd.HVOn) + "\r\n";
00500                         strDiag += "TEC: " + OnOffStr(dd.TECOn) + "\r\n";
00501                 } else {
00502                         strDiag += "PC5: Not Present\r\n";
00503                 }
00504         } else if (device_type == dppPX5) {
00505                 strDiag += "PX5 Temp (raw): " + dd.strTempRaw + "\r\n";
00506                 strDiag += "PX5 Temp (cal'd): " + dd.strTempCal + "\r\n";
00507                 //strDiag += "PWR: " + FmtPc5Pwr(dd.ADC_V[0]) + "\r\n";
00508                 strDiag += "9V: " + FmtPc5Pwr(dd.ADC_V[0]) + "\r\n";
00509                 strDiag += "3.3V: " + FmtPc5Pwr(dd.ADC_V[1]) + "\r\n";
00510                 strDiag += "2.5V: " + FmtPc5Pwr(dd.ADC_V[2]) + "\r\n";
00511                 strDiag += "1.2V: " + FmtPc5Pwr(dd.ADC_V[3]) + "\r\n";
00512                 strDiag += "+5V: " + FmtPc5Pwr(dd.ADC_V[4]) + "\r\n";
00513                 strDiag += "-5V: " + FmtPc5Pwr(dd.ADC_V[5]) + "\r\n";
00514                 strDiag += "+PA: " + FmtPc5Pwr(dd.ADC_V[6]) + "\r\n";
00515                 strDiag += "-PA: " + FmtPc5Pwr(dd.ADC_V[7]) + "\r\n";
00516                 strDiag += "TEC: " + FmtPc5Pwr(dd.ADC_V[8]) + "\r\n";
00517                 strDiag += "ABS(HV): " + FmtHvPwr(dd.ADC_V[9]) + "\r\n";
00518                 strDiag += "DET_TEMP: " + FmtPc5Temp(dd.ADC_V[10]) + "\r\n";
00519         }
00520
00521     strDiag += "\r\nDiagnostic Data\r\n";
00522     strDiag += "---------------\r\n";
00523         for(idxVal=0;idxVal<=191;idxVal++) {
00524         if ((idxVal % 8) == 0) {
00525                         strDiag += FmtHex(idxVal, 2) + ":";
00526                 }
00527         strDiag += FmtHex(dd.DiagData[idxVal], 2) + " ";
00528         if ((idxVal % 8) == 7) {
00529                         strDiag += "\r\n";
00530                 }
00531     }
00532     return (strDiag);
00533 }
00534
00535 string CDP5Status::DiagStrPX5Option(DiagDataType dd, int device_type)
00536 {
00537     long idxVal;
00538         string strVal;
00539     string strDiag;
00540         stringex strfn;
00541
00542     strDiag = "Firmware: " + VersionToStr(dd.Firmware) + "\r\n";
00543     strDiag += "FPGA: " + VersionToStr(dd.FPGA) + "\r\n";
00544     strDiag += "SRAM Test: ";
00545     if (dd.SRAMTestPass) {
00546         strDiag += "PASS\r\n";
00547     } else {
00548         strDiag += "ERROR @ 0x" + FmtHex(dd.SRAMTestData, 6) + "\r\n";
00549     }
00550
00551         if (device_type == dppPX5) {
00552                 strDiag += "PX5 Temp (raw): " + dd.strTempRaw + "\r\n";
00553                 strDiag += "PX5 Temp (cal'd): " + dd.strTempCal + "\r\n";
00554                 strDiag += "9V: " + FmtPc5Pwr(dd.ADC_V[0]) + "\r\n";
00555                 strDiag += "3.3V: " + FmtPc5Pwr(dd.ADC_V[1]) + "\r\n";
00556                 strDiag += "2.5V: " + FmtPc5Pwr(dd.ADC_V[2]) + "\r\n";
00557                 strDiag += "TDET: " + FmtPc5Pwr(dd.ADC_V[3]) + "\r\n";
00558                 strDiag += "+5V: " + FmtPc5Pwr(dd.ADC_V[4]) + "\r\n";
00559                 strDiag += "-5V: " + FmtPc5Pwr(dd.ADC_V[5]) + "\r\n";
00560                 strDiag += "+PA: " + FmtPc5Pwr(dd.ADC_V[6]) + "\r\n";
00561                 strDiag += "-PA: " + FmtPc5Pwr(dd.ADC_V[7]) + "\r\n";
00562                 strDiag += "TEC: " + FmtPc5Pwr(dd.ADC_V[8]) + "\r\n";
00563                 strDiag += "ABS(HV): " + FmtHvPwr(dd.ADC_V[9]) + "\r\n";
00564                 strDiag += "DET_TEMP: " + FmtPc5Temp(dd.ADC_V[10]) + "\r\n";
00565         }
00566
00567     strDiag += "\r\nDiagnostic Data\r\n";
00568     strDiag += "---------------\r\n";
00569         for(idxVal=0;idxVal<=191;idxVal++) {
00570         if ((idxVal % 8) == 0) {
00571                         strDiag += FmtHex(idxVal, 2) + ":";
00572                 }
00573         strDiag += FmtHex(dd.DiagData[idxVal], 2) + " ";
00574         if ((idxVal % 8) == 7) {
00575                         strDiag += "\r\n";
00576                 }
00577     }
00578     return (strDiag);
00579 }
00580
00581 string CDP5Status::FmtHvPwr(float fVal)
00582 {
00583         string strVal;
00584         stringex strfn;
00585         strVal = strfn.Format("%#.1fV", fVal);  // "#.##0V"
00586         return strVal;
00587 }
00588
00589 string CDP5Status::FmtPc5Pwr(float fVal)
00590 {
00591         string strVal;
00592         stringex strfn;
00593         strVal = strfn.Format("%#.3fV", fVal);  // "#.##0V"
00594         return strVal;
00595 }
00596
00597 string CDP5Status::FmtPc5Temp(float fVal)
00598 {
00599         string strVal;
00600         stringex strfn;
00601         strVal = strfn.Format("%#.1fK", fVal);  // "#.##0V"
00602         return strVal;
00603 }
00604
00605 string CDP5Status::FmtHex(long FmtHex, long HexDig)
00606 {
00607         string strHex;
00608         string strFmt;
00609         stringex strfn;
00610         strFmt = strfn.Format("%d",HexDig);             // max size of 0 pad
00611         strFmt = "%0" + strFmt + "X";           // string format specifier
00612         strHex = strfn.Format(strFmt.c_str(), FmtHex);  // create padded string
00613         return strHex;
00614 }
00615
00616 string CDP5Status::FmtLng(long lVal)
00617 {
00618         string strVal;
00619         stringex strfn;
00620         strVal = strfn.Format("%d", lVal);
00621         return strVal;
00622 }
00623
00624 string CDP5Status::VersionToStr(unsigned char bVersion)
00625 {
00626         string strVerMajor;
00627         string strVerMinor;
00628         string strVer;
00629         stringex strfn;
00630         strVerMajor = strfn.Format("%d",((bVersion & 0xF0) / 16));
00631         strVerMinor = strfn.Format("%02d",(bVersion & 0x0F));
00632         strVer = strVerMajor + "." + strVerMinor;
00633         return (strVer);
00634 }
00635
00636 string CDP5Status::OnOffStr(bool bOn)
00637 {
00638     if (bOn) {
00639         return("ON");
00640     } else {
00641         return("OFF");
00642     }
00643 }
00644
00645 string CDP5Status::IsAorB(bool bIsA, string strA, string strB)
00646 {
00647     if (bIsA) {
00648         return(strA);
00649     } else {
00650         return(strB);
00651     }
00652 }
00653
00654 string CDP5Status::GetDeviceNameFromVal(int DeviceTypeVal)
00655 {
00656     string strDeviceType;
00657         switch(DeviceTypeVal) {
00658                 case 0:
00659             strDeviceType = "DP5";
00660                         break;
00661                 case 1:
00662             strDeviceType = "PX5";
00663                         break;
00664                 case 2:
00665             strDeviceType = "DP5G";
00666                         break;
00667                 case 3:
00668             strDeviceType = "MCA8000D";
00669                         break;
00670                 case 4:
00671             strDeviceType = "TB5";
00672                         break;
00673                 case 5:
00674             strDeviceType = "DP5-X";
00675                         break;
00676                 default:           //if unknown set to DP5
00677             strDeviceType = "DP5";
00678                         break;
00679         }
00680     return strDeviceType;
00681 }
00682
00683 string CDP5Status::DisplayBufferArray(unsigned char buffer[], unsigned long bufSizeIn)
00684 {
00685     unsigned long i;
00686         string strVal("");
00687         string strMsg("");
00688         stringex strfn;
00689         for(i=0;i<bufSizeIn;i++) {
00690                 strVal = strfn.Format("%.2X ",buffer[i]);
00691                 strMsg += strVal;
00692                 //if (((i+1) % 16) == 0 ) {
00693                 //      strMsg += "\r\n";
00694                 //} else
00695                 if (((i+1) % 8) == 0 ) {
00696                 //      strMsg += "   ";
00697                         //strMsg += "\r\n";
00698                         strMsg += "\n";
00699                 }
00700         }
00701         //strMsg += "\n";
00702         return strMsg;
00703 }
00704
00705 void CDP5Status::SaveStringDataToFile(string strData)
00706 {
00707         FILE  *out;
00708         string strFilename;
00709         string strError;
00710         stringex strfn;
00711
00712         strFilename = "vcDP5_Data.txt";
00713
00714         if ( (out = fopen(strFilename.c_str(),"w")) == (FILE *) NULL)
00715                 strError = strfn.Format("Couldn't open %s for writing.\n", strFilename.c_str());
00716         else
00717         {
00718                 fprintf(out,"%s\n",strData.c_str());
00719         }
00720         fclose(out);
00721 }
00722
00723
00724
00725
00726
00727
00728
00729
00730
00731
00732
00733
00734
Generated on Thu Sep 21 2017 16:01:13 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: DeviceIO/DP5Status.h File Reference

  • File List
  • File Members
Classes | Typedefs | Enumerations
DeviceIO/DP5Status.h File Reference
#include <stdio.h>
#include <stdlib.h>
#include "DP5Protocol.h"
#include "DppUtilities.h"
Include dependency graph for DP5Status.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct | DP5_DP4_FORMAT_STATUS
struct | _DiagDataType
class | CDP5Status

Typedefs

typedef enum _PX5_OPTIONS | PX5_OPTIONS
typedef struct
DP5_DP4_FORMAT_STATUS 		DP4_FORMAT_STATUS
typedef struct
DP5_DP4_FORMAT_STATUS * 		PDP4_FORMAT_STATUS
typedef struct _DiagDataType | DiagDataType
typedef struct _DiagDataType * | PDDiagDataType

Enumerations

enum _PX5_OPTIONS {
PX5_OPTION_NONE = 0, PX5_OPTION_HPGe_HVPS = 1,
PX5_OPTION_TEST_TEK = 4, PX5_OPTION_TEST_MOX = 5,
PX5_OPTION_TEST_AMP = 6, PX5_OPTION_TEST_MODE_1 = 8,
PX5_OPTION_TEST_MODE_2 = 9
}

Typedef Documentation

typedef struct _DiagDataType DiagDataType
typedef struct DP5_DP4_FORMAT_STATUS DP4_FORMAT_STATUS
typedef struct _DiagDataType * PDDiagDataType
typedef struct DP5_DP4_FORMAT_STATUS * PDP4_FORMAT_STATUS
typedef enum _PX5_OPTIONS PX5_OPTIONS

CDP5Status CDP5Status

Enumeration Type Documentation

enum _PX5_OPTIONS

CDP5Status CDP5Status

Enumerator:
PX5_OPTION_NONE
PX5_OPTION_HPGe_HVPS
PX5_OPTION_TEST_TEK
PX5_OPTION_TEST_MOX
PX5_OPTION_TEST_AMP
PX5_OPTION_TEST_MODE_1
PX5_OPTION_TEST_MODE_2

Definition at line 9 of file DP5Status.h.

Generated on Thu Sep 21 2017 16:01:13 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: DeviceIO/DP5Status.h Source File

  • File List
  • File Members
DeviceIO/DP5Status.h
Go to the documentation of this file.
00001
00003 #pragma once
00004 #include <stdio.h>
00005 #include <stdlib.h>
00006 #include "DP5Protocol.h"
00007 #include "DppUtilities.h"
00008
00009 typedef enum _PX5_OPTIONS
00010 {
00011         PX5_OPTION_NONE=0,
00012         PX5_OPTION_HPGe_HVPS=1,
00013         PX5_OPTION_TEST_TEK=4,
00014         PX5_OPTION_TEST_MOX=5,
00015         PX5_OPTION_TEST_AMP=6,
00016         PX5_OPTION_TEST_MODE_1=8,
00017         PX5_OPTION_TEST_MODE_2=9
00018 } PX5_OPTIONS;
00019
00020 //PX5_OPTION_TEST_MODE_1 reserved for future use
00021 //PX5_OPTION_TEST_MODE_2 reserved for future use
00022
00023 typedef struct DP5_DP4_FORMAT_STATUS
00024 {
00025     unsigned char RAW[64];
00026     unsigned long SerialNumber;
00027     double FastCount;
00028     double SlowCount;
00029     unsigned char FPGA;
00030     unsigned char Firmware;
00031         unsigned char Build;
00032     double AccumulationTime;
00033     double RealTime;
00034     double LiveTime;
00035     double HV;
00036     double DET_TEMP;
00037     double DP5_TEMP;
00038     bool PX4;
00039     bool AFAST_LOCKED;
00040     bool MCA_EN;
00041     bool PRECNT_REACHED;
00042         bool PresetRtDone;
00043         bool PresetLtDone;
00044     bool SUPPLIES_ON;
00045     bool SCOPE_DR;
00046     bool DP5_CONFIGURED;
00047     double GP_COUNTER;
00048     bool AOFFSET_LOCKED;
00049     bool MCS_DONE;
00050     bool RAM_TEST_RUN;
00051     bool RAM_TEST_ERROR;
00052     double DCAL;
00053     unsigned char PZCORR;                               // or single?
00054     unsigned char UC_TEMP_OFFSET;
00055     double AN_IN;
00056     double VREF_IN;
00057     unsigned long PC5_SN;
00058     bool PC5_PRESENT;
00059     bool PC5_HV_POL;
00060     bool PC5_8_5V;
00061     double ADC_GAIN_CAL;
00062     unsigned char ADC_OFFSET_CAL;
00063     long SPECTRUM_OFFSET;     // or single?
00064         bool b80MHzMode;
00065         bool bFPGAAutoClock;
00066         unsigned char DEVICE_ID;
00067         bool ReBootFlag;
00068         unsigned char DPP_options;
00069         bool HPGe_HV_INH;
00070         bool HPGe_HV_INH_POL;
00071         double TEC_Voltage;
00072         unsigned char DPP_ECO;
00073         bool AU34_2;
00074         bool isAscInstalled;
00075         bool isAscEnabled;
00076         bool bScintHas80MHzOption;
00077         bool isDP5_RevDxGains;
00078 } DP4_FORMAT_STATUS, *PDP4_FORMAT_STATUS;
00079
00080 typedef struct _DiagDataType
00081 {
00082     float ADC_V[12];
00083     float PC5_V[4];
00084     bool PC5_PRESENT;
00085     long PC5_SN;
00086     unsigned char Firmware;
00087     unsigned char FPGA;
00088     bool SRAMTestPass;
00089     long SRAMTestData;
00090     int TempOffset;
00091     string strTempRaw;
00092     string strTempCal;
00093     bool PC5Initialized;
00094     float PC5DCAL;
00095     bool IsPosHV;
00096     bool Is8_5VPreAmp;
00097     bool Sup9VOn;
00098     bool PreAmpON;
00099     bool HVOn;
00100     bool TECOn;
00101     unsigned char DiagData[192];
00102 } DiagDataType, *PDDiagDataType;
00103
00104 class CDP5Status
00105 {
00106 public:
00107         CDP5Status(void);
00108         ~CDP5Status(void);
00109
00111         CDppUtilities DppUtil;
00112
00114         DP4_FORMAT_STATUS m_DP5_Status;
00116         DiagDataType DiagData;
00118         void Process_Status(DP4_FORMAT_STATUS *m_DP5_Status);
00119         string DP5_Dx_OptionFlags(unsigned char DP5_Dx_Options);
00121         string ShowStatusValueStrings(DP4_FORMAT_STATUS m_DP5_Status);
00122         string PX5_OptionsString(DP4_FORMAT_STATUS m_DP5_Status);
00123         string GetStatusValueStrings(DP4_FORMAT_STATUS m_DP5_Status);
00124
00126         void Process_Diagnostics(Packet_In PIN, DiagDataType *dd, int device_type);
00128         string DiagnosticsToString(DiagDataType dd, int device_type);
00130         string DiagStrPX5Option(DiagDataType dd, int device_type);
00131
00133         string FmtHvPwr(float fVal);
00135         string FmtPc5Pwr(float fVal);
00137         string FmtPc5Temp(float fVal) ;
00139         string FmtHex(long FmtHex, long HexDig);
00141         string FmtLng(long lVal);
00143         string VersionToStr(unsigned char bVersion);
00145         string OnOffStr(bool bOn);
00147         string IsAorB(bool bIsA, string strA, string strB);
00149         string GetDeviceNameFromVal(int DeviceTypeVal) ;
00151         string DisplayBufferArray(unsigned char buffer[], unsigned long bufSizeIn);
00153         void SaveStringDataToFile(string strData);
00154
00155 };
00156
00157
00158
00159
00160
00161
00162
00163
00164
00165
00166
00167
00168
00169
00170
00171
00172
00173
00174
00175
Generated on Thu Sep 21 2017 16:01:13 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: DeviceIO/DppConst.h File Reference

  • File List
  • File Members
Defines | Typedefs | Enumerations
DeviceIO/DppConst.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define | DP5_DPP_TYPES_FIRST dppDP5
#define | DP5_DPP_TYPES_LAST dppDP5X

Typedefs

typedef enum DP5_DPP_TYPES | dp5DppTypes

Enumerations

enum DP5_DPP_TYPES {
dppDP5, dppPX5,
dppDP5G, dppMCA8000D,
dppTB5, dppDP5X
}

Define Documentation

#define DP5_DPP_TYPES_FIRST dppDP5

Definition at line 20 of file DppConst.h.

#define DP5_DPP_TYPES_LAST dppDP5X

Definition at line 21 of file DppConst.h.

Typedef Documentation

typedef enum DP5_DPP_TYPES dp5DppTypes

Enumeration Type Documentation

enum DP5_DPP_TYPES
Enumerator:
dppDP5

DP5 uses DPP new (this) protocol is supported in this application ==0.

dppPX5

PX5 uses DPP new (this) protocol is supported in this application ==1.

dppDP5G

DP5G uses DPP new (this) protocol is supported in this application ==2.

dppMCA8000D

MCA8000D uses DPP new (this) protocol is supported in this application ==3.

dppTB5

TB5 uses DPP new (this) protocol is supported in this application ==4.

dppDP5X

DP5X uses DPP new (this) protocol is supported in this application ==5.

Definition at line 4 of file DppConst.h.

Generated on Thu Sep 21 2017 16:01:13 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: DeviceIO/DppConst.h Source File

  • File List
  • File Members
DeviceIO/DppConst.h
Go to the documentation of this file.
00001
00002 #pragma once
00003
00004 typedef enum DP5_DPP_TYPES
00005 {
00007         dppDP5,
00009         dppPX5,
00011         dppDP5G,
00013         dppMCA8000D,
00015         dppTB5,
00017         dppDP5X
00018 } dp5DppTypes;
00019
00020 #define DP5_DPP_TYPES_FIRST dppDP5
00021 #define DP5_DPP_TYPES_LAST dppDP5X
Generated on Thu Sep 21 2017 16:01:13 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: DeviceIO/DppLibUsb.cpp File Reference

  • File List
  • File Members
DeviceIO/DppLibUsb.cpp File Reference
#include "DppLibUsb.h"
Include dependency graph for DppLibUsb.cpp:

Go to the source code of this file.

Generated on Thu Sep 21 2017 16:01:13 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: DeviceIO/DppLibUsb.cpp Source File

  • File List
  • File Members
DeviceIO/DppLibUsb.cpp
Go to the documentation of this file.
00001 #include "DppLibUsb.h"
00002
00003 CDppLibUsb::CDppLibUsb(void)
00004 {
00005
00006 }
00007 CDppLibUsb::~CDppLibUsb(void)
00008 {
00009
00010 }
00011
00012 // InitializeLibusb must be call before any other libusb operations
00013 int CDppLibUsb::InitializeLibusb()
00014 {
00015         int iStatus=0;
00016         iStatus = libusb_init(NULL);
00017         if (iStatus != 0) {
00018                 fprintf(stderr, "Unable to initialize libusb. %s\n", libusb_strerror((libusb_error)iStatus));
00019         }
00020         return iStatus;
00021 }
00022
00023 // DeinitializeLibusb must be called after all libusb operations
00024 // have been completed and all devices/lists are closed
00025 void CDppLibUsb::DeinitializeLibusb()
00026 {
00027         libusb_exit(NULL);
00028 }
00029
00030 // devices start at 1
00031 // Do only when no devices are connected
00032 libusb_device_handle * CDppLibUsb::FindUSBDevice(int idxAmptekDevice)
00033 {
00034         struct libusb_device **devs;
00035         struct libusb_device *found = NULL;
00036         struct libusb_device_handle *handle = NULL;
00037         struct libusb_device_descriptor desc;
00038         struct libusb_device *device = NULL;
00039         ssize_t devcnt = 0;
00040         ssize_t iDev = 0;
00041         int r;
00042         int idxDev=1;
00043
00044         bDeviceConnected = false;
00045         devcnt = libusb_get_device_list(NULL, &devs);
00046         if (devcnt < 0) {
00047                 fprintf(stderr, "failed to get device list");
00048                 return NULL;
00049         }
00050         for (iDev = 0; iDev < devcnt; iDev++) {
00051                 device = devs[iDev];
00052                 int r = libusb_get_device_descriptor (device, &desc);
00053                 if (r < 0) {
00054                         fprintf(stderr, libusb_strerror((libusb_error)r));
00055                         goto out;
00056                         //continue;
00057                 }
00058                 if (isAmptekDP5Device(desc)) {
00059                         if (idxAmptekDevice==idxDev) {
00060                                 found = device;
00061                                 break;
00062                         } else {        // inc counter to next device
00063                                 idxDev++;
00064                         }
00065                 }
00066         }
00067         if (found) {
00068                 r = libusb_open(found, &handle);
00069                 if (r < 0) {
00070                         fprintf(stderr, libusb_strerror((libusb_error)r));
00071                         handle = NULL;
00072                 } else {
00073                         if (handle != NULL) {
00074                                 r = libusb_claim_interface(handle, INTERFACE_NUMBER);
00075                                 if (r >= 0) {
00076                                         bDeviceConnected = true; // have interface
00077                                 } else {
00078                                         fprintf(stderr, "libusb_claim_interface error %s\n", libusb_strerror((libusb_error)r));
00079                                 }
00080                         } else {
00081                                 fprintf(stderr, "Unable to find a dpp device.\n");
00082                         }
00083                 }
00084         }
00085
00086 out:
00087         libusb_free_device_list(devs, 1);
00088         return handle;
00089 }
00090
00091 void CDppLibUsb::CloseUSBDevice(libusb_device_handle * devh)
00092 {
00093         int r;
00094         if (devh != NULL) {
00095                 r = libusb_release_interface(devh, INTERFACE_NUMBER);
00096                 if (r < 0) {
00097                         fprintf(stderr, "libusb_release_interface error %s\n", libusb_strerror((libusb_error)r));
00098                 }
00099                 libusb_close(devh);
00100         }
00101 }
00102
00103 int CDppLibUsb::SendPacketUSB(libusb_device_handle *devh, unsigned char data_out[], unsigned char data_in[])
00104 {
00105         int bytes_transferred;
00106         unsigned int timeout = 5000;
00107         int result = 0;
00108         int length = 0;
00109
00110         if ((data_out[2] == PID1_REQ_SCOPE_MISC_TO) && data_out[3] == PID2_SEND_DIAGNOSTIC_DATA_TO) {
00111                 timeout = DP5_DIAGDATA_TIMEOUT;
00112         } else {
00113                 timeout = DP5_USB_TIMEOUT;
00114         }
00115
00116         length = data_out[4];
00117         length *= 256;
00118         length += data_out[5];
00119         length += 8;
00120
00121         result = libusb_bulk_transfer(devh, BULK_OUT_ENDPOINT, data_out, length, &bytes_transferred, timeout);
00122         if (result >= 0) {
00123                 result = libusb_bulk_transfer(devh, BULK_IN_ENDPOINT, data_in, MAX_BULK_IN_TRANSFER_SIZE, &bytes_transferred, timeout);
00124                 if (result >= 0) {
00125                         if (bytes_transferred > 0) {
00126                                 return bytes_transferred;
00127                         } else {
00128                                 fprintf(stderr, "No data received in bulk transfer (%d)\n", result);
00129                                 return -1;
00130                         }
00131                 } else {
00132                         fprintf(stderr, "Error receiving data via bulk transfer %d\n", result);
00133                         return result;
00134                 }
00135         } else {
00136                 fprintf(stderr, "Error sending data via bulk transfer %d\n", result);
00137                 return result;
00138         }
00139         return 0;
00140  }
00141
00142 bool CDppLibUsb::isAmptekDP5Device(libusb_device_descriptor desc)
00143 {
00144         bool isDevice=false;
00145         if ((desc.idVendor == AMPTEK_DP5_VENDOR_ID) && (desc.idProduct == AMPTEK_DP5_PRODUCT_ID))
00146         {
00147                 isDevice=true;
00148         }
00149         return isDevice;
00150 }
00151
00152 // Counts number of dpp devices
00153 // Do only when no devices are connected
00154 int CDppLibUsb::CountDP5LibusbDevices()
00155 {
00156         libusb_device **devs;
00157         int iDppCount=0;
00158
00159         ssize_t cnt = libusb_get_device_list (NULL, &devs);
00160         if (cnt < 0)
00161                 return (-1);
00162         int nr = 0, i = 0;
00163         struct libusb_device_descriptor desc;
00164         for (i = 0; i < cnt; ++i)
00165         {
00166                 int r = libusb_get_device_descriptor (devs[i], &desc);
00167                 if (r != 0) {
00168                         fprintf(stderr, libusb_strerror((libusb_error)r));
00169                         continue;
00170                 }
00171                 if (isAmptekDP5Device(desc)) { nr++; }
00172         }
00173         libusb_free_device_list (devs, 1);
00174         iDppCount = (int)nr;
00175         return iDppCount;
00176 }
00177
00178 // Do only when no devices are connected
00179 void CDppLibUsb::PrintDevices()
00180 {
00181         struct libusb_device **devs;
00182         struct libusb_device *dev = NULL;
00183         int i = 0;
00184         ssize_t cnt = 0;
00185
00186         cnt = libusb_get_device_list(NULL, &devs);
00187         if (cnt < 0) {
00188                 fprintf(stderr, "failed to get device list");
00189                 return;
00190         }
00191
00192         while ((dev = devs[i++]) != NULL) {
00193                 struct libusb_device_descriptor desc;
00194                 int r = libusb_get_device_descriptor(dev, &desc);
00195                 if (r < 0) {
00196                         fprintf(stderr, "device descriptor error: %s", libusb_strerror((libusb_error)r));
00197                         return;
00198                 }
00199                 if (isAmptekDP5Device(desc)) {
00200                         printf("%04x:%04x (bus %d, device %d)\n", desc.idVendor, desc.idProduct, libusb_get_bus_number(dev), libusb_get_device_address(dev));
00201                 }
00202         }
00203         libusb_free_device_list(devs, 1);
00204 }
00205
00206 #ifndef LIBUSB_WINUSB_BACKEND
00207 const char * CDppLibUsb::libusb_strerror(enum libusb_error error_code)
00208 {
00209         switch (error_code) {
00210         case LIBUSB_SUCCESS:
00211                 return "Success";
00212         case LIBUSB_ERROR_IO:
00213                 return "Input/output error";
00214         case LIBUSB_ERROR_INVALID_PARAM:
00215                 return "Invalid parameter";
00216         case LIBUSB_ERROR_ACCESS:
00217                 return "Access denied (insufficient permissions)";
00218         case LIBUSB_ERROR_NO_DEVICE:
00219                 return "No such device (it may have been disconnected)";
00220         case LIBUSB_ERROR_NOT_FOUND:
00221                 return "Entity not found";
00222         case LIBUSB_ERROR_BUSY:
00223                 return "Resource busy";
00224         case LIBUSB_ERROR_TIMEOUT:
00225                 return "Operation timed out";
00226         case LIBUSB_ERROR_OVERFLOW:
00227                 return "Overflow";
00228         case LIBUSB_ERROR_PIPE:
00229                 return "Pipe error";
00230         case LIBUSB_ERROR_INTERRUPTED:
00231                 return "System call interrupted (perhaps due to signal)";
00232         case LIBUSB_ERROR_NO_MEM:
00233                 return "Insufficient memory";
00234         case LIBUSB_ERROR_NOT_SUPPORTED:
00235                 return "Operation not supported or unimplemented on this platform";
00236         case LIBUSB_ERROR_OTHER:
00237                 return "Other error";
00238         }
00239         return "Unknown error";
00240 }
00241 #endif
Generated on Thu Sep 21 2017 16:01:13 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: DeviceIO/DppLibUsb.h File Reference

  • File List
  • File Members
Classes | Defines
DeviceIO/DppLibUsb.h File Reference
#include <libusb.h>
#include <stdio.h>
#include <sys/types.h>
#include <string.h>
Include dependency graph for DppLibUsb.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class | CDppLibUsb

Defines

#define | AMPTEK_DP5_VENDOR_ID 0x10C4
#define | AMPTEK_DP5_PRODUCT_ID 0x842A
#define | INTERFACE_NUMBER 0
#define | TIMEOUT_MS 5000
#define | BULK_IN_ENDPOINT 0x81
#define | BULK_OUT_ENDPOINT 0x02
#define | MAX_BULK_IN_TRANSFER_SIZE 32768
#define | MAX_BULK_OUT_TRANSFER_SIZE 520
#define | STATUS_PACKET_SIZE 64
#define | DP5_USB_TIMEOUT 500
#define | DP5_DIAGDATA_TIMEOUT 2500
#define | PID1_REQ_SCOPE_MISC_TO 0x03
#define | PID2_SEND_DIAGNOSTIC_DATA_TO 0x05

Define Documentation

#define AMPTEK_DP5_PRODUCT_ID 0x842A

Definition at line 21 of file DppLibUsb.h.

#define AMPTEK_DP5_VENDOR_ID 0x10C4

Definition at line 20 of file DppLibUsb.h.

#define BULK_IN_ENDPOINT 0x81

Definition at line 25 of file DppLibUsb.h.

#define BULK_OUT_ENDPOINT 0x02

Definition at line 26 of file DppLibUsb.h.

#define DP5_DIAGDATA_TIMEOUT 2500

Definition at line 31 of file DppLibUsb.h.

#define DP5_USB_TIMEOUT 500

Definition at line 30 of file DppLibUsb.h.

#define INTERFACE_NUMBER 0

Definition at line 23 of file DppLibUsb.h.

#define MAX_BULK_IN_TRANSFER_SIZE 32768

Definition at line 27 of file DppLibUsb.h.

#define MAX_BULK_OUT_TRANSFER_SIZE 520

Definition at line 28 of file DppLibUsb.h.

#define PID1_REQ_SCOPE_MISC_TO 0x03

Definition at line 32 of file DppLibUsb.h.

#define PID2_SEND_DIAGNOSTIC_DATA_TO 0x05

Definition at line 33 of file DppLibUsb.h.

#define STATUS_PACKET_SIZE 64

Definition at line 29 of file DppLibUsb.h.

#define TIMEOUT_MS 5000

Definition at line 24 of file DppLibUsb.h.

Generated on Thu Sep 21 2017 16:01:13 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: DeviceIO/DppLibUsb.h Source File

  • File List
  • File Members
DeviceIO/DppLibUsb.h
Go to the documentation of this file.
00001 #pragma once
00002
00003 #ifdef _WIN32
00004         #define LIBUSB_WINUSB_BACKEND 1
00005 #endif
00006
00007 #ifdef LIBUSB_WINUSB_BACKEND
00008         #include "libusb.h"
00009         #ifdef _MSC_VER
00010                 #pragma comment(lib, ".\\DeviceIO\\libusb.lib")
00011         #endif
00012 #else
00013         #include <libusb.h>
00014 #endif
00015
00016 #include <stdio.h>
00017 #include <sys/types.h>
00018 #include <string.h>
00019
00020 #define AMPTEK_DP5_VENDOR_ID 0x10C4
00021 #define AMPTEK_DP5_PRODUCT_ID 0x842A
00022
00023 #define INTERFACE_NUMBER 0
00024 #define TIMEOUT_MS 5000
00025 #define BULK_IN_ENDPOINT 0x81
00026 #define BULK_OUT_ENDPOINT 0x02
00027 #define MAX_BULK_IN_TRANSFER_SIZE 32768
00028 #define MAX_BULK_OUT_TRANSFER_SIZE 520
00029 #define STATUS_PACKET_SIZE 64
00030 #define DP5_USB_TIMEOUT 500         // default timeout (500mS)
00031 #define DP5_DIAGDATA_TIMEOUT 2500       // diag data timeout
00032 #define PID1_REQ_SCOPE_MISC_TO 0x03
00033 #define PID2_SEND_DIAGNOSTIC_DATA_TO 0x05
00034
00035
00036 class CDppLibUsb
00037 {
00038 public:
00039         CDppLibUsb(void);
00040         ~CDppLibUsb(void);
00041
00042         unsigned char data_in[MAX_BULK_IN_TRANSFER_SIZE];               // data bytes in
00043         unsigned char data_out[MAX_BULK_OUT_TRANSFER_SIZE];             // data bytes out
00044
00045         libusb_device_handle *DppLibusbHandle;
00046         int NumDevices;
00047         int CurrentDevice;
00048         bool bLibusbReady;
00049         bool bDeviceReady;
00050         char LastLibUsbError[256];
00051         bool bDeviceConnected;
00052
00053         int InitializeLibusb();
00054         void DeinitializeLibusb();
00055         libusb_device_handle * FindUSBDevice(int idxAmptekDevice);
00056         void CloseUSBDevice(libusb_device_handle * devh);
00057         int SendPacketUSB(libusb_device_handle *devh, unsigned char data_out[], unsigned char data_in[]);
00058         bool isAmptekDP5Device(libusb_device_descriptor desc);
00059         int CountDP5LibusbDevices();
00060         void PrintDevices();
00061
00062 #ifndef LIBUSB_WINUSB_BACKEND
00063         const char * libusb_strerror(enum libusb_error error_code);
00064 #endif
00065
00066 };
00067
00068
00069
00070
00071
00072
00073
00074
00075
Generated on Thu Sep 21 2017 16:01:13 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: DeviceIO/DppUtilities.cpp File Reference

  • File List
  • File Members
DeviceIO/DppUtilities.cpp File Reference
#include "DppUtilities.h"
#include "stringex.h"
Include dependency graph for DppUtilities.cpp:

Go to the source code of this file.

Generated on Thu Sep 21 2017 16:01:13 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: DeviceIO/DppUtilities.cpp Source File

  • File List
  • File Members
DeviceIO/DppUtilities.cpp
Go to the documentation of this file.
00001 #include "DppUtilities.h"
00002 #include "stringex.h"
00003
00004 CDppUtilities::CDppUtilities(void)
00005 {
00006 }
00007
00008 CDppUtilities::~CDppUtilities(void)
00009 {
00010 }
00011
00012 // convert a 4 byte long word to a double
00013 // lwStart - starting index of longword
00014 // buffer - byte buffer
00015 double CDppUtilities::LongWordToDouble(int lwStart, unsigned char buffer[])
00016 {
00017         double dblVal;
00018         int idx;
00019         double ByteMask;
00020         dblVal = 0;
00021         for(idx=0;idx<4;idx++) {                // build 4 bytes (lwStart-lwStart+3) into double
00022                 ByteMask = pow(2.0,(8 * idx));
00023                 dblVal = dblVal + (buffer[(lwStart + idx)] * ByteMask);
00024         }
00025         return dblVal;
00026 }
00027
00028 // calculate major.minor version from unsigned char, convert/save to double
00029 double CDppUtilities::BYTEVersionToDouble(unsigned char Version)
00030 {
00031         double dblVersion = 0.0;
00032         stringex strfn;
00033         string strTemp;
00034         strTemp = strfn.Format("%d.%02d",((Version & 240) / 16),(Version & 15));
00035         dblVersion = atof(strTemp.c_str());
00036         return dblVersion;
00037 }
00038
00039 // calculate major.minor version from unsigned char, convert/save to string
00040 string CDppUtilities::BYTEVersionToString(unsigned char Version)
00041 {
00042         string strTemp;
00043         stringex strfn;
00044         strTemp = strfn.Format("%d.%02d",((Version & 240) / 16),(Version & 15));
00045         return strTemp;
00046 }
Generated on Thu Sep 21 2017 16:01:13 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: DeviceIO/DppUtilities.h File Reference

  • File List
  • File Members
Classes
DeviceIO/DppUtilities.h File Reference
#include <stdlib.h>
#include <math.h>
#include <string>
Include dependency graph for DppUtilities.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class CDppUtilities
Generated on Thu Sep 21 2017 16:01:13 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: DeviceIO/DppUtilities.h Source File

  • File List
  • File Members
DeviceIO/DppUtilities.h
Go to the documentation of this file.
00001 #pragma once
00002 #include <stdlib.h>
00003 #include <math.h>
00004 #include <string>
00005 using namespace std;
00006
00007 class CDppUtilities
00008 {
00009 public:
00010         CDppUtilities(void);
00011         ~CDppUtilities(void);
00013         double LongWordToDouble(int lwStart, unsigned char buffer[]);
00015         double BYTEVersionToDouble(unsigned char Version);
00017         string BYTEVersionToString(unsigned char Version);
00018 };
Generated on Thu Sep 21 2017 16:01:13 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: DeviceIO/DppWinUSB.cpp File Reference

  • File List
  • File Members
DeviceIO/DppWinUSB.cpp File Reference
#include "StdAfx.h"
#include "DppWinUSB.h"
Include dependency graph for DppWinUSB.cpp:

Go to the source code of this file.

Generated on Thu Sep 21 2017 16:01:13 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: DeviceIO/DppWinUSB.cpp Source File

  • File List
  • File Members
DeviceIO/DppWinUSB.cpp
Go to the documentation of this file.
00001 #include "StdAfx.h"
00002 #include "DppWinUSB.h"
00003
00004 CDppWinUSB::CDppWinUSB(void)
00005 {
00006         WinUsb_Disabled = false;
00007         InitDeviceInfo();
00008         NumPipes = -1;
00009         CurrentDevice = 1;
00010         NumDevices = 0;
00011         USB_Default_Timeout = FALSE;     // flag that non-default timeout is in use
00012 }
00013
00014 CDppWinUSB::~CDppWinUSB(void)
00015 {
00016 }
00017
00018 void CDppWinUSB::Disable_WinUsb()
00019 {
00020         WinUsb_Disabled = true;
00021 }
00022
00023 void CDppWinUSB::InitDeviceInfo()
00024 {
00025         devInfo.deviceHandle = INVALID_HANDLE_VALUE;
00026         devInfo.winUSBHandle = NULL;
00027         devInfo.deviceConnected = FALSE;
00028 }
00029
00030 void CDppWinUSB::CloseDeviceHandle()
00031 {
00032         if ((devInfo.deviceHandle != NULL) && (devInfo.deviceHandle != INVALID_HANDLE_VALUE)) {
00033                 CloseHandle(devInfo.deviceHandle);
00034                 devInfo.deviceHandle = NULL;
00035         }
00036 }
00037
00038 void CDppWinUSB::CloseWinUsbDevice()
00039 {
00040         if (WinUsb_Disabled) return;
00041     if (devInfo.winUSBHandle) {
00042         if (!WinUsb_Free(devInfo.winUSBHandle)) {
00043                         //DSYSERR("-WinUsb_Free failed");
00044                         //MessageBox(NULL,"WinUsb_Free failed","Closing WinUSB",MB_OK);
00045         }
00046         devInfo.winUSBHandle = NULL;
00047     }
00048         CloseDeviceHandle();
00049 }
00050
00051 BOOL CDppWinUSB::GetDevicePath(LPGUID InterfaceGuid, PCHAR DevicePath, size_t BufLen, DWORD MemberIndex)
00052 {
00053         BOOL bResult = FALSE;
00054         HDEVINFO deviceInfo;
00055         SP_DEVICE_INTERFACE_DATA interfaceData;
00056         PSP_DEVICE_INTERFACE_DETAIL_DATA detailData = NULL;
00057         ULONG length;
00058         ULONG requiredLength=0;
00059         HRESULT hr;
00060
00061         if (WinUsb_Disabled) return FALSE;
00062
00063         // get device information handle
00064         deviceInfo = SetupDiGetClassDevs(InterfaceGuid, NULL, NULL, DIGCF_PRESENT | DIGCF_DEVICEINTERFACE);
00065
00066         // ===== Loop here to find multiple devices ====================
00067         // get interface data for device enumeration (first
00068         interfaceData.cbSize = sizeof(SP_DEVICE_INTERFACE_DATA);
00069         bResult = SetupDiEnumDeviceInterfaces(deviceInfo, NULL, InterfaceGuid, MemberIndex, &interfaceData);
00070         //bResult = SetupDiEnumDeviceInterfaces(deviceInfo, NULL, InterfaceGuid, 0, &interfaceData);
00071         if(FALSE == bResult)  { return FALSE; }
00072
00073         // get the details for the current device interface
00074         bResult = SetupDiGetDeviceInterfaceDetail(deviceInfo, &interfaceData, NULL, 0, &requiredLength, NULL);
00075         detailData = (PSP_DEVICE_INTERFACE_DETAIL_DATA)LocalAlloc(LMEM_FIXED, requiredLength);
00076         if(NULL == detailData) {
00077                 SetupDiDestroyDeviceInfoList(deviceInfo);
00078                 return FALSE;
00079         }
00080         detailData->cbSize = sizeof(SP_DEVICE_INTERFACE_DETAIL_DATA);
00081         length = requiredLength;
00082         bResult = SetupDiGetDeviceInterfaceDetail(deviceInfo, &interfaceData, detailData, length, &requiredLength, NULL);
00083         if(FALSE == bResult)   {
00084                 LocalFree(detailData);
00085                 return FALSE;
00086         }
00087         // copy the device path
00088         hr = StringCchCopy(DevicePath, BufLen, detailData->DevicePath);
00089         if(FAILED(hr)) {
00090                 SetupDiDestroyDeviceInfoList(deviceInfo);
00091                 LocalFree(detailData);
00092         }
00093         LocalFree(detailData);
00094         return bResult;
00095 }
00096
00097 HANDLE CDppWinUSB::OpenDevice(BOOL bSync, DWORD MemberIndex)
00098 {
00099         HANDLE hDev = NULL;
00100         char devicePath[MAX_DEVPATH_LENGTH];
00101         BOOL retVal;
00102
00103         if (WinUsb_Disabled) return INVALID_HANDLE_VALUE;
00104
00105         retVal = GetDevicePath((LPGUID) &GUID_DP5_INTERFACE_CLASS, devicePath, sizeof(devicePath), MemberIndex);
00106         //Error-handling code omitted.
00107         if (retVal) {
00108                 HRESULT hr;
00109                 hr = StringCchCopy(devInfo.devicePath, sizeof(devicePath), devicePath);
00110         }
00111         hDev = CreateFile(devicePath, GENERIC_WRITE | GENERIC_READ, FILE_SHARE_WRITE | FILE_SHARE_READ,
00112                                                 NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_OVERLAPPED, NULL);
00113         //Error-handling code omitted.
00114         return hDev;
00115 }
00116
00117 BOOL CDppWinUSB::Initialize_Device(DWORD MemberIndex)
00118 {
00119         BOOL bResult;
00120         WINUSB_INTERFACE_HANDLE usbHandle;
00121         USB_INTERFACE_DESCRIPTOR ifaceDescriptor;
00122         WINUSB_PIPE_INFORMATION pipeInfo;
00123         UCHAR speed;
00124         ULONG length;
00125         BYTE bFalse = 0;
00126         BYTE bTrue = 1;
00127         ULONG pipeTimeout;
00128
00129         if (WinUsb_Disabled) return false;
00130
00131         pipeTimeout = 500;   // 2/4/10 - seems like 500mS should be plenty?
00132         //Change timeout for Erase FPGA (4 Sec), and Diagnostic Data (2.5 Sec) commands
00133
00134         InitDeviceInfo();
00135         devInfo.deviceHandle = OpenDevice(TRUE, MemberIndex);
00136         bResult = WinUsb_Initialize(devInfo.deviceHandle, &usbHandle);
00137         //[1]
00138         if(bResult) {
00139                 devInfo.winUSBHandle = usbHandle;
00140                 length = sizeof(UCHAR);
00141                 bResult = WinUsb_QueryDeviceInformation(devInfo.winUSBHandle, DEVICE_SPEED, &length, &speed);
00142         }
00143         //[2]
00144         if(bResult)
00145         {
00146                 devInfo.deviceSpeed = speed;
00147                 bResult = WinUsb_QueryInterfaceSettings(devInfo.winUSBHandle, 0, &ifaceDescriptor);
00148         }
00149         if(bResult) {
00150                 NumPipes = ifaceDescriptor.bNumEndpoints;
00151                 for(int i=0;i<ifaceDescriptor.bNumEndpoints;i++) {
00152                         PipeId[i] = INVALID_HANDLE_VALUE;
00153                         PipeTimeout[i] = 500;
00154                         //[3]
00155                         bResult = WinUsb_QueryPipe(devInfo.winUSBHandle, 0, (UCHAR) i, &pipeInfo);
00156                         PipeId[i] = (HANDLE)pipeInfo.PipeId;
00157                         PipeTimeout[i] = pipeTimeout;
00158                         //[4]
00159                         if(pipeInfo.PipeType == UsbdPipeTypeBulk && USB_ENDPOINT_DIRECTION_IN(pipeInfo.PipeId)) {
00160                                 devInfo.bulkInPipe = pipeInfo.PipeId;
00161                                 WinUsb_SetPipePolicy(devInfo.winUSBHandle, devInfo.bulkInPipe, IGNORE_SHORT_PACKETS, sizeof(BYTE), &bFalse);
00162                                 WinUsb_SetPipePolicy(devInfo.winUSBHandle, devInfo.bulkInPipe, AUTO_CLEAR_STALL, sizeof(BYTE), &bTrue);
00163                                 WinUsb_SetPipePolicy(devInfo.winUSBHandle, devInfo.bulkInPipe, ALLOW_PARTIAL_READS, sizeof(BYTE), &bFalse);
00164                                 WinUsb_SetPipePolicy(devInfo.winUSBHandle, devInfo.bulkInPipe, PIPE_TRANSFER_TIMEOUT, sizeof(ULONG), &pipeTimeout);
00165                         } else if(pipeInfo.PipeType == UsbdPipeTypeBulk && USB_ENDPOINT_DIRECTION_OUT(pipeInfo.PipeId)) {
00166                                 devInfo.bulkOutPipe = pipeInfo.PipeId;
00167                                 WinUsb_SetPipePolicy(devInfo.winUSBHandle, devInfo.bulkInPipe, IGNORE_SHORT_PACKETS, sizeof(BYTE), &bFalse);
00168                                 //WinUsb_SetPipePolicy(devInfo.winUSBHandle, devInfo.bulkOutPipe, SHORT_PACKET_TERMINATE, sizeof(BYTE), &bTrue);
00169                                 WinUsb_SetPipePolicy(devInfo.winUSBHandle, devInfo.bulkOutPipe, SHORT_PACKET_TERMINATE, sizeof(BYTE), &bFalse);
00170                                 WinUsb_SetPipePolicy(devInfo.winUSBHandle, devInfo.bulkOutPipe, AUTO_CLEAR_STALL, sizeof(BYTE), &bTrue);
00171                                 WinUsb_SetPipePolicy(devInfo.winUSBHandle, devInfo.bulkOutPipe, PIPE_TRANSFER_TIMEOUT, sizeof(ULONG), &pipeTimeout);
00172                         } else if(pipeInfo.PipeType == UsbdPipeTypeInterrupt) {
00173                                 devInfo.interruptPipe = pipeInfo.PipeId;
00174                         } else {
00175                                 bResult = FALSE;
00176                                 break;
00177                         }
00178                 }
00179         }
00180         return bResult;
00181 }
00182
00183 DPP_USB_STATUS CDppWinUSB::FindUSBDevice(DWORD MemberIndex)
00184 {
00185         BOOL bResult;
00186         DPP_USB_STATUS USBStatus;       //0=do nothing, 1=new connect, 2=cannot connect
00187
00188         if (WinUsb_Disabled) return dusbStatConnectFail;
00189
00190         USBStatus = dusbStatNoAction;
00191         if (devInfo.deviceConnected) {          // already connected,do nothing
00192                 return (USBStatus);
00193         }
00194         USBStatus = dusbStatConnectFail;
00195         bResult = Initialize_Device(MemberIndex);               // begin connect sequence
00196         if (! bResult) {                                                                // failed to initialize
00197                 devInfo.deviceConnected = FALSE;
00198                 return (USBStatus);                                                     // return ConnectFail
00199         }
00200         if (devInfo.deviceHandle == NULL) {     // NULL device handle,do nothing
00201                 USBStatus = dusbStatNoAction;
00202                 return (USBStatus);
00203         }
00204         if (devInfo.deviceHandle != INVALID_HANDLE_VALUE) {
00205                 devInfo.deviceConnected = true;
00206                 USBStatus = dusbStatNewConnect;                         // return NewConnect
00207         } else {                                                                                // return ConnectFail
00208                 devInfo.deviceConnected = false;
00209                 CloseWinUsbDevice();
00210         }
00211         //if (devInfo.deviceConnected) {
00212         //      RegDeviceNotification();
00213         //}
00214         return (USBStatus);
00215 }
00216
00217 int CDppWinUSB::CountDP5WinusbDevices(void)
00218 {
00219         int NumDevices = 0;
00220     HKEY hKey;
00221     DWORD retCode;
00222         BYTE DevicePath[MAXREGBUFFER];
00223     DWORD cbDevicePath;
00224     char KeyName[MAX_PATH];
00225         DWORD cbKeyName;
00226         char ErrMsg[MAXREGBUFFER];
00227         DWORD cbErrMsg;
00228
00229         char* lpDevicePath;
00230
00231         retCode = RegOpenKeyEx(HKEY_LOCAL_MACHINE, WinUSBService, 0, KEY_QUERY_VALUE, &hKey);
00232     if (retCode != ERROR_SUCCESS) {
00233         return 0;
00234     }
00235         // Test ALL Keys (0,1,... are device paths, Count,NextInstance,(Default) have other info)
00236         for (DWORD idxDP5 = 0; idxDP5 < MAXDP5S + 3; idxDP5++) {        //devs + 3 other keys
00237                 cbKeyName = MAX_PATH;
00238                 cbDevicePath = MAXREGBUFFER;
00239                 retCode = RegEnumValue(hKey, idxDP5, KeyName, &cbKeyName, NULL, NULL, &DevicePath[0], &cbDevicePath);
00240                 if (retCode == ERROR_SUCCESS) {
00241                         lpDevicePath = (char*)DevicePath;
00242                         if (!_strnicmp(KeyName, "Count", 5)) {
00243                                 continue;
00244                         } else if (!_strnicmp(lpDevicePath, WinUsbDP5, WinUsbDP5Size)) {        // DP5 device path found
00245                                 //TRACE("DP5 device [%d]: %s=%s\r\n", (NumDevices + 1), KeyName, DevicePath);
00246                                 NumDevices++;
00247                                 continue;
00248                         }
00249                 } else if (retCode == ERROR_NO_MORE_ITEMS) {    // no more values to read
00250                         break;
00251                 } else {                                                                                // error reading values
00252                         cbErrMsg = MAXREGBUFFER;
00253                         FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, NULL, retCode, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), ErrMsg, cbErrMsg, NULL);
00254                         break;
00255                 }
00256         }
00257         RegCloseKey(hKey);
00258     return NumDevices;          /* return number of devices */
00259 }
00260
00261 string CDppWinUSB::USBStatusString(DPP_USB_STATUS USBStatus)
00262 {
00263         string strStatus;
00264         strStatus = "";
00265         switch (USBStatus) {
00266                 case dusbStatNewConnect:
00267                         strStatus = "USB DPP device connected.";
00268                         break;
00269                 case dusbStatConnectFail:
00270                         strStatus = "Cannot connect to USB DPP device.";
00271                         break;
00272         }
00273         return (strStatus);
00274 }
00275
00276 string CDppWinUSB::DisplayBufferArray(unsigned char buffer[], unsigned long bufSizeIn)
00277 {
00278     unsigned long i;
00279         string strVal("");
00280         string strMsg("");
00281         stringex strfn;
00282         for(i=0;i<bufSizeIn;i++) {
00283                 strVal = strfn.Format("%.2X ",buffer[i]);
00284                 strMsg += strVal;
00285                 if (((i+1) % 16) == 0 ) {
00286                         strMsg += "\r\n";
00287                 } else if (((i+1) % 8) == 0 ) {
00288                         strMsg += "   ";
00289                 }
00290         }
00291         strMsg += "\r\n";
00292         return strMsg;
00293 }
00294
00295 void CDppWinUSB::SaveStringDataToFile(string strData)
00296 {
00297    FILE  *out;
00298    string strFilename;
00299    string strError;
00300    stringex strfn;
00301
00302    strFilename = "CfgHex.txt";
00303
00304    if ( (out = fopen(strFilename.c_str(),"w")) == (FILE *) NULL)
00305       strError = strfn.Format("Couldn't open %s for writing.\n", strFilename.c_str());
00306    else
00307    {
00308       fprintf(out,"%s\n",strData.c_str());
00309    }
00310    fclose(out);
00311 }
00312
00313 bool CDppWinUSB::SendPacketUSB(unsigned char Buffer[], DEVICE_INFO TestDevInfo, unsigned char PacketIn[])
00314 {
00315     unsigned long bytesWritten;
00316         unsigned long bytesRead;
00317     int success;
00318     long PLen;
00319         unsigned long pipeTimeout;
00320
00321     if ((Buffer[2] == PID1_REQ_SCOPE_MISC) && Buffer[3] == PID2_SEND_DIAGNOSTIC_DATA) {
00322                 // Request Diagnostic Packet delay 'USB_DiagDataDelayMS
00323                 pipeTimeout = USB_DiagDataDelayMS;
00324                 success = WinUsb_SetPipePolicy(TestDevInfo.winUSBHandle, TestDevInfo.bulkInPipe, PIPE_TRANSFER_TIMEOUT, sizeof(unsigned long), &pipeTimeout);
00325         USB_Default_Timeout = false;     // flag that non-default timeout is in use
00326         } else {
00327         if (USB_Default_Timeout == false) {  // change pipetimeout to default if it isn't already set that way
00328                         pipeTimeout = USB_TIMEOUT;
00329                         success = WinUsb_SetPipePolicy(TestDevInfo.winUSBHandle, TestDevInfo.bulkInPipe, PIPE_TRANSFER_TIMEOUT, sizeof(unsigned long), &pipeTimeout);
00330             USB_Default_Timeout = true;      // flag that default timeout is in use
00331         }
00332         }
00333
00334         bytesWritten = NULL;
00335         bytesRead = NULL;
00336         PLen = (Buffer[4] * 256) + Buffer[5] + 8;
00337         success = WinUsb_WritePipe(TestDevInfo.winUSBHandle, TestDevInfo.bulkOutPipe, Buffer, PLen, &bytesWritten, NULL);
00338         Sleep(50);                              // 20110907 Added to improve usb communications while running other processes
00339         if (success) {
00340                 success = WinUsb_ReadPipe(TestDevInfo.winUSBHandle, TestDevInfo.bulkInPipe, PacketIn, 32767, &bytesRead, NULL);
00341                 if (success) {
00342                         return true;
00343                 } else {
00344                         return false;
00345                 }
00346         } else {
00347                 return false;
00348         }
00349 }
Generated on Thu Sep 21 2017 16:01:13 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: DeviceIO/DppWinUSB.h File Reference

  • File List
  • File Members
Classes | Defines | Typedefs | Enumerations
DeviceIO/DppWinUSB.h File Reference
#include <Windows.h>
#include <Strsafe.h>
#include "stringex.h"
#include <Winusb.h>
#include <Setupapi.h>
#include "guid.h"
#include <Dbt.h>
#include "DP5Protocol.h"
Include dependency graph for DppWinUSB.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct | WINUSB_DEVICE_INFO
Holds WinUSB device information. More...
class | CDppWinUSB

Defines

#define | MAX_DEVPATH_LENGTH 256
#define | MAXDP5S 128
#define | MAXREGBUFFER 128
#define | WinUSBService "SYSTEM\\CurrentControlSet\\Services\\WinUSB\\Enum"
#define | WinUsbDP5 "USB\\Vid_10c4&Pid_842a"
#define | WinUsbDP5Size 21
#define | DRV_INFO_OPTION_NONE 0x00
#define | DRV_INFO_OPTION_MFG_NAME 0x01
#define | DRV_INFO_OPTION_PROV_NAME 0x02
#define | DRV_INFO_OPTION_DESC 0x04
#define | DRV_INFO_OPTION_DATE 0x08
#define | DRV_INFO_OPTION_VER 0x10
#define | DRV_INFO_OPTION_MS_TERM 0x20
#define | DRV_INFO_OPTION_UX_TERM 0x40
#define | DRV_INFO_OPTION_LABEL 0x80
#define | DRV_INFO_OPTION_ALL 0xFF
#define | MAXPIPES 10

Typedefs

typedef enum _DPP_USB_STATUS | DPP_USB_STATUS
typedef struct WINUSB_DEVICE_INFO | DEVICE_INFO
Holds WinUSB device information.
typedef struct WINUSB_DEVICE_INFO * | PDEVICE_INFO

Enumerations

enum _DPP_USB_STATUS {
dusbStatNoAction, dusbStatNewConnect,
dusbStatConnectFail
}

Define Documentation

#define DRV_INFO_OPTION_ALL 0xFF

Definition at line 37 of file DppWinUSB.h.

#define DRV_INFO_OPTION_DATE 0x08

Definition at line 32 of file DppWinUSB.h.

#define DRV_INFO_OPTION_DESC 0x04

Definition at line 31 of file DppWinUSB.h.

#define DRV_INFO_OPTION_LABEL 0x80

Definition at line 36 of file DppWinUSB.h.

#define DRV_INFO_OPTION_MFG_NAME 0x01

Definition at line 29 of file DppWinUSB.h.

#define DRV_INFO_OPTION_MS_TERM 0x20

Definition at line 34 of file DppWinUSB.h.

#define DRV_INFO_OPTION_NONE 0x00

Definition at line 28 of file DppWinUSB.h.

#define DRV_INFO_OPTION_PROV_NAME 0x02

Definition at line 30 of file DppWinUSB.h.

#define DRV_INFO_OPTION_UX_TERM 0x40

Definition at line 35 of file DppWinUSB.h.

#define DRV_INFO_OPTION_VER 0x10

Definition at line 33 of file DppWinUSB.h.

#define MAX_DEVPATH_LENGTH 256

CDppWinUSB CDppWinUSB

Definition at line 22 of file DppWinUSB.h.

#define MAXDP5S 128

Definition at line 23 of file DppWinUSB.h.

#define MAXPIPES 10

Definition at line 38 of file DppWinUSB.h.

#define MAXREGBUFFER 128

Definition at line 24 of file DppWinUSB.h.

#define WinUsbDP5 "USB\\Vid_10c4&Pid_842a"

Definition at line 26 of file DppWinUSB.h.

#define WinUsbDP5Size 21

Definition at line 27 of file DppWinUSB.h.

#define WinUSBService "SYSTEM\\CurrentControlSet\\Services\\WinUSB\\Enum"

Definition at line 25 of file DppWinUSB.h.

Typedef Documentation

typedef struct WINUSB_DEVICE_INFO DEVICE_INFO

Holds WinUSB device information.

typedef enum _DPP_USB_STATUS DPP_USB_STATUS
typedef struct WINUSB_DEVICE_INFO * PDEVICE_INFO

Enumeration Type Documentation

enum _DPP_USB_STATUS
Enumerator:
dusbStatNoAction
dusbStatNewConnect
dusbStatConnectFail

Definition at line 40 of file DppWinUSB.h.

Generated on Thu Sep 21 2017 16:01:13 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: DeviceIO/DppWinUSB.h Source File

  • File List
  • File Members
DeviceIO/DppWinUSB.h
Go to the documentation of this file.
00001
00002 #pragma once
00003 #pragma comment(lib, ".\\DeviceIO\\winusb.lib")
00004 #pragma comment(lib, "setupapi.lib")
00005
00006 // MS var redef bug fix
00007 #ifdef _MP
00008         #undef _MP
00009 #endif
00010 // ====================
00011 // Include Windows headers
00012 #include <Windows.h>
00013 #include <Strsafe.h>
00014 #include "stringex.h"
00015 // Include WinUSB headers
00016 #include <Winusb.h>
00017 #include <Setupapi.h>
00018 #include "guid.h"
00019 #include <Dbt.h>
00020 #include "DP5Protocol.h"
00021
00022 #define MAX_DEVPATH_LENGTH 256
00023 #define MAXDP5S 128                             // max number of devices
00024 #define MAXREGBUFFER 128
00025 #define WinUSBService "SYSTEM\\CurrentControlSet\\Services\\WinUSB\\Enum"
00026 #define WinUsbDP5 "USB\\Vid_10c4&Pid_842a"
00027 #define WinUsbDP5Size 21
00028 #define DRV_INFO_OPTION_NONE 0x00
00029 #define DRV_INFO_OPTION_MFG_NAME 0x01
00030 #define DRV_INFO_OPTION_PROV_NAME 0x02
00031 #define DRV_INFO_OPTION_DESC 0x04
00032 #define DRV_INFO_OPTION_DATE 0x08
00033 #define DRV_INFO_OPTION_VER 0x10
00034 #define DRV_INFO_OPTION_MS_TERM 0x20
00035 #define DRV_INFO_OPTION_UX_TERM 0x40
00036 #define DRV_INFO_OPTION_LABEL 0x80
00037 #define DRV_INFO_OPTION_ALL 0xFF
00038 #define MAXPIPES 10
00039
00040 typedef enum _DPP_USB_STATUS
00041 {
00042         dusbStatNoAction,
00043         dusbStatNewConnect,
00044         dusbStatConnectFail
00045 } DPP_USB_STATUS;
00046
00048 typedef struct WINUSB_DEVICE_INFO
00049 {
00051         HANDLE deviceHandle;
00053         WINUSB_INTERFACE_HANDLE winUSBHandle;
00055         UCHAR deviceSpeed;
00057         UCHAR bulkInPipe;
00059         UCHAR bulkOutPipe;
00061         UCHAR interruptPipe;
00063         char devicePath[MAX_DEVPATH_LENGTH];
00065         BOOL deviceConnected;
00066 } DEVICE_INFO, *PDEVICE_INFO;
00067
00068 class CDppWinUSB
00069 {
00070 public:
00071         CDppWinUSB(void);
00072         ~CDppWinUSB(void);
00073
00074         bool WinUsb_Disabled;
00075         void Disable_WinUsb();
00076
00078         DEVICE_INFO devInfo;
00080         int NumPipes;
00081
00083         HANDLE PipeId[MAXPIPES];
00085         ULONG PipeTimeout[MAXPIPES];
00087         void InitDeviceInfo();
00089         void CloseDeviceHandle();
00091         void CloseWinUsbDevice();
00093         BOOL GetDevicePath(LPGUID InterfaceGuid, PCHAR DevicePath, size_t BufLen, DWORD MemberIndex);
00095         HANDLE OpenDevice(BOOL bSync, DWORD MemberIndex);
00097         BOOL Initialize_Device(DWORD MemberIndex);
00098
00099         // dialog helper functions
00100
00102         DPP_USB_STATUS FindUSBDevice(DWORD MemberIndex);
00104         int CountDP5WinusbDevices(void);
00106         int CurrentDevice;
00108         int NumDevices;
00110         bool isDppFound;
00111
00112         string DisplayBufferArray(unsigned char buffer[], unsigned long bufSizeIn);
00113         void SaveStringDataToFile(string strData);
00114
00115         string USBStatusString(DPP_USB_STATUS USBStatus);
00116
00118         bool SendPacketUSB(unsigned char Buffer[], DEVICE_INFO TestDevInfo, unsigned char PacketIn[]);
00119         bool USB_Default_Timeout;
00120
00121 };
Generated on Thu Sep 21 2017 16:01:13 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: DeviceIO/guid.h File Reference

  • File List
  • File Members
Functions
DeviceIO/guid.h File Reference
#include <objbase.h>
#include <initguid.h>
Include dependency graph for guid.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

DEFINE_GUID (GUID_DP5_INTERFACE_CLASS, 0x5a8ed6a1, 0x7fc3, 0x4b6a, 0xa5, 0x36, 0x95, 0xdf, 0x35, 0xd0, 0x34, 0x48)
Device Interface ID {5A8ED6A1-7FC3-4b6a-A536-95DF35D03448}.
DEFINE_GUID (GUID_DP5_SETUP_CLASS, 0x6a4e9a2d, 0x9368, 0x4f01, 0x8e, 0x60, 0xb3, 0xf9, 0xcd, 0xba, 0xb5, 0xe8)
Setup Class ID {6A4E9A2D-9368-4f01-8E60-B3F9CDBAB5E8}.

Function Documentation

DEFINE_GUID | ( | GUID_DP5_INTERFACE_CLASS | ,
 |  | 0x5a8ed6a1 | ,
 |  | 0x7fc3 | ,
 |  | 0x4b6a | ,
 |  | 0xa5 | ,
 |  | 0x36 | ,
 |  | 0x95 | ,
 |  | 0xdf | ,
 |  | 0x35 | ,
 |  | 0xd0 | ,
 |  | 0x34 | ,
 |  | 0x48 |
 | ) |  |

Device Interface ID {5A8ED6A1-7FC3-4b6a-A536-95DF35D03448}.

DEFINE_GUID | ( | GUID_DP5_SETUP_CLASS | ,
 |  | 0x6a4e9a2d | ,
 |  | 0x9368 | ,
 |  | 0x4f01 | ,
 |  | 0x8e | ,
 |  | 0x60 | ,
 |  | 0xb3 | ,
 |  | 0xf9 | ,
 |  | 0xcd | ,
 |  | 0xba | ,
 |  | 0xb5 | ,
 |  | 0xe8 |
 | ) |  |

Setup Class ID {6A4E9A2D-9368-4f01-8E60-B3F9CDBAB5E8}.

Generated on Thu Sep 21 2017 16:01:13 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: DeviceIO/guid.h Source File

  • File List
  • File Members
DeviceIO/guid.h
Go to the documentation of this file.
00001 //
00002 // $History: guid.h $
00003 //
00004 //Amptek DP5 WinUSB    Date: 03/08/2011    Time: 02:49:49 PM
00005
00006 #ifndef GUID_INC
00007 #define GUID_INC
00008
00009 #pragma once
00010
00011 #ifndef DEFINE_GUID
00012 #include <objbase.h>
00013 #endif
00014
00015 #include <initguid.h>
00016
00018 DEFINE_GUID(GUID_DP5_INTERFACE_CLASS, 0x5a8ed6a1, 0x7fc3, 0x4b6a, 0xa5, 0x36, 0x95, 0xdf, 0x35, 0xd0, 0x34, 0x48);
00019
00021 DEFINE_GUID(GUID_DP5_SETUP_CLASS, 0x6a4e9a2d, 0x9368, 0x4f01, 0x8e, 0x60, 0xb3, 0xf9, 0xcd, 0xba, 0xb5, 0xe8);
00022
00023
00024 #endif // end, #ifndef GUID_INC
Generated on Thu Sep 21 2017 16:01:13 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: DeviceIO/MSecTimer.cpp File Reference

  • File List
  • File Members
DeviceIO/MSecTimer.cpp File Reference
#include ".\msectimer.h"
Include dependency graph for MSecTimer.cpp:

Go to the source code of this file.

Generated on Thu Sep 21 2017 16:01:13 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: DeviceIO/MSecTimer.cpp Source File

  • File List
  • File Members
DeviceIO/MSecTimer.cpp
Go to the documentation of this file.
00001 #include ".\msectimer.h"
00002
00003 CMSecTimer::CMSecTimer(void)
00004 {
00005 }
00006
00007 CMSecTimer::~CMSecTimer(void)
00008 {
00009 }
00010
00011 DWORD CMSecTimer::msTimeDiff(DWORD msStartTime, DWORD msTestTime)
00012 {
00013         DWORD64 RollOver = (DWORD)pow(2.0,32);
00014         DWORD64 msStartTime64;
00015         DWORD64 msTestTime64;
00016         DWORD64 msTimeDiff64;
00017         DWORD msTimeDiff32;
00018         if (msStartTime > msTestTime) { // rollover
00019                 msTestTime64 = (DWORD64)msTestTime + RollOver;
00020                 msStartTime64 = (DWORD64)msStartTime;
00021                 msTimeDiff64 = msTestTime64 - msTestTime64;
00022                 if (msTimeDiff64 < RollOver) {
00023                         msTimeDiff32 = (DWORD)(msTimeDiff64);
00024                 } else {
00025                         msTimeDiff32 = 0;
00026                 }
00027         } else {
00028                 msTimeDiff32 = msTestTime - msStartTime;
00029         }
00030         return (msTimeDiff32);
00031 }
00032
00033 BOOL CMSecTimer::msTimeExpired(DWORD msStartTime, DWORD msDelay)
00034 {
00035         BOOL isExpired;
00036         DWORD msTestTime;
00037         DWORD64 RollOver = (DWORD)pow(2.0,32);
00038         DWORD64 msStartTime64;
00039         DWORD64 msTestTime64;
00040         DWORD64 msTimeDiff64;
00041         DWORD msTimeDiff32;
00042
00043         msTestTime = timeGetTime();
00044         if (msStartTime > msTestTime) { // rollover
00045                 msTestTime64 = (DWORD64)msTestTime + RollOver;
00046                 msStartTime64 = (DWORD64)msStartTime;
00047                 msTimeDiff64 = msTestTime64 - msTestTime64;
00048                 if (msTimeDiff64 < RollOver) {
00049                         msTimeDiff32 = (DWORD)(msTimeDiff64);
00050                 } else {
00051                         msTimeDiff32 = 0;
00052                 }
00053         } else {
00054                 msTimeDiff32 = msTestTime - msStartTime;
00055         }
00056         isExpired = (msTimeDiff32 >= msDelay);
00057         return (isExpired);
00058 }
00059
00060 BOOL CMSecTimer::msTimer(DWORD msDelay)
00061 {
00062         MSG msg;
00063         DWORD msStartTime;
00064         DWORD msTestTime;
00065         BOOL isExpired = FALSE;
00066         DWORD msTimeDiff32 = 0;
00067         msStartTime = timeGetTime();
00068         msTestTime = timeGetTime();
00069         do {
00070                 isExpired = msTimeExpired(msStartTime, msDelay);
00071                 msTimeDiff32 = msTimeDiff(msStartTime, msTestTime);
00072                 if (PeekMessage(&msg, NULL, NULL, NULL, PM_REMOVE))
00073                 {
00074                 TranslateMessage(&msg);
00075                 DispatchMessage(&msg);
00076                 }
00077         } while (!isExpired && (msTimeDiff32 <= msDelay));
00078         return (TRUE);
00079 }
Generated on Thu Sep 21 2017 16:01:13 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: DeviceIO/MSecTimer.h File Reference

  • File List
  • File Members
Classes
DeviceIO/MSecTimer.h File Reference
#include "stdafx.h"
#include <math.h>
#include <Mmsystem.h>
Include dependency graph for MSecTimer.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class CMSecTimer
Generated on Thu Sep 21 2017 16:01:13 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: DeviceIO/MSecTimer.h Source File

  • File List
  • File Members
DeviceIO/MSecTimer.h
Go to the documentation of this file.
00001 #pragma once
00002 #include "stdafx.h"
00003 #include <math.h>
00004 #include <Mmsystem.h>
00005
00006 class CMSecTimer
00007 {
00008 public:
00009         CMSecTimer(void);
00010         ~CMSecTimer(void);
00011         DWORD msTimeDiff(DWORD msStartTime, DWORD msTestTime);
00012         BOOL msTimeExpired(DWORD msStartTime, DWORD msDelay);
00013         BOOL msTimer(DWORD msDelay);
00014 };
Generated on Thu Sep 21 2017 16:01:13 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: DeviceIO/NetFinder.cpp File Reference

  • File List
  • File Members
DeviceIO/NetFinder.cpp File Reference
#include "StdAfx.h"
#include "NetFinder.h"
#include <time.h>
#include <math.h>
Include dependency graph for NetFinder.cpp:

Go to the source code of this file.

Generated on Thu Sep 21 2017 16:01:13 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: DeviceIO/NetFinder.cpp Source File

  • File List
  • File Members
DeviceIO/NetFinder.cpp
Go to the documentation of this file.
00001 #include "StdAfx.h"
00002 #include "NetFinder.h"
00003 #include <time.h>
00004 #include <math.h>
00005
00006 CNetFinder::CNetFinder(void)
00007 {
00008         InitAllEntries();
00009         m_rand = 0;
00010         LastEntry = NO_ENTRIES;
00011 }
00012
00013 CNetFinder::~CNetFinder(void)
00014 {
00015
00016 }
00017
00018 COLORREF CNetFinder::AlertEntryToCOLORREF(NETDISPLAY_ENTRY *pEntry)
00019 {
00020         COLORREF DppConnectionColor;
00021         DppConnectionColor = AlertByteToCOLORREF(pEntry->alert_level);
00022         return (DppConnectionColor);
00023 }
00024
00025 COLORREF CNetFinder::AlertByteToCOLORREF(BYTE alert_level)
00026 {
00027         COLORREF DppConnectionColor;
00028         switch(alert_level){                    // Alert Level
00029                 case 0x00:      //0 = Interface is open (unconnected);
00030                         DppConnectionColor = colorGreen;
00031                         break;
00032                 case 0x01:      //1 = Interface is connected (sharing is allowed);
00033                         DppConnectionColor = colorYellow;
00034                         break;
00035                 case 0x02:      //2 = Interface is connected (sharing is not allowed);
00036                         DppConnectionColor = colorRed;
00037                         break;
00038                 case 0x03:      //3 = Interface is locked
00039                         DppConnectionColor = colorRed;
00040                         break;
00041                 case 0x04:      //4 = Interface is unavailable because USB is connected
00042                         DppConnectionColor = colorSilver;
00043                         break;
00044                 default:        //Interface configuration unknown
00045                         DppConnectionColor = colorWhite;
00046                         break;
00047         }
00048         return (DppConnectionColor);
00049 }
00050
00051 CString CNetFinder::EntryToStr(NETDISPLAY_ENTRY *pEntry)
00052 {
00053         CString cstrAlertLevel;
00054         CString strDeviceType;
00055         CString cstrIpAddress;
00056         CString cstrEvent1, cstrEvent2;
00057         CString cstrAdditionalDesc;
00058         CString cstrMacAddress;
00059         CString cstrEntry;
00060         CString temp_str, temp_str2;
00061
00062         cstrAlertLevel = "Connection: ";
00063         switch(pEntry->alert_level){                    // Alert Level
00064                 case 0x00:      //0 = Interface is open (unconnected);
00065                         cstrAlertLevel += "Interface is open (unconnected)";
00066                         break;
00067                 case 0x01:      //1 = Interface is connected (sharing is allowed);
00068                         cstrAlertLevel += "Interface is connected (sharing is allowed)";
00069                         break;
00070                 case 0x02:      //2 = Interface is connected (sharing is not allowed);
00071                         cstrAlertLevel += "Interface is connected (sharing is not allowed)";
00072                         break;
00073                 case 0x03:      //3 = Interface is locked
00074                         cstrAlertLevel += "Interface is locked";
00075                         break;
00076                 case 0x04:      //4 = Interface is unavailable because USB is connected
00077                         cstrAlertLevel += "Interface is unavailable because USB is connected";
00078                         break;
00079                 default:
00080                         cstrAlertLevel += "Interface configuration unknown";
00081                         break;
00082         }
00083         strDeviceType = pEntry->str_type;               // Device Name/Type
00084         // IP Address String
00085         cstrIpAddress.Format("IP Address: %u.%u.%u.%u", (unsigned short) pEntry->ip[0], (unsigned short) pEntry->ip[1],(unsigned short) pEntry->ip[2],(unsigned short) pEntry->ip[3]);
00086         cstrAdditionalDesc = pEntry->str_description;   // Additional Description
00087         // MacAddress
00088         cstrMacAddress.Format("MAC Address: %02x-%02x-%02x-%02x-%02x-%02x", (unsigned short) pEntry->mac[0], (unsigned short) pEntry->mac[1],(unsigned short) pEntry->mac[2],(unsigned short) pEntry->mac[3],(unsigned short) pEntry->mac[4],(unsigned short) pEntry->mac[5]);
00089         // Event1 Time
00090         temp_str = pEntry->str_ev1 + " ";
00091         if(pEntry->event1_days) temp_str2.Format("%i days, %i hours, %i minutes, %i seconds", pEntry->event1_days,pEntry->event1_hours,pEntry->event1_minutes, pEntry->event1_seconds );
00092         else if(pEntry->event1_hours) temp_str2.Format("%i hours, %i minutes, %i seconds", pEntry->event1_hours,pEntry->event1_minutes, pEntry->event1_seconds );
00093         else if(pEntry->event1_minutes) temp_str2.Format("%i minutes, %i seconds", pEntry->event1_minutes, pEntry->event1_seconds );
00094         else temp_str2.Format("%i seconds", pEntry->event1_seconds );
00095         cstrEvent1 = temp_str + temp_str2;
00096         // Event2 Time
00097         temp_str = pEntry->str_ev2 + " ";
00098         if(pEntry->event2_days) temp_str2.Format("%i days, %i hours, %i minutes, %i seconds", pEntry->event2_days,pEntry->event2_hours,pEntry->event2_minutes, pEntry->event2_seconds );
00099         else if(pEntry->event2_hours) temp_str2.Format("%i hours, %i minutes, %i seconds", pEntry->event2_hours,pEntry->event2_minutes, pEntry->event2_seconds );
00100         else if(pEntry->event2_minutes) temp_str2.Format("%i minutes, %i seconds", pEntry->event2_minutes, pEntry->event2_seconds );
00101         else temp_str2.Format("%i seconds", pEntry->event2_seconds );
00102         cstrEvent2 = temp_str + temp_str2;
00103
00104         cstrEntry = strDeviceType + "\r\n";
00105         cstrEntry += cstrAlertLevel + "\r\n";
00106         cstrEntry += cstrIpAddress + "\r\n";
00107         cstrEntry += cstrAdditionalDesc + "\r\n";
00108         cstrEntry += cstrMacAddress + "\r\n";
00109         cstrEntry += cstrEvent1 + "\r\n";
00110         cstrEntry += cstrEvent2 + "\r\n";
00111         return cstrEntry;
00112 }
00113
00114 CString CNetFinder::EntryToStrRS232(NETDISPLAY_ENTRY *pEntry, CString strPort)
00115 {
00116         CString cstrAlertLevel;
00117         CString strDeviceType;
00118         CString cstrIpAddress;
00119         CString cstrEvent1, cstrEvent2;
00120         CString cstrAdditionalDesc;
00121         CString cstrMacAddress;
00122         CString cstrEntry;
00123         CString temp_str, temp_str2;
00124
00125         cstrAlertLevel = "Connection: ";
00126         cstrAlertLevel += strPort;
00127         //switch(pEntry->alert_level){                  // Alert Level
00128         //      case 0x00:      //0 = Interface is open (unconnected);
00129         //              cstrAlertLevel += "Interface is open (unconnected)";
00130         //              break;
00131         //      case 0x01:      //1 = Interface is connected (sharing is allowed);
00132         //              cstrAlertLevel += "Interface is connected (sharing is allowed)";
00133         //              break;
00134         //      case 0x02:      //2 = Interface is connected (sharing is not allowed);
00135         //              cstrAlertLevel += "Interface is connected (sharing is not allowed)";
00136         //              break;
00137         //      case 0x03:      //3 = Interface is locked
00138         //              cstrAlertLevel += "Interface is locked";
00139         //              break;
00140         //      case 0x04:      //4 = Interface is unavailable because USB is connected
00141         //              cstrAlertLevel += "Interface is unavailable because USB is connected";
00142         //              break;
00143         //      default:
00144         //              cstrAlertLevel += "Interface configuration unknown";
00145         //              break;
00146         //}
00147         strDeviceType = pEntry->str_type;               // Device Name/Type
00148         // IP Address String
00149         cstrIpAddress.Format("IP Address: %u.%u.%u.%u", (unsigned short) pEntry->ip[0], (unsigned short) pEntry->ip[1],(unsigned short) pEntry->ip[2],(unsigned short) pEntry->ip[3]);
00150         cstrAdditionalDesc = pEntry->str_description;   // Additional Description
00151         // MacAddress
00152         cstrMacAddress.Format("MAC Address: %02x-%02x-%02x-%02x-%02x-%02x", (unsigned short) pEntry->mac[0], (unsigned short) pEntry->mac[1],(unsigned short) pEntry->mac[2],(unsigned short) pEntry->mac[3],(unsigned short) pEntry->mac[4],(unsigned short) pEntry->mac[5]);
00153         // Event1 Time
00154         temp_str = pEntry->str_ev1 + " ";
00155         if(pEntry->event1_days) temp_str2.Format("%i days, %i hours, %i minutes, %i seconds", pEntry->event1_days,pEntry->event1_hours,pEntry->event1_minutes, pEntry->event1_seconds );
00156         else if(pEntry->event1_hours) temp_str2.Format("%i hours, %i minutes, %i seconds", pEntry->event1_hours,pEntry->event1_minutes, pEntry->event1_seconds );
00157         else if(pEntry->event1_minutes) temp_str2.Format("%i minutes, %i seconds", pEntry->event1_minutes, pEntry->event1_seconds );
00158         else temp_str2.Format("%i seconds", pEntry->event1_seconds );
00159         cstrEvent1 = temp_str + temp_str2;
00160         // Event2 Time
00161         temp_str = pEntry->str_ev2 + " ";
00162         if(pEntry->event2_days) temp_str2.Format("%i days, %i hours, %i minutes, %i seconds", pEntry->event2_days,pEntry->event2_hours,pEntry->event2_minutes, pEntry->event2_seconds );
00163         else if(pEntry->event2_hours) temp_str2.Format("%i hours, %i minutes, %i seconds", pEntry->event2_hours,pEntry->event2_minutes, pEntry->event2_seconds );
00164         else if(pEntry->event2_minutes) temp_str2.Format("%i minutes, %i seconds", pEntry->event2_minutes, pEntry->event2_seconds );
00165         else temp_str2.Format("%i seconds", pEntry->event2_seconds );
00166         cstrEvent2 = temp_str + temp_str2;
00167
00168         cstrEntry = strDeviceType + "\r\n";
00169         cstrEntry += cstrAlertLevel + "\r\n";
00170         //cstrEntry += cstrIpAddress + "\r\n";
00171         cstrEntry += cstrAdditionalDesc + "\r\n";
00172         cstrEntry += cstrMacAddress + "\r\n";
00173         cstrEntry += cstrEvent1 + "\r\n";
00174         //cstrEntry += cstrEvent2 + "\r\n";
00175         return cstrEntry;
00176 }
00177
00178 CString CNetFinder::EntryToStrUSB(NETDISPLAY_ENTRY *pEntry, CString strPort)
00179 {
00180         CString cstrAlertLevel;
00181         CString strDeviceType;
00182         CString cstrIpAddress;
00183         CString cstrEvent1, cstrEvent2;
00184         CString cstrAdditionalDesc;
00185         CString cstrMacAddress;
00186         CString cstrEntry;
00187         CString temp_str, temp_str2;
00188
00189         cstrAlertLevel = "Connection: ";
00190         cstrAlertLevel += strPort;
00191         //switch(pEntry->alert_level){                  // Alert Level
00192         //      case 0x00:      //0 = Interface is open (unconnected);
00193         //              cstrAlertLevel += "Interface is open (unconnected)";
00194         //              break;
00195         //      case 0x01:      //1 = Interface is connected (sharing is allowed);
00196         //              cstrAlertLevel += "Interface is connected (sharing is allowed)";
00197         //              break;
00198         //      case 0x02:      //2 = Interface is connected (sharing is not allowed);
00199         //              cstrAlertLevel += "Interface is connected (sharing is not allowed)";
00200         //              break;
00201         //      case 0x03:      //3 = Interface is locked
00202         //              cstrAlertLevel += "Interface is locked";
00203         //              break;
00204         //      case 0x04:      //4 = Interface is unavailable because USB is connected
00205         //              cstrAlertLevel += "Interface is unavailable because USB is connected";
00206         //              break;
00207         //      default:
00208         //              cstrAlertLevel += "Interface configuration unknown";
00209         //              break;
00210         //}
00211         strDeviceType = pEntry->str_type;               // Device Name/Type
00212         // IP Address String
00213         cstrIpAddress.Format("IP Address: %u.%u.%u.%u", (unsigned short) pEntry->ip[0], (unsigned short) pEntry->ip[1],(unsigned short) pEntry->ip[2],(unsigned short) pEntry->ip[3]);
00214         cstrAdditionalDesc = pEntry->str_description;   // Additional Description
00215         // MacAddress
00216         cstrMacAddress.Format("MAC Address: %02x-%02x-%02x-%02x-%02x-%02x", (unsigned short) pEntry->mac[0], (unsigned short) pEntry->mac[1],(unsigned short) pEntry->mac[2],(unsigned short) pEntry->mac[3],(unsigned short) pEntry->mac[4],(unsigned short) pEntry->mac[5]);
00217         // Event1 Time
00218         temp_str = pEntry->str_ev1 + " ";
00219         if(pEntry->event1_days) temp_str2.Format("%i days, %i hours, %i minutes, %i seconds", pEntry->event1_days,pEntry->event1_hours,pEntry->event1_minutes, pEntry->event1_seconds );
00220         else if(pEntry->event1_hours) temp_str2.Format("%i hours, %i minutes, %i seconds", pEntry->event1_hours,pEntry->event1_minutes, pEntry->event1_seconds );
00221         else if(pEntry->event1_minutes) temp_str2.Format("%i minutes, %i seconds", pEntry->event1_minutes, pEntry->event1_seconds );
00222         else temp_str2.Format("%i seconds", pEntry->event1_seconds );
00223         cstrEvent1 = temp_str + temp_str2;
00224         // Event2 Time
00225         temp_str = pEntry->str_ev2 + " ";
00226         if(pEntry->event2_days) temp_str2.Format("%i days, %i hours, %i minutes, %i seconds", pEntry->event2_days,pEntry->event2_hours,pEntry->event2_minutes, pEntry->event2_seconds );
00227         else if(pEntry->event2_hours) temp_str2.Format("%i hours, %i minutes, %i seconds", pEntry->event2_hours,pEntry->event2_minutes, pEntry->event2_seconds );
00228         else if(pEntry->event2_minutes) temp_str2.Format("%i minutes, %i seconds", pEntry->event2_minutes, pEntry->event2_seconds );
00229         else temp_str2.Format("%i seconds", pEntry->event2_seconds );
00230         cstrEvent2 = temp_str + temp_str2;
00231
00232         cstrEntry = strDeviceType + "\r\n";
00233         cstrEntry += cstrAlertLevel + "\r\n";
00234         //cstrEntry += cstrIpAddress + "\r\n";
00235         cstrEntry += cstrAdditionalDesc + "\r\n";
00236         cstrEntry += cstrMacAddress + "\r\n";
00237         cstrEntry += cstrEvent1 + "\r\n";
00238         //cstrEntry += cstrEvent2 + "\r\n";
00239         return cstrEntry;
00240 }
00241
00242 int CNetFinder::FindEntry(ULONG SockAddr)
00243 {
00244         int idxEntry;
00245         int EntryFound;
00246         EntryFound = NO_ENTRIES;
00247         for (idxEntry=0;idxEntry<=LastEntry;idxEntry++){
00248                 if (SockAddr == DppEntries[idxEntry].SockAddr) {
00249                         EntryFound = idxEntry;
00250                         break;
00251                 }
00252         }
00253         return (EntryFound);
00254 }
00255
00256 void CNetFinder::InitEntry(NETDISPLAY_ENTRY *pEntry)
00257 {
00258         int idxInit;
00259         pEntry->alert_level = 0;
00260
00261         pEntry->event1_days = 0;
00262         pEntry->event1_hours = 0;
00263         pEntry->event1_minutes = 0;
00264
00265         pEntry->event2_days = 0;
00266         pEntry->event2_hours = 0;
00267         pEntry->event2_minutes = 0;
00268
00269         pEntry->event1_seconds = 0;
00270         pEntry->event2_seconds = 0;
00271
00272         pEntry->port = 0; // Get port from UDP header
00273
00274         for (idxInit=0;idxInit<4;idxInit++){
00275                 pEntry->mac[idxInit] = 0;
00276                 pEntry->ip[idxInit] = 0;
00277                 pEntry->subnet[idxInit] = 0;
00278                 pEntry->gateway[idxInit] = 0;
00279         }
00280
00281         pEntry->mac[4] = 0;
00282         pEntry->mac[5] = 0;
00283
00284         pEntry->str_type = "";
00285         pEntry->str_description = "";
00286         pEntry->str_ev1 = "";
00287         pEntry->str_ev2 = "";
00288
00289         pEntry->str_display = "";
00290         pEntry->ccConnectRGB = colorWhite;
00291
00292         pEntry->HasData = FALSE;
00293
00294         pEntry->SockAddr = 0;
00295
00296 }
00297
00298 void CNetFinder::InitAllEntries()
00299 {
00300         for (int idxEntry=0;idxEntry<MAX_ENTRIES;idxEntry++){
00301                 InitEntry(&DppEntries[idxEntry]);
00302         }
00303         LastEntry = NO_ENTRIES;
00304         m_rand = 0;
00305 }
00306
00307 void CNetFinder::AddEntry(NETDISPLAY_ENTRY *pEntry, BYTE *buffer, UINT destPort)
00308 {
00309         pEntry->alert_level = buffer[1];
00310         pEntry->port = destPort;
00311
00312         int i = 4; // Start buffer index at 4
00313
00314         pEntry->event1_days = ( (int) buffer[i++]<<8 );
00315         pEntry->event1_days |= buffer[i++];
00316
00317         pEntry->event1_hours = buffer[i++];
00318         pEntry->event1_minutes = buffer[i++];
00319
00320         pEntry->event2_days = ( (int) buffer[i++]<<8 );
00321         pEntry->event2_days |= buffer[i++];
00322
00323         pEntry->event2_hours = buffer[i++];
00324         pEntry->event2_minutes = buffer[i++];
00325
00326         pEntry->event1_seconds = buffer[i++];
00327         pEntry->event2_seconds = buffer[i++];
00328
00329         pEntry->mac[0] = buffer[i++];
00330         pEntry->mac[1] = buffer[i++];
00331         pEntry->mac[2] = buffer[i++];
00332         pEntry->mac[3] = buffer[i++];
00333         pEntry->mac[4] = buffer[i++];
00334         pEntry->mac[5] = buffer[i++];
00335
00336         pEntry->ip[0] = buffer[i++];
00337         pEntry->ip[1] = buffer[i++];
00338         pEntry->ip[2] = buffer[i++];
00339         pEntry->ip[3] = buffer[i++];
00340
00341         pEntry->subnet[0] = buffer[i++];
00342         pEntry->subnet[1] = buffer[i++];
00343         pEntry->subnet[2] = buffer[i++];
00344         pEntry->subnet[3] = buffer[i++];
00345
00346         pEntry->gateway[0] = buffer[i++];
00347         pEntry->gateway[1] = buffer[i++];
00348         pEntry->gateway[2] = buffer[i++];
00349         pEntry->gateway[3] = buffer[i++];
00350
00351         pEntry->str_type = &buffer[i];
00352         i += (pEntry->str_type.GetLength()+1);
00353
00354         pEntry->str_description = &buffer[i];
00355         i += (pEntry->str_description.GetLength()+1);
00356
00357         // Copy the Event1+2 text descripion without the ": "
00358         pEntry->str_ev1 = &buffer[i];
00359         i += (pEntry->str_ev1.GetLength()+1);
00360
00361         pEntry->str_ev2 = &buffer[i];
00362         i += (pEntry->str_ev2.GetLength()+1);
00363
00364         // Add ": " to str_ev1 and str_ev2
00365         pEntry->str_ev1 += ": ";
00366         pEntry->str_ev2 += ": ";
00367
00368         pEntry->ccConnectRGB = AlertByteToCOLORREF(pEntry->alert_level);
00369         pEntry->HasData = TRUE;
00370         pEntry->SockAddr = SockAddr_ByteToULong(&buffer[20]);
00371         pEntry->str_display = EntryToStr(pEntry);       // Convert Entry infor to string
00372 }
00373
00374 CString CNetFinder::SockAddr_DlgToStr(CDialog *dlg, int id1, int id2, int id3, int id4)
00375 {
00376         char szAddr[10];
00377         CString cstrAddr;
00378         CString cstrID;
00379
00380         memset(&szAddr, 0, sizeof(szAddr));
00381         ::GetDlgItemText(dlg->GetSafeHwnd(), id1, szAddr, sizeof(szAddr));
00382         cstrID.Format("%s",szAddr);
00383         cstrAddr = cstrID.Trim();
00384         memset(&szAddr, 0, sizeof(szAddr));
00385         ::GetDlgItemText(dlg->GetSafeHwnd(), id2, szAddr, sizeof(szAddr));
00386         cstrID.Format(".%s",szAddr);
00387         cstrAddr += cstrID.Trim();
00388         memset(&szAddr, 0, sizeof(szAddr));
00389         ::GetDlgItemText(dlg->GetSafeHwnd(), id3, szAddr, sizeof(szAddr));
00390         cstrID.Format(".%s",szAddr);
00391         cstrAddr += cstrID.Trim();
00392         memset(&szAddr, 0, sizeof(szAddr));
00393         ::GetDlgItemText(dlg->GetSafeHwnd(), id4, szAddr, sizeof(szAddr));
00394         cstrID.Format(".%s",szAddr);
00395         cstrAddr += cstrID.Trim();
00396         return(cstrAddr);
00397
00398 }
00399
00400
00401 UINT CNetFinder::SockPort_DlgToUINT(CDialog *dlg, int id1)
00402 {
00403         char szPort[10];
00404         UINT Port;
00405         CString strPort;
00406         memset(&szPort, 0, sizeof(szPort));
00407         ::GetDlgItemText(dlg->GetSafeHwnd(), id1, szPort, sizeof(szPort));
00408         Port = atoi(szPort);
00409         return(Port);
00410 }
00411
00412 in_addr CNetFinder::SockAddr_ByteToInAddr(BYTE *ip)
00413 {
00414         in_addr inSockAddr;
00415         inSockAddr.S_un.S_un_b.s_b1 = ip[0];
00416         inSockAddr.S_un.S_un_b.s_b2 = ip[1];
00417         inSockAddr.S_un.S_un_b.s_b3 = ip[2];
00418         inSockAddr.S_un.S_un_b.s_b4 = ip[3];
00419         return (inSockAddr);
00420 }
00421
00422 ULONG CNetFinder::SockAddr_ByteToULong(BYTE *ip)
00423 {
00424         in_addr inSockAddr;
00425         inSockAddr = SockAddr_ByteToInAddr(ip);
00426         return (inSockAddr.S_un.S_addr);
00427 }
00428
00429 CString CNetFinder::SockAddr_ByteToStr(BYTE *ip)
00430 {
00431         CString cstrSockAddr;
00432         cstrSockAddr.Format("%d.%d.%d.%d",ip[0],ip[1],ip[2],ip[3]);
00433         return (cstrSockAddr);
00434 }
00435
00436 in_addr CNetFinder::SockAddr_StrToInAddr(CString cstrSockAddr)
00437 {
00438         ULONG SockAddr;
00439         in_addr inSockAddr;
00440         SockAddr = inet_addr(cstrSockAddr);
00441         inSockAddr.S_un.S_addr = SockAddr;
00442         return (inSockAddr);
00443 }
00444
00445 ULONG CNetFinder::SockAddr_StrToULong(CString cstrSockAddr)
00446 {
00447         ULONG SockAddr;
00448         SockAddr = inet_addr(cstrSockAddr);
00449         return (SockAddr);
00450 }
00451
00452 in_addr CNetFinder::SockAddr_ULongToInAddr(ULONG SockAddr)
00453 {
00454         in_addr inSockAddr;
00455         inSockAddr.S_un.S_addr = SockAddr;
00456         return (inSockAddr);
00457 }
00458
00459 CString CNetFinder::SockAddr_ULongToStr(ULONG SockAddr)
00460 {
00461         CString cstrSockAddr;
00462         in_addr inSockAddr;
00463         inSockAddr.S_un.S_addr = SockAddr;
00464         cstrSockAddr.Format("%s",_T(inet_ntoa(inSockAddr)));
00465         return (cstrSockAddr);
00466 }
00467
00468 CString CNetFinder::SockAddr_InAddrToStr(in_addr inSockAddr)
00469 {
00470         CString cstrSockAddr;
00471         cstrSockAddr.Format("%s",_T(inet_ntoa(inSockAddr)));
00472         return (cstrSockAddr);
00473 }
00474
00475
00476
00477
00478
00479
00480
00481
00482
00483
00484
00485
00486
00487
00488
00489
00490
00491
00492
00493
00494
00495
00496
00497
00498
00499
00500
00501
Generated on Thu Sep 21 2017 16:01:13 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: DeviceIO/NetFinder.h File Reference

  • File List
  • File Members
Classes | Typedefs | Variables
DeviceIO/NetFinder.h File Reference
#include "stdafx.h"
#include "X11Color.h"
Include dependency graph for NetFinder.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct | NETDISPLAY_ENTRY
class | CNetFinder

Typedefs

typedef struct NETDISPLAY_ENTRY | NETDISPLAY_ENTRY

Variables

const int | NO_ENTRIES = -1
const int | MAX_ENTRIES = 10

Typedef Documentation

typedef struct NETDISPLAY_ENTRY NETDISPLAY_ENTRY

Variable Documentation

const int MAX_ENTRIES = 10

Definition at line 43 of file NetFinder.h.

const int NO_ENTRIES = -1

Definition at line 42 of file NetFinder.h.

Generated on Thu Sep 21 2017 16:01:13 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: DeviceIO/NetFinder.h Source File

  • File List
  • File Members
DeviceIO/NetFinder.h
Go to the documentation of this file.
00001 #pragma once
00002 #include "stdafx.h"
00003 #include "X11Color.h"
00004
00006 // NetFinder Data
00007
00008 typedef struct NETDISPLAY_ENTRY {
00009         BYTE alert_level;
00010
00011         UINT event1_days;
00012         BYTE event1_hours;
00013         BYTE event1_minutes;
00014
00015         UINT event2_days;
00016         BYTE event2_hours;
00017         BYTE event2_minutes;
00018
00019         BYTE event1_seconds;
00020         BYTE event2_seconds;
00021
00022         BYTE mac[6];
00023         BYTE ip[4];
00024         USHORT port; // Get port from UDP header
00025         BYTE subnet[4];
00026         BYTE gateway[4];
00027
00028         CString str_type;
00029         CString str_description;
00030         CString str_ev1;
00031         CString str_ev2;
00032
00033         CString str_display;
00034         COLORREF ccConnectRGB;
00035
00036         BOOL HasData;
00037
00038         ULONG SockAddr;
00039
00040 } NETDISPLAY_ENTRY;
00041
00042 const int NO_ENTRIES = -1;
00043 const int MAX_ENTRIES = 10;
00044
00045 class CNetFinder
00046 {
00047 public:
00048         CNetFinder(void);
00049         ~CNetFinder(void);
00050
00051         int m_rand;
00052         NETDISPLAY_ENTRY DppEntries[MAX_ENTRIES];       // 20140430 changed hardcode to const var
00053         int LastEntry;
00054
00055         ULONG DppSockAddr;                                      // socket address of selected DPP
00056         int DppEntryIdx;                                        // entry index of selected DPP
00057         BOOL DppFound;                                          // selected DPP found
00058
00059         CString EntryToStr(NETDISPLAY_ENTRY *pEntry);
00060         CString EntryToStrRS232(NETDISPLAY_ENTRY *pEntry, CString strPort);
00061         CString EntryToStrUSB(NETDISPLAY_ENTRY *pEntry, CString strPort);
00062         COLORREF AlertEntryToCOLORREF(NETDISPLAY_ENTRY *pEntry);
00063         COLORREF AlertByteToCOLORREF(BYTE alert_level);
00064
00065         int FindEntry(ULONG SockAddr);
00066
00067         CString SockAddr_DlgToStr(CDialog *dlg, int id1, int id2, int id3, int id4);
00068         UINT SockPort_DlgToUINT(CDialog *dlg, int id1);
00069
00070         in_addr SockAddr_ByteToInAddr(BYTE *ip);
00071         ULONG SockAddr_ByteToULong(BYTE *ip);
00072         CString SockAddr_ByteToStr(BYTE *ip);
00073
00074         in_addr SockAddr_StrToInAddr(CString cstrSockAddr);     // BYTES in_addr.S_un.S_un_b.s_b*
00075         ULONG SockAddr_StrToULong(CString cstrSockAddr);
00076
00077         in_addr SockAddr_ULongToInAddr(ULONG SockAddr);
00078         CString SockAddr_ULongToStr(ULONG SockAddr);
00079
00080         CString SockAddr_InAddrToStr(in_addr inSockAddr);
00081
00082         void InitEntry(NETDISPLAY_ENTRY *pEntry);
00083         void InitAllEntries();
00084         void AddEntry(NETDISPLAY_ENTRY *pEntry, BYTE *buffer, UINT destPort);
00085
00086 };
00087
Generated on Thu Sep 21 2017 16:01:13 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: DeviceIO/ParsePacket.cpp File Reference

  • File List
  • File Members
DeviceIO/ParsePacket.cpp File Reference
#include "ParsePacket.h"
Include dependency graph for ParsePacket.cpp:

Go to the source code of this file.

Generated on Thu Sep 21 2017 16:01:13 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: DeviceIO/ParsePacket.cpp Source File

  • File List
  • File Members
DeviceIO/ParsePacket.cpp
Go to the documentation of this file.
00001 #include "ParsePacket.h"
00002
00003 CParsePacket::CParsePacket(void)
00004 {
00005 }
00006
00007 CParsePacket::~CParsePacket(void)
00008 {
00009 }
00010
00011 void CParsePacket::ParsePacketStatus(unsigned char P[], Packet_In *PIN)
00012 {
00013     short X;
00014     long CSum;
00015
00016     CSum = 0;
00017     if (P[0] == SYNC1_) {
00018         if (P[1] == SYNC2_) {
00019             if (P[4] < 128) {  // LEN MSB < 128, i.e. LEN < 32768
00020                 PIN->LEN = (P[4] * 256) + P[5];
00021                 PIN->PID1 = P[2];
00022                 PIN->PID2 = P[3];
00023                                 for (X=0;X <=(PIN->LEN+5);X++) {        // add up all the bytes except checksum
00024                     CSum = CSum + P[X];
00025                 }
00026                 CSum = CSum + 256 * (long)(P[PIN->LEN + 6]) + (long)(P[PIN->LEN + 7]);
00027                 PIN->CheckSum = CSum;
00028                 if ((CSum & 0xFFFF) == 0) {
00029                     PIN->STATUS = 0;      // packet is OK
00030                     if (PIN->LEN > 0) {
00031                                                 for (X=6;X <=(PIN->LEN+5);X++) {
00032                             PIN->DATA[X - 6] = P[X];
00033                                                 }
00034                     }
00035                 } else {
00036                     PIN->STATUS = PID2_ACK_CHECKSUM_ERROR;    // checksum error
00037                 }
00038             } else {
00039                 PIN->STATUS = PID2_ACK_LEN_ERROR;        // length error
00040             }
00041         } else {
00042             PIN->STATUS = PID2_ACK_SYNC_ERROR;            // sync error
00043         }
00044     } else {
00045         PIN->STATUS = PID2_ACK_SYNC_ERROR ;               // sync error
00046     }
00047 }
00048
00049 string CParsePacket::PID2_TextToString(string strPacketSource, unsigned char PID2)
00050 {
00051         string strPID2;
00052         strPID2 = "";
00053         switch (PID2) {
00054                 case PID2_ACK_OK:    // ACK OK
00055             //PID2_TextToString = strPacketSource + ": OK\t";
00056             //strPID2 = "ACK_OK";
00057                         strPID2 = "";
00058             //ACK_Received = True
00059                         break;
00060         case PID2_ACK_SYNC_ERROR:
00061             strPID2 = strPacketSource + ": Sync Error\t";
00062                         break;
00063         case PID2_ACK_PID_ERROR:
00064             strPID2 = strPacketSource + ": PID Error\t";
00065                         break;
00066         case PID2_ACK_LEN_ERROR:
00067             strPID2 = strPacketSource + ": Length Error\t";
00068                         break;
00069         case PID2_ACK_CHECKSUM_ERROR:
00070             strPID2 = strPacketSource + ": Checksum Error\t";
00071                         break;
00072         case PID2_ACK_BAD_PARAM:        // now msg includes bad parameter
00073                         // put the error extractor in a new function
00074                 //[] If PIN.LEN > 0 Then ' BAD CMD (PID2=7), BAD PARAM (PID2=5), NO PC5 (PID2=11) errors return offending command string
00075       //        [] T$ = ""
00076       //        [] For X = 0 To PIN.LEN - 1
00077       //                [] T$ = T$ + Chr(PIN.DATA(X))
00078       //        [] Next X
00079       //        [] End If
00080             strPID2 = strPacketSource + ": Bad Parameter\t";
00081                         break;
00082         case PID2_ACK_BAD_HEX_REC:
00083             strPID2 = strPacketSource + ": Bad HEX Record\t";
00084                         break;
00085         case PID2_ACK_FPGA_ERROR:
00086             strPID2 = strPacketSource + ": FPGA not initialized\t";
00087                         break;
00088         case PID2_ACK_CP2201_NOT_FOUND:
00089             strPID2 = strPacketSource + ": CP2201 not found\t";
00090                         break;
00091         case PID2_ACK_SCOPE_DATA_NOT_AVAIL:
00092             strPID2 = strPacketSource + ": No scope data\t";
00093                         break;
00094         case PID2_ACK_PC5_NOT_PRESENT:
00095             strPID2 = strPacketSource + ": PC5 not present\t";
00096                         break;
00097         case PID2_ACK_OK_ETHERNET_SHARE_REQ:
00098             strPID2 = strPacketSource + ": Ethernet sharing request\t";
00099                         break;
00100         case PID2_ACK_ETHERNET_BUSY:
00101             strPID2 = strPacketSource + ": Ethernet sharing request\t";
00102                         break;
00103                 //[] Case :TextLog "ACK: PC5 NOT DETECTED '" + T$ + "'" + vbCrLf
00104         case PID2_ACK_CAL_DATA_NOT_PRESENT:
00105             strPID2 = strPacketSource + ": Calibration data not present\t";
00106                         break;
00107         case PID2_ACK_UNRECOG:
00108             strPID2 = strPacketSource + ": Unrecognized Command\t";
00109                         break;
00110                 default:
00111                         strPID2 = strPacketSource + ": Unrecognized Error\t";
00112                         break;
00113         }
00114         return strPID2;
00115 }
00116
00117 long CParsePacket::ParsePacket(unsigned char P[], Packet_In *PIN)
00118 {
00119         long ParsePkt;
00120     ParsePkt = preqProcessNone;
00121     ParsePacketStatus (P, PIN);
00122     if (PIN->STATUS == PID2_ACK_OK) { // no errors
00123         if ((PIN->PID1 == PID1_RCV_STATUS) && (PIN->PID2 == PID2_SEND_DP4_STYLE_STATUS)) { // DP4-style status
00124             ParsePkt = preqProcessStatus;
00125         } else if ((PIN->PID1 == PID1_RCV_SPECTRUM) && ((PIN->PID2 >= RCVPT_256_CHANNEL_SPECTRUM) && (PIN->PID2 <= RCVPT_8192_CHANNEL_SPECTRUM_STATUS))) { // spectrum / spectrum+status
00126             ParsePkt = preqProcessSpectrum;
00127         //} else if ((PIN->PID1 == PID1_RCV_SCOPE_MISC) && (PIN->PID2 == PID2_SEND_SCOPE_DATA)) { //scope data packet
00128         //    ParsePkt = preqProcessScopeData;
00129         //} else if ((PIN->PID1 == PID1_RCV_SCOPE_MISC) && (PIN->PID2 == PID2_SEND_512_BYTE_MISC_DATA)) { //text data packet
00130         //    ParsePkt = preqProcessTextData;
00131         } else if ((PIN->PID1 == PID1_RCV_SCOPE_MISC) && (PIN->PID2 == RCVPT_SCOPE_DATA)) { //scope data packet
00132             //ScopeOverFlow = false;
00133             ParsePkt = preqProcessScopeData;
00134         } else if ((PIN->PID1 == PID1_RCV_SCOPE_MISC) && (PIN->PID2 == RCVPT_512_BYTE_MISC_DATA)) { //text data packet
00135             ParsePkt = preqProcessTextData;
00136         } else if ((PIN->PID1 == PID1_RCV_SCOPE_MISC) && (PIN->PID2 == RCVPT_SCOPE_DATA_WITH_OVERFLOW)) { //scope data with overflow packet
00137             //ScopeOverFlow = true;
00138             //ParsePkt = preqProcessScopeData;
00139             ParsePkt = preqProcessScopeDataOverFlow;
00140         } else if ((PIN->PID1 == PID1_RCV_SCOPE_MISC) && (PIN->PID2 == RCVPT_ETHERNET_SETTINGS)) { //ethernet settings packet
00141             //ParsePkt = preqProcessInetSettings;
00142         } else if ((PIN->PID1 == PID1_RCV_SCOPE_MISC) && (PIN->PID2 == RCVPT_DIAGNOSTIC_DATA)) { //diagnostic data  packet
00143             ParsePkt = preqProcessDiagData;
00144         //} else if ((PIN->PID1 == PID1_RCV_SCOPE_MISC) && (PIN->PID2 == RCVPT_HARDWARE_DESCRIPTION)) { //hardware description packet
00145             //ParsePkt = preqProcessHwDesc;
00146         } else if ((PIN->PID1 == PID1_RCV_SCOPE_MISC) && (PIN->PID2 == RCVPT_CONFIG_READBACK)) {
00147             ParsePkt = preqProcessCfgRead;
00148         //} else if ((PIN->PID1 == PID1_RCV_SCOPE_MISC) && (PIN->PID2 == RCVPT_NETFINDER_READBACK)) {
00149             //ParsePkt = preqProcessNetFindRead;
00150         } else if ((PIN->PID1 == PID1_RCV_SCOPE_MISC) && (PIN->PID2 == RCVPT_OPTION_PA_CALIBRATION)) {
00151             ParsePkt = preqProcessPaCal;
00152         } else if (PIN->PID1 == PID1_ACK) {
00153             ParsePkt = preqProcessAck;
00154         } else {
00155             PIN->STATUS = PID2_ACK_PID_ERROR;  // unknown PID
00156             ParsePkt = preqProcessError;
00157         }
00158     } else {
00159         ParsePkt = preqProcessError;
00160     }
00161
00162     //PIN->PID1 = 0;    // overwrite the PIDs so packet can't be erroneously processed again
00163     //PIN->PID2 = 0;
00164
00165         return ParsePkt;
00166 }
00167
00168 //ElseIf PIN.PID2 = 7 Then ' Config readback response packet
00169 //    txtConfig.Text = ""
00170 //    For X = 0 To PIN.LEN - 1
00171 //        txtConfig.Text = txtConfig.Text + Chr(PIN.DATA(X))
00172 //        If Chr(PIN.DATA(X)) = ";" Then
00173 //            txtConfig.Text = txtConfig.Text + vbCrLf
00174 //        End If
00175 //    Next X
00176
00177
00178
00179
00180
00181
00182
00183
Generated on Thu Sep 21 2017 16:01:13 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: DeviceIO/ParsePacket.h File Reference

  • File List
  • File Members
Classes | Defines | Typedefs | Enumerations
DeviceIO/ParsePacket.h File Reference
#include <string>
#include "DP5Protocol.h"
Include dependency graph for ParsePacket.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct | _DppStateType
class | CParsePacket

Defines

#define | preqProcessNone 0x0
#define | preqProcessStatus 0x1
#define | preqProcessSpectrum 0x2
#define | preqRequestScopeData 0x4
#define | preqProcessScopeData 0x8
#define | preqProcessTextData 0x10
#define | preqProcessScopeDataOverFlow 0x20
#define | preqProcessInetSettings 0x40
#define | preqProcessDiagData 0x80
#define | preqProcessHwDesc 0x100
#define | preqProcessCfgRead 0x200
#define | preqProcessNetFindRead 0x400
#define | preqProcessPaCal 0x800
#define | preqProcessSCAData 0x2000
#define | preqProcessAck 0x4000
#define | preqProcessError 0x8000

Typedefs

typedef enum _CommType | CommType
typedef struct _DppStateType | DppStateType

Enumerations

enum _CommType {
commNone = 0, commRS232 = 1,
commUSB = 2, commSockets = 3
}

Define Documentation

#define preqProcessAck 0x4000

Definition at line 30 of file ParsePacket.h.

#define preqProcessCfgRead 0x200

Definition at line 25 of file ParsePacket.h.

#define preqProcessDiagData 0x80

Definition at line 23 of file ParsePacket.h.

#define preqProcessError 0x8000

Definition at line 31 of file ParsePacket.h.

#define preqProcessHwDesc 0x100

Definition at line 24 of file ParsePacket.h.

#define preqProcessInetSettings 0x40

Definition at line 22 of file ParsePacket.h.

#define preqProcessNetFindRead 0x400

Definition at line 26 of file ParsePacket.h.

#define preqProcessNone 0x0

Definition at line 15 of file ParsePacket.h.

#define preqProcessPaCal 0x800

Definition at line 27 of file ParsePacket.h.

#define preqProcessSCAData 0x2000

Definition at line 29 of file ParsePacket.h.

#define preqProcessScopeData 0x8

Definition at line 19 of file ParsePacket.h.

#define preqProcessScopeDataOverFlow 0x20

Definition at line 21 of file ParsePacket.h.

#define preqProcessSpectrum 0x2

Definition at line 17 of file ParsePacket.h.

#define preqProcessStatus 0x1

Definition at line 16 of file ParsePacket.h.

#define preqProcessTextData 0x10

Definition at line 20 of file ParsePacket.h.

#define preqRequestScopeData 0x4

Definition at line 18 of file ParsePacket.h.

Typedef Documentation

typedef enum _CommType CommType
typedef struct _DppStateType DppStateType

Enumeration Type Documentation

enum _CommType
Enumerator:
commNone
commRS232
commUSB
commSockets

Definition at line 8 of file ParsePacket.h.

Generated on Thu Sep 21 2017 16:01:13 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: DeviceIO/ParsePacket.h Source File

  • File List
  • File Members
DeviceIO/ParsePacket.h
Go to the documentation of this file.
00001
00002 #pragma once
00003
00004 #include <string>
00005 #include "DP5Protocol.h"
00006 using namespace std;
00007
00008 typedef enum _CommType {
00009     commNone = 0,
00010     commRS232 = 1,
00011     commUSB = 2,
00012     commSockets = 3
00013 } CommType;
00014
00015 #define preqProcessNone 0x0
00016 #define preqProcessStatus 0x1
00017 #define preqProcessSpectrum 0x2
00018 #define preqRequestScopeData 0x4
00019 #define preqProcessScopeData 0x8
00020 #define preqProcessTextData 0x10
00021 #define preqProcessScopeDataOverFlow 0x20
00022 #define preqProcessInetSettings 0x40
00023 #define preqProcessDiagData 0x80
00024 #define preqProcessHwDesc 0x100
00025 #define preqProcessCfgRead 0x200
00026 #define preqProcessNetFindRead 0x400
00027 #define preqProcessPaCal 0x800
00028 //...
00029 #define preqProcessSCAData 0x2000
00030 #define preqProcessAck 0x4000
00031 #define preqProcessError 0x8000
00032
00033 typedef struct _DppStateType {
00034     CommType Interface;
00035     string strPort;
00036     unsigned long ReqProcess;
00037     bool HaveScopeData;
00038     bool ScopeAutoRearm;
00039         bool ScopeOverFlow;
00040 } DppStateType;
00041
00042 class CParsePacket
00043 {
00044 public:
00045         CParsePacket(void);
00046         ~CParsePacket(void);
00048         DppStateType DppState;
00050         void ParsePacketStatus(unsigned char P[], Packet_In *PIN);
00052         string PID2_TextToString(string strPacketSource, unsigned char PID2);
00054         long ParsePacket(unsigned char P[], Packet_In *PIN);
00055 };
00056
Generated on Thu Sep 21 2017 16:01:13 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: DeviceIO/SendCommand.cpp File Reference

  • File List
  • File Members
DeviceIO/SendCommand.cpp File Reference
#include "SendCommand.h"
#include "stringex.h"
Include dependency graph for SendCommand.cpp:

Go to the source code of this file.

Generated on Thu Sep 21 2017 16:01:13 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: DeviceIO/SendCommand.cpp Source File

  • File List
  • File Members
DeviceIO/SendCommand.cpp
Go to the documentation of this file.
00001 #include "SendCommand.h"
00002 #include "stringex.h"
00003
00004 CSendCommand::CSendCommand(void)
00005 {
00006 }
00007
00008 CSendCommand::~CSendCommand(void)
00009 {
00010 }
00011
00012 bool CSendCommand::TestPacketCkSumOK(unsigned char Data[])
00013 {
00014     long idxBuffer;
00015     long CS;
00016         long PktLen;
00017         unsigned char CHKSUM_MSB;
00018     //unsigned char CHKSUM_LSB;
00019
00020         PktLen = (Data[4] * 256) + Data[5];
00021     CS = Data[0] + Data[1] + Data[2] + Data[3] + Data[4] + Data[5];
00022         if (PktLen > 0) {
00023                 for (idxBuffer=0; idxBuffer<PktLen;idxBuffer++) {
00024             CS = CS + Data[idxBuffer + 6];
00025                 }
00026     }
00027     CS = (CS ^ 0xFFFF) + 1;
00028     CHKSUM_MSB = (unsigned char)((CS & 0xFF00) / 256);  // calculated checksum
00029     //CHKSUM_LSB = (unsigned char)(CS & 0xFF);
00030         if ((Data[PktLen + 6] == CHKSUM_MSB) && (Data[PktLen + 7] == (CS & 0xFF))) {
00031                 return true;
00032         } else {
00033                 return false;
00034         }
00035 }
00036
00037 //Extend Packet_Out to include entire message
00038 //include send packet data finishing into dp5_cmd
00039 //remove control and interface objects
00040 //move send packet to separate function
00041
00042 bool CSendCommand::DP5_CMD(unsigned char Buffer[], TRANSMIT_PACKET_TYPE XmtCmd)
00043 {
00044     bool bCmdFound;
00045     string D;
00046     Packet_Out POUT;
00047
00048     bCmdFound = true;
00049     POUT.LEN = 0;
00050         string strCfg;
00051         long lLen;
00052         //long idxData;
00053
00054         switch (XmtCmd) {
00056                 case XMTPT_SEND_STATUS:
00057             POUT.PID1 = PID1_REQ_STATUS;
00058             POUT.PID2 = PID2_SEND_DP4_STYLE_STATUS;   // send status only
00059                         break;
00060         //case XMTPT_SEND_SPECTRUM:
00061                         //break;
00062         //case XMTPT_SEND_CLEAR_SPECTRUM:
00063                         //break;
00064         case XMTPT_SEND_SPECTRUM_STATUS:
00065             POUT.PID1 = PID1_REQ_SPECTRUM;
00066             POUT.PID2 = PID2_SEND_SPECTRUM_STATUS;   // send spectrum & status
00067                         break;
00068         case XMTPT_SEND_CLEAR_SPECTRUM_STATUS:
00069             POUT.PID1 = PID1_REQ_SPECTRUM;
00070             POUT.PID2 = PID2_SEND_CLEAR_SPECTRUM_STATUS;   // send & clear spectrum & status
00071                         break;
00072         //case XMTPT_BUFFER_SPECTRUM:
00073                         //break;
00074         //case XMTPT_BUFFER_CLEAR_SPECTRUM:
00075                         //break;
00076         //case XMTPT_SEND_BUFFER:
00077                         //break;
00078         //case XMTPT_SEND_DP4_STYLE_STATUS:
00079                         //break;
00080         //case XMTPT_SEND_CONFIG:
00081                         //break;
00082         case XMTPT_SEND_SCOPE_DATA:
00083             POUT.PID1 = PID1_REQ_SCOPE_MISC;
00084             POUT.PID2 = PID2_SEND_SCOPE_DATA;
00085                         break;
00086         case XMTPT_SEND_512_BYTE_MISC_DATA:
00087             POUT.PID1 = PID1_REQ_SCOPE_MISC;
00088             POUT.PID2 = PID2_SEND_512_BYTE_MISC_DATA; // request misc data
00089                         break;
00090         case XMTPT_SEND_SCOPE_DATA_REARM:
00091             POUT.PID1 = PID1_REQ_SCOPE_MISC;
00092             POUT.PID2 = PID2_SEND_SCOPE_DATA_REARM;
00093                         break;
00094         //case XMTPT_SEND_ETHERNET_SETTINGS:
00095                         //break;
00096         case XMTPT_SEND_DIAGNOSTIC_DATA:
00097             POUT.PID1 = PID1_REQ_SCOPE_MISC;
00098             POUT.PID2 = PID2_SEND_DIAGNOSTIC_DATA;   // Request Diagnostic Packet
00099             POUT.LEN = 0;
00100                         break;
00101         case XMTPT_SEND_NETFINDER_PACKET:
00102             POUT.PID1 = PID1_REQ_SCOPE_MISC;
00103             POUT.PID2 = PID2_SEND_NETFINDER_READBACK;   // Request NetFinder Packet
00104             POUT.LEN = 0;
00105                         break;
00106         //case XMTPT_SEND_HARDWARE_DESCRIPTION:
00107                         //break;
00108         //case XMTPT_SEND_SCA:
00109                         //break;
00110         //case XMTPT_LATCH_SEND_SCA:
00111                         //break;
00112         //case XMTPT_LATCH_CLEAR_SEND_SCA:
00113                         //break;
00114         //case XMTPT_SEND_ROI_OR_FIXED_BLOCK:
00115                         //break;
00116         //case XMTPT_PX4_STYLE_CONFIG_PACKET:
00117                         //break;
00118                 case XMTPT_SCA_READ_CONFIG_PACKET:
00119                         strCfg = "";
00120                         strCfg = "SCAW=?;";
00121                         strCfg +="SCAI=1;SCAL=?;SCAH=?;SCAO=?;";
00122                         strCfg +="SCAI=2;SCAL=?;SCAH=?;SCAO=?;";
00123                         strCfg +="SCAI=3;SCAL=?;SCAH=?;SCAO=?;";
00124                         strCfg +="SCAI=4;SCAL=?;SCAH=?;SCAO=?;";
00125                         strCfg +="SCAI=5;SCAL=?;SCAH=?;SCAO=?;";
00126                         strCfg +="SCAI=6;SCAL=?;SCAH=?;SCAO=?;";
00127                         strCfg +="SCAI=7;SCAL=?;SCAH=?;SCAO=?;";
00128                         strCfg +="SCAI=8;SCAL=?;SCAH=?;SCAO=?;";
00129                         lLen = (long)strCfg.length();
00130                         if (lLen > 0) {
00131                                 strCfg = AsciiCmdUtil.MakeUpper(strCfg);
00132                                 AsciiCmdUtil.CopyAsciiData(POUT.DATA, strCfg, lLen);
00133                         }
00134             POUT.PID1 = PID1_REQ_CONFIG;
00135             POUT.PID2 = PID2_CONFIG_READBACK_PACKET;   // read config packet
00136             POUT.LEN = (unsigned short)lLen;
00137                         break;
00138                  case XMTPT_ERASE_FPGA_IMAGE:
00139             POUT.PID1 = PID1_REQ_FPGA_UC;
00140             POUT.PID2 = PID2_ERASE_FPGA_IMAGE;
00141             POUT.LEN = 2;
00142             POUT.DATA[0] = 0x12;
00143             POUT.DATA[1] = 0x34;
00144                         break;
00145         //case XMTPT_UPLOAD_PACKET_FPGA:
00146                         //break;
00147         //case XMTPT_REINITIALIZE_FPGA:
00148                         //break;
00149         //case XMTPT_ERASE_UC_IMAGE_0:
00150                         //break;
00151         case XMTPT_ERASE_UC_IMAGE_1:
00152             POUT.PID1 = PID1_REQ_FPGA_UC;
00153             POUT.PID2 = PID2_ERASE_UC_IMAGE_1;   // erase image #1 (sector 5)
00154             POUT.LEN = 2;
00155             POUT.DATA[0] = 0x12;
00156             POUT.DATA[1] = 0x34;
00157                         break;
00158         //case XMTPT_ERASE_UC_IMAGE_2:
00159                         //break;
00160         //case XMTPT_UPLOAD_PACKET_UC:
00161                         //break;
00162         //case XMTPT_SWITCH_TO_UC_IMAGE_0:
00163                         //break;
00164         case XMTPT_SWITCH_TO_UC_IMAGE_1:
00165             POUT.PID1 = PID1_REQ_FPGA_UC;
00166             POUT.PID2 = PID2_SWITCH_TO_UC_IMAGE_1;   // switch to uC image #1
00167             POUT.LEN = 2;
00168             POUT.DATA[0] = 0xA5; // uC FLASH unlock keys
00169             POUT.DATA[1] = 0xF1;
00170                         break;
00171         //case XMTPT_SWITCH_TO_UC_IMAGE_2:
00172                         //break;
00173         //case XMTPT_UC_FPGA_CHECKSUMS:
00174                         //break;
00176         //case XMTPT_CLEAR_SPECTRUM_BUFFER_A:
00177                         //break;
00178         case XMTPT_ENABLE_MCA_MCS:
00179             POUT.PID1 = PID1_VENDOR_REQ;
00180             POUT.PID2 = PID2_ENABLE_MCA_MCS;
00181             POUT.LEN = 0;
00182                         break;
00183         case XMTPT_DISABLE_MCA_MCS:
00184             POUT.PID1 = PID1_VENDOR_REQ;
00185             POUT.PID2 = PID2_DISABLE_MCA_MCS;
00186             POUT.LEN = 0;
00187                         break;
00188         case XMTPT_ARM_DIGITAL_OSCILLOSCOPE:
00189             POUT.PID1 = PID1_VENDOR_REQ;
00190             POUT.PID2 = PID2_ARM_DIGITAL_OSCILLOSCOPE;   // arm trigger
00191                         break;
00192         //case XMTPT_AUTOSET_INPUT_OFFSET:
00193                         //break;
00194         case XMTPT_AUTOSET_FAST_THRESHOLD:
00195             POUT.PID1 = PID1_VENDOR_REQ;
00196             POUT.PID2 = PID2_AUTOSET_FAST_THRESHOLD;
00197             POUT.LEN = 0;
00198                         break;
00199         //case XMTPT_READ_IO3_0:
00200                         //break;
00201         //case XMTPT_WRITE_IO3_0:
00202                         //break;
00203         //case XMTPT_SET_DCAL:
00204                         //break;
00205         //case XMTPT_SET_PZ_CORRECTION_UC_TEMP_CAL:
00206                         //break;
00207         //case XMTPT_SET_PZ_CORRECTION_UC_TEMP_CAL:
00208                         //break;
00209         //case XMTPT_SET_BOOT_FLAGS:
00210                         //break;
00211         //case XMTPT_SET_HV_DP4_EMULATION:
00212                         //break;
00213         //case XMTPT_SET_TEC_DP4_EMULATION:
00214                         //break;
00215         //case XMTPT_SET_INPUT_OFFSET_DP4_EMULATION:
00216                         //break;
00217         //case XMTPT_SET_ADC_CAL_GAIN_OFFSET:
00218                         //break;
00219         //case XMTPT_SET_SPECTRUM_OFFSET:
00220                         //break;
00221         //case XMTPT_REQ_SCOPE_DATA_MISC_DATA_SCA_PACKETS:
00222                         //break;
00223         //case XMTPT_SET_SERIAL_NUMBER:
00224                         //break;
00225         //case XMTPT_CLEAR_GP_COUNTER:
00226                         //break;
00227         //case XMTPT_SWITCH_SUPPLIES:
00228                         //break;
00229         //case XMTPT_SEND_TEST_PACKET:
00230                         //break;
00231         case XMTPT_REQ_ACK_PACKET:
00232             POUT.PID1 = PID1_COMM_TEST;
00233             POUT.PID2 = PID2_ACK_OK;
00234             POUT.LEN = 0;
00235                         break;
00236                 case XMTPT_FORCE_SCOPE_TRIGGER:
00237             POUT.PID1 = PID1_VENDOR_REQ;
00238             POUT.PID2 = PID2_GENERIC_FPGA_WRITE;        // generic FPGA write
00239             POUT.LEN = 2;
00240             POUT.DATA[0] = 119;                                         // force scope trigger
00241             POUT.DATA[1] = 0;                                           // data doesn't matter
00242                         break;
00243                 case XMTPT_AU34_2_RESTART:
00244             POUT.PID1 = PID1_VENDOR_REQ;
00245             POUT.PID2 = PID2_GENERIC_FPGA_WRITE;        // generic FPGA write
00246             POUT.LEN = 2;
00247             POUT.DATA[0] = 0x73;                                        // AU34_2_RESTART
00248             POUT.DATA[1] = 0;                                           // data doesn't matter
00249                         break;
00250         case XMTPT_READ_MCA8000D_OPTION_PA_CAL:
00251             POUT.PID1 = PID1_REQ_SCOPE_MISC;
00252             POUT.PID2 = PID2_SEND_OPTION_PA_CALIBRATION;
00253             POUT.LEN = 0;
00254                         break;
00255                 default:
00256             bCmdFound = false;
00257                         break;
00258         }
00259         if (bCmdFound) {
00260         if (! POUT_Buffer(POUT, Buffer)) {
00261             bCmdFound = false;
00262         }
00263     }
00264         return bCmdFound;
00265 }
00266
00267 //DP5_CMD_Config is for: (requires pc5 and device info)
00268 //              XMTPT_SEND_CONFIG_PACKET_TO_HW
00269 //              XMTPT_SEND_CONFIG_PACKET_EX
00270 //              XMTPT_FULL_READ_CONFIG_PACKET
00271 //              XMTPT_READ_CONFIG_PACKET
00272 //              XMTPT_READ_CONFIG_PACKET_EX
00273 bool CSendCommand::DP5_CMD_Config(unsigned char Buffer[], TRANSMIT_PACKET_TYPE XmtCmd, CONFIG_OPTIONS CfgOptions)
00274 {
00275     bool bCmdFound;
00276     string D;
00277     Packet_Out POUT;
00278     bCmdFound = true;
00279     POUT.LEN = 0;
00280         string strCfg;
00281         long lLen;
00282
00283         switch (XmtCmd) {
00284         case XMTPT_SEND_CONFIG_PACKET_TO_HW:
00285                         // CONFIG_OPTIONS Needed:
00286                         //              CfgOptions.HwCfgDP5Out
00287                         //              CfgOptions.SendCoarseFineGain
00288                         //              CfgOptions.PC5_PRESENT
00289                         //              CfgOptions.DppType
00290                         strCfg = "";
00291                         strCfg = CfgOptions.HwCfgDP5Out;
00292
00293                         if (CfgOptions.SendCoarseFineGain) {
00294                                 strCfg = AsciiCmdUtil.RemoveCmd("GAIN",strCfg);
00295                         } else {
00296                                 strCfg = AsciiCmdUtil.RemoveCmd("GAIA",strCfg);
00297                                 strCfg = AsciiCmdUtil.RemoveCmd("GAIF",strCfg);
00298                         }
00299                         strCfg = AsciiCmdUtil.RemoveCmdByDeviceType(strCfg, CfgOptions.PC5_PRESENT, CfgOptions.DppType, CfgOptions.isDP5_RevDxGains, CfgOptions.DPP_ECO);
00300                         lLen = (long)strCfg.length();
00301                         if (lLen > 0) {
00302                                 strCfg = AsciiCmdUtil.MakeUpper(strCfg);
00303                                 AsciiCmdUtil.CopyAsciiData(POUT.DATA, strCfg, lLen);
00304                         }
00305             POUT.PID1 = PID1_REQ_CONFIG;
00306             POUT.PID2 = PID2_TEXT_CONFIG_PACKET;   // text config packet
00307             POUT.LEN = (unsigned short)lLen;
00308                         break;
00309         case XMTPT_SEND_CONFIG_PACKET_EX:                       // bypass any filters
00310                         // CONFIG_OPTIONS Needed:
00311                         //              CfgOptions.HwCfgDP5Out
00312                         strCfg = "";
00313                         strCfg = CfgOptions.HwCfgDP5Out;
00314                         lLen = (long)strCfg.length();
00315                         if (lLen > 0) {
00316                                 strCfg = AsciiCmdUtil.MakeUpper(strCfg);
00317                                 AsciiCmdUtil.CopyAsciiData(POUT.DATA, strCfg, lLen);
00318                         }
00319             POUT.PID1 = PID1_REQ_CONFIG;
00320             POUT.PID2 = PID2_TEXT_CONFIG_PACKET;   // text config packet
00321             POUT.LEN = (unsigned short)lLen;
00322                         break;
00323          case XMTPT_FULL_READ_CONFIG_PACKET:
00324                         // CONFIG_OPTIONS Needed:
00325                         //              CfgOptions.PC5_PRESENT
00326                         //              CfgOptions.DppType
00327                         strCfg = "";
00328                         strCfg = AsciiCmdUtil.CreateFullReadBackCmd(CfgOptions.PC5_PRESENT, CfgOptions.DppType, CfgOptions.isDP5_RevDxGains, CfgOptions.DPP_ECO);
00329                         lLen = (long)strCfg.length();
00330                         if (lLen > 0) {
00331                                 strCfg = AsciiCmdUtil.MakeUpper(strCfg);
00332                                 AsciiCmdUtil.CopyAsciiData(POUT.DATA, strCfg, lLen);
00333                         }
00334             POUT.PID1 = PID1_REQ_CONFIG;
00335             POUT.PID2 = PID2_CONFIG_READBACK_PACKET;   // read config packet
00336             POUT.LEN = (unsigned short)lLen;
00337                         break;
00338         case XMTPT_READ_CONFIG_PACKET_EX:                                       // bypass any filters
00339                         strCfg = "";
00340                         strCfg = CfgOptions.HwCfgDP5Out;
00341                         lLen = (long)strCfg.length();
00342                         if (lLen > 0) {
00343                                 strCfg = AsciiCmdUtil.MakeUpper(strCfg);
00344                                 AsciiCmdUtil.CopyAsciiData(POUT.DATA, strCfg, lLen);    //ForceASCII_20110606
00345                         }
00346             POUT.PID1 = PID1_REQ_CONFIG;
00347             POUT.PID2 = PID2_CONFIG_READBACK_PACKET;   // text config packet
00348             POUT.LEN = (unsigned short)lLen;
00349                         break;
00350                 case XMTPT_READ_CONFIG_PACKET:
00351                         strCfg = "";
00352                         strCfg += "CLCK=?;"; // FPGA clock
00353                         strCfg += "TPEA=?;"; // peak time
00354                         strCfg += "GAIN=?;"; // gain
00355                         if (CfgOptions.DppType == dppMCA8000D) {
00356                                 strCfg += "GAIA=?;"; // coarse gain
00357                         }
00358                         strCfg += "MCAS=?;"; // mca mode
00359                         strCfg += "MCAC=?;"; // channels
00360                         strCfg += "INOF=?;"; // osc. Input offset
00361                         strCfg += "THSL=?;"; // LLD thresh
00362                         strCfg += "TFLA=?;"; // flat top width
00363                         strCfg += "THFA=?;"; // fast thresh
00364                         strCfg += "DACO=?;"; // osc. DAC output
00365                         strCfg += "DACF=?;"; // osc. DAC offset
00366                         strCfg += "AUO1=?;"; // osc. AUX_OUT1
00367                         strCfg += "PRET=?;"; // preset actual time
00368                         strCfg += "PRER=?;"; // preset real time
00369                         strCfg += "PREC=?;"; // preset count
00370                         if (CfgOptions.DppType == dppMCA8000D) {
00371                                 strCfg += "PREL=?;"; // preset real time
00372                         }
00373                         strCfg += "HVSE=?;"; // high voltage setting for manufacuting test
00374                         strCfg += "SCOE=?;"; // osc. Scope trigger edge
00375                         strCfg += "SCOT=?;"; // osc. Scope trigger position
00376                         strCfg += "SCOG=?;"; // osc. Scope gain
00377
00378                         lLen = (long)strCfg.length();
00379                         if (lLen > 0) {
00380                                 strCfg = AsciiCmdUtil.MakeUpper(strCfg);
00381                                 AsciiCmdUtil.CopyAsciiData(POUT.DATA, strCfg, lLen);
00382                         }
00383             POUT.PID1 = PID1_REQ_CONFIG;
00384             POUT.PID2 = PID2_CONFIG_READBACK_PACKET;   // read config packet
00385             POUT.LEN = (unsigned short)lLen;
00386                         break;
00387                 default:
00388             bCmdFound = false;
00389                         break;
00390         }
00391         if (bCmdFound) {
00392         if (! POUT_Buffer(POUT, Buffer)) {
00393             bCmdFound = false;
00394         }
00395     }
00396         return bCmdFound;
00397 }
00398
00399
00400 //Extend Packet_Out to include entire message
00401 //include send packet data finishing into dp5_cmd
00402 //remove control and interface objects
00403 //move send packet to separate function
00404 bool CSendCommand::DP5_CMD_Data(unsigned char Buffer[], TRANSMIT_PACKET_TYPE XmtCmd, unsigned char DataOut[])
00405 {
00406     bool bCmdFound;
00407     short idxMiscData;
00408     Packet_Out POUT;
00409     long PktLen;
00410
00411     bCmdFound = false;
00412     POUT.LEN = 0;
00413         string strCfg;
00414         long idxData;
00415         switch (XmtCmd) {       //REQUEST_PACKETS_TO_DP5
00416         case XMTPT_WRITE_512_BYTE_MISC_DATA:
00417             POUT.PID1 = PID1_VENDOR_REQ;
00418             POUT.PID2 = PID2_WRITE_512_BYTE_MISC_DATA;                          // write misc data
00419             POUT.LEN = 512;
00420                         for (idxMiscData=0;idxMiscData<=511;idxMiscData++) {    // byte array padded w/NULLs
00421                 POUT.DATA[idxMiscData] = DataOut[idxMiscData];
00422                         }
00423                         bCmdFound = true;
00424                         if (! POUT_Buffer(POUT, Buffer)) {
00425                                 bCmdFound = false;
00426                         }
00427                         break;
00428          case XMTPT_SEND_TEST_PACKET:
00429                         PktLen = (DataOut[4] * 256) + DataOut[5] + 8;           // get entire packet size
00430                         if ((PktLen >= 8) && (PktLen <= 12)) {                          // test data len 0-4 bytes
00431                                 if (TestPacketCkSumOK(DataOut)) {                               // check the message for correct check sum
00432                                         for(idxData=0;idxData<PktLen;idxData++) {       // load the data into the command buffer
00433                                                 Buffer[idxData] = DataOut[idxData];
00434                                         }
00435                                         bCmdFound = true;
00436                                 }
00437                         }
00438                         break;
00439                 default:
00440             bCmdFound = false;
00441                         break;
00442         }
00443         return bCmdFound;
00444 }
00445
00446 bool CSendCommand::POUT_Buffer(Packet_Out POUT, unsigned char Buffer[])
00447 {
00448     long idxBuffer;
00449     long CS;
00450
00451     Buffer[0] = SYNC1_;
00452     Buffer[1] = SYNC2_;
00453     Buffer[2] = POUT.PID1;
00454     Buffer[3] = POUT.PID2;
00455     Buffer[4] = (POUT.LEN & 0xFF00) / 256;
00456     Buffer[5] = POUT.LEN & 0xFF;
00457
00458     CS = SYNC1_ + SYNC2_ + POUT.PID1 + POUT.PID2 + ((POUT.LEN & 0xFF00) / 256) + (POUT.LEN & 0xFF);
00459
00460         if (POUT.LEN > 0) {
00461                 for (idxBuffer=0; idxBuffer<POUT.LEN;idxBuffer++) {
00462             Buffer[idxBuffer + 6] = POUT.DATA[idxBuffer];
00463             CS = CS + POUT.DATA[idxBuffer];
00464                 }
00465     }
00466     CS = (CS ^ 0xFFFF) + 1;
00467     Buffer[POUT.LEN + 6] = (unsigned char)((CS & 0xFF00) / 256);
00468     Buffer[POUT.LEN + 7] = (unsigned char)(CS & 0xFF);
00469     return true;
00470 }
00471
Generated on Thu Sep 21 2017 16:01:13 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: DeviceIO/SendCommand.h File Reference

  • File List
  • File Members
Classes | Typedefs
DeviceIO/SendCommand.h File Reference
#include "DppConst.h"
#include "DP5Protocol.h"
#include "AsciiCmdUtilities.h"
Include dependency graph for SendCommand.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct | _CONFIG_OPTIONS
class | CSendCommand

Typedefs

typedef struct _CONFIG_OPTIONS | CONFIG_OPTIONS

Typedef Documentation

typedef struct _CONFIG_OPTIONS CONFIG_OPTIONS
Generated on Thu Sep 21 2017 16:01:13 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: DeviceIO/SendCommand.h Source File

  • File List
  • File Members
DeviceIO/SendCommand.h
Go to the documentation of this file.
00001 #pragma once
00002 #include "DppConst.h"
00003 #include "DP5Protocol.h"
00004 #include "AsciiCmdUtilities.h"
00005
00006 typedef struct _CONFIG_OPTIONS
00007 {
00008     bool PC5_PRESENT;
00009     int DppType;
00010         string HwCfgDP5Out;
00011         bool SendCoarseFineGain;
00012         bool isDP5_RevDxGains;
00013         unsigned char DPP_ECO;
00014 } CONFIG_OPTIONS;
00015
00023 class CSendCommand
00024 {
00025 public:
00026         CSendCommand(void);
00027         ~CSendCommand(void);
00028     CAsciiCmdUtilities AsciiCmdUtil;
00029
00031         bool TestPacketCkSumOK(unsigned char Data[]);
00033         bool DP5_CMD(unsigned char Buffer[], TRANSMIT_PACKET_TYPE XmtCmd);
00035         bool DP5_CMD_Config(unsigned char Buffer[], TRANSMIT_PACKET_TYPE XmtCmd, CONFIG_OPTIONS CfgOptions);
00037         bool DP5_CMD_Data(unsigned char Buffer[], TRANSMIT_PACKET_TYPE XmtCmd, unsigned char DataOut[]);
00039         bool POUT_Buffer(Packet_Out POUT, unsigned char Buffer[]);
00040 };
00041
Generated on Thu Sep 21 2017 16:01:13 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: DeviceIO/WINUSB.H File Reference

  • File List
  • File Members
Classes | Typedefs | Functions
DeviceIO/WINUSB.H File Reference
#include "winusbio.h"
Include dependency graph for WINUSB.H:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct | _WINUSB_SETUP_PACKET

Typedefs

typedef PVOID | WINUSB_INTERFACE_HANDLE
typedef PVOID * | PWINUSB_INTERFACE_HANDLE
typedef struct _WINUSB_SETUP_PACKET | WINUSB_SETUP_PACKET
typedef struct
_WINUSB_SETUP_PACKET * 		PWINUSB_SETUP_PACKET

Functions

BOOL __stdcall | WinUsb_Initialize (IN HANDLE DeviceHandle, OUT PWINUSB_INTERFACE_HANDLE InterfaceHandle)
BOOL __stdcall | WinUsb_Free (IN WINUSB_INTERFACE_HANDLE InterfaceHandle)
BOOL __stdcall | WinUsb_GetAssociatedInterface (IN WINUSB_INTERFACE_HANDLE InterfaceHandle, IN UCHAR AssociatedInterfaceIndex, OUT PWINUSB_INTERFACE_HANDLE AssociatedInterfaceHandle)
BOOL __stdcall | WinUsb_GetDescriptor (IN WINUSB_INTERFACE_HANDLE InterfaceHandle, IN UCHAR DescriptorType, IN UCHAR Index, IN USHORT LanguageID, OUT PUCHAR Buffer, IN ULONG BufferLength, OUT PULONG LengthTransferred)
BOOL __stdcall | WinUsb_QueryInterfaceSettings (IN WINUSB_INTERFACE_HANDLE InterfaceHandle, IN UCHAR AlternateInterfaceNumber, OUT PUSB_INTERFACE_DESCRIPTOR UsbAltInterfaceDescriptor)
BOOL __stdcall | WinUsb_QueryDeviceInformation (IN WINUSB_INTERFACE_HANDLE InterfaceHandle, IN ULONG InformationType, IN OUT PULONG BufferLength, OUT PVOID Buffer)
BOOL __stdcall | WinUsb_SetCurrentAlternateSetting (IN WINUSB_INTERFACE_HANDLE InterfaceHandle, IN UCHAR SettingNumber)
BOOL __stdcall | WinUsb_GetCurrentAlternateSetting (IN WINUSB_INTERFACE_HANDLE InterfaceHandle, OUT PUCHAR SettingNumber)
BOOL __stdcall | WinUsb_QueryPipe (IN WINUSB_INTERFACE_HANDLE InterfaceHandle, IN UCHAR AlternateInterfaceNumber, IN UCHAR PipeIndex, OUT PWINUSB_PIPE_INFORMATION PipeInformation)
BOOL __stdcall | WinUsb_SetPipePolicy (IN WINUSB_INTERFACE_HANDLE InterfaceHandle, IN UCHAR PipeID, IN ULONG PolicyType, IN ULONG ValueLength, IN PVOID Value)
BOOL __stdcall | WinUsb_GetPipePolicy (IN WINUSB_INTERFACE_HANDLE InterfaceHandle, IN UCHAR PipeID, IN ULONG PolicyType, IN OUT PULONG ValueLength, OUT PVOID Value)
BOOL __stdcall | WinUsb_ReadPipe (IN WINUSB_INTERFACE_HANDLE InterfaceHandle, IN UCHAR PipeID, IN PUCHAR Buffer, IN ULONG BufferLength, OUT PULONG LengthTransferred, IN LPOVERLAPPED Overlapped)
BOOL __stdcall | WinUsb_WritePipe (IN WINUSB_INTERFACE_HANDLE InterfaceHandle, IN UCHAR PipeID, IN PUCHAR Buffer, IN ULONG BufferLength, OUT PULONG LengthTransferred, IN LPOVERLAPPED Overlapped)
BOOL __stdcall | WinUsb_ControlTransfer (IN WINUSB_INTERFACE_HANDLE InterfaceHandle, IN WINUSB_SETUP_PACKET SetupPacket, IN PUCHAR Buffer, IN ULONG BufferLength, OUT PULONG LengthTransferred, IN LPOVERLAPPED Overlapped)
BOOL __stdcall | WinUsb_ResetPipe (IN WINUSB_INTERFACE_HANDLE InterfaceHandle, IN UCHAR PipeID)
BOOL __stdcall | WinUsb_AbortPipe (IN WINUSB_INTERFACE_HANDLE InterfaceHandle, IN UCHAR PipeID)
BOOL __stdcall | WinUsb_FlushPipe (IN WINUSB_INTERFACE_HANDLE InterfaceHandle, IN UCHAR PipeID)
BOOL __stdcall | WinUsb_SetPowerPolicy (IN WINUSB_INTERFACE_HANDLE InterfaceHandle, IN ULONG PolicyType, IN ULONG ValueLength, IN PVOID Value)
BOOL __stdcall | WinUsb_GetPowerPolicy (IN WINUSB_INTERFACE_HANDLE InterfaceHandle, IN ULONG PolicyType, IN OUT PULONG ValueLength, OUT PVOID Value)
BOOL __stdcall | WinUsb_GetOverlappedResult (IN WINUSB_INTERFACE_HANDLE InterfaceHandle, IN LPOVERLAPPED lpOverlapped, OUT LPDWORD lpNumberOfBytesTransferred, BOOL bWait)
PUSB_INTERFACE_DESCRIPTOR __stdcall | WinUsb_ParseConfigurationDescriptor (IN PUSB_CONFIGURATION_DESCRIPTOR ConfigurationDescriptor, IN PVOID StartPosition, IN LONG InterfaceNumber, IN LONG AlternateSetting, IN LONG InterfaceClass, IN LONG InterfaceSubClass, IN LONG InterfaceProtocol)
PUSB_COMMON_DESCRIPTOR __stdcall | WinUsb_ParseDescriptors (IN PVOID DescriptorBuffer, IN ULONG TotalLength, IN PVOID StartPosition, IN LONG DescriptorType)

Typedef Documentation

typedef PVOID * PWINUSB_INTERFACE_HANDLE

Definition at line 45 of file WINUSB.H.

typedef struct _WINUSB_SETUP_PACKET * PWINUSB_SETUP_PACKET
typedef PVOID WINUSB_INTERFACE_HANDLE

Definition at line 45 of file WINUSB.H.

typedef struct _WINUSB_SETUP_PACKET WINUSB_SETUP_PACKET

Function Documentation

BOOL __stdcall WinUsb_AbortPipe | ( | IN WINUSB_INTERFACE_HANDLE | InterfaceHandle,
 |  | IN UCHAR | PipeID
 | ) |  |
BOOL __stdcall WinUsb_ControlTransfer | ( | IN WINUSB_INTERFACE_HANDLE | InterfaceHandle,
 |  | IN WINUSB_SETUP_PACKET | SetupPacket,
 |  | IN PUCHAR | Buffer,
 |  | IN ULONG | BufferLength,
 |  | OUT PULONG | LengthTransferred,
 |  | IN LPOVERLAPPED | Overlapped
 | ) |  |
BOOL __stdcall WinUsb_FlushPipe | ( | IN WINUSB_INTERFACE_HANDLE | InterfaceHandle,
 |  | IN UCHAR | PipeID
 | ) |  |
BOOL __stdcall WinUsb_Free ( IN WINUSB_INTERFACE_HANDLE InterfaceHandle )

Here is the caller graph for this function:

BOOL __stdcall WinUsb_GetAssociatedInterface | ( | IN WINUSB_INTERFACE_HANDLE | InterfaceHandle,
 |  | IN UCHAR | AssociatedInterfaceIndex,
 |  | OUT PWINUSB_INTERFACE_HANDLE | AssociatedInterfaceHandle
 | ) |  |
BOOL __stdcall WinUsb_GetCurrentAlternateSetting | ( | IN WINUSB_INTERFACE_HANDLE | InterfaceHandle,
 |  | OUT PUCHAR | SettingNumber
 | ) |  |
BOOL __stdcall WinUsb_GetDescriptor | ( | IN WINUSB_INTERFACE_HANDLE | InterfaceHandle,
 |  | IN UCHAR | DescriptorType,
 |  | IN UCHAR | Index,
 |  | IN USHORT | LanguageID,
 |  | OUT PUCHAR | Buffer,
 |  | IN ULONG | BufferLength,
 |  | OUT PULONG | LengthTransferred
 | ) |  |
BOOL __stdcall WinUsb_GetOverlappedResult | ( | IN WINUSB_INTERFACE_HANDLE | InterfaceHandle,
 |  | IN LPOVERLAPPED | lpOverlapped,
 |  | OUT LPDWORD | lpNumberOfBytesTransferred,
 |  | BOOL | bWait
 | ) |  |
BOOL __stdcall WinUsb_GetPipePolicy | ( | IN WINUSB_INTERFACE_HANDLE | InterfaceHandle,
 |  | IN UCHAR | PipeID,
 |  | IN ULONG | PolicyType,
 |  | IN OUT PULONG | ValueLength,
 |  | OUT PVOID | Value
 | ) |  |
BOOL __stdcall WinUsb_GetPowerPolicy | ( | IN WINUSB_INTERFACE_HANDLE | InterfaceHandle,
 |  | IN ULONG | PolicyType,
 |  | IN OUT PULONG | ValueLength,
 |  | OUT PVOID | Value
 | ) |  |
BOOL __stdcall WinUsb_Initialize | ( | IN HANDLE | DeviceHandle,
 |  | OUT PWINUSB_INTERFACE_HANDLE | InterfaceHandle
 | ) |  |

Here is the caller graph for this function:

PUSB_INTERFACE_DESCRIPTOR __stdcall WinUsb_ParseConfigurationDescriptor | ( | IN PUSB_CONFIGURATION_DESCRIPTOR | ConfigurationDescriptor,
 |  | IN PVOID | StartPosition,
 |  | IN LONG | InterfaceNumber,
 |  | IN LONG | AlternateSetting,
 |  | IN LONG | InterfaceClass,
 |  | IN LONG | InterfaceSubClass,
 |  | IN LONG | InterfaceProtocol
 | ) |  |
PUSB_COMMON_DESCRIPTOR __stdcall WinUsb_ParseDescriptors | ( | IN PVOID | DescriptorBuffer,
 |  | IN ULONG | TotalLength,
 |  | IN PVOID | StartPosition,
 |  | IN LONG | DescriptorType
 | ) |  |
BOOL __stdcall WinUsb_QueryDeviceInformation | ( | IN WINUSB_INTERFACE_HANDLE | InterfaceHandle,
 |  | IN ULONG | InformationType,
 |  | IN OUT PULONG | BufferLength,
 |  | OUT PVOID | Buffer
 | ) |  |

Here is the caller graph for this function:

BOOL __stdcall WinUsb_QueryInterfaceSettings | ( | IN WINUSB_INTERFACE_HANDLE | InterfaceHandle,
 |  | IN UCHAR | AlternateInterfaceNumber,
 |  | OUT PUSB_INTERFACE_DESCRIPTOR | UsbAltInterfaceDescriptor
 | ) |  |

Here is the caller graph for this function:

BOOL __stdcall WinUsb_QueryPipe | ( | IN WINUSB_INTERFACE_HANDLE | InterfaceHandle,
 |  | IN UCHAR | AlternateInterfaceNumber,
 |  | IN UCHAR | PipeIndex,
 |  | OUT PWINUSB_PIPE_INFORMATION | PipeInformation
 | ) |  |

Here is the caller graph for this function:

BOOL __stdcall WinUsb_ReadPipe | ( | IN WINUSB_INTERFACE_HANDLE | InterfaceHandle,
 |  | IN UCHAR | PipeID,
 |  | IN PUCHAR | Buffer,
 |  | IN ULONG | BufferLength,
 |  | OUT PULONG | LengthTransferred,
 |  | IN LPOVERLAPPED | Overlapped
 | ) |  |

Here is the caller graph for this function:

BOOL __stdcall WinUsb_ResetPipe | ( | IN WINUSB_INTERFACE_HANDLE | InterfaceHandle,
 |  | IN UCHAR | PipeID
 | ) |  |
BOOL __stdcall WinUsb_SetCurrentAlternateSetting | ( | IN WINUSB_INTERFACE_HANDLE | InterfaceHandle,
 |  | IN UCHAR | SettingNumber
 | ) |  |
BOOL __stdcall WinUsb_SetPipePolicy | ( | IN WINUSB_INTERFACE_HANDLE | InterfaceHandle,
 |  | IN UCHAR | PipeID,
 |  | IN ULONG | PolicyType,
 |  | IN ULONG | ValueLength,
 |  | IN PVOID | Value
 | ) |  |

Here is the caller graph for this function:

BOOL __stdcall WinUsb_SetPowerPolicy | ( | IN WINUSB_INTERFACE_HANDLE | InterfaceHandle,
 |  | IN ULONG | PolicyType,
 |  | IN ULONG | ValueLength,
 |  | IN PVOID | Value
 | ) |  |
BOOL __stdcall WinUsb_WritePipe | ( | IN WINUSB_INTERFACE_HANDLE | InterfaceHandle,
 |  | IN UCHAR | PipeID,
 |  | IN PUCHAR | Buffer,
 |  | IN ULONG | BufferLength,
 |  | OUT PULONG | LengthTransferred,
 |  | IN LPOVERLAPPED | Overlapped
 | ) |  |

Here is the caller graph for this function:

Generated on Thu Sep 21 2017 16:01:13 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: DeviceIO/WINUSB.H Source File

  • File List
  • File Members
DeviceIO/WINUSB.H
Go to the documentation of this file.
00001 /*++
00002
00003 Copyright (c) 2002 Microsoft Corporation
00004
00005 Module Name:
00006
00007         wusb.h
00008
00009 Abstract:
00010
00011         Public interface to winusb.dll
00012
00013 Environment:
00014
00015         Kernel Mode Only
00016
00017 Notes:
00018
00019         THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
00020         KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
00021         IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
00022         PURPOSE.
00023
00024         Copyright (c) 2001 Microsoft Corporation.  All Rights Reserved.
00025
00026
00027 Revision History:
00028
00029         11/19/2002 : created
00030
00031 Authors:
00032
00033 --*/
00034
00035 #ifndef __WUSB_H__
00036 #define __WUSB_H__
00037
00038 #ifdef __cplusplus
00039 extern "C" {
00040 #endif
00041
00042 #include "winusbio.h"
00043
00044
00045 typedef PVOID WINUSB_INTERFACE_HANDLE, *PWINUSB_INTERFACE_HANDLE;
00046
00047
00048 #pragma pack(1)
00049
00050 typedef struct _WINUSB_SETUP_PACKET {
00051     UCHAR   RequestType;
00052     UCHAR   Request;
00053     USHORT  Value;
00054     USHORT  Index;
00055     USHORT  Length;
00056 } WINUSB_SETUP_PACKET, *PWINUSB_SETUP_PACKET;
00057
00058 #pragma pack()
00059
00060
00061
00062 BOOL __stdcall
00063 WinUsb_Initialize(
00064     IN HANDLE DeviceHandle,
00065     OUT PWINUSB_INTERFACE_HANDLE InterfaceHandle
00066     );
00067
00068
00069 BOOL __stdcall
00070 WinUsb_Free(
00071     IN  WINUSB_INTERFACE_HANDLE InterfaceHandle
00072     );
00073
00074
00075 BOOL __stdcall
00076 WinUsb_GetAssociatedInterface(
00077     IN WINUSB_INTERFACE_HANDLE InterfaceHandle,
00078     IN UCHAR AssociatedInterfaceIndex,
00079     OUT PWINUSB_INTERFACE_HANDLE AssociatedInterfaceHandle
00080     );
00081
00082
00083
00084 BOOL __stdcall
00085 WinUsb_GetDescriptor(
00086     IN  WINUSB_INTERFACE_HANDLE InterfaceHandle,
00087     IN  UCHAR DescriptorType,
00088     IN  UCHAR Index,
00089     IN  USHORT LanguageID,
00090     OUT PUCHAR Buffer,
00091     IN  ULONG BufferLength,
00092     OUT PULONG LengthTransferred
00093     );
00094
00095 BOOL __stdcall
00096 WinUsb_QueryInterfaceSettings(
00097     IN WINUSB_INTERFACE_HANDLE InterfaceHandle,
00098     IN UCHAR AlternateInterfaceNumber,
00099     OUT PUSB_INTERFACE_DESCRIPTOR UsbAltInterfaceDescriptor
00100     );
00101
00102 BOOL __stdcall
00103 WinUsb_QueryDeviceInformation(
00104     IN WINUSB_INTERFACE_HANDLE InterfaceHandle,
00105     IN ULONG InformationType,
00106     IN OUT PULONG BufferLength,
00107     OUT PVOID Buffer
00108     );
00109
00110 BOOL __stdcall
00111 WinUsb_SetCurrentAlternateSetting(
00112     IN  WINUSB_INTERFACE_HANDLE InterfaceHandle,
00113     IN  UCHAR SettingNumber
00114     );
00115
00116 BOOL __stdcall
00117 WinUsb_GetCurrentAlternateSetting(
00118     IN  WINUSB_INTERFACE_HANDLE InterfaceHandle,
00119     OUT PUCHAR SettingNumber
00120     );
00121
00122
00123 BOOL __stdcall
00124 WinUsb_QueryPipe(
00125     IN  WINUSB_INTERFACE_HANDLE InterfaceHandle,
00126     IN  UCHAR AlternateInterfaceNumber,
00127     IN  UCHAR PipeIndex,
00128     OUT PWINUSB_PIPE_INFORMATION PipeInformation
00129     );
00130
00131
00132 BOOL __stdcall
00133 WinUsb_SetPipePolicy(
00134     IN  WINUSB_INTERFACE_HANDLE InterfaceHandle,
00135     IN  UCHAR PipeID,
00136     IN  ULONG PolicyType,
00137     IN  ULONG ValueLength,
00138     IN  PVOID Value
00139     );
00140
00141 BOOL __stdcall
00142 WinUsb_GetPipePolicy(
00143     IN WINUSB_INTERFACE_HANDLE InterfaceHandle,
00144     IN UCHAR PipeID,
00145     IN ULONG PolicyType,
00146     IN OUT PULONG ValueLength,
00147     OUT PVOID Value
00148     );
00149
00150 BOOL __stdcall
00151 WinUsb_ReadPipe(
00152     IN  WINUSB_INTERFACE_HANDLE InterfaceHandle,
00153     IN  UCHAR PipeID,
00154     IN  PUCHAR Buffer,
00155     IN  ULONG BufferLength,
00156     OUT PULONG LengthTransferred,
00157     IN  LPOVERLAPPED Overlapped
00158     );
00159
00160 BOOL __stdcall
00161 WinUsb_WritePipe(
00162     IN  WINUSB_INTERFACE_HANDLE InterfaceHandle,
00163     IN  UCHAR PipeID,
00164     IN  PUCHAR Buffer,
00165     IN  ULONG BufferLength,
00166     OUT PULONG LengthTransferred,
00167     IN  LPOVERLAPPED Overlapped
00168     );
00169
00170 BOOL __stdcall
00171 WinUsb_ControlTransfer(
00172     IN  WINUSB_INTERFACE_HANDLE InterfaceHandle,
00173     IN  WINUSB_SETUP_PACKET SetupPacket,
00174     IN  PUCHAR Buffer,
00175     IN  ULONG BufferLength,
00176     OUT PULONG LengthTransferred,
00177     IN  LPOVERLAPPED Overlapped
00178     );
00179
00180 BOOL __stdcall
00181 WinUsb_ResetPipe(
00182     IN  WINUSB_INTERFACE_HANDLE InterfaceHandle,
00183     IN  UCHAR PipeID
00184     );
00185
00186 BOOL __stdcall
00187 WinUsb_AbortPipe(
00188     IN  WINUSB_INTERFACE_HANDLE InterfaceHandle,
00189     IN  UCHAR PipeID
00190     );
00191
00192 BOOL __stdcall
00193 WinUsb_FlushPipe(
00194     IN  WINUSB_INTERFACE_HANDLE InterfaceHandle,
00195     IN  UCHAR PipeID
00196     );
00197
00198 BOOL __stdcall
00199 WinUsb_SetPowerPolicy(
00200     IN  WINUSB_INTERFACE_HANDLE InterfaceHandle,
00201     IN  ULONG PolicyType,
00202     IN  ULONG ValueLength,
00203     IN  PVOID Value
00204     );
00205
00206 BOOL __stdcall
00207 WinUsb_GetPowerPolicy(
00208     IN WINUSB_INTERFACE_HANDLE InterfaceHandle,
00209     IN ULONG PolicyType,
00210     IN OUT PULONG ValueLength,
00211     OUT PVOID Value
00212     );
00213
00214 BOOL __stdcall
00215 WinUsb_GetOverlappedResult(
00216     IN WINUSB_INTERFACE_HANDLE InterfaceHandle,
00217     IN LPOVERLAPPED lpOverlapped,
00218     OUT LPDWORD lpNumberOfBytesTransferred,
00219     BOOL bWait
00220     );
00221
00222
00223 PUSB_INTERFACE_DESCRIPTOR __stdcall
00224 WinUsb_ParseConfigurationDescriptor(
00225     IN PUSB_CONFIGURATION_DESCRIPTOR ConfigurationDescriptor,
00226     IN PVOID StartPosition,
00227     IN LONG InterfaceNumber,
00228     IN LONG AlternateSetting,
00229     IN LONG InterfaceClass,
00230     IN LONG InterfaceSubClass,
00231     IN LONG InterfaceProtocol
00232     );
00233
00234 PUSB_COMMON_DESCRIPTOR __stdcall
00235 WinUsb_ParseDescriptors(
00236     IN PVOID    DescriptorBuffer,
00237     IN ULONG    TotalLength,
00238     IN PVOID    StartPosition,
00239     IN LONG     DescriptorType
00240     );
00241
00242
00243 #ifdef __cplusplus
00244 }
00245 #endif
00246
00247
00248 #endif //__WUSB_H__
00249
Generated on Thu Sep 21 2017 16:01:13 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: DeviceIO/WINUSBIO.H File Reference

  • File List
  • File Members
Classes | Defines | Typedefs | Functions
DeviceIO/WINUSBIO.H File Reference
#include "usb.h"
#include <initguid.h>
Include dependency graph for WINUSBIO.H:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct | _WINUSB_PIPE_INFORMATION

Defines

#define | SHORT_PACKET_TERMINATE 0x01
#define | AUTO_CLEAR_STALL 0x02
#define | PIPE_TRANSFER_TIMEOUT 0x03
#define | IGNORE_SHORT_PACKETS 0x04
#define | ALLOW_PARTIAL_READS 0x05
#define | AUTO_FLUSH 0x06
#define | RAW_IO 0x07
#define | MAXIMUM_TRANSFER_SIZE 0x08
#define | AUTO_SUSPEND 0x81
#define | SUSPEND_DELAY 0x83
#define | DEVICE_SPEED 0x01
#define | LowSpeed 0x01
#define | FullSpeed 0x02
#define | HighSpeed 0x03

Typedefs

typedef struct
_WINUSB_PIPE_INFORMATION 		WINUSB_PIPE_INFORMATION
typedef struct
_WINUSB_PIPE_INFORMATION * 		PWINUSB_PIPE_INFORMATION

Functions

DEFINE_GUID (WinUSB_TestGuid, 0xda812bff, 0x12c3, 0x46a2, 0x8e, 0x2b, 0xdb, 0xd3, 0xb7, 0x83, 0x4c, 0x43)

Define Documentation

#define ALLOW_PARTIAL_READS 0x05

Definition at line 44 of file WINUSBIO.H.

#define AUTO_CLEAR_STALL 0x02

Definition at line 41 of file WINUSBIO.H.

#define AUTO_FLUSH 0x06

Definition at line 45 of file WINUSBIO.H.

#define AUTO_SUSPEND 0x81

Definition at line 55 of file WINUSBIO.H.

#define DEVICE_SPEED 0x01

Definition at line 59 of file WINUSBIO.H.

#define FullSpeed 0x02

Definition at line 63 of file WINUSBIO.H.

#define HighSpeed 0x03

Definition at line 64 of file WINUSBIO.H.

#define IGNORE_SHORT_PACKETS 0x04

Definition at line 43 of file WINUSBIO.H.

#define LowSpeed 0x01

Definition at line 62 of file WINUSBIO.H.

#define MAXIMUM_TRANSFER_SIZE 0x08

Definition at line 47 of file WINUSBIO.H.

#define PIPE_TRANSFER_TIMEOUT 0x03

Definition at line 42 of file WINUSBIO.H.

#define RAW_IO 0x07

Definition at line 46 of file WINUSBIO.H.

#define SHORT_PACKET_TERMINATE 0x01

Definition at line 40 of file WINUSBIO.H.

#define SUSPEND_DELAY 0x83

Definition at line 56 of file WINUSBIO.H.

Typedef Documentation

typedef struct _WINUSB_PIPE_INFORMATION * PWINUSB_PIPE_INFORMATION
typedef struct _WINUSB_PIPE_INFORMATION WINUSB_PIPE_INFORMATION

Function Documentation

DEFINE_GUID | ( | WinUSB_TestGuid | ,
 |  | 0xda812bff | ,
 |  | 0x12c3 | ,
 |  | 0x46a2 | ,
 |  | 0x8e | ,
 |  | 0x2b | ,
 |  | 0xdb | ,
 |  | 0xd3 | ,
 |  | 0xb7 | ,
 |  | 0x83 | ,
 |  | 0x4c | ,
 |  | 0x43 |
 | ) |  |
Generated on Thu Sep 21 2017 16:01:13 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: DeviceIO/WINUSBIO.H Source File

  • File List
  • File Members
DeviceIO/WINUSBIO.H
Go to the documentation of this file.
00001 /***************************************************************************
00002
00003 Copyright (c) 2002 Microsoft Corporation
00004
00005 Module Name:
00006
00007         wusbio.h
00008
00009 Abstract:
00010
00011         Public header for WINUSB
00012
00013 Environment:
00014
00015         User and Kernel Mode
00016
00017 Notes:
00018
00019         THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
00020         KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
00021         IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
00022         PURPOSE.
00023
00024         Copyright (c) 2001 Microsoft Corporation.  All Rights Reserved.
00025
00026
00027 Revision History:
00028
00029         11/12/2002 : created
00030
00031
00032 ****************************************************************************/
00033
00034 #ifndef __WUSBIO_H__
00035 #define __WUSBIO_H__
00036
00037 #include "usb.h"
00038
00039 // Pipe policy types
00040 #define SHORT_PACKET_TERMINATE  0x01
00041 #define AUTO_CLEAR_STALL        0x02
00042 #define PIPE_TRANSFER_TIMEOUT   0x03
00043 #define IGNORE_SHORT_PACKETS    0x04
00044 #define ALLOW_PARTIAL_READS     0x05
00045 #define AUTO_FLUSH              0x06
00046 #define RAW_IO                  0x07
00047 #define MAXIMUM_TRANSFER_SIZE   0x08
00048
00049 // Power policy types
00050 //
00051 // Add 0x80 for Power policy types in order to prevent overlap with
00052 // Pipe policy types to prevent "accidentally" setting the wrong value for the
00053 // wrong type.
00054 //
00055 #define AUTO_SUSPEND            0x81
00056 #define SUSPEND_DELAY           0x83
00057
00058 // Device Information types
00059 #define DEVICE_SPEED            0x01
00060
00061 // Device Speeds
00062 #define LowSpeed                0x01
00063 #define FullSpeed               0x02
00064 #define HighSpeed               0x03
00065
00066 // {DA812BFF-12C3-46a2-8E2B-DBD3B7834C43}
00067 #include <initguid.h>
00068 DEFINE_GUID(WinUSB_TestGuid, 0xda812bff, 0x12c3, 0x46a2, 0x8e, 0x2b, 0xdb, 0xd3, 0xb7, 0x83, 0x4c, 0x43);
00069
00070
00071 typedef struct _WINUSB_PIPE_INFORMATION {
00072     USBD_PIPE_TYPE  PipeType;
00073     UCHAR           PipeId;
00074     USHORT          MaximumPacketSize;
00075     UCHAR           Interval;
00076 } WINUSB_PIPE_INFORMATION, *PWINUSB_PIPE_INFORMATION;
00077
00078 #endif // __WUSBIO_H__
00079
00080
Generated on Thu Sep 21 2017 16:01:13 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: File Members

  • File List
  • File Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • p
  • r
  • s
  • t
  • u
  • w
  • x
Here is a list of all file members with links to the files they belong to:

- _ -

  • _CommType : ParsePacket.h
  • _DPP_USB_STATUS : DppWinUSB.h
  • _PX5_OPTIONS : DP5Status.h
  • _tmain() : vcDppConsole.cpp
Generated on Thu Sep 21 2017 16:01:18 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: File Members

  • File List
  • File Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • p
  • r
  • s
  • t
  • u
  • w
  • x
Here is a list of all file members with links to the files they belong to:

- a -

  • ACK : DP5Protocol.h
  • AcquireSpectrum() : vcDppConsole.cpp
  • ALLOW_PARTIAL_READS : WINUSBIO.H
  • AMPTEK_DP5_PRODUCT_ID : DppLibUsb.h
  • AMPTEK_DP5_VENDOR_ID : DppLibUsb.h
  • AUTO_CLEAR_STALL : WINUSBIO.H
  • AUTO_FLUSH : WINUSBIO.H
  • AUTO_SUSPEND : WINUSBIO.H
Generated on Thu Sep 21 2017 16:01:18 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: File Members

  • File List
  • File Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • p
  • r
  • s
  • t
  • u
  • w
  • x
Here is a list of all file members with links to the files they belong to:

- b -

  • bHaveConfigFromHW : vcDppConsole.cpp
  • bHaveStatusResponse : vcDppConsole.cpp
  • bRunConfigurationTest : vcDppConsole.cpp
  • bRunSpectrumTest : vcDppConsole.cpp
  • BULK_IN_ENDPOINT : DppLibUsb.h
  • BULK_OUT_ENDPOINT : DppLibUsb.h
Generated on Thu Sep 21 2017 16:01:18 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: File Members

  • File List
  • File Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • p
  • r
  • s
  • t
  • u
  • w
  • x
Here is a list of all file members with links to the files they belong to:

- c -

  • chdpp : vcDppConsole.cpp
  • CloseConnection() : vcDppConsole.cpp
  • commNone : ParsePacket.h
  • commRS232 : ParsePacket.h
  • commSockets : ParsePacket.h
  • CommType : ParsePacket.h
  • commUSB : ParsePacket.h
  • CONFIG_OPTIONS : SendCommand.h
  • ConnectToDefaultDPP() : vcDppConsole.cpp
Generated on Thu Sep 21 2017 16:01:18 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: File Members

  • File List
  • File Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • p
  • r
  • s
  • t
  • u
  • w
  • x
Here is a list of all file members with links to the files they belong to:

- d -

  • DEFINE_GUID() : guid.h , WINUSBIO.H
  • DEVICE_INFO : DppWinUSB.h
  • DEVICE_SPEED : WINUSBIO.H
  • DiagDataType : DP5Status.h
  • DisplayPresets() : vcDppConsole.cpp
  • DP4_FORMAT_STATUS : DP5Status.h
  • DP4_PX4_OLD_CFG_SIZE : AsciiCmdUtilities.h
  • DP5_DIAGDATA_TIMEOUT : DppLibUsb.h
  • DP5_DPP_TYPES : DppConst.h
  • DP5_DPP_TYPES_FIRST : DppConst.h
  • DP5_DPP_TYPES_LAST : DppConst.h
  • DP5_MAX_CFG_SIZE : AsciiCmdUtilities.h
  • DP5_USB_TIMEOUT : DppLibUsb.h
  • dp5DppTypes : DppConst.h
  • DPP_USB_STATUS : DppWinUSB.h
  • dppDP5 : DppConst.h
  • dppDP5G : DppConst.h
  • dppDP5X : DppConst.h
  • dppMCA8000D : DppConst.h
  • dppPX5 : DppConst.h
  • DppStateType : ParsePacket.h
  • dppTB5 : DppConst.h
  • DRV_INFO_OPTION_ALL : DppWinUSB.h
  • DRV_INFO_OPTION_DATE : DppWinUSB.h
  • DRV_INFO_OPTION_DESC : DppWinUSB.h
  • DRV_INFO_OPTION_LABEL : DppWinUSB.h
  • DRV_INFO_OPTION_MFG_NAME : DppWinUSB.h
  • DRV_INFO_OPTION_MS_TERM : DppWinUSB.h
  • DRV_INFO_OPTION_NONE : DppWinUSB.h
  • DRV_INFO_OPTION_PROV_NAME : DppWinUSB.h
  • DRV_INFO_OPTION_UX_TERM : DppWinUSB.h
  • DRV_INFO_OPTION_VER : DppWinUSB.h
  • dusbStatConnectFail : DppWinUSB.h
  • dusbStatNewConnect : DppWinUSB.h
  • dusbStatNoAction : DppWinUSB.h
Generated on Thu Sep 21 2017 16:01:18 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: File Members

  • File List
  • File Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • p
  • r
  • s
  • t
  • u
  • w
  • x
Here is a list of all file members with links to the files they belong to:

- e -

  • ETHERNET : DP5Protocol.h
  • ETHERNET_TIMEOUT : DP5Protocol.h
Generated on Thu Sep 21 2017 16:01:18 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: File Members

  • File List
  • File Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • p
  • r
  • s
  • t
  • u
  • w
  • x
Here is a list of all file members with links to the files they belong to:

- f -

  • FullSpeed : WINUSBIO.H
Generated on Thu Sep 21 2017 16:01:18 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: File Members

  • File List
  • File Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • p
  • r
  • s
  • t
  • u
  • w
  • x
Here is a list of all file members with links to the files they belong to:

- g -

  • GetDppStatus() : vcDppConsole.cpp
Generated on Thu Sep 21 2017 16:01:18 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: File Members

  • File List
  • File Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • p
  • r
  • s
  • t
  • u
  • w
  • x
Here is a list of all file members with links to the files they belong to:

- h -

  • HighSpeed : WINUSBIO.H
Generated on Thu Sep 21 2017 16:01:18 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: File Members

  • File List
  • File Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • p
  • r
  • s
  • t
  • u
  • w
  • x
Here is a list of all file members with links to the files they belong to:

- i -

  • IGNORE_SHORT_PACKETS : WINUSBIO.H
  • INTERFACE_NUMBER : DppLibUsb.h
Generated on Thu Sep 21 2017 16:01:18 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: File Members

  • File List
  • File Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • p
  • r
  • s
  • t
  • u
  • w
  • x
Here is a list of all file members with links to the files they belong to:

- l -

  • LowSpeed : WINUSBIO.H
Generated on Thu Sep 21 2017 16:01:18 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: File Members

  • File List
  • File Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • p
  • r
  • s
  • t
  • u
  • w
  • x
Here is a list of all file members with links to the files they belong to:

- m -

  • MAX_BUFFER_DATA : DP5Protocol.h
  • MAX_BULK_IN_TRANSFER_SIZE : DppLibUsb.h
  • MAX_BULK_OUT_TRANSFER_SIZE : DppLibUsb.h
  • MAX_DEVPATH_LENGTH : DppWinUSB.h
  • MAX_ENTRIES : NetFinder.h
  • MAX_SCOPE_DATA : DP5Protocol.h
  • MAXDP5S : DppWinUSB.h
  • MAXIMUM_TRANSFER_SIZE : WINUSBIO.H
  • MAXPIPES : DppWinUSB.h
  • MAXREGBUFFER : DppWinUSB.h
Generated on Thu Sep 21 2017 16:01:18 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: File Members

  • File List
  • File Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • p
  • r
  • s
  • t
  • u
  • w
  • x
Here is a list of all file members with links to the files they belong to:

- n -

  • NETDISPLAY_ENTRY : NetFinder.h
  • NO_ENTRIES : NetFinder.h
Generated on Thu Sep 21 2017 16:01:18 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: File Members

  • File List
  • File Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • p
  • r
  • s
  • t
  • u
  • w
  • x
Here is a list of all file members with links to the files they belong to:

- p -

  • Packet_In : DP5Protocol.h
  • PDDiagDataType : DP5Status.h
  • PDEVICE_INFO : DppWinUSB.h
  • PDP4_FORMAT_STATUS : DP5Status.h
  • PID1_ACK : DP5Protocol.h
  • PID1_COMM_TEST : DP5Protocol.h
  • PID1_RCV_SCA : DP5Protocol.h
  • PID1_RCV_SCOPE_MISC : DP5Protocol.h
  • PID1_RCV_SPECTRUM : DP5Protocol.h
  • PID1_RCV_STATUS : DP5Protocol.h
  • PID1_REQ_CONFIG : DP5Protocol.h
  • PID1_REQ_FPGA_UC : DP5Protocol.h
  • PID1_REQ_SCA : DP5Protocol.h
  • PID1_REQ_SCOPE_MISC : DP5Protocol.h
  • PID1_REQ_SCOPE_MISC_TO : DppLibUsb.h
  • PID1_REQ_SPECTRUM : DP5Protocol.h
  • PID1_REQ_STATUS : DP5Protocol.h
  • PID1_TYPE : DP5Protocol.h
  • PID1_VENDOR_REQ : DP5Protocol.h
  • PID2_ACK_BAD_HEX_REC : DP5Protocol.h
  • PID2_ACK_BAD_PARAM : DP5Protocol.h
  • PID2_ACK_CAL_DATA_NOT_PRESENT : DP5Protocol.h
  • PID2_ACK_CHECKSUM_ERROR : DP5Protocol.h
  • PID2_ACK_CP2201_NOT_FOUND : DP5Protocol.h
  • PID2_ACK_ETHERNET_BUSY : DP5Protocol.h
  • PID2_ACK_FEATURE_NOT_FPGA_SUPPORTED : DP5Protocol.h
  • PID2_ACK_FPGA_ERROR : DP5Protocol.h
  • PID2_ACK_I2C_ERROR : DP5Protocol.h
  • PID2_ACK_LEN_ERROR : DP5Protocol.h
  • PID2_ACK_OK : DP5Protocol.h
  • PID2_ACK_OK_ETHERNET_SHARE_REQ : DP5Protocol.h
  • PID2_ACK_OK_FPGA_UPLOAD_ADDR : DP5Protocol.h
  • PID2_ACK_PC5_NOT_PRESENT : DP5Protocol.h
  • PID2_ACK_PID_ERROR : DP5Protocol.h
  • PID2_ACK_SCOPE_DATA_NOT_AVAIL : DP5Protocol.h
  • PID2_ACK_SYNC_ERROR : DP5Protocol.h
  • PID2_ACK_TYPE : DP5Protocol.h
  • PID2_ACK_UNRECOG : DP5Protocol.h
  • PID2_ARM_DIGITAL_OSCILLOSCOPE : DP5Protocol.h
  • PID2_AUTOSET_FAST_THRESHOLD : DP5Protocol.h
  • PID2_AUTOSET_INPUT_OFFSET : DP5Protocol.h
  • PID2_CLEAR_GP_COUNTER : DP5Protocol.h
  • PID2_CLEAR_SPECTRUM_BUFFER_A : DP5Protocol.h
  • PID2_CONFIG_READBACK_PACKET : DP5Protocol.h
  • PID2_DISABLE_MCA_MCS : DP5Protocol.h
  • PID2_ENABLE_MCA_MCS : DP5Protocol.h
  • PID2_ERASE_FPGA_IMAGE : DP5Protocol.h
  • PID2_ERASE_UC_IMAGE_0 : DP5Protocol.h
  • PID2_ERASE_UC_IMAGE_1 : DP5Protocol.h
  • PID2_ERASE_UC_IMAGE_2 : DP5Protocol.h
  • PID2_ETHERNET_ALLOW_SHAREING : DP5Protocol.h
  • PID2_ETHERNET_LOCK_IP : DP5Protocol.h
  • PID2_ETHERNET_NO_SHARING : DP5Protocol.h
  • PID2_GENERIC_FPGA_WRITE : DP5Protocol.h
  • PID2_LATCH_CLEAR_SEND_SCA : DP5Protocol.h
  • PID2_LATCH_SEND_SCA : DP5Protocol.h
  • PID2_PX4_STYLE_CONFIG_PACKET : DP5Protocol.h
  • PID2_RCV_SCA_TYPE : DP5Protocol.h
  • PID2_RCV_SCOPE_MISC_TYPE : DP5Protocol.h
  • PID2_RCV_SPECTRUM_TYPE : DP5Protocol.h
  • PID2_RCV_STATUS_TYPE : DP5Protocol.h
  • PID2_READ_IO3_0 : DP5Protocol.h
  • PID2_REINITIALIZE_FPGA : DP5Protocol.h
  • PID2_REQ_CONFIG_TYPE : DP5Protocol.h
  • PID2_REQ_FPGA_UC_TYPE : DP5Protocol.h
  • PID2_REQ_SCA_TYPE : DP5Protocol.h
  • PID2_REQ_SCOPE_MISC_TYPE : DP5Protocol.h
  • PID2_REQ_SPECTRUM_TYPE : DP5Protocol.h
  • PID2_REQ_STATUS_TYPE : DP5Protocol.h
  • PID2_SEND_512_BYTE_MISC_DATA : DP5Protocol.h
  • PID2_SEND_CLEAR_SPECTRUM : DP5Protocol.h
  • PID2_SEND_CLEAR_SPECTRUM_STATUS : DP5Protocol.h
  • PID2_SEND_DIAGNOSTIC_DATA : DP5Protocol.h
  • PID2_SEND_DIAGNOSTIC_DATA_TO : DppLibUsb.h
  • PID2_SEND_DP4_STYLE_STATUS : DP5Protocol.h
  • PID2_SEND_ETHERNET_SETTINGS : DP5Protocol.h
  • PID2_SEND_HARDWARE_DESCRIPTION : DP5Protocol.h
  • PID2_SEND_I2C_DATA : DP5Protocol.h
  • PID2_SEND_LIST_MODE_DATA : DP5Protocol.h
  • PID2_SEND_NETFINDER_READBACK : DP5Protocol.h
  • PID2_SEND_OPTION_PA_CALIBRATION : DP5Protocol.h
  • PID2_SEND_SCA : DP5Protocol.h
  • PID2_SEND_SCOPE_DATA : DP5Protocol.h
  • PID2_SEND_SCOPE_DATA_REARM : DP5Protocol.h
  • PID2_SEND_SPECTRUM : DP5Protocol.h
  • PID2_SEND_SPECTRUM_STATUS : DP5Protocol.h
  • PID2_SET_ADC_CAL_GAIN_OFFSET : DP5Protocol.h
  • PID2_SET_BOOT_FLAGS : DP5Protocol.h
  • PID2_SET_DCAL : DP5Protocol.h
  • PID2_SET_ETHERNET_SETTINGS : DP5Protocol.h
  • PID2_SET_PZ_CORRECTION_UC_TEMP_CAL_PZ : DP5Protocol.h
  • PID2_SET_PZ_CORRECTION_UC_TEMP_CAL_UC : DP5Protocol.h
  • PID2_SET_SERIAL_NUMBER : DP5Protocol.h
  • PID2_SWITCH_TO_UC_IMAGE_0 : DP5Protocol.h
  • PID2_SWITCH_TO_UC_IMAGE_1 : DP5Protocol.h
  • PID2_SWITCH_TO_UC_IMAGE_2 : DP5Protocol.h
  • PID2_TEXT_CONFIG_PACKET : DP5Protocol.h
  • PID2_UPLOAD_PACKET_FPGA : DP5Protocol.h
  • PID2_UPLOAD_PACKET_UC : DP5Protocol.h
  • PID2_VENDOR_REQ_TYPE : DP5Protocol.h
  • PID2_WRITE_512_BYTE_MISC_DATA : DP5Protocol.h
  • PID2_WRITE_IO3_0 : DP5Protocol.h
  • PIPE_TRANSFER_TIMEOUT : WINUSBIO.H
  • preqProcessAck : ParsePacket.h
  • preqProcessCfgRead : ParsePacket.h
  • preqProcessDiagData : ParsePacket.h
  • preqProcessError : ParsePacket.h
  • preqProcessHwDesc : ParsePacket.h
  • preqProcessInetSettings : ParsePacket.h
  • preqProcessNetFindRead : ParsePacket.h
  • preqProcessNone : ParsePacket.h
  • preqProcessPaCal : ParsePacket.h
  • preqProcessSCAData : ParsePacket.h
  • preqProcessScopeData : ParsePacket.h
  • preqProcessScopeDataOverFlow : ParsePacket.h
  • preqProcessSpectrum : ParsePacket.h
  • preqProcessStatus : ParsePacket.h
  • preqProcessTextData : ParsePacket.h
  • preqRequestScopeData : ParsePacket.h
  • PWINUSB_INTERFACE_HANDLE : WINUSB.H
  • PWINUSB_PIPE_INFORMATION : WINUSBIO.H
  • PWINUSB_SETUP_PACKET : WINUSB.H
  • PX5_OPTION_HPGe_HVPS : DP5Status.h
  • PX5_OPTION_NONE : DP5Status.h
  • PX5_OPTION_TEST_AMP : DP5Status.h
  • PX5_OPTION_TEST_MODE_1 : DP5Status.h
  • PX5_OPTION_TEST_MODE_2 : DP5Status.h
  • PX5_OPTION_TEST_MOX : DP5Status.h
  • PX5_OPTION_TEST_TEK : DP5Status.h
  • PX5_OPTIONS : DP5Status.h
Generated on Thu Sep 21 2017 16:01:18 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: File Members

  • File List
  • File Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • p
  • r
  • s
  • t
  • u
  • w
  • x
Here is a list of all file members with links to the files they belong to:

- r -

  • RAW_IO : WINUSBIO.H
  • RCVPT_1024_CHANNEL_SPECTRUM : DP5Protocol.h
  • RCVPT_1024_CHANNEL_SPECTRUM_STATUS : DP5Protocol.h
  • RCVPT_2048_CHANNEL_SPECTRUM : DP5Protocol.h
  • RCVPT_2048_CHANNEL_SPECTRUM_STATUS : DP5Protocol.h
  • RCVPT_256_CHANNEL_SPECTRUM : DP5Protocol.h
  • RCVPT_256_CHANNEL_SPECTRUM_STATUS : DP5Protocol.h
  • RCVPT_4096_CHANNEL_SPECTRUM : DP5Protocol.h
  • RCVPT_4096_CHANNEL_SPECTRUM_STATUS : DP5Protocol.h
  • RCVPT_512_BYTE_MISC_DATA : DP5Protocol.h
  • RCVPT_512_CHANNEL_SPECTRUM : DP5Protocol.h
  • RCVPT_512_CHANNEL_SPECTRUM_STATUS : DP5Protocol.h
  • RCVPT_8192_CHANNEL_SPECTRUM : DP5Protocol.h
  • RCVPT_8192_CHANNEL_SPECTRUM_STATUS : DP5Protocol.h
  • RCVPT_CONFIG_READBACK : DP5Protocol.h
  • RCVPT_DIAGNOSTIC_DATA : DP5Protocol.h
  • RCVPT_DP4_STYLE_STATUS : DP5Protocol.h
  • RCVPT_ETHERNET_SETTINGS : DP5Protocol.h
  • RCVPT_HARDWARE_DESCRIPTION : DP5Protocol.h
  • RCVPT_I2C_DATA : DP5Protocol.h
  • RCVPT_LIST_MODE_DATA : DP5Protocol.h
  • RCVPT_LIST_MODE_DATA_FIFO_FULL : DP5Protocol.h
  • RCVPT_NETFINDER_READBACK : DP5Protocol.h
  • RCVPT_OPTION_PA_CALIBRATION : DP5Protocol.h
  • RCVPT_SCA : DP5Protocol.h
  • RCVPT_SCOPE_DATA : DP5Protocol.h
  • RCVPT_SCOPE_DATA_WITH_OVERFLOW : DP5Protocol.h
  • ReadConfigFile() : vcDppConsole.cpp
  • ReadDppConfigurationFromHardware() : vcDppConsole.cpp
  • Retries : DP5Protocol.h
  • RS232 : DP5Protocol.h
  • RS232_TIMEOUT : DP5Protocol.h
Generated on Thu Sep 21 2017 16:01:18 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: File Members

  • File List
  • File Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • p
  • r
  • s
  • t
  • u
  • w
  • x
Here is a list of all file members with links to the files they belong to:

- s -

  • SaveSpectrumConfig() : vcDppConsole.cpp
  • SaveSpectrumFile() : vcDppConsole.cpp
  • SendCommandString() : vcDppConsole.cpp
  • SendConfigFileToDpp() : vcDppConsole.cpp
  • SendPresetAcquisitionTime() : vcDppConsole.cpp
  • SHORT_PACKET_TERMINATE : WINUSBIO.H
  • ShortenCfgCmds() : vcDppConsole.cpp
  • SpectrumFileType : ConsoleHelper.h
  • STATUS_PACKET_SIZE : DppLibUsb.h
  • SUSPEND_DELAY : WINUSBIO.H
  • SYNC1_ : DP5Protocol.h
  • SYNC2_ : DP5Protocol.h
Generated on Thu Sep 21 2017 16:01:18 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: File Members

  • File List
  • File Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • p
  • r
  • s
  • t
  • u
  • w
  • x
Here is a list of all file members with links to the files they belong to:

- t -

  • TIMEOUT_MS : DppLibUsb.h
  • TRANSMIT_PACKET_TYPE : DP5Protocol.h
Generated on Thu Sep 21 2017 16:01:18 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: File Members

  • File List
  • File Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • p
  • r
  • s
  • t
  • u
  • w
  • x
Here is a list of all file members with links to the files they belong to:

- u -

  • USB : DP5Protocol.h
  • USB_DiagDataDelayMS : DP5Protocol.h
  • USB_TIMEOUT : DP5Protocol.h
Generated on Thu Sep 21 2017 16:01:18 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: File Members

  • File List
  • File Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • p
  • r
  • s
  • t
  • u
  • w
  • x
Here is a list of all file members with links to the files they belong to:

- w -

  • Whitespace : AsciiCmdUtilities.h
  • WinUsb_AbortPipe() : WINUSB.H
  • WinUsb_ControlTransfer() : WINUSB.H
  • WinUsb_FlushPipe() : WINUSB.H
  • WinUsb_Free() : WINUSB.H
  • WinUsb_GetAssociatedInterface() : WINUSB.H
  • WinUsb_GetCurrentAlternateSetting() : WINUSB.H
  • WinUsb_GetDescriptor() : WINUSB.H
  • WinUsb_GetOverlappedResult() : WINUSB.H
  • WinUsb_GetPipePolicy() : WINUSB.H
  • WinUsb_GetPowerPolicy() : WINUSB.H
  • WinUsb_Initialize() : WINUSB.H
  • WINUSB_INTERFACE_HANDLE : WINUSB.H
  • WinUsb_ParseConfigurationDescriptor() : WINUSB.H
  • WinUsb_ParseDescriptors() : WINUSB.H
  • WINUSB_PIPE_INFORMATION : WINUSBIO.H
  • WinUsb_QueryDeviceInformation() : WINUSB.H
  • WinUsb_QueryInterfaceSettings() : WINUSB.H
  • WinUsb_QueryPipe() : WINUSB.H
  • WinUsb_ReadPipe() : WINUSB.H
  • WinUsb_ResetPipe() : WINUSB.H
  • WinUsb_SetCurrentAlternateSetting() : WINUSB.H
  • WinUsb_SetPipePolicy() : WINUSB.H
  • WinUsb_SetPowerPolicy() : WINUSB.H
  • WINUSB_SETUP_PACKET : WINUSB.H
  • WinUsb_WritePipe() : WINUSB.H
  • WinUsbDP5 : DppWinUSB.h
  • WinUsbDP5Size : DppWinUSB.h
  • WinUSBService : DppWinUSB.h
Generated on Thu Sep 21 2017 16:01:18 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: File Members

  • File List
  • File Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • p
  • r
  • s
  • t
  • u
  • w
  • x
Here is a list of all file members with links to the files they belong to:

- x -

  • XMTPT_ARM_DIGITAL_OSCILLOSCOPE : DP5Protocol.h
  • XMTPT_AU34_2_RESTART : DP5Protocol.h
  • XMTPT_AUTOSET_FAST_THRESHOLD : DP5Protocol.h
  • XMTPT_AUTOSET_INPUT_OFFSET : DP5Protocol.h
  • XMTPT_BUFFER_CLEAR_SPECTRUM : DP5Protocol.h
  • XMTPT_BUFFER_SPECTRUM : DP5Protocol.h
  • XMTPT_CLEAR_GP_COUNTER : DP5Protocol.h
  • XMTPT_CLEAR_SPECTRUM_BUFFER_A : DP5Protocol.h
  • XMTPT_DISABLE_MCA_MCS : DP5Protocol.h
  • XMTPT_ENABLE_MCA_MCS : DP5Protocol.h
  • XMTPT_ERASE_FPGA_IMAGE : DP5Protocol.h
  • XMTPT_ERASE_UC_IMAGE_0 : DP5Protocol.h
  • XMTPT_ERASE_UC_IMAGE_1 : DP5Protocol.h
  • XMTPT_ERASE_UC_IMAGE_2 : DP5Protocol.h
  • XMTPT_FORCE_SCOPE_TRIGGER : DP5Protocol.h
  • XMTPT_FULL_READ_CONFIG_PACKET : DP5Protocol.h
  • XMTPT_LATCH_CLEAR_SEND_SCA : DP5Protocol.h
  • XMTPT_LATCH_SEND_SCA : DP5Protocol.h
  • XMTPT_PX4_STYLE_CONFIG_PACKET : DP5Protocol.h
  • XMTPT_READ_CONFIG_PACKET : DP5Protocol.h
  • XMTPT_READ_CONFIG_PACKET_EX : DP5Protocol.h
  • XMTPT_READ_IO3_0 : DP5Protocol.h
  • XMTPT_READ_MCA8000D_OPTION_PA_CAL : DP5Protocol.h
  • XMTPT_REINITIALIZE_FPGA : DP5Protocol.h
  • XMTPT_REQ_ACK_PACKET : DP5Protocol.h
  • XMTPT_REQ_SCOPE_DATA_MISC_DATA_SCA_PACKETS : DP5Protocol.h
  • XMTPT_SCA_READ_CONFIG_PACKET : DP5Protocol.h
  • XMTPT_SEND_512_BYTE_MISC_DATA : DP5Protocol.h
  • XMTPT_SEND_BUFFER : DP5Protocol.h
  • XMTPT_SEND_CLEAR_SPECTRUM : DP5Protocol.h
  • XMTPT_SEND_CLEAR_SPECTRUM_STATUS : DP5Protocol.h
  • XMTPT_SEND_CONFIG_PACKET_EX : DP5Protocol.h
  • XMTPT_SEND_CONFIG_PACKET_TO_HW : DP5Protocol.h
  • XMTPT_SEND_DIAGNOSTIC_DATA : DP5Protocol.h
  • XMTPT_SEND_DP4_STYLE_STATUS : DP5Protocol.h
  • XMTPT_SEND_ETHERNET_SETTINGS : DP5Protocol.h
  • XMTPT_SEND_HARDWARE_DESCRIPTION : DP5Protocol.h
  • XMTPT_SEND_NETFINDER_PACKET : DP5Protocol.h
  • XMTPT_SEND_PX4_CONFIG : DP5Protocol.h
  • XMTPT_SEND_ROI_OR_FIXED_BLOCK : DP5Protocol.h
  • XMTPT_SEND_SCA : DP5Protocol.h
  • XMTPT_SEND_SCOPE_DATA : DP5Protocol.h
  • XMTPT_SEND_SCOPE_DATA_REARM : DP5Protocol.h
  • XMTPT_SEND_SPECTRUM : DP5Protocol.h
  • XMTPT_SEND_SPECTRUM_STATUS : DP5Protocol.h
  • XMTPT_SEND_STATUS : DP5Protocol.h
  • XMTPT_SEND_TEST_PACKET : DP5Protocol.h
  • XMTPT_SET_ADC_CAL_GAIN_OFFSET : DP5Protocol.h
  • XMTPT_SET_BOOT_FLAGS : DP5Protocol.h
  • XMTPT_SET_DCAL : DP5Protocol.h
  • XMTPT_SET_HV_DP4_EMULATION : DP5Protocol.h
  • XMTPT_SET_INPUT_OFFSET_DP4_EMULATION : DP5Protocol.h
  • XMTPT_SET_PZ_CORRECTION_UC_TEMP_CAL_PZ : DP5Protocol.h
  • XMTPT_SET_PZ_CORRECTION_UC_TEMP_CAL_UC : DP5Protocol.h
  • XMTPT_SET_SERIAL_NUMBER : DP5Protocol.h
  • XMTPT_SET_SPECTRUM_OFFSET : DP5Protocol.h
  • XMTPT_SET_TEC_DP4_EMULATION : DP5Protocol.h
  • XMTPT_SWITCH_SUPPLIES : DP5Protocol.h
  • XMTPT_SWITCH_TO_UC_IMAGE_0 : DP5Protocol.h
  • XMTPT_SWITCH_TO_UC_IMAGE_1 : DP5Protocol.h
  • XMTPT_SWITCH_TO_UC_IMAGE_2 : DP5Protocol.h
  • XMTPT_UC_FPGA_CHECKSUMS : DP5Protocol.h
  • XMTPT_UPLOAD_PACKET_FPGA : DP5Protocol.h
  • XMTPT_UPLOAD_PACKET_UC : DP5Protocol.h
  • XMTPT_WRITE_512_BYTE_MISC_DATA : DP5Protocol.h
  • XMTPT_WRITE_IO3_0 : DP5Protocol.h
Generated on Thu Sep 21 2017 16:01:18 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: File Members

  • File List
  • File Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • c
  • d
  • g
  • r
  • s
  • w

- _ -

  • _tmain() : vcDppConsole.cpp

- a -

  • AcquireSpectrum() : vcDppConsole.cpp

- c -

  • CloseConnection() : vcDppConsole.cpp
  • ConnectToDefaultDPP() : vcDppConsole.cpp

- d -

  • DEFINE_GUID() : guid.h , WINUSBIO.H
  • DisplayPresets() : vcDppConsole.cpp

- g -

  • GetDppStatus() : vcDppConsole.cpp

- r -

  • ReadConfigFile() : vcDppConsole.cpp
  • ReadDppConfigurationFromHardware() : vcDppConsole.cpp

- s -

  • SaveSpectrumConfig() : vcDppConsole.cpp
  • SaveSpectrumFile() : vcDppConsole.cpp
  • SendCommandString() : vcDppConsole.cpp
  • SendConfigFileToDpp() : vcDppConsole.cpp
  • SendPresetAcquisitionTime() : vcDppConsole.cpp
  • ShortenCfgCmds() : vcDppConsole.cpp

- w -

  • WinUsb_AbortPipe() : WINUSB.H
  • WinUsb_ControlTransfer() : WINUSB.H
  • WinUsb_FlushPipe() : WINUSB.H
  • WinUsb_Free() : WINUSB.H
  • WinUsb_GetAssociatedInterface() : WINUSB.H
  • WinUsb_GetCurrentAlternateSetting() : WINUSB.H
  • WinUsb_GetDescriptor() : WINUSB.H
  • WinUsb_GetOverlappedResult() : WINUSB.H
  • WinUsb_GetPipePolicy() : WINUSB.H
  • WinUsb_GetPowerPolicy() : WINUSB.H
  • WinUsb_Initialize() : WINUSB.H
  • WinUsb_ParseConfigurationDescriptor() : WINUSB.H
  • WinUsb_ParseDescriptors() : WINUSB.H
  • WinUsb_QueryDeviceInformation() : WINUSB.H
  • WinUsb_QueryInterfaceSettings() : WINUSB.H
  • WinUsb_QueryPipe() : WINUSB.H
  • WinUsb_ReadPipe() : WINUSB.H
  • WinUsb_ResetPipe() : WINUSB.H
  • WinUsb_SetCurrentAlternateSetting() : WINUSB.H
  • WinUsb_SetPipePolicy() : WINUSB.H
  • WinUsb_SetPowerPolicy() : WINUSB.H
  • WinUsb_WritePipe() : WINUSB.H
Generated on Thu Sep 21 2017 16:01:18 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: File Members

  • File List
  • File Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • bHaveConfigFromHW : vcDppConsole.cpp
  • bHaveStatusResponse : vcDppConsole.cpp
  • bRunConfigurationTest : vcDppConsole.cpp
  • bRunSpectrumTest : vcDppConsole.cpp
  • chdpp : vcDppConsole.cpp
  • MAX_ENTRIES : NetFinder.h
  • NO_ENTRIES : NetFinder.h
Generated on Thu Sep 21 2017 16:01:18 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: File Members

  • File List
  • File Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • CommType : ParsePacket.h
  • CONFIG_OPTIONS : SendCommand.h
  • DEVICE_INFO : DppWinUSB.h
  • DiagDataType : DP5Status.h
  • DP4_FORMAT_STATUS : DP5Status.h
  • dp5DppTypes : DppConst.h
  • DPP_USB_STATUS : DppWinUSB.h
  • DppStateType : ParsePacket.h
  • NETDISPLAY_ENTRY : NetFinder.h
  • Packet_In : DP5Protocol.h
  • PDDiagDataType : DP5Status.h
  • PDEVICE_INFO : DppWinUSB.h
  • PDP4_FORMAT_STATUS : DP5Status.h
  • PWINUSB_INTERFACE_HANDLE : WINUSB.H
  • PWINUSB_PIPE_INFORMATION : WINUSBIO.H
  • PWINUSB_SETUP_PACKET : WINUSB.H
  • PX5_OPTIONS : DP5Status.h
  • SpectrumFileType : ConsoleHelper.h
  • WINUSB_INTERFACE_HANDLE : WINUSB.H
  • WINUSB_PIPE_INFORMATION : WINUSBIO.H
  • WINUSB_SETUP_PACKET : WINUSB.H
Generated on Thu Sep 21 2017 16:01:18 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: File Members

  • File List
  • File Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _CommType : ParsePacket.h
  • _DPP_USB_STATUS : DppWinUSB.h
  • _PX5_OPTIONS : DP5Status.h
  • DP5_DPP_TYPES : DppConst.h
  • PID1_TYPE : DP5Protocol.h
  • PID2_ACK_TYPE : DP5Protocol.h
  • PID2_RCV_SCA_TYPE : DP5Protocol.h
  • PID2_RCV_SCOPE_MISC_TYPE : DP5Protocol.h
  • PID2_RCV_SPECTRUM_TYPE : DP5Protocol.h
  • PID2_RCV_STATUS_TYPE : DP5Protocol.h
  • PID2_REQ_CONFIG_TYPE : DP5Protocol.h
  • PID2_REQ_FPGA_UC_TYPE : DP5Protocol.h
  • PID2_REQ_SCA_TYPE : DP5Protocol.h
  • PID2_REQ_SCOPE_MISC_TYPE : DP5Protocol.h
  • PID2_REQ_SPECTRUM_TYPE : DP5Protocol.h
  • PID2_REQ_STATUS_TYPE : DP5Protocol.h
  • PID2_VENDOR_REQ_TYPE : DP5Protocol.h
  • TRANSMIT_PACKET_TYPE : DP5Protocol.h
Generated on Thu Sep 21 2017 16:01:18 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: File Members

  • File List
  • File Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • c
  • d
  • p
  • r
  • x

- c -

  • commNone : ParsePacket.h
  • commRS232 : ParsePacket.h
  • commSockets : ParsePacket.h
  • commUSB : ParsePacket.h

- d -

  • dppDP5 : DppConst.h
  • dppDP5G : DppConst.h
  • dppDP5X : DppConst.h
  • dppMCA8000D : DppConst.h
  • dppPX5 : DppConst.h
  • dppTB5 : DppConst.h
  • dusbStatConnectFail : DppWinUSB.h
  • dusbStatNewConnect : DppWinUSB.h
  • dusbStatNoAction : DppWinUSB.h

- p -

  • PID1_ACK : DP5Protocol.h
  • PID1_COMM_TEST : DP5Protocol.h
  • PID1_RCV_SCA : DP5Protocol.h
  • PID1_RCV_SCOPE_MISC : DP5Protocol.h
  • PID1_RCV_SPECTRUM : DP5Protocol.h
  • PID1_RCV_STATUS : DP5Protocol.h
  • PID1_REQ_CONFIG : DP5Protocol.h
  • PID1_REQ_FPGA_UC : DP5Protocol.h
  • PID1_REQ_SCA : DP5Protocol.h
  • PID1_REQ_SCOPE_MISC : DP5Protocol.h
  • PID1_REQ_SPECTRUM : DP5Protocol.h
  • PID1_REQ_STATUS : DP5Protocol.h
  • PID1_VENDOR_REQ : DP5Protocol.h
  • PID2_ACK_BAD_HEX_REC : DP5Protocol.h
  • PID2_ACK_BAD_PARAM : DP5Protocol.h
  • PID2_ACK_CAL_DATA_NOT_PRESENT : DP5Protocol.h
  • PID2_ACK_CHECKSUM_ERROR : DP5Protocol.h
  • PID2_ACK_CP2201_NOT_FOUND : DP5Protocol.h
  • PID2_ACK_ETHERNET_BUSY : DP5Protocol.h
  • PID2_ACK_FEATURE_NOT_FPGA_SUPPORTED : DP5Protocol.h
  • PID2_ACK_FPGA_ERROR : DP5Protocol.h
  • PID2_ACK_I2C_ERROR : DP5Protocol.h
  • PID2_ACK_LEN_ERROR : DP5Protocol.h
  • PID2_ACK_OK : DP5Protocol.h
  • PID2_ACK_OK_ETHERNET_SHARE_REQ : DP5Protocol.h
  • PID2_ACK_OK_FPGA_UPLOAD_ADDR : DP5Protocol.h
  • PID2_ACK_PC5_NOT_PRESENT : DP5Protocol.h
  • PID2_ACK_PID_ERROR : DP5Protocol.h
  • PID2_ACK_SCOPE_DATA_NOT_AVAIL : DP5Protocol.h
  • PID2_ACK_SYNC_ERROR : DP5Protocol.h
  • PID2_ACK_UNRECOG : DP5Protocol.h
  • PID2_ARM_DIGITAL_OSCILLOSCOPE : DP5Protocol.h
  • PID2_AUTOSET_FAST_THRESHOLD : DP5Protocol.h
  • PID2_AUTOSET_INPUT_OFFSET : DP5Protocol.h
  • PID2_CLEAR_GP_COUNTER : DP5Protocol.h
  • PID2_CLEAR_SPECTRUM_BUFFER_A : DP5Protocol.h
  • PID2_CONFIG_READBACK_PACKET : DP5Protocol.h
  • PID2_DISABLE_MCA_MCS : DP5Protocol.h
  • PID2_ENABLE_MCA_MCS : DP5Protocol.h
  • PID2_ERASE_FPGA_IMAGE : DP5Protocol.h
  • PID2_ERASE_UC_IMAGE_0 : DP5Protocol.h
  • PID2_ERASE_UC_IMAGE_1 : DP5Protocol.h
  • PID2_ERASE_UC_IMAGE_2 : DP5Protocol.h
  • PID2_ETHERNET_ALLOW_SHAREING : DP5Protocol.h
  • PID2_ETHERNET_LOCK_IP : DP5Protocol.h
  • PID2_ETHERNET_NO_SHARING : DP5Protocol.h
  • PID2_GENERIC_FPGA_WRITE : DP5Protocol.h
  • PID2_LATCH_CLEAR_SEND_SCA : DP5Protocol.h
  • PID2_LATCH_SEND_SCA : DP5Protocol.h
  • PID2_PX4_STYLE_CONFIG_PACKET : DP5Protocol.h
  • PID2_READ_IO3_0 : DP5Protocol.h
  • PID2_REINITIALIZE_FPGA : DP5Protocol.h
  • PID2_SEND_512_BYTE_MISC_DATA : DP5Protocol.h
  • PID2_SEND_CLEAR_SPECTRUM : DP5Protocol.h
  • PID2_SEND_CLEAR_SPECTRUM_STATUS : DP5Protocol.h
  • PID2_SEND_DIAGNOSTIC_DATA : DP5Protocol.h
  • PID2_SEND_DP4_STYLE_STATUS : DP5Protocol.h
  • PID2_SEND_ETHERNET_SETTINGS : DP5Protocol.h
  • PID2_SEND_HARDWARE_DESCRIPTION : DP5Protocol.h
  • PID2_SEND_I2C_DATA : DP5Protocol.h
  • PID2_SEND_LIST_MODE_DATA : DP5Protocol.h
  • PID2_SEND_NETFINDER_READBACK : DP5Protocol.h
  • PID2_SEND_OPTION_PA_CALIBRATION : DP5Protocol.h
  • PID2_SEND_SCA : DP5Protocol.h
  • PID2_SEND_SCOPE_DATA : DP5Protocol.h
  • PID2_SEND_SCOPE_DATA_REARM : DP5Protocol.h
  • PID2_SEND_SPECTRUM : DP5Protocol.h
  • PID2_SEND_SPECTRUM_STATUS : DP5Protocol.h
  • PID2_SET_ADC_CAL_GAIN_OFFSET : DP5Protocol.h
  • PID2_SET_BOOT_FLAGS : DP5Protocol.h
  • PID2_SET_DCAL : DP5Protocol.h
  • PID2_SET_ETHERNET_SETTINGS : DP5Protocol.h
  • PID2_SET_PZ_CORRECTION_UC_TEMP_CAL_PZ : DP5Protocol.h
  • PID2_SET_PZ_CORRECTION_UC_TEMP_CAL_UC : DP5Protocol.h
  • PID2_SET_SERIAL_NUMBER : DP5Protocol.h
  • PID2_SWITCH_TO_UC_IMAGE_0 : DP5Protocol.h
  • PID2_SWITCH_TO_UC_IMAGE_1 : DP5Protocol.h
  • PID2_SWITCH_TO_UC_IMAGE_2 : DP5Protocol.h
  • PID2_TEXT_CONFIG_PACKET : DP5Protocol.h
  • PID2_UPLOAD_PACKET_FPGA : DP5Protocol.h
  • PID2_UPLOAD_PACKET_UC : DP5Protocol.h
  • PID2_WRITE_512_BYTE_MISC_DATA : DP5Protocol.h
  • PID2_WRITE_IO3_0 : DP5Protocol.h
  • PX5_OPTION_HPGe_HVPS : DP5Status.h
  • PX5_OPTION_NONE : DP5Status.h
  • PX5_OPTION_TEST_AMP : DP5Status.h
  • PX5_OPTION_TEST_MODE_1 : DP5Status.h
  • PX5_OPTION_TEST_MODE_2 : DP5Status.h
  • PX5_OPTION_TEST_MOX : DP5Status.h
  • PX5_OPTION_TEST_TEK : DP5Status.h

- r -

  • RCVPT_1024_CHANNEL_SPECTRUM : DP5Protocol.h
  • RCVPT_1024_CHANNEL_SPECTRUM_STATUS : DP5Protocol.h
  • RCVPT_2048_CHANNEL_SPECTRUM : DP5Protocol.h
  • RCVPT_2048_CHANNEL_SPECTRUM_STATUS : DP5Protocol.h
  • RCVPT_256_CHANNEL_SPECTRUM : DP5Protocol.h
  • RCVPT_256_CHANNEL_SPECTRUM_STATUS : DP5Protocol.h
  • RCVPT_4096_CHANNEL_SPECTRUM : DP5Protocol.h
  • RCVPT_4096_CHANNEL_SPECTRUM_STATUS : DP5Protocol.h
  • RCVPT_512_BYTE_MISC_DATA : DP5Protocol.h
  • RCVPT_512_CHANNEL_SPECTRUM : DP5Protocol.h
  • RCVPT_512_CHANNEL_SPECTRUM_STATUS : DP5Protocol.h
  • RCVPT_8192_CHANNEL_SPECTRUM : DP5Protocol.h
  • RCVPT_8192_CHANNEL_SPECTRUM_STATUS : DP5Protocol.h
  • RCVPT_CONFIG_READBACK : DP5Protocol.h
  • RCVPT_DIAGNOSTIC_DATA : DP5Protocol.h
  • RCVPT_DP4_STYLE_STATUS : DP5Protocol.h
  • RCVPT_ETHERNET_SETTINGS : DP5Protocol.h
  • RCVPT_HARDWARE_DESCRIPTION : DP5Protocol.h
  • RCVPT_I2C_DATA : DP5Protocol.h
  • RCVPT_LIST_MODE_DATA : DP5Protocol.h
  • RCVPT_LIST_MODE_DATA_FIFO_FULL : DP5Protocol.h
  • RCVPT_NETFINDER_READBACK : DP5Protocol.h
  • RCVPT_OPTION_PA_CALIBRATION : DP5Protocol.h
  • RCVPT_SCA : DP5Protocol.h
  • RCVPT_SCOPE_DATA : DP5Protocol.h
  • RCVPT_SCOPE_DATA_WITH_OVERFLOW : DP5Protocol.h

- x -

  • XMTPT_ARM_DIGITAL_OSCILLOSCOPE : DP5Protocol.h
  • XMTPT_AU34_2_RESTART : DP5Protocol.h
  • XMTPT_AUTOSET_FAST_THRESHOLD : DP5Protocol.h
  • XMTPT_AUTOSET_INPUT_OFFSET : DP5Protocol.h
  • XMTPT_BUFFER_CLEAR_SPECTRUM : DP5Protocol.h
  • XMTPT_BUFFER_SPECTRUM : DP5Protocol.h
  • XMTPT_CLEAR_GP_COUNTER : DP5Protocol.h
  • XMTPT_CLEAR_SPECTRUM_BUFFER_A : DP5Protocol.h
  • XMTPT_DISABLE_MCA_MCS : DP5Protocol.h
  • XMTPT_ENABLE_MCA_MCS : DP5Protocol.h
  • XMTPT_ERASE_FPGA_IMAGE : DP5Protocol.h
  • XMTPT_ERASE_UC_IMAGE_0 : DP5Protocol.h
  • XMTPT_ERASE_UC_IMAGE_1 : DP5Protocol.h
  • XMTPT_ERASE_UC_IMAGE_2 : DP5Protocol.h
  • XMTPT_FORCE_SCOPE_TRIGGER : DP5Protocol.h
  • XMTPT_FULL_READ_CONFIG_PACKET : DP5Protocol.h
  • XMTPT_LATCH_CLEAR_SEND_SCA : DP5Protocol.h
  • XMTPT_LATCH_SEND_SCA : DP5Protocol.h
  • XMTPT_PX4_STYLE_CONFIG_PACKET : DP5Protocol.h
  • XMTPT_READ_CONFIG_PACKET : DP5Protocol.h
  • XMTPT_READ_CONFIG_PACKET_EX : DP5Protocol.h
  • XMTPT_READ_IO3_0 : DP5Protocol.h
  • XMTPT_READ_MCA8000D_OPTION_PA_CAL : DP5Protocol.h
  • XMTPT_REINITIALIZE_FPGA : DP5Protocol.h
  • XMTPT_REQ_ACK_PACKET : DP5Protocol.h
  • XMTPT_REQ_SCOPE_DATA_MISC_DATA_SCA_PACKETS : DP5Protocol.h
  • XMTPT_SCA_READ_CONFIG_PACKET : DP5Protocol.h
  • XMTPT_SEND_512_BYTE_MISC_DATA : DP5Protocol.h
  • XMTPT_SEND_BUFFER : DP5Protocol.h
  • XMTPT_SEND_CLEAR_SPECTRUM : DP5Protocol.h
  • XMTPT_SEND_CLEAR_SPECTRUM_STATUS : DP5Protocol.h
  • XMTPT_SEND_CONFIG_PACKET_EX : DP5Protocol.h
  • XMTPT_SEND_CONFIG_PACKET_TO_HW : DP5Protocol.h
  • XMTPT_SEND_DIAGNOSTIC_DATA : DP5Protocol.h
  • XMTPT_SEND_DP4_STYLE_STATUS : DP5Protocol.h
  • XMTPT_SEND_ETHERNET_SETTINGS : DP5Protocol.h
  • XMTPT_SEND_HARDWARE_DESCRIPTION : DP5Protocol.h
  • XMTPT_SEND_NETFINDER_PACKET : DP5Protocol.h
  • XMTPT_SEND_PX4_CONFIG : DP5Protocol.h
  • XMTPT_SEND_ROI_OR_FIXED_BLOCK : DP5Protocol.h
  • XMTPT_SEND_SCA : DP5Protocol.h
  • XMTPT_SEND_SCOPE_DATA : DP5Protocol.h
  • XMTPT_SEND_SCOPE_DATA_REARM : DP5Protocol.h
  • XMTPT_SEND_SPECTRUM : DP5Protocol.h
  • XMTPT_SEND_SPECTRUM_STATUS : DP5Protocol.h
  • XMTPT_SEND_STATUS : DP5Protocol.h
  • XMTPT_SEND_TEST_PACKET : DP5Protocol.h
  • XMTPT_SET_ADC_CAL_GAIN_OFFSET : DP5Protocol.h
  • XMTPT_SET_BOOT_FLAGS : DP5Protocol.h
  • XMTPT_SET_DCAL : DP5Protocol.h
  • XMTPT_SET_HV_DP4_EMULATION : DP5Protocol.h
  • XMTPT_SET_INPUT_OFFSET_DP4_EMULATION : DP5Protocol.h
  • XMTPT_SET_PZ_CORRECTION_UC_TEMP_CAL_PZ : DP5Protocol.h
  • XMTPT_SET_PZ_CORRECTION_UC_TEMP_CAL_UC : DP5Protocol.h
  • XMTPT_SET_SERIAL_NUMBER : DP5Protocol.h
  • XMTPT_SET_SPECTRUM_OFFSET : DP5Protocol.h
  • XMTPT_SET_TEC_DP4_EMULATION : DP5Protocol.h
  • XMTPT_SWITCH_SUPPLIES : DP5Protocol.h
  • XMTPT_SWITCH_TO_UC_IMAGE_0 : DP5Protocol.h
  • XMTPT_SWITCH_TO_UC_IMAGE_1 : DP5Protocol.h
  • XMTPT_SWITCH_TO_UC_IMAGE_2 : DP5Protocol.h
  • XMTPT_UC_FPGA_CHECKSUMS : DP5Protocol.h
  • XMTPT_UPLOAD_PACKET_FPGA : DP5Protocol.h
  • XMTPT_UPLOAD_PACKET_UC : DP5Protocol.h
  • XMTPT_WRITE_512_BYTE_MISC_DATA : DP5Protocol.h
  • XMTPT_WRITE_IO3_0 : DP5Protocol.h
Generated on Thu Sep 21 2017 16:01:18 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: File Members

  • File List
  • File Members
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • a
  • b
  • d
  • e
  • f
  • h
  • i
  • l
  • m
  • p
  • r
  • s
  • t
  • u
  • w

- a -

  • ACK : DP5Protocol.h
  • ALLOW_PARTIAL_READS : WINUSBIO.H
  • AMPTEK_DP5_PRODUCT_ID : DppLibUsb.h
  • AMPTEK_DP5_VENDOR_ID : DppLibUsb.h
  • AUTO_CLEAR_STALL : WINUSBIO.H
  • AUTO_FLUSH : WINUSBIO.H
  • AUTO_SUSPEND : WINUSBIO.H

- b -

  • BULK_IN_ENDPOINT : DppLibUsb.h
  • BULK_OUT_ENDPOINT : DppLibUsb.h

- d -

  • DEVICE_SPEED : WINUSBIO.H
  • DP4_PX4_OLD_CFG_SIZE : AsciiCmdUtilities.h
  • DP5_DIAGDATA_TIMEOUT : DppLibUsb.h
  • DP5_DPP_TYPES_FIRST : DppConst.h
  • DP5_DPP_TYPES_LAST : DppConst.h
  • DP5_MAX_CFG_SIZE : AsciiCmdUtilities.h
  • DP5_USB_TIMEOUT : DppLibUsb.h
  • DRV_INFO_OPTION_ALL : DppWinUSB.h
  • DRV_INFO_OPTION_DATE : DppWinUSB.h
  • DRV_INFO_OPTION_DESC : DppWinUSB.h
  • DRV_INFO_OPTION_LABEL : DppWinUSB.h
  • DRV_INFO_OPTION_MFG_NAME : DppWinUSB.h
  • DRV_INFO_OPTION_MS_TERM : DppWinUSB.h
  • DRV_INFO_OPTION_NONE : DppWinUSB.h
  • DRV_INFO_OPTION_PROV_NAME : DppWinUSB.h
  • DRV_INFO_OPTION_UX_TERM : DppWinUSB.h
  • DRV_INFO_OPTION_VER : DppWinUSB.h

- e -

  • ETHERNET : DP5Protocol.h
  • ETHERNET_TIMEOUT : DP5Protocol.h

- f -

  • FullSpeed : WINUSBIO.H

- h -

  • HighSpeed : WINUSBIO.H

- i -

  • IGNORE_SHORT_PACKETS : WINUSBIO.H
  • INTERFACE_NUMBER : DppLibUsb.h

- l -

  • LowSpeed : WINUSBIO.H

- m -

  • MAX_BUFFER_DATA : DP5Protocol.h
  • MAX_BULK_IN_TRANSFER_SIZE : DppLibUsb.h
  • MAX_BULK_OUT_TRANSFER_SIZE : DppLibUsb.h
  • MAX_DEVPATH_LENGTH : DppWinUSB.h
  • MAX_SCOPE_DATA : DP5Protocol.h
  • MAXDP5S : DppWinUSB.h
  • MAXIMUM_TRANSFER_SIZE : WINUSBIO.H
  • MAXPIPES : DppWinUSB.h
  • MAXREGBUFFER : DppWinUSB.h

- p -

  • PID1_REQ_SCOPE_MISC_TO : DppLibUsb.h
  • PID2_SEND_DIAGNOSTIC_DATA_TO : DppLibUsb.h
  • PIPE_TRANSFER_TIMEOUT : WINUSBIO.H
  • preqProcessAck : ParsePacket.h
  • preqProcessCfgRead : ParsePacket.h
  • preqProcessDiagData : ParsePacket.h
  • preqProcessError : ParsePacket.h
  • preqProcessHwDesc : ParsePacket.h
  • preqProcessInetSettings : ParsePacket.h
  • preqProcessNetFindRead : ParsePacket.h
  • preqProcessNone : ParsePacket.h
  • preqProcessPaCal : ParsePacket.h
  • preqProcessSCAData : ParsePacket.h
  • preqProcessScopeData : ParsePacket.h
  • preqProcessScopeDataOverFlow : ParsePacket.h
  • preqProcessSpectrum : ParsePacket.h
  • preqProcessStatus : ParsePacket.h
  • preqProcessTextData : ParsePacket.h
  • preqRequestScopeData : ParsePacket.h

- r -

  • RAW_IO : WINUSBIO.H
  • Retries : DP5Protocol.h
  • RS232 : DP5Protocol.h
  • RS232_TIMEOUT : DP5Protocol.h

- s -

  • SHORT_PACKET_TERMINATE : WINUSBIO.H
  • STATUS_PACKET_SIZE : DppLibUsb.h
  • SUSPEND_DELAY : WINUSBIO.H
  • SYNC1_ : DP5Protocol.h
  • SYNC2_ : DP5Protocol.h

- t -

  • TIMEOUT_MS : DppLibUsb.h

- u -

  • USB : DP5Protocol.h
  • USB_DiagDataDelayMS : DP5Protocol.h
  • USB_TIMEOUT : DP5Protocol.h

- w -

  • Whitespace : AsciiCmdUtilities.h
  • WinUsbDP5 : DppWinUSB.h
  • WinUsbDP5Size : DppWinUSB.h
  • WinUSBService : DppWinUSB.h
Generated on Thu Sep 21 2017 16:01:18 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: Class List

  • Class List
  • Class Index
  • Class Members
Class List
Here are the classes, structs, unions and interfaces with brief descriptions:
_CONFIG_OPTIONS |
_DiagDataType |
_DppStateType |
_Packet_In |
_SpectrumFileType |
_WINUSB_PIPE_INFORMATION |
_WINUSB_SETUP_PACKET |
CAsciiCmdUtilities |
CConsoleHelper |
CDP5Protocol |
CDP5Status |
CDppLibUsb |
CDppUtilities |
CDppWinUSB |
CMSecTimer |
CNetFinder |
CParsePacket |
CSendCommand |
DP5_DP4_FORMAT_STATUS |
NETDISPLAY_ENTRY |
Packet_Out |
Spec |
stringex |
WINUSB_DEVICE_INFO | Holds WinUSB device information
Generated on Thu Sep 21 2017 16:01:17 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: Class Index

  • Class List
  • Class Index
  • Class Members
Class Index
C | D | N | P | S | W | _
C
CDppWinUSB
N
stringex _DppStateType
CMSecTimer
W
_Packet_In
CAsciiCmdUtilities CNetFinder NETDISPLAY_ENTRY _SpectrumFileType
CConsoleHelper CParsePacket
P
WINUSB_DEVICE_INFO _WINUSB_PIPE_INFORMATION
CDP5Protocol CSendCommand
_
_WINUSB_SETUP_PACKET
CDP5Status
D
Packet_Out
CDppLibUsb
S
_CONFIG_OPTIONS
CDppUtilities DP5_DP4_FORMAT_STATUS _DiagDataType
Spec
C | D | N | P | S | W | _
Generated on Thu Sep 21 2017 16:01:17 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: File List

  • File List
  • File Members
File List
Here is a list of all files with brief descriptions:
ConsoleHelper.cpp [code]
ConsoleHelper.h [code]
stdafx.cpp [code]
stdafx.h [code]
stringex.cpp [code]
stringex.h [code]
stringSplit.h [code]
vcDppConsole.cpp [code]
DeviceIO/AsciiCmdUtilities.cpp [code]
DeviceIO/AsciiCmdUtilities.h [code]
DeviceIO/DP5Protocol.cpp [code]
DeviceIO/DP5Protocol.h [code]
DeviceIO/DP5Status.cpp [code]
DeviceIO/DP5Status.h [code]
DeviceIO/DppConst.h [code]
DeviceIO/DppLibUsb.cpp [code]
DeviceIO/DppLibUsb.h [code]
DeviceIO/DppUtilities.cpp [code]
DeviceIO/DppUtilities.h [code]
DeviceIO/DppWinUSB.cpp [code]
DeviceIO/DppWinUSB.h [code]
DeviceIO/guid.h [code]
DeviceIO/MSecTimer.cpp [code]
DeviceIO/MSecTimer.h [code]
DeviceIO/NetFinder.cpp [code]
DeviceIO/NetFinder.h [code]
DeviceIO/ParsePacket.cpp [code]
DeviceIO/ParsePacket.h [code]
DeviceIO/SendCommand.cpp [code]
DeviceIO/SendCommand.h [code]
DeviceIO/WINUSB.H [code]
DeviceIO/WINUSBIO.H [code]
Generated on Thu Sep 21 2017 16:01:18 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: Graph Legend

Graph Legend

This page explains how to interpret the graphs that are generated by doxygen.

Consider the following example:

/*! Invisible class because of truncation */
class Invisible { };

/*! Truncated class, inheritance relation is hidden */
class Truncated : public Invisible { };

/* Class not documented with doxygen comments */
class Undocumented { };

/*! Class that is inherited using public inheritance */
class PublicBase : public Truncated { };

/*! A template class */
template<class T> class Templ { };

/*! Class that is inherited using protected inheritance */
class ProtectedBase { };

/*! Class that is inherited using private inheritance */
class PrivateBase { };

/*! Class that is used by the Inherited class */
class Used { };

/*! Super class that inherits a number of other classes */
class Inherited : public PublicBase,
                  protected ProtectedBase,
                  private PrivateBase,
                  public Undocumented,
                  public Templ<int>
{
  private:
    Used *m_usedClass;
};

This will result in the following graph:

The boxes in the above graph have the following meaning:

  • A filled gray box represents the struct or class for which the graph is generated.
  • A box with a black border denotes a documented struct or class.
  • A box with a grey border denotes an undocumented struct or class.
  • A box with a red border denotes a documented struct or class forwhich not all inheritance/containment relations are shown. A graph is truncated if it does not fit within the specified boundaries.

The arrows have the following meaning:

  • A dark blue arrow is used to visualize a public inheritance relation between two classes.
  • A dark green arrow is used for protected inheritance.
  • A dark red arrow is used for private inheritance.
  • A purple dashed arrow is used if a class is contained or used by another class. The arrow is labeled with the variable(s) through which the pointed class or struct is accessible.
  • A yellow dashed arrow denotes a relation between a template instance and the template class it was instantiated from. The arrow is labeled with the template parameters of the instance.
Generated on Thu Sep 21 2017 16:01:17 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: Namespace List

  • Namespace List
  • Namespace Members
Namespace List
Here is a list of all namespaces with brief descriptions:
stringSplit
Generated on Thu Sep 21 2017 16:01:17 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: readme.txt File Reference

  • File List
  • File Members
readme.txt File Reference
Generated on Thu Sep 21 2017 16:01:13 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: stringSplit.h File Reference

  • File List
  • File Members
Namespaces | Typedefs | Functions
stringSplit.h File Reference
#include <string>
#include <vector>
Include dependency graph for stringSplit.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace | stringSplit

Typedefs

typedef string::size_type(string::* | stringSplit::FindToken )(const string &strDelimiter, string::size_type sztOffset) const

Functions

vector< string > | stringSplit::Split (const string &strIn, const string &strDelimiters, bool bRemoveEmpty=false, bool bMatchAll=false)
Generated on Thu Sep 21 2017 16:01:13 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1


vcDppConsole Test C++ SDK: stringSplit.h Source File

  • File List
  • File Members
stringSplit.h
Go to the documentation of this file.
00001 #include <string>
00002 #include <vector>
00003
00004 namespace stringSplit
00005 {
00006     using namespace std;
00007     typedef string::size_type (string::*FindToken)(const string& strDelimiter, string::size_type sztOffset) const;
00008     // Split a string using a delimiter string or string character set, returns split string as a vector<string>
00009         // strIn - string being split
00010         // strDelimiters - delimiter string or character list in a string for splitting strIn
00011         // bRemoveEmpty - remove empty strings from list
00012         // bMatchAll - true=use delimiter string, false=use string as character set matching any chars in set
00013     vector<string> Split(const string& strIn, const string& strDelimiters, bool bRemoveEmpty=false, bool bMatchAll=false)
00014     {
00015         vector<string> VecStrTokens;                                            // return container for strTokens
00016         string::size_type SearchStart = 0;                                      // starting position for searches
00017         string::size_type SkipPosition = 1;                                     // positions to SkipPosition after a strDelimiters
00018         FindToken FindPosition = &string::find_first_of;        // search algorithm for matches
00019         if (bMatchAll)
00020         {
00021             SkipPosition = strDelimiters.length();
00022             FindPosition = &string::find;
00023         }
00024         while (SearchStart != string::npos)
00025         {
00026             string::size_type SearchEnd = (strIn.*FindPosition)(strDelimiters, SearchStart);    // get a complete range [SearchStart..SearchEnd)
00027             if (SkipPosition == 0) SearchEnd = string::npos;    // no match ret whole string if skip is null
00028             string strToken = strIn.substr(SearchStart, SearchEnd - SearchStart);
00029             if (!(bRemoveEmpty && strToken.empty()))
00030             {
00031                 VecStrTokens.push_back(strToken);                                 // extract the strToken and add it to the VecStrTokens list
00032             }
00033             if ((SearchStart = SearchEnd) != string::npos) SearchStart += SkipPosition; // SearchStart the next range
00034         }
00035         return VecStrTokens;
00036     }
00037 }
Generated on Thu Sep 21 2017 16:01:13 for vcDppConsole Test C++ SDK by doxygen 1.7.6.1