DPP csDP5 WinUSB RS232: Main Page

DPP csDP5 WinUSB RS232 20170920
DPP csDP5 WinUSB RS232
  • Main Page
  • Namespaces
  • Classes
  • Files
DPP csDP5 WinUSB RS232 Documentation

Amptek CSharp DP5 Example (csDP5)

csDP5 is a C# .Net application that demonstrates how Amptek DPP communications can be easily integrated into other programs.

What csDP5 does.

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

  • Searches for Amptek FW6 DPP devices
  • Communicates with Amptek FW6 DPP devices
  • Determines the DPP device type
  • Reads and updates configuration Data
  • Acquires and saves spectrum data
  • Reads DPP status
  • (Project source is CSharp vs2005 and above and requires .Net2 or above installed)

csDP5 Classes

  • csDP5.Form1.buttonFindUsbDevices_Click (Search for DPP devices)
  • csDP5.Form1.buttonRunFW6Tests_Click (Run DPP Tests)
  • csRepeat.FW6.FW6Device (FW6 Device Communications Template)
  • csRepeat.FW6.DPDeviceUsb (USB FW6 Device Communications)
  • csRepeat.FW6.DPDeviceSerialFW6 (RS232 FW6 Device Communications)
  • csRepeat.FW6DppStatus (Status Functions)
  • MiscUtil (Utilities)
  • csRepeat.FW6 (FW6 Functions)
  • WinUsb (WinUSB Communications Support)

Main csDP5 Namespace

  • csDP5 (Controls csDP5 Functions)

More Information

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

Generated on Fri Sep 22 2017 10:35:18 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: AsciiCmdUtilities.CommandFilters Class Reference

  • Namespaces
  • Classes
  • Files
  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • AsciiCmdUtilities
  • CommandFilters
Public Member Functions | Static Public Member Functions
AsciiCmdUtilities.CommandFilters Class Reference

List of all members.

Public Member Functions

string | CreateResTestReadBackCmd (bool bSendCoarseFineGain, int DppType)
string | CreateFullReadBackCmd (bool PC5_PRESENT, int DppType, bool isDP5_RevDxGains, byte DPP_ECO)
string | RemoveCmdByDeviceType (string strCfgDataIn, bool PC5_PRESENT, int DppType, bool isDP5_RevDxGains, byte DPP_ECO)
string | GetCmdDesc (string strCmd)
string | CreateSpectrumConfig (string strRawCfgIn)
ArrayList | MakeDp5CmdList ()

Static Public Member Functions

static string | RemoveCmd (string strCmd, string strCfgData)

Detailed Description

Definition at line 10 of file AsciiCmdUtilities.cs.

Member Function Documentation

string AsciiCmdUtilities.CommandFilters.CreateFullReadBackCmd | ( | bool | PC5_PRESENT,
 |  | int | DppType,
 |  | bool | isDP5_RevDxGains,
 |  | byte | DPP_ECO
 | ) |  | [inline]

Definition at line 37 of file AsciiCmdUtilities.cs.

string AsciiCmdUtilities.CommandFilters.CreateResTestReadBackCmd | ( | bool | bSendCoarseFineGain,
 |  | int | DppType
 | ) |  | [inline]

Definition at line 12 of file AsciiCmdUtilities.cs.

string AsciiCmdUtilities.CommandFilters.CreateSpectrumConfig ( string strRawCfgIn ) [inline]

Definition at line 635 of file AsciiCmdUtilities.cs.

Here is the call graph for this function:

string AsciiCmdUtilities.CommandFilters.GetCmdDesc ( string strCmd ) [inline]

Definition at line 326 of file AsciiCmdUtilities.cs.

ArrayList AsciiCmdUtilities.CommandFilters.MakeDp5CmdList ( ) [inline]

Definition at line 656 of file AsciiCmdUtilities.cs.

Here is the caller graph for this function:

static string AsciiCmdUtilities.CommandFilters.RemoveCmd | ( | string | strCmd,
 |  | string | strCfgData
 | ) |  | [inline, static]

Definition at line 191 of file AsciiCmdUtilities.cs.

Here is the caller graph for this function:

string AsciiCmdUtilities.CommandFilters.RemoveCmdByDeviceType | ( | string | strCfgDataIn,
 |  | bool | PC5_PRESENT,
 |  | int | DppType,
 |  | bool | isDP5_RevDxGains,
 |  | byte | DPP_ECO
 | ) |  | [inline]

Definition at line 210 of file AsciiCmdUtilities.cs.

Here is the call graph for this function:

The documentation for this class was generated from the following file:
  • FW6/AsciiCmdUtilities.cs
Generated on Fri Sep 22 2017 10:35:16 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: csDP5.Form1 Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • csDP5
  • Form1
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes
csDP5.Form1 Class Reference

Summary description for Form1. More...

List of all members.

Public Member Functions

Form1 ()
void | PlotData (int[] DataBuffer, int NumChan, bool OptScaleType)
void | buttonFindUsbDevices_Click (object sender, EventArgs e)
void | buttonRunFW6Tests_Click (object sender, EventArgs e)

Public Attributes

Button | buttonFindUsbDevices
Button | buttonRunFW6Tests

Protected Member Functions

override void | Dispose (bool disposing)
Clean up any resources being used.
void | StartAutodetection ()
void | DiscoverDevices (object ThreadContext)

Protected Attributes

bool | detectingDevices = false

Detailed Description

Summary description for Form1.

Definition at line 23 of file Form1.cs.

Constructor & Destructor Documentation

csDP5.Form1.Form1 ( ) [inline]

Definition at line 51 of file Form1.cs.

Member Function Documentation

void csDP5.Form1.buttonFindUsbDevices_Click | ( | object | sender,
 |  | EventArgs | e
 | ) |  | [inline]

Definition at line 479 of file Form1.cs.

Here is the call graph for this function:

void csDP5.Form1.buttonRunFW6Tests_Click | ( | object | sender,
 |  | EventArgs | e
 | ) |  | [inline]

Definition at line 600 of file Form1.cs.

Here is the call graph for this function:

void csDP5.Form1.DiscoverDevices ( object ThreadContext ) [inline, protected]

Definition at line 504 of file Form1.cs.

Here is the call graph for this function:

Here is the caller graph for this function:

override void csDP5.Form1.Dispose ( bool disposing ) [inline, protected]

Clean up any resources being used.

Definition at line 66 of file Form1.cs.

void csDP5.Form1.PlotData | ( | int[] | DataBuffer,
 |  | int | NumChan,
 |  | bool | OptScaleType
 | ) |  | [inline]

Definition at line 305 of file Form1.cs.

void csDP5.Form1.StartAutodetection ( ) [inline, protected]

Definition at line 497 of file Form1.cs.

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

Button csDP5.Form1.buttonFindUsbDevices

Definition at line 26 of file Form1.cs.

Button csDP5.Form1.buttonRunFW6Tests

Definition at line 35 of file Form1.cs.

bool csDP5.Form1.detectingDevices = false [protected]

Definition at line 502 of file Form1.cs.

The documentation for this class was generated from the following file:
  • Form1.cs
Generated on Fri Sep 22 2017 10:35:16 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: csDP5.Properties.Resources Class Reference

  • Class Members
  • csDP5
  • Properties
  • Resources
csDP5.Properties.Resources Class Reference

A strongly-typed resource class, for looking up localized strings, etc. More...

List of all members.

Detailed Description

A strongly-typed resource class, for looking up localized strings, etc.

Definition at line 25 of file Resources.Designer.cs.

The documentation for this class was generated from the following file:
  • Properties/Resources.Designer.cs
Generated on Fri Sep 22 2017 10:35:17 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: csRepeat.DisplayVersion Class Reference

  • csRepeat
  • DisplayVersion
Static Public Member Functions
csRepeat.DisplayVersion Class Reference

List of all members.

Static Public Member Functions

static string VersionString (DPDevice device, Version version, bool isFPGA)

Detailed Description

Definition at line 13 of file DisplayVersion.cs.

Member Function Documentation

static string csRepeat.DisplayVersion.VersionString | ( | DPDevice | device,
 |  | Version | version,
 |  | bool | isFPGA
 | ) |  | [inline, static]

Definition at line 16 of file DisplayVersion.cs.

Here is the caller graph for this function:

The documentation for this class was generated from the following file:
  • FW6/DisplayVersion.cs
Generated on Fri Sep 22 2017 10:35:17 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: csRepeat.DPDevice Class Reference

  • csRepeat
  • DPDevice
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Properties
csRepeat.DPDevice Class Reference
Inheritance diagram for csRepeat.DPDevice:
[legend]

List of all members.

Public Types

enum InterfaceTypes {
ethernet, rs232,
usb
}
enum FpgaStates {
Normal, EncryptionFailure,
Unprogrammed
}
Possible fpga states. More...

Public Member Functions

DPDevice (InterfaceTypes interfaceType, DeviceTypes deviceType, Version firmwareVersion, Version fpgaVersion, string serialNumber)
delegate void | UploadProgressUpdateDelegate (long currentByteOffset, long totalBytes)
delegate bool | HasFirmwareLoadBeenCancelledDelegate ()
override string | ToString ()

Static Public Member Functions

static List< DPDevice > | PerformDeviceDetection ()

Public Attributes

Version | FirmwareVersion
Version | FpgaVersion
HasFirmwareLoadBeenCancelledDelegate HasFirmwareLoadBeenCancelled

Static Public Attributes

static readonly Version | FpgaEncryptionFailureVersion = new Version(14, 14)
14.14 is fpga encryption failure

Properties

InterfaceTypes | InterfaceType [get, set]
DeviceTypes | DeviceType [get, set]
string | SerialNumber [get, set]
FpgaStates | FpgaState [get, set]

Detailed Description

Definition at line 7 of file DPDevice.cs.

Member Enumeration Documentation

enum csRepeat::DPDevice::FpgaStates

Possible fpga states.

Enumerator:
Normal

Normal fpga state.

EncryptionFailure

Fpga reports an encryption failure.

Unprogrammed

Fpga image is unprogrammed.

Definition at line 65 of file DPDevice.cs.

enum csRepeat::DPDevice::InterfaceTypes
Enumerator:
ethernet
rs232
usb

Definition at line 9 of file DPDevice.cs.

Constructor & Destructor Documentation

csRepeat.DPDevice.DPDevice | ( | InterfaceTypes | interfaceType,
 |  | DeviceTypes | deviceType,
 |  | Version | firmwareVersion,
 |  | Version | fpgaVersion,
 |  | string | serialNumber
 | ) |  | [inline]

Definition at line 40 of file DPDevice.cs.

Member Function Documentation

delegate bool csRepeat.DPDevice.HasFirmwareLoadBeenCancelledDelegate ( )
static List<DPDevice> csRepeat.DPDevice.PerformDeviceDetection ( ) [inline, static]

Definition at line 104 of file DPDevice.cs.

Here is the caller graph for this function:

override string csRepeat.DPDevice.ToString ( ) [inline]

Reimplemented in csRepeat.FW6.DPDeviceSerialFW6.

Definition at line 129 of file DPDevice.cs.

Here is the call graph for this function:

Here is the caller graph for this function:

delegate void csRepeat.DPDevice.UploadProgressUpdateDelegate | ( | long | currentByteOffset,
 |  | long | totalBytes
 | ) |  |

Member Data Documentation

Version csRepeat.DPDevice.FirmwareVersion

Definition at line 30 of file DPDevice.cs.

readonly Version csRepeat.DPDevice.FpgaEncryptionFailureVersion = new Version(14, 14) [static]

14.14 is fpga encryption failure

Definition at line 86 of file DPDevice.cs.

Version csRepeat.DPDevice.FpgaVersion

Definition at line 31 of file DPDevice.cs.

HasFirmwareLoadBeenCancelledDelegate csRepeat.DPDevice.HasFirmwareLoadBeenCancelled

Definition at line 102 of file DPDevice.cs.

Property Documentation

DeviceTypes csRepeat.DPDevice.DeviceType [get, set]

Definition at line 25 of file DPDevice.cs.

FpgaStates csRepeat.DPDevice.FpgaState [get, set]

Definition at line 94 of file DPDevice.cs.

InterfaceTypes csRepeat.DPDevice.InterfaceType [get, set]

Definition at line 18 of file DPDevice.cs.

string csRepeat.DPDevice.SerialNumber [get, set]

Definition at line 35 of file DPDevice.cs.

The documentation for this class was generated from the following file:
  • FW6/DPDevice.cs
Generated on Fri Sep 22 2017 10:35:17 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: csRepeat.FW6DppStatus Class Reference

  • csRepeat
  • FW6DppStatus
Public Member Functions | Public Attributes
csRepeat.FW6DppStatus Class Reference

Parse FW6 Dpp Status data packets. More...

List of all members.

Public Member Functions

ulong | GetULong (int ulStart, byte[] buffer)
void | Process_Status (byte[] buffer)
string | ShowStatusValueStrings ()
string | PX5_OptionsString ()
string | GetStatusValueStrings ()
string | VersionToStr (byte bVersion)
string | OnOffStr (bool bOn)
string | GetDeviceNameFromVal (int DeviceTypeVal)

Public Attributes

double | AccumulationTime
bool | MCA_EN
bool | PRECNT_REACHED
bool | PresetRtDone
bool | PresetLtDone
bool | PC5_PRESENT
byte | DEVICE_ID
byte | DPP_ECO = 0
bool | isDP5_RevDxGains = false
const byte | dppDP5 = 0
const byte | dppPX5 = 1
const byte | dppDP5G = 2
const byte | dppMCA8000D = 3
const byte | dppTB5 = 4
const byte | dppDP5X = 5
const byte | PX5_OPTION_NONE = 0
const byte | PX5_OPTION_HPGe_HVPS = 1
const byte | PX5_OPTION_TEST_TEK = 4
const byte | PX5_OPTION_TEST_MOX = 5
const byte | PX5_OPTION_TEST_AMP = 6
const byte | PX5_OPTION_TEST_MODE_1 = 8
const byte | PX5_OPTION_TEST_MODE_2 = 9

Detailed Description

Parse FW6 Dpp Status data packets.

Definition at line 10 of file FW6DppStatus.cs.

Member Function Documentation

string csRepeat.FW6DppStatus.GetDeviceNameFromVal ( int DeviceTypeVal ) [inline]

Definition at line 694 of file FW6DppStatus.cs.

Here is the caller graph for this function:

string csRepeat.FW6DppStatus.GetStatusValueStrings ( ) [inline]

Definition at line 350 of file FW6DppStatus.cs.

Here is the call graph for this function:

Here is the caller graph for this function:

ulong csRepeat.FW6DppStatus.GetULong | ( | int | ulStart,
 |  | byte[] | buffer
 | ) |  | [inline]

Definition at line 88 of file FW6DppStatus.cs.

Here is the caller graph for this function:

string csRepeat.FW6DppStatus.OnOffStr ( bool bOn ) [inline]

Definition at line 670 of file FW6DppStatus.cs.

void csRepeat.FW6DppStatus.Process_Status ( byte[] buffer ) [inline]

Definition at line 97 of file FW6DppStatus.cs.

Here is the call graph for this function:

Here is the caller graph for this function:

string csRepeat.FW6DppStatus.PX5_OptionsString ( ) [inline]

Definition at line 313 of file FW6DppStatus.cs.

Here is the caller graph for this function:

string csRepeat.FW6DppStatus.ShowStatusValueStrings ( ) [inline]

Definition at line 260 of file FW6DppStatus.cs.

Here is the call graph for this function:

string csRepeat.FW6DppStatus.VersionToStr ( byte bVersion ) [inline]

Definition at line 661 of file FW6DppStatus.cs.

Here is the caller graph for this function:

Member Data Documentation

double csRepeat.FW6DppStatus.AccumulationTime

Definition at line 21 of file FW6DppStatus.cs.

byte csRepeat.FW6DppStatus.DEVICE_ID

Definition at line 55 of file FW6DppStatus.cs.

byte csRepeat.FW6DppStatus.DPP_ECO = 0

Definition at line 62 of file FW6DppStatus.cs.

const byte csRepeat.FW6DppStatus.dppDP5 = 0

Definition at line 70 of file FW6DppStatus.cs.

const byte csRepeat.FW6DppStatus.dppDP5G = 2

Definition at line 72 of file FW6DppStatus.cs.

const byte csRepeat.FW6DppStatus.dppDP5X = 5

Definition at line 75 of file FW6DppStatus.cs.

const byte csRepeat.FW6DppStatus.dppMCA8000D = 3

Definition at line 73 of file FW6DppStatus.cs.

const byte csRepeat.FW6DppStatus.dppPX5 = 1

Definition at line 71 of file FW6DppStatus.cs.

const byte csRepeat.FW6DppStatus.dppTB5 = 4

Definition at line 74 of file FW6DppStatus.cs.

bool csRepeat.FW6DppStatus.isDP5_RevDxGains = false

Definition at line 67 of file FW6DppStatus.cs.

bool csRepeat.FW6DppStatus.MCA_EN

Definition at line 29 of file FW6DppStatus.cs.

bool csRepeat.FW6DppStatus.PC5_PRESENT

Definition at line 47 of file FW6DppStatus.cs.

bool csRepeat.FW6DppStatus.PRECNT_REACHED

Definition at line 30 of file FW6DppStatus.cs.

bool csRepeat.FW6DppStatus.PresetLtDone

Definition at line 32 of file FW6DppStatus.cs.

bool csRepeat.FW6DppStatus.PresetRtDone

Definition at line 31 of file FW6DppStatus.cs.

const byte csRepeat.FW6DppStatus.PX5_OPTION_HPGe_HVPS = 1

Definition at line 80 of file FW6DppStatus.cs.

const byte csRepeat.FW6DppStatus.PX5_OPTION_NONE = 0

Definition at line 79 of file FW6DppStatus.cs.

const byte csRepeat.FW6DppStatus.PX5_OPTION_TEST_AMP = 6

Definition at line 83 of file FW6DppStatus.cs.

const byte csRepeat.FW6DppStatus.PX5_OPTION_TEST_MODE_1 = 8

Definition at line 84 of file FW6DppStatus.cs.

const byte csRepeat.FW6DppStatus.PX5_OPTION_TEST_MODE_2 = 9

Definition at line 85 of file FW6DppStatus.cs.

const byte csRepeat.FW6DppStatus.PX5_OPTION_TEST_MOX = 5

Definition at line 82 of file FW6DppStatus.cs.

const byte csRepeat.FW6DppStatus.PX5_OPTION_TEST_TEK = 4

Definition at line 81 of file FW6DppStatus.cs.

The documentation for this class was generated from the following file:
  • FW6/FW6DppStatus.cs
Generated on Fri Sep 22 2017 10:35:17 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Package csRepeat

  • Namespace List
  • Namespace Members
Namespaces | Classes | Enumerations
Package csRepeat

Namespaces

package | FW6

Classes

class | DisplayVersion
class | DPDevice
class | FW6DppStatus
Parse FW6 Dpp Status data packets. More...

Enumerations

enum DeviceTypes {
DP5 = 0, PX5 = 1,
DP5G = 2, MCA8000D = 3,
TB5 = 4, DP5X = 5,
ANY
}

Enumeration Type Documentation

enum csRepeat::DeviceTypes
Enumerator:
DP5
PX5
DP5G
MCA8000D
TB5
DP5X
ANY

Definition at line 7 of file DeviceTypes.cs.

Generated on Fri Sep 22 2017 10:35:17 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: csRepeat.FW6.AckResponse Class Reference

  • csRepeat
  • FW6
  • AckResponse
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Properties
csRepeat.FW6.AckResponse Class Reference
Inheritance diagram for csRepeat.FW6.AckResponse:
[legend]
Collaboration diagram for csRepeat.FW6.AckResponse:
[legend]

List of all members.

Public Types

enum AckTypes {
Ok = 0x0, SyncError,
PidError, LenError,
ChecksumError, BadParameter,
BadHexRecord, UnrecognizedCommand,
FpgaError, Cp2201NotFound,
ScopeDataNotAvailable, Pc5NotPresent,
OkInterfaceSharingRequest, BusyAnotherInterfaceIsInUse,
I2cError, UploadAckPacket = 0x0F
}

Public Member Functions

AckResponse (byte[] packetContent)

Static Public Member Functions

static bool | IsMatch (byte pid1, byte pid2)

Public Attributes

const int | AddressMsbOffset = 0
First byte is address msb.
const int | AddressLsbOffset = 1
Second byte is address lsb.
const int | RecordTypeOffset = 2
Third byte is record type.

Properties

override byte | PID1 [get]
override byte | PID2 [get]
int | Address [get]
Intel hex record address Field available if PID2 is UploadAckPacket.
override byte[] | Data [get]
Payload data.
AckTypes | AckType [get]

Detailed Description

Definition at line 7 of file AckResponse.cs.

Member Enumeration Documentation

enum csRepeat::FW6::AckResponse::AckTypes
Enumerator:
Ok
SyncError
PidError
LenError
ChecksumError
BadParameter
BadHexRecord
UnrecognizedCommand
FpgaError
Cp2201NotFound
ScopeDataNotAvailable
Pc5NotPresent
OkInterfaceSharingRequest
BusyAnotherInterfaceIsInUse
I2cError
UploadAckPacket

Definition at line 71 of file AckResponse.cs.

Constructor & Destructor Documentation

csRepeat.FW6.AckResponse.AckResponse ( byte[] packetContent ) [inline]

Definition at line 11 of file AckResponse.cs.

Member Function Documentation

static bool csRepeat.FW6.AckResponse.IsMatch | ( | byte | pid1,
 |  | byte | pid2
 | ) |  | [inline, static]

Definition at line 99 of file AckResponse.cs.

Here is the caller graph for this function:

Member Data Documentation

const int csRepeat.FW6.AckResponse.AddressLsbOffset = 1

Second byte is address lsb.

Definition at line 36 of file AckResponse.cs.

const int csRepeat.FW6.AckResponse.AddressMsbOffset = 0

First byte is address msb.

Definition at line 31 of file AckResponse.cs.

const int csRepeat.FW6.AckResponse.RecordTypeOffset = 2

Third byte is record type.

Definition at line 41 of file AckResponse.cs.

Property Documentation

AckTypes csRepeat.FW6.AckResponse.AckType [get]

Definition at line 92 of file AckResponse.cs.

int csRepeat.FW6.AckResponse.Address [get]

Intel hex record address Field available if PID2 is UploadAckPacket.

Definition at line 48 of file AckResponse.cs.

override byte [] csRepeat.FW6.AckResponse.Data [get]

Payload data.

Reimplemented from csRepeat.FW6.FW6Packet.

Definition at line 62 of file AckResponse.cs.

override byte csRepeat.FW6.AckResponse.PID1 [get]

Reimplemented from csRepeat.FW6.FW6Packet.

Definition at line 19 of file AckResponse.cs.

override byte csRepeat.FW6.AckResponse.PID2 [get]

Reimplemented from csRepeat.FW6.FW6Packet.

Definition at line 24 of file AckResponse.cs.

The documentation for this class was generated from the following file:
  • FW6/AckResponse.cs
Generated on Fri Sep 22 2017 10:35:17 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: csRepeat.FW6.Configuration Class Reference

  • csRepeat
  • FW6
  • Configuration
Public Member Functions | Properties
csRepeat.FW6.Configuration Class Reference

Sends a Text Configuration packet. More...

Inheritance diagram for csRepeat.FW6.Configuration:
[legend]
Collaboration diagram for csRepeat.FW6.Configuration:
[legend]

List of all members.

Public Member Functions

Configuration (byte[] data)

Properties

override byte | PID1 [get]
override byte | PID2 [get]
override byte[] | Data [get]
Payload data.

Detailed Description

Sends a Text Configuration packet.

Definition at line 10 of file Configuration.cs.

Constructor & Destructor Documentation

csRepeat.FW6.Configuration.Configuration ( byte[] data ) [inline]

Definition at line 28 of file Configuration.cs.

Here is the caller graph for this function:

Property Documentation

override byte [] csRepeat.FW6.Configuration.Data [get]

Payload data.

Reimplemented from csRepeat.FW6.FW6Packet.

Definition at line 24 of file Configuration.cs.

override byte csRepeat.FW6.Configuration.PID1 [get]

Reimplemented from csRepeat.FW6.FW6Packet.

Definition at line 13 of file Configuration.cs.

override byte csRepeat.FW6.Configuration.PID2 [get]

Reimplemented from csRepeat.FW6.FW6Packet.

Definition at line 18 of file Configuration.cs.

The documentation for this class was generated from the following file:
  • FW6/Configuration.cs
Generated on Fri Sep 22 2017 10:35:17 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: csRepeat.FW6.ConfigurationReadback Class Reference

  • csRepeat
  • FW6
  • ConfigurationReadback
Public Member Functions | Properties
csRepeat.FW6.ConfigurationReadback Class Reference

Sends a Text Configuration Readback Request. More...

Inheritance diagram for csRepeat.FW6.ConfigurationReadback:
[legend]
Collaboration diagram for csRepeat.FW6.ConfigurationReadback:
[legend]

List of all members.

Public Member Functions

ConfigurationReadback (byte[] data)

Properties

override byte | PID1 [get]
override byte | PID2 [get]
override byte[] | Data [get]
Payload data.

Detailed Description

Sends a Text Configuration Readback Request.

Definition at line 10 of file ConfigurationReadback.cs.

Constructor & Destructor Documentation

csRepeat.FW6.ConfigurationReadback.ConfigurationReadback ( byte[] data ) [inline]

Definition at line 28 of file ConfigurationReadback.cs.

Here is the caller graph for this function:

Property Documentation

override byte [] csRepeat.FW6.ConfigurationReadback.Data [get]

Payload data.

Reimplemented from csRepeat.FW6.FW6Packet.

Definition at line 24 of file ConfigurationReadback.cs.

override byte csRepeat.FW6.ConfigurationReadback.PID1 [get]

Reimplemented from csRepeat.FW6.FW6Packet.

Definition at line 13 of file ConfigurationReadback.cs.

override byte csRepeat.FW6.ConfigurationReadback.PID2 [get]

Reimplemented from csRepeat.FW6.FW6Packet.

Definition at line 18 of file ConfigurationReadback.cs.

The documentation for this class was generated from the following file:
  • FW6/ConfigurationReadback.cs
Generated on Fri Sep 22 2017 10:35:17 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: csRepeat.FW6.ConfigurationResponse Class Reference

  • csRepeat
  • FW6
  • ConfigurationResponse
Public Member Functions | Static Public Member Functions | Properties
csRepeat.FW6.ConfigurationResponse Class Reference

Configuration response that is returned from a configuration readback request. More...

Inheritance diagram for csRepeat.FW6.ConfigurationResponse:
[legend]
Collaboration diagram for csRepeat.FW6.ConfigurationResponse:
[legend]

List of all members.

Public Member Functions

ConfigurationResponse (byte[] packetContent)

Static Public Member Functions

static bool | IsMatch (byte pid1, byte pid2)

Properties

override byte | PID1 [get]
override byte | PID2 [get]
override byte[] | Data [get]
Payload data.

Detailed Description

Configuration response that is returned from a configuration readback request.

Definition at line 10 of file ConfigurationResponse.cs.

Constructor & Destructor Documentation

csRepeat.FW6.ConfigurationResponse.ConfigurationResponse ( byte[] packetContent ) [inline]

Definition at line 37 of file ConfigurationResponse.cs.

Member Function Documentation

static bool csRepeat.FW6.ConfigurationResponse.IsMatch | ( | byte | pid1,
 |  | byte | pid2
 | ) |  | [inline, static]

Definition at line 42 of file ConfigurationResponse.cs.

Here is the caller graph for this function:

Property Documentation

override byte [] csRepeat.FW6.ConfigurationResponse.Data [get]

Payload data.

Reimplemented from csRepeat.FW6.FW6Packet.

Definition at line 28 of file ConfigurationResponse.cs.

override byte csRepeat.FW6.ConfigurationResponse.PID1 [get]

Reimplemented from csRepeat.FW6.FW6Packet.

Definition at line 18 of file ConfigurationResponse.cs.

override byte csRepeat.FW6.ConfigurationResponse.PID2 [get]

Reimplemented from csRepeat.FW6.FW6Packet.

Definition at line 23 of file ConfigurationResponse.cs.

The documentation for this class was generated from the following file:
  • FW6/ConfigurationResponse.cs
Generated on Fri Sep 22 2017 10:35:17 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: csRepeat.FW6.DiagnosticRequest Class Reference

  • csRepeat
  • FW6
  • DiagnosticRequest
Properties
csRepeat.FW6.DiagnosticRequest Class Reference

Diagnostic data request packet. More...

Inheritance diagram for csRepeat.FW6.DiagnosticRequest:
[legend]
Collaboration diagram for csRepeat.FW6.DiagnosticRequest:
[legend]

List of all members.

Properties

override byte[] | Data [get]
No data in a diagnostic data request packet.
override byte | PID1 [get]
Request diagnostic data.
override byte | PID2 [get]
Request diagnostic data.

Detailed Description

Diagnostic data request packet.

Definition at line 10 of file DiagnosticRequest.cs.

Property Documentation

override byte [] csRepeat.FW6.DiagnosticRequest.Data [get]

No data in a diagnostic data request packet.

Reimplemented from csRepeat.FW6.FW6Packet.

Definition at line 16 of file DiagnosticRequest.cs.

override byte csRepeat.FW6.DiagnosticRequest.PID1 [get]

Request diagnostic data.

Reimplemented from csRepeat.FW6.FW6Packet.

Definition at line 27 of file DiagnosticRequest.cs.

override byte csRepeat.FW6.DiagnosticRequest.PID2 [get]

Request diagnostic data.

Reimplemented from csRepeat.FW6.FW6Packet.

Definition at line 35 of file DiagnosticRequest.cs.

The documentation for this class was generated from the following file:
  • FW6/DiagnosticRequest.cs
Generated on Fri Sep 22 2017 10:35:17 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: csRepeat.FW6.DiagnosticResponse Class Reference

  • csRepeat
  • FW6
  • DiagnosticResponse
Public Member Functions | Static Public Member Functions | Properties
csRepeat.FW6.DiagnosticResponse Class Reference

Diagnostic data response packet. More...

Inheritance diagram for csRepeat.FW6.DiagnosticResponse:
[legend]
Collaboration diagram for csRepeat.FW6.DiagnosticResponse:
[legend]

List of all members.

Public Member Functions

DiagnosticResponse (byte[] packetContent)

Static Public Member Functions

static bool | IsMatch (byte pid1, byte pid2)

Properties

override byte[] | Data [get]
Payload data.
int | FirmwareMajor [get]
int | FirmwareMinor [get]
int | FpgaMajor [get]
int | FpgaMinor [get]
UInt16 | DCalSetting [get]
byte | pzCorrection [get]
byte | uCTemperatureCalibration [get]
byte | ADCGainCalibration [get]
byte | ADCOffsetCalibration [get]
override byte | PID1 [get]
override byte | PID2 [get]

Detailed Description

Diagnostic data response packet.

Definition at line 10 of file DiagnosticResponse.cs.

Constructor & Destructor Documentation

csRepeat.FW6.DiagnosticResponse.DiagnosticResponse ( byte[] packetContent ) [inline]

Definition at line 128 of file DiagnosticResponse.cs.

Member Function Documentation

static bool csRepeat.FW6.DiagnosticResponse.IsMatch | ( | byte | pid1,
 |  | byte | pid2
 | ) |  | [inline, static]

Definition at line 118 of file DiagnosticResponse.cs.

Here is the caller graph for this function:

Property Documentation

byte csRepeat.FW6.DiagnosticResponse.ADCGainCalibration [get]

Definition at line 88 of file DiagnosticResponse.cs.

byte csRepeat.FW6.DiagnosticResponse.ADCOffsetCalibration [get]

Definition at line 98 of file DiagnosticResponse.cs.

override byte [] csRepeat.FW6.DiagnosticResponse.Data [get]

Payload data.

Reimplemented from csRepeat.FW6.FW6Packet.

Definition at line 15 of file DiagnosticResponse.cs.

UInt16 csRepeat.FW6.DiagnosticResponse.DCalSetting [get]

Definition at line 58 of file DiagnosticResponse.cs.

int csRepeat.FW6.DiagnosticResponse.FirmwareMajor [get]

Definition at line 22 of file DiagnosticResponse.cs.

int csRepeat.FW6.DiagnosticResponse.FirmwareMinor [get]

Definition at line 30 of file DiagnosticResponse.cs.

int csRepeat.FW6.DiagnosticResponse.FpgaMajor [get]

Definition at line 40 of file DiagnosticResponse.cs.

int csRepeat.FW6.DiagnosticResponse.FpgaMinor [get]

Definition at line 48 of file DiagnosticResponse.cs.

override byte csRepeat.FW6.DiagnosticResponse.PID1 [get]

Reimplemented from csRepeat.FW6.FW6Packet.

Definition at line 109 of file DiagnosticResponse.cs.

override byte csRepeat.FW6.DiagnosticResponse.PID2 [get]

Reimplemented from csRepeat.FW6.FW6Packet.

Definition at line 114 of file DiagnosticResponse.cs.

byte csRepeat.FW6.DiagnosticResponse.pzCorrection [get]

Definition at line 68 of file DiagnosticResponse.cs.

byte csRepeat.FW6.DiagnosticResponse.uCTemperatureCalibration [get]

Definition at line 78 of file DiagnosticResponse.cs.

The documentation for this class was generated from the following file:
  • FW6/DiagnosticResponse.cs
Generated on Fri Sep 22 2017 10:35:17 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: csRepeat.FW6.DPDeviceEthernet Class Reference

  • csRepeat
  • FW6
  • DPDeviceEthernet
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Properties
csRepeat.FW6.DPDeviceEthernet Class Reference
Inheritance diagram for csRepeat.FW6.DPDeviceEthernet:
[legend]
Collaboration diagram for csRepeat.FW6.DPDeviceEthernet:
[legend]

List of all members.

Public Member Functions

DPDeviceEthernet (DeviceTypes deviceType, Version firmwareVersion, Version fpgaVersion, string serialNumber, IPEndPoint deviceEndPoint)
override bool | ConnectForTesting ()
override void | DisconnectForTesting ()
override bool | StartDppData ()
override bool | PauseDppData ()
override bool | ClearDppData ()
override bool | GetConfiguration (string strCommands, ref byte[] readBuffer, out uint bytesRead)
override string | GetFullConfiguration (bool PC5_PRESENT, int DppType, bool isDP5_RevDxGains, byte DPP_ECO)
override string | DisplayConfiguration (string strCommands)
override bool | SendConfiguration (string strCommands)
override bool | GetRawStatus (ref byte[] readBuffer, out uint bytesRead)
override bool | GetSpectrumData (ref byte[] readBuffer, out uint bytesRead)

Static Public Member Functions

static List< DPDevice > | DetectDevices ()

Public Attributes

const int | udpDiscoveryPort = 10001
IPEndPoint | deviceEndPoint

Protected Member Functions

override void | Connect ()
override void | Disconnect ()
override FW6Packet | SendAndGetResponse (FW6Packet packetToSend, int timeoutMS)
Send and get a response.
override FW6Packet | SendAndGetResponse (FW6Packet packetToSend, int delayBeforeReadMS, int timeoutMS)
Returns true if an ack was found, false if timeout with some retries.

Protected Attributes

UdpClient | udpClient

Properties

override int | DataPacketAckTimeoutMS [get]
The maximum time to wait for an ack after sending a data packet.
override int | mcaChannels [get, set]

Detailed Description

Definition at line 12 of file DPDeviceEthernet.cs.

Constructor & Destructor Documentation

csRepeat.FW6.DPDeviceEthernet.DPDeviceEthernet | ( | DeviceTypes | deviceType,
 |  | Version | firmwareVersion,
 |  | Version | fpgaVersion,
 |  | string | serialNumber,
 |  | IPEndPoint | deviceEndPoint
 | ) |  | [inline]

Definition at line 32 of file DPDeviceEthernet.cs.

Member Function Documentation

override bool csRepeat.FW6.DPDeviceEthernet.ClearDppData ( ) [inline, virtual]

Implements csRepeat.FW6.FW6Device.

Definition at line 373 of file DPDeviceEthernet.cs.

Here is the call graph for this function:

override void csRepeat.FW6.DPDeviceEthernet.Connect ( ) [inline, protected, virtual]

Implements csRepeat.FW6.FW6Device.

Definition at line 205 of file DPDeviceEthernet.cs.

override bool csRepeat.FW6.DPDeviceEthernet.ConnectForTesting ( ) [inline, virtual]

Implements csRepeat.FW6.FW6Device.

Definition at line 323 of file DPDeviceEthernet.cs.

Here is the call graph for this function:

static List<DPDevice> csRepeat.FW6.DPDeviceEthernet.DetectDevices ( ) [inline, static]

Definition at line 50 of file DPDeviceEthernet.cs.

override void csRepeat.FW6.DPDeviceEthernet.Disconnect ( ) [inline, protected, virtual]

Implements csRepeat.FW6.FW6Device.

Definition at line 214 of file DPDeviceEthernet.cs.

override void csRepeat.FW6.DPDeviceEthernet.DisconnectForTesting ( ) [inline, virtual]

Implements csRepeat.FW6.FW6Device.

Definition at line 340 of file DPDeviceEthernet.cs.

override string csRepeat.FW6.DPDeviceEthernet.DisplayConfiguration ( string strCommands ) [inline, virtual]

Implements csRepeat.FW6.FW6Device.

Definition at line 470 of file DPDeviceEthernet.cs.

override bool csRepeat.FW6.DPDeviceEthernet.GetConfiguration | ( | string | strCommands,
 |  | ref byte[] | readBuffer,
 |  | out uint | bytesRead
 | ) |  | [inline, virtual]

Implements csRepeat.FW6.FW6Device.

Definition at line 398 of file DPDeviceEthernet.cs.

Here is the call graph for this function:

override string csRepeat.FW6.DPDeviceEthernet.GetFullConfiguration | ( | bool | PC5_PRESENT,
 |  | int | DppType,
 |  | bool | isDP5_RevDxGains,
 |  | byte | DPP_ECO
 | ) |  | [inline, virtual]

Implements csRepeat.FW6.FW6Device.

Definition at line 435 of file DPDeviceEthernet.cs.

Here is the call graph for this function:

override bool csRepeat.FW6.DPDeviceEthernet.GetRawStatus | ( | ref byte[] | readBuffer,
 |  | out uint | bytesRead
 | ) |  | [inline, virtual]

Implements csRepeat.FW6.FW6Device.

Definition at line 508 of file DPDeviceEthernet.cs.

Here is the call graph for this function:

override bool csRepeat.FW6.DPDeviceEthernet.GetSpectrumData | ( | ref byte[] | readBuffer,
 |  | out uint | bytesRead
 | ) |  | [inline, virtual]

Implements csRepeat.FW6.FW6Device.

Definition at line 539 of file DPDeviceEthernet.cs.

Here is the call graph for this function:

override bool csRepeat.FW6.DPDeviceEthernet.PauseDppData ( ) [inline, virtual]

Implements csRepeat.FW6.FW6Device.

Definition at line 359 of file DPDeviceEthernet.cs.

Here is the call graph for this function:

override FW6Packet csRepeat.FW6.DPDeviceEthernet.SendAndGetResponse | ( | FW6Packet | packetToSend,
 |  | int | timeoutMS
 | ) |  | [inline, protected, virtual]

Send and get a response.

Parameters:
packetToSend
timeoutMS
Returns:

Implements csRepeat.FW6.FW6Device.

Definition at line 226 of file DPDeviceEthernet.cs.

override FW6Packet csRepeat.FW6.DPDeviceEthernet.SendAndGetResponse | ( | FW6Packet | packetToSend,
 |  | int | delayBeforeReadMS,
 |  | int | timeoutMS
 | ) |  | [inline, protected, virtual]

Returns true if an ack was found, false if timeout with some retries.

Parameters:
port
packetToSend
timeoutMS
Returns:

Implements csRepeat.FW6.FW6Device.

Definition at line 239 of file DPDeviceEthernet.cs.

override bool csRepeat.FW6.DPDeviceEthernet.SendConfiguration ( string strCommands ) [inline, virtual]

Implements csRepeat.FW6.FW6Device.

Definition at line 486 of file DPDeviceEthernet.cs.

Here is the call graph for this function:

override bool csRepeat.FW6.DPDeviceEthernet.StartDppData ( ) [inline, virtual]

Implements csRepeat.FW6.FW6Device.

Definition at line 345 of file DPDeviceEthernet.cs.

Here is the call graph for this function:

Member Data Documentation

IPEndPoint csRepeat.FW6.DPDeviceEthernet.deviceEndPoint

Definition at line 16 of file DPDeviceEthernet.cs.

UdpClient csRepeat.FW6.DPDeviceEthernet.udpClient [protected]

Definition at line 203 of file DPDeviceEthernet.cs.

const int csRepeat.FW6.DPDeviceEthernet.udpDiscoveryPort = 10001

Definition at line 14 of file DPDeviceEthernet.cs.

Property Documentation

override int csRepeat.FW6.DPDeviceEthernet.DataPacketAckTimeoutMS [get, protected]

The maximum time to wait for an ack after sending a data packet.

Reimplemented from csRepeat.FW6.FW6Device.

Definition at line 19 of file DPDeviceEthernet.cs.

override int csRepeat.FW6.DPDeviceEthernet.mcaChannels [get, set]

Reimplemented from csRepeat.FW6.FW6Device.

Definition at line 574 of file DPDeviceEthernet.cs.

The documentation for this class was generated from the following file:
  • FW6/DPDeviceEthernet.cs
Generated on Fri Sep 22 2017 10:35:17 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: csRepeat.FW6.DPDeviceSerialFW6 Class Reference

  • csRepeat
  • FW6
  • DPDeviceSerialFW6
Public Member Functions | Static Public Member Functions | Protected Member Functions | Properties
csRepeat.FW6.DPDeviceSerialFW6 Class Reference
Inheritance diagram for csRepeat.FW6.DPDeviceSerialFW6:
[legend]
Collaboration diagram for csRepeat.FW6.DPDeviceSerialFW6:
[legend]

List of all members.

Public Member Functions

DPDeviceSerialFW6 (DeviceTypes deviceType, Version firmwareVersion, Version fpgaVersion, string serialNumber, string portName)
override bool | ConnectForTesting ()
override void | DisconnectForTesting ()
override bool | GetRawStatus (ref byte[] readBuffer, out uint bytesRead)
override string | GetFullConfiguration (bool PC5_PRESENT, int DppType, bool isDP5_RevDxGains, byte DPP_ECO)
override string | DisplayConfiguration (string strCommands)
override bool | GetConfiguration (string strCommands, ref byte[] readBuffer, out uint bytesRead)
override bool | SendConfiguration (string strCommands)
override bool | ClearDppData ()
override bool | StartDppData ()
override bool | PauseDppData ()
override bool | GetSpectrumData (ref byte[] readBuffer, out uint bytesRead)
override string | ToString ()

Static Public Member Functions

static List< DPDevice > | DetectDevices ()

Protected Member Functions

override void | Connect ()
override void | Disconnect ()
override FW6Packet | SendAndGetResponse (FW6Packet packetToSend, int timeoutMS)
Send a command and read the response.
override FW6Packet | SendAndGetResponse (FW6Packet packetToSend, int delayBeforeReadMS, int timeoutMS)
Send a command, wait delayBeforeReadMS, and then attempt to read the response for timeoutMS.

Properties

string | PortName [get, set]
override int | mcaChannels [get, set]
override int | DataPacketAckTimeoutMS [get]
The maximum time to wait for an ack after sending a data packet.

Detailed Description

Definition at line 11 of file DPDeviceSerialFW6.cs.

Constructor & Destructor Documentation

csRepeat.FW6.DPDeviceSerialFW6.DPDeviceSerialFW6 | ( | DeviceTypes | deviceType,
 |  | Version | firmwareVersion,
 |  | Version | fpgaVersion,
 |  | string | serialNumber,
 |  | string | portName
 | ) |  | [inline]

Definition at line 36 of file DPDeviceSerialFW6.cs.

Member Function Documentation

override bool csRepeat.FW6.DPDeviceSerialFW6.ClearDppData ( ) [inline, virtual]

Implements csRepeat.FW6.FW6Device.

Definition at line 231 of file DPDeviceSerialFW6.cs.

Here is the call graph for this function:

override void csRepeat.FW6.DPDeviceSerialFW6.Connect ( ) [inline, protected, virtual]

Implements csRepeat.FW6.FW6Device.

Definition at line 437 of file DPDeviceSerialFW6.cs.

override bool csRepeat.FW6.DPDeviceSerialFW6.ConnectForTesting ( ) [inline, virtual]

Implements csRepeat.FW6.FW6Device.

Definition at line 56 of file DPDeviceSerialFW6.cs.

Here is the call graph for this function:

static List<DPDevice> csRepeat.FW6.DPDeviceSerialFW6.DetectDevices ( ) [inline, static]

Definition at line 304 of file DPDeviceSerialFW6.cs.

override void csRepeat.FW6.DPDeviceSerialFW6.Disconnect ( ) [inline, protected, virtual]

Implements csRepeat.FW6.FW6Device.

Definition at line 443 of file DPDeviceSerialFW6.cs.

override void csRepeat.FW6.DPDeviceSerialFW6.DisconnectForTesting ( ) [inline, virtual]

Implements csRepeat.FW6.FW6Device.

Definition at line 73 of file DPDeviceSerialFW6.cs.

override string csRepeat.FW6.DPDeviceSerialFW6.DisplayConfiguration ( string strCommands ) [inline, virtual]

Implements csRepeat.FW6.FW6Device.

Definition at line 156 of file DPDeviceSerialFW6.cs.

override bool csRepeat.FW6.DPDeviceSerialFW6.GetConfiguration | ( | string | strCommands,
 |  | ref byte[] | readBuffer,
 |  | out uint | bytesRead
 | ) |  | [inline, virtual]

Implements csRepeat.FW6.FW6Device.

Definition at line 172 of file DPDeviceSerialFW6.cs.

Here is the call graph for this function:

override string csRepeat.FW6.DPDeviceSerialFW6.GetFullConfiguration | ( | bool | PC5_PRESENT,
 |  | int | DppType,
 |  | bool | isDP5_RevDxGains,
 |  | byte | DPP_ECO
 | ) |  | [inline, virtual]

Implements csRepeat.FW6.FW6Device.

Definition at line 120 of file DPDeviceSerialFW6.cs.

Here is the call graph for this function:

override bool csRepeat.FW6.DPDeviceSerialFW6.GetRawStatus | ( | ref byte[] | readBuffer,
 |  | out uint | bytesRead
 | ) |  | [inline, virtual]

Implements csRepeat.FW6.FW6Device.

Definition at line 78 of file DPDeviceSerialFW6.cs.

Here is the call graph for this function:

override bool csRepeat.FW6.DPDeviceSerialFW6.GetSpectrumData | ( | ref byte[] | readBuffer,
 |  | out uint | bytesRead
 | ) |  | [inline, virtual]

Implements csRepeat.FW6.FW6Device.

Definition at line 273 of file DPDeviceSerialFW6.cs.

Here is the call graph for this function:

override bool csRepeat.FW6.DPDeviceSerialFW6.PauseDppData ( ) [inline, virtual]

Implements csRepeat.FW6.FW6Device.

Definition at line 259 of file DPDeviceSerialFW6.cs.

Here is the call graph for this function:

override FW6Packet csRepeat.FW6.DPDeviceSerialFW6.SendAndGetResponse | ( | FW6Packet | packetToSend,
 |  | int | timeoutMS
 | ) |  | [inline, protected, virtual]

Send a command and read the response.

Parameters:
packetToSend
timeoutMS
Returns:

Implements csRepeat.FW6.FW6Device.

Definition at line 449 of file DPDeviceSerialFW6.cs.

override FW6Packet csRepeat.FW6.DPDeviceSerialFW6.SendAndGetResponse | ( | FW6Packet | packetToSend,
 |  | int | delayBeforeReadMS,
 |  | int | timeoutMS
 | ) |  | [inline, protected, virtual]

Send a command, wait delayBeforeReadMS, and then attempt to read the response for timeoutMS.

Parameters:
packetToSend
delayBeforeReadMS
timeoutMS
Returns:

Implements csRepeat.FW6.FW6Device.

Definition at line 455 of file DPDeviceSerialFW6.cs.

Here is the call graph for this function:

override bool csRepeat.FW6.DPDeviceSerialFW6.SendConfiguration ( string strCommands ) [inline, virtual]

Implements csRepeat.FW6.FW6Device.

Definition at line 209 of file DPDeviceSerialFW6.cs.

Here is the call graph for this function:

override bool csRepeat.FW6.DPDeviceSerialFW6.StartDppData ( ) [inline, virtual]

Implements csRepeat.FW6.FW6Device.

Definition at line 245 of file DPDeviceSerialFW6.cs.

Here is the call graph for this function:

override string csRepeat.FW6.DPDeviceSerialFW6.ToString ( ) [inline]

Reimplemented from csRepeat.DPDevice.

Definition at line 519 of file DPDeviceSerialFW6.cs.

Property Documentation

override int csRepeat.FW6.DPDeviceSerialFW6.DataPacketAckTimeoutMS [get, protected]

The maximum time to wait for an ack after sending a data packet.

Reimplemented from csRepeat.FW6.FW6Device.

Definition at line 32 of file DPDeviceSerialFW6.cs.

override int csRepeat.FW6.DPDeviceSerialFW6.mcaChannels [get, set]

Reimplemented from csRepeat.FW6.FW6Device.

Definition at line 26 of file DPDeviceSerialFW6.cs.

string csRepeat.FW6.DPDeviceSerialFW6.PortName [get, set]

Definition at line 17 of file DPDeviceSerialFW6.cs.

The documentation for this class was generated from the following file:
  • FW6/DPDeviceSerialFW6.cs
Generated on Fri Sep 22 2017 10:35:17 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: csRepeat.FW6.MessageHandler Class Reference

  • csRepeat
  • FW6
  • MessageHandler
Public Member Functions | Protected Member Functions
csRepeat.FW6.MessageHandler Class Reference

List of all members.

Public Member Functions

MessageHandler ()

Protected Member Functions

override void WndProc (ref Message msg)

Detailed Description

Definition at line 14 of file DPDeviceUsb.cs.

Constructor & Destructor Documentation

csRepeat.FW6.MessageHandler.MessageHandler ( ) [inline]

Definition at line 18 of file DPDeviceUsb.cs.

Member Function Documentation

override void csRepeat.FW6.MessageHandler.WndProc ( ref Message msg ) [inline, protected]

Definition at line 23 of file DPDeviceUsb.cs.

The documentation for this class was generated from the following file:
  • FW6/DPDeviceUsb.cs
Generated on Fri Sep 22 2017 10:35:17 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: csRepeat.FW6.DPDeviceUsb Class Reference

  • csRepeat
  • FW6
  • DPDeviceUsb
Public Member Functions | Static Public Member Functions | Protected Member Functions | Properties
csRepeat.FW6.DPDeviceUsb Class Reference
Inheritance diagram for csRepeat.FW6.DPDeviceUsb:
[legend]
Collaboration diagram for csRepeat.FW6.DPDeviceUsb:
[legend]

List of all members.

Public Member Functions

DPDeviceUsb (DeviceTypes deviceType, Version firmwareVersion, Version fpgaVersion, string serialNumber, string devicePath)
bool | SendCommand (FW6Packet packet)
bool | ReadData (ref byte[] readBuffer, out uint bytesRead)
override bool | ConnectForTesting ()
override void | DisconnectForTesting ()
override bool | GetRawStatus (ref byte[] readBuffer, out uint bytesRead)
override string | GetFullConfiguration (bool PC5_PRESENT, int DppType, bool isDP5_RevDxGains, byte DPP_ECO)
override string | DisplayConfiguration (string strCommands)
override bool | GetConfiguration (string strCommands, ref byte[] readBuffer, out uint bytesRead)
override bool | SendConfiguration (string strCommands)
override bool | ClearDppData ()
override bool | StartDppData ()
override bool | PauseDppData ()
override bool | GetSpectrumData (ref byte[] readBuffer, out uint bytesRead)

Static Public Member Functions

static List< DPDevice > | DetectDevices ()

Protected Member Functions

override void | Connect ()
override void | Disconnect ()
override FW6Packet | SendAndGetResponse (FW6Packet packetToSend, int timeoutMS)
override FW6Packet | SendAndGetResponse (FW6Packet packetToSend, int delayBeforeReadMS, int timeoutMS)
Returns a packet if one was returned.

Properties

override int | DataPacketAckTimeoutMS [get]
The maximum time to wait for an ack after sending a data packet.
override int | mcaChannels [get, set]

Detailed Description

Definition at line 50 of file DPDeviceUsb.cs.

Constructor & Destructor Documentation

csRepeat.FW6.DPDeviceUsb.DPDeviceUsb | ( | DeviceTypes | deviceType,
 |  | Version | firmwareVersion,
 |  | Version | fpgaVersion,
 |  | string | serialNumber,
 |  | string | devicePath
 | ) |  | [inline]

Definition at line 76 of file DPDeviceUsb.cs.

Member Function Documentation

override bool csRepeat.FW6.DPDeviceUsb.ClearDppData ( ) [inline, virtual]

Implements csRepeat.FW6.FW6Device.

Definition at line 297 of file DPDeviceUsb.cs.

Here is the call graph for this function:

override void csRepeat.FW6.DPDeviceUsb.Connect ( ) [inline, protected, virtual]

Implements csRepeat.FW6.FW6Device.

Definition at line 445 of file DPDeviceUsb.cs.

Here is the caller graph for this function:

override bool csRepeat.FW6.DPDeviceUsb.ConnectForTesting ( ) [inline, virtual]

Implements csRepeat.FW6.FW6Device.

Definition at line 139 of file DPDeviceUsb.cs.

Here is the call graph for this function:

static List<DPDevice> csRepeat.FW6.DPDeviceUsb.DetectDevices ( ) [inline, static]

Definition at line 359 of file DPDeviceUsb.cs.

Here is the call graph for this function:

override void csRepeat.FW6.DPDeviceUsb.Disconnect ( ) [inline, protected, virtual]

Implements csRepeat.FW6.FW6Device.

Definition at line 495 of file DPDeviceUsb.cs.

Here is the caller graph for this function:

override void csRepeat.FW6.DPDeviceUsb.DisconnectForTesting ( ) [inline, virtual]

Implements csRepeat.FW6.FW6Device.

Definition at line 152 of file DPDeviceUsb.cs.

override string csRepeat.FW6.DPDeviceUsb.DisplayConfiguration ( string strCommands ) [inline, virtual]

Implements csRepeat.FW6.FW6Device.

Definition at line 227 of file DPDeviceUsb.cs.

override bool csRepeat.FW6.DPDeviceUsb.GetConfiguration | ( | string | strCommands,
 |  | ref byte[] | readBuffer,
 |  | out uint | bytesRead
 | ) |  | [inline, virtual]

Implements csRepeat.FW6.FW6Device.

Definition at line 243 of file DPDeviceUsb.cs.

Here is the call graph for this function:

override string csRepeat.FW6.DPDeviceUsb.GetFullConfiguration | ( | bool | PC5_PRESENT,
 |  | int | DppType,
 |  | bool | isDP5_RevDxGains,
 |  | byte | DPP_ECO
 | ) |  | [inline, virtual]

Implements csRepeat.FW6.FW6Device.

Definition at line 193 of file DPDeviceUsb.cs.

Here is the call graph for this function:

override bool csRepeat.FW6.DPDeviceUsb.GetRawStatus | ( | ref byte[] | readBuffer,
 |  | out uint | bytesRead
 | ) |  | [inline, virtual]

Implements csRepeat.FW6.FW6Device.

Definition at line 157 of file DPDeviceUsb.cs.

Here is the call graph for this function:

override bool csRepeat.FW6.DPDeviceUsb.GetSpectrumData | ( | ref byte[] | readBuffer,
 |  | out uint | bytesRead
 | ) |  | [inline, virtual]

Implements csRepeat.FW6.FW6Device.

Definition at line 324 of file DPDeviceUsb.cs.

Here is the call graph for this function:

override bool csRepeat.FW6.DPDeviceUsb.PauseDppData ( ) [inline, virtual]

Implements csRepeat.FW6.FW6Device.

Definition at line 315 of file DPDeviceUsb.cs.

Here is the call graph for this function:

bool csRepeat.FW6.DPDeviceUsb.ReadData | ( | ref byte[] | readBuffer,
 |  | out uint | bytesRead
 | ) |  | [inline]

Definition at line 126 of file DPDeviceUsb.cs.

Here is the caller graph for this function:

override FW6Packet csRepeat.FW6.DPDeviceUsb.SendAndGetResponse | ( | FW6Packet | packetToSend,
 |  | int | timeoutMS
 | ) |  | [inline, protected, virtual]
Parameters:
packetToSend
timeoutMS
Returns:

Implements csRepeat.FW6.FW6Device.

Definition at line 522 of file DPDeviceUsb.cs.

override FW6Packet csRepeat.FW6.DPDeviceUsb.SendAndGetResponse | ( | FW6Packet | packetToSend,
 |  | int | delayBeforeReadMS,
 |  | int | timeoutMS
 | ) |  | [inline, protected, virtual]

Returns a packet if one was returned.

Implements csRepeat.FW6.FW6Device.

Definition at line 531 of file DPDeviceUsb.cs.

Here is the call graph for this function:

bool csRepeat.FW6.DPDeviceUsb.SendCommand ( FW6Packet packet ) [inline]
Parameters:
packet
Returns:
True if sending was successful, false if not

Definition at line 117 of file DPDeviceUsb.cs.

Here is the caller graph for this function:

override bool csRepeat.FW6.DPDeviceUsb.SendConfiguration ( string strCommands ) [inline, virtual]

Implements csRepeat.FW6.FW6Device.

Definition at line 283 of file DPDeviceUsb.cs.

Here is the call graph for this function:

override bool csRepeat.FW6.DPDeviceUsb.StartDppData ( ) [inline, virtual]

Implements csRepeat.FW6.FW6Device.

Definition at line 306 of file DPDeviceUsb.cs.

Here is the call graph for this function:

Property Documentation

override int csRepeat.FW6.DPDeviceUsb.DataPacketAckTimeoutMS [get, protected]

The maximum time to wait for an ack after sending a data packet.

Reimplemented from csRepeat.FW6.FW6Device.

Definition at line 62 of file DPDeviceUsb.cs.

override int csRepeat.FW6.DPDeviceUsb.mcaChannels [get, set]

Reimplemented from csRepeat.FW6.FW6Device.

Definition at line 71 of file DPDeviceUsb.cs.

The documentation for this class was generated from the following file:
  • FW6/DPDeviceUsb.cs
Generated on Fri Sep 22 2017 10:35:17 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: csRepeat.FW6.fpgaDataPacket Class Reference

  • csRepeat
  • FW6
  • fpgaDataPacket
Public Member Functions | Properties
csRepeat.FW6.fpgaDataPacket Class Reference
Inheritance diagram for csRepeat.FW6.fpgaDataPacket:
[legend]
Collaboration diagram for csRepeat.FW6.fpgaDataPacket:
[legend]

List of all members.

Public Member Functions

fpgaDataPacket (byte[] data)

Properties

override byte | PID1 [get]
override byte | PID2 [get]
override byte[] | Data [get]
Payload data.

Detailed Description

Definition at line 7 of file fpgaDataPacket.cs.

Constructor & Destructor Documentation

csRepeat.FW6.fpgaDataPacket.fpgaDataPacket ( byte[] data ) [inline]

Definition at line 25 of file fpgaDataPacket.cs.

Property Documentation

override byte [] csRepeat.FW6.fpgaDataPacket.Data [get]

Payload data.

Reimplemented from csRepeat.FW6.FW6Packet.

Definition at line 21 of file fpgaDataPacket.cs.

override byte csRepeat.FW6.fpgaDataPacket.PID1 [get]

Reimplemented from csRepeat.FW6.FW6Packet.

Definition at line 10 of file fpgaDataPacket.cs.

override byte csRepeat.FW6.fpgaDataPacket.PID2 [get]

Reimplemented from csRepeat.FW6.FW6Packet.

Definition at line 15 of file fpgaDataPacket.cs.

The documentation for this class was generated from the following file:
  • FW6/fpgaDataPacket.cs
Generated on Fri Sep 22 2017 10:35:17 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: csRepeat.FW6.fpgaDataPacketv2 Class Reference

  • csRepeat
  • FW6
  • fpgaDataPacketv2
Public Member Functions | Properties
csRepeat.FW6.fpgaDataPacketv2 Class Reference

v2 uC data packet, requires firmware newer than v6.06.04 More...

Inheritance diagram for csRepeat.FW6.fpgaDataPacketv2:
[legend]
Collaboration diagram for csRepeat.FW6.fpgaDataPacketv2:
[legend]

List of all members.

Public Member Functions

fpgaDataPacketv2 (byte[] data)

Properties

override byte | PID1 [get]
override byte | PID2 [get]
override byte[] | Data [get]
Payload data.

Detailed Description

v2 uC data packet, requires firmware newer than v6.06.04

Definition at line 10 of file fpgadatapacketv2.cs.

Constructor & Destructor Documentation

csRepeat.FW6.fpgaDataPacketv2.fpgaDataPacketv2 ( byte[] data ) [inline]

Definition at line 28 of file fpgadatapacketv2.cs.

Property Documentation

override byte [] csRepeat.FW6.fpgaDataPacketv2.Data [get]

Payload data.

Reimplemented from csRepeat.FW6.FW6Packet.

Definition at line 24 of file fpgadatapacketv2.cs.

override byte csRepeat.FW6.fpgaDataPacketv2.PID1 [get]

Reimplemented from csRepeat.FW6.FW6Packet.

Definition at line 13 of file fpgadatapacketv2.cs.

override byte csRepeat.FW6.fpgaDataPacketv2.PID2 [get]

Reimplemented from csRepeat.FW6.FW6Packet.

Definition at line 18 of file fpgadatapacketv2.cs.

The documentation for this class was generated from the following file:
  • FW6/fpgadatapacketv2.cs
Generated on Fri Sep 22 2017 10:35:17 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: csRepeat.FW6.FW6Device Class Reference

  • csRepeat
  • FW6
  • FW6Device
Public Member Functions | Protected Member Functions | Properties
csRepeat.FW6.FW6Device Class Reference
Inheritance diagram for csRepeat.FW6.FW6Device:
[legend]
Collaboration diagram for csRepeat.FW6.FW6Device:
[legend]

List of all members.

Public Member Functions

FW6Device (InterfaceTypes interfaceType, DeviceTypes deviceType, Version firmwareVersion, Version fpgaVersion, string serialNumber)
void | SetAdcCalibration (byte adcGain, byte adcOffset)
void | SetuCTemperatureCalibration (byte uCTempCalibration)
void | SetPZCorrection (byte pzCorrection)
void | SetDCalCalibration (ushort dcalValue)
abstract bool | ConnectForTesting ()
abstract void | DisconnectForTesting ()
abstract bool | StartDppData ()
abstract bool | PauseDppData ()
abstract bool | ClearDppData ()
abstract bool | GetConfiguration (string strCommands, ref byte[] readBuffer, out uint bytesRead)
abstract string | GetFullConfiguration (bool PC5_PRESENT, int DppType, bool isDP5_RevDxGains, byte DPP_ECO)
abstract string | DisplayConfiguration (string strCommands)
abstract bool | SendConfiguration (string strCommands)
abstract bool | GetRawStatus (ref byte[] readBuffer, out uint bytesRead)
abstract bool | GetSpectrumData (ref byte[] readBuffer, out uint bytesRead)

Protected Member Functions

abstract void | Connect ()
abstract void | Disconnect ()
AckResponse | SendAndWaitForAck (FW6Packet packetToSend, int timeoutMS)
Send a packet and get the response.
AckResponse | SendAndWaitForAck (FW6Packet packetToSend, int delayBeforeReadMS, int timeoutMS)
Send a packet and get the response.
abstract FW6Packet | SendAndGetResponse (FW6Packet packetToSend, int timeoutMS)
Send a command and read the response.
abstract FW6Packet | SendAndGetResponse (FW6Packet packetToSend, int delayBeforeReadMS, int timeoutMS)
Send a command, wait delayBeforeReadMS, and then attempt to read the response for timeoutMS.

Properties

abstract int | DataPacketAckTimeoutMS [get]
The maximum time to wait for an ack after sending a data packet.
abstract int | mcaChannels [get, set]
DiagnosticResponse | GetDiagnosticResponse [get]

Detailed Description

Definition at line 8 of file FW6Device.cs.

Constructor & Destructor Documentation

csRepeat.FW6.FW6Device.FW6Device | ( | InterfaceTypes | interfaceType,
 |  | DeviceTypes | deviceType,
 |  | Version | firmwareVersion,
 |  | Version | fpgaVersion,
 |  | string | serialNumber
 | ) |  | [inline]

Definition at line 77 of file FW6Device.cs.

Member Function Documentation

abstract bool csRepeat.FW6.FW6Device.ClearDppData ( ) [pure virtual]

Implemented in csRepeat.FW6.DPDeviceEthernet, csRepeat.FW6.DPDeviceUsb, and csRepeat.FW6.DPDeviceSerialFW6.

abstract void csRepeat.FW6.FW6Device.Connect ( ) [protected, pure virtual]

Implemented in csRepeat.FW6.DPDeviceUsb, csRepeat.FW6.DPDeviceSerialFW6, and csRepeat.FW6.DPDeviceEthernet.

abstract bool csRepeat.FW6.FW6Device.ConnectForTesting ( ) [pure virtual]

Implemented in csRepeat.FW6.DPDeviceEthernet, csRepeat.FW6.DPDeviceUsb, and csRepeat.FW6.DPDeviceSerialFW6.

abstract void csRepeat.FW6.FW6Device.Disconnect ( ) [protected, pure virtual]

Implemented in csRepeat.FW6.DPDeviceUsb, csRepeat.FW6.DPDeviceSerialFW6, and csRepeat.FW6.DPDeviceEthernet.

abstract void csRepeat.FW6.FW6Device.DisconnectForTesting ( ) [pure virtual]

Implemented in csRepeat.FW6.DPDeviceEthernet, csRepeat.FW6.DPDeviceUsb, and csRepeat.FW6.DPDeviceSerialFW6.

abstract string csRepeat.FW6.FW6Device.DisplayConfiguration ( string strCommands ) [pure virtual]

Implemented in csRepeat.FW6.DPDeviceEthernet, csRepeat.FW6.DPDeviceUsb, and csRepeat.FW6.DPDeviceSerialFW6.

abstract bool csRepeat.FW6.FW6Device.GetConfiguration | ( | string | strCommands,
 |  | ref byte[] | readBuffer,
 |  | out uint | bytesRead
 | ) |  | [pure virtual]

Implemented in csRepeat.FW6.DPDeviceEthernet, csRepeat.FW6.DPDeviceUsb, and csRepeat.FW6.DPDeviceSerialFW6.

abstract string csRepeat.FW6.FW6Device.GetFullConfiguration | ( | bool | PC5_PRESENT,
 |  | int | DppType,
 |  | bool | isDP5_RevDxGains,
 |  | byte | DPP_ECO
 | ) |  | [pure virtual]

Implemented in csRepeat.FW6.DPDeviceEthernet, csRepeat.FW6.DPDeviceUsb, and csRepeat.FW6.DPDeviceSerialFW6.

abstract bool csRepeat.FW6.FW6Device.GetRawStatus | ( | ref byte[] | readBuffer,
 |  | out uint | bytesRead
 | ) |  | [pure virtual]

Implemented in csRepeat.FW6.DPDeviceEthernet, csRepeat.FW6.DPDeviceUsb, and csRepeat.FW6.DPDeviceSerialFW6.

abstract bool csRepeat.FW6.FW6Device.GetSpectrumData | ( | ref byte[] | readBuffer,
 |  | out uint | bytesRead
 | ) |  | [pure virtual]

Implemented in csRepeat.FW6.DPDeviceEthernet, csRepeat.FW6.DPDeviceUsb, and csRepeat.FW6.DPDeviceSerialFW6.

abstract bool csRepeat.FW6.FW6Device.PauseDppData ( ) [pure virtual]

Implemented in csRepeat.FW6.DPDeviceEthernet, csRepeat.FW6.DPDeviceUsb, and csRepeat.FW6.DPDeviceSerialFW6.

abstract FW6Packet csRepeat.FW6.FW6Device.SendAndGetResponse | ( | FW6Packet | packetToSend,
 |  | int | timeoutMS
 | ) |  | [protected, pure virtual]

Send a command and read the response.

Parameters:
packetToSend
timeoutMS
Returns:

Implemented in csRepeat.FW6.DPDeviceUsb, csRepeat.FW6.DPDeviceSerialFW6, and csRepeat.FW6.DPDeviceEthernet.

abstract FW6Packet csRepeat.FW6.FW6Device.SendAndGetResponse | ( | FW6Packet | packetToSend,
 |  | int | delayBeforeReadMS,
 |  | int | timeoutMS
 | ) |  | [protected, pure virtual]

Send a command, wait delayBeforeReadMS, and then attempt to read the response for timeoutMS.

Parameters:
packetToSend
delayBeforeReadMS
timeoutMS
Returns:

Implemented in csRepeat.FW6.DPDeviceUsb, csRepeat.FW6.DPDeviceSerialFW6, and csRepeat.FW6.DPDeviceEthernet.

AckResponse csRepeat.FW6.FW6Device.SendAndWaitForAck | ( | FW6Packet | packetToSend,
 |  | int | timeoutMS
 | ) |  | [inline, protected]

Send a packet and get the response.

Parameters:
packetToSend
timeoutMS
Returns:

Definition at line 20 of file FW6Device.cs.

AckResponse csRepeat.FW6.FW6Device.SendAndWaitForAck | ( | FW6Packet | packetToSend,
 |  | int | delayBeforeReadMS,
 |  | int | timeoutMS
 | ) |  | [inline, protected]

Send a packet and get the response.

Parameters:
packetToSend
timeoutMS
Returns:

Definition at line 32 of file FW6Device.cs.

abstract bool csRepeat.FW6.FW6Device.SendConfiguration ( string strCommands ) [pure virtual]

Implemented in csRepeat.FW6.DPDeviceEthernet, csRepeat.FW6.DPDeviceUsb, and csRepeat.FW6.DPDeviceSerialFW6.

void csRepeat.FW6.FW6Device.SetAdcCalibration | ( | byte | adcGain,
 |  | byte | adcOffset
 | ) |  | [inline]

Definition at line 141 of file FW6Device.cs.

void csRepeat.FW6.FW6Device.SetDCalCalibration ( ushort dcalValue ) [inline]

Definition at line 207 of file FW6Device.cs.

void csRepeat.FW6.FW6Device.SetPZCorrection ( byte pzCorrection ) [inline]

Definition at line 185 of file FW6Device.cs.

void csRepeat.FW6.FW6Device.SetuCTemperatureCalibration ( byte uCTempCalibration ) [inline]

Definition at line 163 of file FW6Device.cs.

abstract bool csRepeat.FW6.FW6Device.StartDppData ( ) [pure virtual]

Implemented in csRepeat.FW6.DPDeviceEthernet, csRepeat.FW6.DPDeviceUsb, and csRepeat.FW6.DPDeviceSerialFW6.

Property Documentation

abstract int csRepeat.FW6.FW6Device.DataPacketAckTimeoutMS [get, protected]

The maximum time to wait for an ack after sending a data packet.

Reimplemented in csRepeat.FW6.DPDeviceUsb, csRepeat.FW6.DPDeviceSerialFW6, and csRepeat.FW6.DPDeviceEthernet.

Definition at line 67 of file FW6Device.cs.

DiagnosticResponse csRepeat.FW6.FW6Device.GetDiagnosticResponse [get]

Definition at line 113 of file FW6Device.cs.

abstract int csRepeat.FW6.FW6Device.mcaChannels [get, set]

Reimplemented in csRepeat.FW6.DPDeviceEthernet, csRepeat.FW6.DPDeviceUsb, and csRepeat.FW6.DPDeviceSerialFW6.

Definition at line 72 of file FW6Device.cs.

The documentation for this class was generated from the following file:
  • FW6/FW6Device.cs
Generated on Fri Sep 22 2017 10:35:17 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: csRepeat.FW6.FW6Packet Class Reference

  • csRepeat
  • FW6
  • FW6Packet
Public Member Functions | Static Public Member Functions | Public Attributes | Properties
csRepeat.FW6.FW6Packet Class Reference

Packet layout looks like: [SYNC1][SYNC2][PID1][PID2][LEN1][LEN2][data bytes, length][CHECKSUM MSB][CHECKSUM LSB]. More...

Inheritance diagram for csRepeat.FW6.FW6Packet:
[legend]

List of all members.

Public Member Functions

override string | ToString ()

Static Public Member Functions

static UInt16 | Calculate16bitChecksum (byte[] array, int length)

Public Attributes

const int | PID1Offset = 2
Offset from the start of the packet.
const int | PID2Offset = 3
Offset from the start of the packet.
const int | PacketHeaderLength = 2 + 2 + 2
Bytes in the header of the packet.
const int | ChecksumLength = 2
Trailing checksum bytes.

Properties

abstract byte | PID1 [get]
abstract byte | PID2 [get]
abstract byte[] | Data [get]
Payload data.
byte | SYNC1 [get]
byte | SYNC2 [get]
byte[] | EncodedPacket [get]

Detailed Description

Packet layout looks like: [SYNC1][SYNC2][PID1][PID2][LEN1][LEN2][data bytes, length][CHECKSUM MSB][CHECKSUM LSB].

Length is the number of 'Data bytes', and does not include the header or checksum bytes

Definition at line 14 of file FW6Packet.cs.

Member Function Documentation

static UInt16 csRepeat.FW6.FW6Packet.Calculate16bitChecksum | ( | byte[] | array,
 |  | int | length
 | ) |  | [inline, static]

Definition at line 36 of file FW6Packet.cs.

Here is the caller graph for this function:

override string csRepeat.FW6.FW6Packet.ToString ( ) [inline]

Definition at line 126 of file FW6Packet.cs.

Here is the caller graph for this function:

Member Data Documentation

const int csRepeat.FW6.FW6Packet.ChecksumLength = 2

Trailing checksum bytes.

Definition at line 34 of file FW6Packet.cs.

const int csRepeat.FW6.FW6Packet.PacketHeaderLength = 2 + 2 + 2

Bytes in the header of the packet.

Definition at line 29 of file FW6Packet.cs.

const int csRepeat.FW6.FW6Packet.PID1Offset = 2

Offset from the start of the packet.

Definition at line 19 of file FW6Packet.cs.

const int csRepeat.FW6.FW6Packet.PID2Offset = 3

Offset from the start of the packet.

Definition at line 24 of file FW6Packet.cs.

Property Documentation

abstract byte [] csRepeat.FW6.FW6Packet.Data [get]

Payload data.

Reimplemented in csRepeat.FW6.DisableMCA, csRepeat.FW6.EnableMCA, csRepeat.FW6.StatusResponse, csRepeat.FW6.AckResponse, csRepeat.FW6.ClearSpectrum, csRepeat.FW6.SpectrumResponse, csRepeat.FW6.SpectrumRequest, csRepeat.FW6.SetADCCalibrationRequest, csRepeat.FW6.SetDCalRequest, csRepeat.FW6.SetPZCorrectionRequest, csRepeat.FW6.SetuCTemperatureCalibrationRequest, csRepeat.FW6.ConfigurationResponse, csRepeat.FW6.StatusRequest, csRepeat.FW6.uCSwitchToImage, csRepeat.FW6.Configuration, csRepeat.FW6.ConfigurationReadback, csRepeat.FW6.fpgaDataPacketv2, csRepeat.FW6.uCDataPacketv2, csRepeat.FW6.fpgaDataPacket, csRepeat.FW6.uCDataPacket, csRepeat.FW6.DiagnosticRequest, csRepeat.FW6.StartFpgaUpload, csRepeat.FW6.StartUCUpload, and csRepeat.FW6.DiagnosticResponse.

Definition at line 62 of file FW6Packet.cs.

byte [] csRepeat.FW6.FW6Packet.EncodedPacket [get]

Definition at line 83 of file FW6Packet.cs.

abstract byte csRepeat.FW6.FW6Packet.PID1 [get]

Reimplemented in csRepeat.FW6.DisableMCA, csRepeat.FW6.DiagnosticResponse, csRepeat.FW6.EnableMCA, csRepeat.FW6.StatusResponse, csRepeat.FW6.ClearSpectrum, csRepeat.FW6.SpectrumResponse, csRepeat.FW6.DiagnosticRequest, csRepeat.FW6.StartUCUpload, csRepeat.FW6.SpectrumRequest, csRepeat.FW6.SetADCCalibrationRequest, csRepeat.FW6.StartFpgaUpload, csRepeat.FW6.SetDCalRequest, csRepeat.FW6.SetPZCorrectionRequest, csRepeat.FW6.SetuCTemperatureCalibrationRequest, csRepeat.FW6.AckResponse, csRepeat.FW6.ConfigurationResponse, csRepeat.FW6.StatusRequest, csRepeat.FW6.Configuration, csRepeat.FW6.ConfigurationReadback, csRepeat.FW6.fpgaDataPacketv2, csRepeat.FW6.uCDataPacketv2, csRepeat.FW6.uCSwitchToImage, csRepeat.FW6.fpgaDataPacket, and csRepeat.FW6.uCDataPacket.

Definition at line 49 of file FW6Packet.cs.

abstract byte csRepeat.FW6.FW6Packet.PID2 [get]

Reimplemented in csRepeat.FW6.DisableMCA, csRepeat.FW6.DiagnosticResponse, csRepeat.FW6.EnableMCA, csRepeat.FW6.StatusResponse, csRepeat.FW6.ClearSpectrum, csRepeat.FW6.SpectrumResponse, csRepeat.FW6.DiagnosticRequest, csRepeat.FW6.SpectrumRequest, csRepeat.FW6.StartUCUpload, csRepeat.FW6.SetADCCalibrationRequest, csRepeat.FW6.SetDCalRequest, csRepeat.FW6.SetPZCorrectionRequest, csRepeat.FW6.SetuCTemperatureCalibrationRequest, csRepeat.FW6.StartFpgaUpload, csRepeat.FW6.StatusRequest, csRepeat.FW6.AckResponse, csRepeat.FW6.ConfigurationResponse, csRepeat.FW6.uCSwitchToImage, csRepeat.FW6.Configuration, csRepeat.FW6.ConfigurationReadback, csRepeat.FW6.fpgaDataPacketv2, csRepeat.FW6.uCDataPacketv2, csRepeat.FW6.fpgaDataPacket, and csRepeat.FW6.uCDataPacket.

Definition at line 54 of file FW6Packet.cs.

byte csRepeat.FW6.FW6Packet.SYNC1 [get]

Definition at line 67 of file FW6Packet.cs.

byte csRepeat.FW6.FW6Packet.SYNC2 [get]

Definition at line 75 of file FW6Packet.cs.

The documentation for this class was generated from the following file:
  • FW6/FW6Packet.cs
Generated on Fri Sep 22 2017 10:35:17 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: csRepeat.FW6.FW6PacketParser Class Reference

  • csRepeat
  • FW6
  • FW6PacketParser
Public Types | Public Member Functions
csRepeat.FW6.FW6PacketParser Class Reference

List of all members.

Public Types

enum HandleStates {
NeedMoreData, CommandComplete,
InvalidChecksum
}

Public Member Functions

FW6PacketParser ()
FW6Packet HandleBytes (out HandleStates state, byte[] data, int dataLength)

Detailed Description

Definition at line 8 of file FW6PacketParser.cs.

Member Enumeration Documentation

enum csRepeat::FW6::FW6PacketParser::HandleStates
Enumerator:
NeedMoreData
CommandComplete
InvalidChecksum

Definition at line 13 of file FW6PacketParser.cs.

Constructor & Destructor Documentation

csRepeat.FW6.FW6PacketParser.FW6PacketParser ( ) [inline]

Definition at line 23 of file FW6PacketParser.cs.

Member Function Documentation

FW6Packet csRepeat.FW6.FW6PacketParser.HandleBytes | ( | out HandleStates | state,
 |  | byte[] | data,
 |  | int | dataLength
 | ) |  | [inline]

Definition at line 29 of file FW6PacketParser.cs.

Here is the call graph for this function:

Here is the caller graph for this function:

The documentation for this class was generated from the following file:
  • FW6/FW6PacketParser.cs
Generated on Fri Sep 22 2017 10:35:17 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: csRepeat.FW6.SetADCCalibrationRequest Class Reference

  • csRepeat
  • FW6
  • SetADCCalibrationRequest
Public Member Functions | Properties
csRepeat.FW6.SetADCCalibrationRequest Class Reference
Inheritance diagram for csRepeat.FW6.SetADCCalibrationRequest:
[legend]
Collaboration diagram for csRepeat.FW6.SetADCCalibrationRequest:
[legend]

List of all members.

Public Member Functions

SetADCCalibrationRequest (byte adcGain, byte adcOffset)

Properties

override byte | PID1 [get]
override byte | PID2 [get]
override byte[] | Data [get]
Payload data.

Detailed Description

Definition at line 7 of file SetADCCalibrationRequest.cs.

Constructor & Destructor Documentation

csRepeat.FW6.SetADCCalibrationRequest.SetADCCalibrationRequest | ( | byte | adcGain,
 |  | byte | adcOffset
 | ) |  | [inline]

Definition at line 12 of file SetADCCalibrationRequest.cs.

Property Documentation

override byte [] csRepeat.FW6.SetADCCalibrationRequest.Data [get]

Payload data.

Reimplemented from csRepeat.FW6.FW6Packet.

Definition at line 35 of file SetADCCalibrationRequest.cs.

override byte csRepeat.FW6.SetADCCalibrationRequest.PID1 [get]

Reimplemented from csRepeat.FW6.FW6Packet.

Definition at line 19 of file SetADCCalibrationRequest.cs.

override byte csRepeat.FW6.SetADCCalibrationRequest.PID2 [get]

Reimplemented from csRepeat.FW6.FW6Packet.

Definition at line 27 of file SetADCCalibrationRequest.cs.

The documentation for this class was generated from the following file:
  • FW6/SetADCCalibrationRequest.cs
Generated on Fri Sep 22 2017 10:35:17 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: csRepeat.FW6.SetDCalRequest Class Reference

  • csRepeat
  • FW6
  • SetDCalRequest
Public Member Functions | Properties
csRepeat.FW6.SetDCalRequest Class Reference
Inheritance diagram for csRepeat.FW6.SetDCalRequest:
[legend]
Collaboration diagram for csRepeat.FW6.SetDCalRequest:
[legend]

List of all members.

Public Member Functions

SetDCalRequest (ushort dcalValue)

Properties

override byte | PID1 [get]
override byte | PID2 [get]
override byte[] | Data [get]
Payload data.

Detailed Description

Definition at line 7 of file SetDCalRequest.cs.

Constructor & Destructor Documentation

csRepeat.FW6.SetDCalRequest.SetDCalRequest ( ushort dcalValue ) [inline]

Definition at line 11 of file SetDCalRequest.cs.

Property Documentation

override byte [] csRepeat.FW6.SetDCalRequest.Data [get]

Payload data.

Reimplemented from csRepeat.FW6.FW6Packet.

Definition at line 33 of file SetDCalRequest.cs.

override byte csRepeat.FW6.SetDCalRequest.PID1 [get]

Reimplemented from csRepeat.FW6.FW6Packet.

Definition at line 17 of file SetDCalRequest.cs.

override byte csRepeat.FW6.SetDCalRequest.PID2 [get]

Reimplemented from csRepeat.FW6.FW6Packet.

Definition at line 25 of file SetDCalRequest.cs.

The documentation for this class was generated from the following file:
  • FW6/SetDCalRequest.cs
Generated on Fri Sep 22 2017 10:35:17 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: csRepeat.FW6.SetPZCorrectionRequest Class Reference

  • csRepeat
  • FW6
  • SetPZCorrectionRequest
Public Member Functions | Properties
csRepeat.FW6.SetPZCorrectionRequest Class Reference
Inheritance diagram for csRepeat.FW6.SetPZCorrectionRequest:
[legend]
Collaboration diagram for csRepeat.FW6.SetPZCorrectionRequest:
[legend]

List of all members.

Public Member Functions

SetPZCorrectionRequest (byte pzCorrection)

Properties

override byte | PID1 [get]
override byte | PID2 [get]
override byte[] | Data [get]
Payload data.

Detailed Description

Definition at line 7 of file SetPZCorrectionRequest.cs.

Constructor & Destructor Documentation

csRepeat.FW6.SetPZCorrectionRequest.SetPZCorrectionRequest ( byte pzCorrection ) [inline]

Definition at line 11 of file SetPZCorrectionRequest.cs.

Property Documentation

override byte [] csRepeat.FW6.SetPZCorrectionRequest.Data [get]

Payload data.

Reimplemented from csRepeat.FW6.FW6Packet.

Definition at line 33 of file SetPZCorrectionRequest.cs.

override byte csRepeat.FW6.SetPZCorrectionRequest.PID1 [get]

Reimplemented from csRepeat.FW6.FW6Packet.

Definition at line 17 of file SetPZCorrectionRequest.cs.

override byte csRepeat.FW6.SetPZCorrectionRequest.PID2 [get]

Reimplemented from csRepeat.FW6.FW6Packet.

Definition at line 25 of file SetPZCorrectionRequest.cs.

The documentation for this class was generated from the following file:
  • FW6/SetPZCorrectionRequest.cs
Generated on Fri Sep 22 2017 10:35:17 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: csRepeat.FW6.SetuCTemperatureCalibrationRequest Class Reference

  • csRepeat
  • FW6
  • SetuCTemperatureCalibrationRequest
Public Member Functions | Properties
csRepeat.FW6.SetuCTemperatureCalibrationRequest Class Reference
Inheritance diagram for csRepeat.FW6.SetuCTemperatureCalibrationRequest:
[legend]
Collaboration diagram for csRepeat.FW6.SetuCTemperatureCalibrationRequest:
[legend]

List of all members.

Public Member Functions

SetuCTemperatureCalibrationRequest (byte uCTempCalibration)

Properties

override byte | PID1 [get]
override byte | PID2 [get]
override byte[] | Data [get]
Payload data.

Detailed Description

Definition at line 7 of file SetuCTemperatureCalibrationRequest.cs.

Constructor & Destructor Documentation

csRepeat.FW6.SetuCTemperatureCalibrationRequest.SetuCTemperatureCalibrationRequest ( byte uCTempCalibration ) [inline]

Definition at line 11 of file SetuCTemperatureCalibrationRequest.cs.

Property Documentation

override byte [] csRepeat.FW6.SetuCTemperatureCalibrationRequest.Data [get]

Payload data.

Reimplemented from csRepeat.FW6.FW6Packet.

Definition at line 33 of file SetuCTemperatureCalibrationRequest.cs.

override byte csRepeat.FW6.SetuCTemperatureCalibrationRequest.PID1 [get]

Reimplemented from csRepeat.FW6.FW6Packet.

Definition at line 17 of file SetuCTemperatureCalibrationRequest.cs.

override byte csRepeat.FW6.SetuCTemperatureCalibrationRequest.PID2 [get]

Reimplemented from csRepeat.FW6.FW6Packet.

Definition at line 25 of file SetuCTemperatureCalibrationRequest.cs.

The documentation for this class was generated from the following file:
  • FW6/SetuCTemperatureCalibrationRequest.cs
Generated on Fri Sep 22 2017 10:35:17 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: csRepeat.FW6.SpectrumRequest Class Reference

  • csRepeat
  • FW6
  • SpectrumRequest
Public Member Functions | Properties
csRepeat.FW6.SpectrumRequest Class Reference

Request device spectrum data. More...

Inheritance diagram for csRepeat.FW6.SpectrumRequest:
[legend]
Collaboration diagram for csRepeat.FW6.SpectrumRequest:
[legend]

List of all members.

Public Member Functions

SpectrumRequest ()

Properties

override byte | PID1 [get]
PID1.
override byte | PID2 [get]
PID2.
override byte[] | Data [get]
Packet data.

Detailed Description

Request device spectrum data.

Definition at line 10 of file SpectrumRequest.cs.

Constructor & Destructor Documentation

csRepeat.FW6.SpectrumRequest.SpectrumRequest ( ) [inline]

Definition at line 12 of file SpectrumRequest.cs.

Here is the caller graph for this function:

Property Documentation

override byte [] csRepeat.FW6.SpectrumRequest.Data [get]

Packet data.

Reimplemented from csRepeat.FW6.FW6Packet.

Definition at line 42 of file SpectrumRequest.cs.

override byte csRepeat.FW6.SpectrumRequest.PID1 [get]

PID1.

Reimplemented from csRepeat.FW6.FW6Packet.

Definition at line 20 of file SpectrumRequest.cs.

override byte csRepeat.FW6.SpectrumRequest.PID2 [get]

PID2.

Reimplemented from csRepeat.FW6.FW6Packet.

Definition at line 31 of file SpectrumRequest.cs.

The documentation for this class was generated from the following file:
  • FW6/SpectrumRequest.cs
Generated on Fri Sep 22 2017 10:35:17 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: csRepeat.FW6.SpectrumResponse Class Reference

  • csRepeat
  • FW6
  • SpectrumResponse
Public Types | Public Member Functions | Static Public Member Functions | Properties
csRepeat.FW6.SpectrumResponse Class Reference

Encompases the several kinds of spectrum responses that can be returned from a spectrum request NOTE: The spectrum responses with status are handled elsewhere as they have a status field that the responses handled here do not have. More...

Inheritance diagram for csRepeat.FW6.SpectrumResponse:
[legend]
Collaboration diagram for csRepeat.FW6.SpectrumResponse:
[legend]

List of all members.

Public Types

enum SpectrumResponseTypePids {
Channel256Spectrum = 0x01, Channel512Spectrum = 0x3,
Channel1024Spectrum = 0x5, Channel2048Spectrum = 0x7,
Channel4096Spectrum = 0x9, Channel8192Spectrum = 0xB
}
The possible spectrum responses NOTE: The type is a single byte thats why it is defined as 'byte'. More...

Public Member Functions

SpectrumResponse (byte[] packetContent)

Static Public Member Functions

static bool | IsMatch (byte pid1, byte pid2)

Properties

override byte | PID1 [get]
override byte | PID2 [get]
See SpectrumResponseTypePids as this command maps to multiple responses.
override byte[] | Data [get]
Payload data.

Detailed Description

Encompases the several kinds of spectrum responses that can be returned from a spectrum request NOTE: The spectrum responses with status are handled elsewhere as they have a status field that the responses handled here do not have.

Definition at line 12 of file SpectrumResponse.cs.

Member Enumeration Documentation

enum csRepeat::FW6::SpectrumResponse::SpectrumResponseTypePids

The possible spectrum responses NOTE: The type is a single byte thats why it is defined as 'byte'.

Enumerator:
Channel256Spectrum
Channel512Spectrum
Channel1024Spectrum
Channel2048Spectrum
Channel4096Spectrum
Channel8192Spectrum

Definition at line 22 of file SpectrumResponse.cs.

Constructor & Destructor Documentation

csRepeat.FW6.SpectrumResponse.SpectrumResponse ( byte[] packetContent ) [inline]

Definition at line 61 of file SpectrumResponse.cs.

Member Function Documentation

static bool csRepeat.FW6.SpectrumResponse.IsMatch | ( | byte | pid1,
 |  | byte | pid2
 | ) |  | [inline, static]

Definition at line 66 of file SpectrumResponse.cs.

Here is the caller graph for this function:

Property Documentation

override byte [] csRepeat.FW6.SpectrumResponse.Data [get]

Payload data.

Reimplemented from csRepeat.FW6.FW6Packet.

Definition at line 52 of file SpectrumResponse.cs.

override byte csRepeat.FW6.SpectrumResponse.PID1 [get]

Reimplemented from csRepeat.FW6.FW6Packet.

Definition at line 33 of file SpectrumResponse.cs.

override byte csRepeat.FW6.SpectrumResponse.PID2 [get]

See SpectrumResponseTypePids as this command maps to multiple responses.

Reimplemented from csRepeat.FW6.FW6Packet.

Definition at line 42 of file SpectrumResponse.cs.

The documentation for this class was generated from the following file:
  • FW6/SpectrumResponse.cs
Generated on Fri Sep 22 2017 10:35:17 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: csRepeat.FW6.StartFpgaUpload Class Reference

  • csRepeat
  • FW6
  • StartFpgaUpload
Properties
csRepeat.FW6.StartFpgaUpload Class Reference
Inheritance diagram for csRepeat.FW6.StartFpgaUpload:
[legend]
Collaboration diagram for csRepeat.FW6.StartFpgaUpload:
[legend]

List of all members.

Properties

override byte[] | Data [get]
Payload data.
override byte | PID1 [get]
override byte | PID2 [get]

Detailed Description

Definition at line 7 of file StartFpgaUpload.cs.

Property Documentation

override byte [] csRepeat.FW6.StartFpgaUpload.Data [get]

Payload data.

Reimplemented from csRepeat.FW6.FW6Packet.

Definition at line 10 of file StartFpgaUpload.cs.

override byte csRepeat.FW6.StartFpgaUpload.PID1 [get]

Reimplemented from csRepeat.FW6.FW6Packet.

Definition at line 21 of file StartFpgaUpload.cs.

override byte csRepeat.FW6.StartFpgaUpload.PID2 [get]

Reimplemented from csRepeat.FW6.FW6Packet.

Definition at line 26 of file StartFpgaUpload.cs.

The documentation for this class was generated from the following file:
  • FW6/StartFpgaUpload.cs
Generated on Fri Sep 22 2017 10:35:17 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: csRepeat.FW6.StartUCUpload Class Reference

  • csRepeat
  • FW6
  • StartUCUpload
Properties
csRepeat.FW6.StartUCUpload Class Reference
Inheritance diagram for csRepeat.FW6.StartUCUpload:
[legend]
Collaboration diagram for csRepeat.FW6.StartUCUpload:
[legend]

List of all members.

Properties

override byte[] | Data [get]
Payload data.
override byte | PID1 [get]
Start uC upload.
override byte | PID2 [get]
Erase image #1 (sector 5)

Detailed Description

Definition at line 7 of file StartUCUpload.cs.

Property Documentation

override byte [] csRepeat.FW6.StartUCUpload.Data [get]

Payload data.

Reimplemented from csRepeat.FW6.FW6Packet.

Definition at line 10 of file StartUCUpload.cs.

override byte csRepeat.FW6.StartUCUpload.PID1 [get]

Start uC upload.

Reimplemented from csRepeat.FW6.FW6Packet.

Definition at line 24 of file StartUCUpload.cs.

override byte csRepeat.FW6.StartUCUpload.PID2 [get]

Erase image #1 (sector 5)

Reimplemented from csRepeat.FW6.FW6Packet.

Definition at line 32 of file StartUCUpload.cs.

The documentation for this class was generated from the following file:
  • FW6/StartUCUpload.cs
Generated on Fri Sep 22 2017 10:35:17 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: csRepeat.FW6.StatusRequest Class Reference

  • csRepeat
  • FW6
  • StatusRequest
Public Member Functions | Properties
csRepeat.FW6.StatusRequest Class Reference
Inheritance diagram for csRepeat.FW6.StatusRequest:
[legend]
Collaboration diagram for csRepeat.FW6.StatusRequest:
[legend]

List of all members.

Public Member Functions

StatusRequest ()

Properties

override byte | PID1 [get]
override byte | PID2 [get]
override byte[] | Data [get]
Payload data.

Detailed Description

Definition at line 7 of file StatusRequest.cs.

Constructor & Destructor Documentation

csRepeat.FW6.StatusRequest.StatusRequest ( ) [inline]

Definition at line 9 of file StatusRequest.cs.

Here is the caller graph for this function:

Property Documentation

override byte [] csRepeat.FW6.StatusRequest.Data [get]

Payload data.

Reimplemented from csRepeat.FW6.FW6Packet.

Definition at line 30 of file StatusRequest.cs.

override byte csRepeat.FW6.StatusRequest.PID1 [get]

Reimplemented from csRepeat.FW6.FW6Packet.

Definition at line 14 of file StatusRequest.cs.

override byte csRepeat.FW6.StatusRequest.PID2 [get]

Reimplemented from csRepeat.FW6.FW6Packet.

Definition at line 22 of file StatusRequest.cs.

The documentation for this class was generated from the following file:
  • FW6/StatusRequest.cs
Generated on Fri Sep 22 2017 10:35:17 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: csRepeat.FW6.ClearSpectrum Class Reference

  • csRepeat
  • FW6
  • ClearSpectrum
Public Member Functions | Properties
csRepeat.FW6.ClearSpectrum Class Reference
Inheritance diagram for csRepeat.FW6.ClearSpectrum:
[legend]
Collaboration diagram for csRepeat.FW6.ClearSpectrum:
[legend]

List of all members.

Public Member Functions

ClearSpectrum ()

Properties

override byte | PID1 [get]
override byte | PID2 [get]
override byte[] | Data [get]
Payload data.

Detailed Description

Definition at line 38 of file StatusRequest.cs.

Constructor & Destructor Documentation

csRepeat.FW6.ClearSpectrum.ClearSpectrum ( ) [inline]

Definition at line 40 of file StatusRequest.cs.

Here is the caller graph for this function:

Property Documentation

override byte [] csRepeat.FW6.ClearSpectrum.Data [get]

Payload data.

Reimplemented from csRepeat.FW6.FW6Packet.

Definition at line 61 of file StatusRequest.cs.

override byte csRepeat.FW6.ClearSpectrum.PID1 [get]

Reimplemented from csRepeat.FW6.FW6Packet.

Definition at line 45 of file StatusRequest.cs.

override byte csRepeat.FW6.ClearSpectrum.PID2 [get]

Reimplemented from csRepeat.FW6.FW6Packet.

Definition at line 53 of file StatusRequest.cs.

The documentation for this class was generated from the following file:
  • FW6/StatusRequest.cs
Generated on Fri Sep 22 2017 10:35:17 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: csRepeat.FW6.EnableMCA Class Reference

  • csRepeat
  • FW6
  • EnableMCA
Public Member Functions | Properties
csRepeat.FW6.EnableMCA Class Reference
Inheritance diagram for csRepeat.FW6.EnableMCA:
[legend]
Collaboration diagram for csRepeat.FW6.EnableMCA:
[legend]

List of all members.

Public Member Functions

EnableMCA ()

Properties

override byte | PID1 [get]
override byte | PID2 [get]
override byte[] | Data [get]
Payload data.

Detailed Description

Definition at line 69 of file StatusRequest.cs.

Constructor & Destructor Documentation

csRepeat.FW6.EnableMCA.EnableMCA ( ) [inline]

Definition at line 71 of file StatusRequest.cs.

Here is the caller graph for this function:

Property Documentation

override byte [] csRepeat.FW6.EnableMCA.Data [get]

Payload data.

Reimplemented from csRepeat.FW6.FW6Packet.

Definition at line 92 of file StatusRequest.cs.

override byte csRepeat.FW6.EnableMCA.PID1 [get]

Reimplemented from csRepeat.FW6.FW6Packet.

Definition at line 76 of file StatusRequest.cs.

override byte csRepeat.FW6.EnableMCA.PID2 [get]

Reimplemented from csRepeat.FW6.FW6Packet.

Definition at line 84 of file StatusRequest.cs.

The documentation for this class was generated from the following file:
  • FW6/StatusRequest.cs
Generated on Fri Sep 22 2017 10:35:17 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: csRepeat.FW6.DisableMCA Class Reference

  • csRepeat
  • FW6
  • DisableMCA
Public Member Functions | Properties
csRepeat.FW6.DisableMCA Class Reference
Inheritance diagram for csRepeat.FW6.DisableMCA:
[legend]
Collaboration diagram for csRepeat.FW6.DisableMCA:
[legend]

List of all members.

Public Member Functions

DisableMCA ()

Properties

override byte | PID1 [get]
override byte | PID2 [get]
override byte[] | Data [get]
Payload data.

Detailed Description

Definition at line 100 of file StatusRequest.cs.

Constructor & Destructor Documentation

csRepeat.FW6.DisableMCA.DisableMCA ( ) [inline]

Definition at line 102 of file StatusRequest.cs.

Here is the caller graph for this function:

Property Documentation

override byte [] csRepeat.FW6.DisableMCA.Data [get]

Payload data.

Reimplemented from csRepeat.FW6.FW6Packet.

Definition at line 123 of file StatusRequest.cs.

override byte csRepeat.FW6.DisableMCA.PID1 [get]

Reimplemented from csRepeat.FW6.FW6Packet.

Definition at line 107 of file StatusRequest.cs.

override byte csRepeat.FW6.DisableMCA.PID2 [get]

Reimplemented from csRepeat.FW6.FW6Packet.

Definition at line 115 of file StatusRequest.cs.

The documentation for this class was generated from the following file:
  • FW6/StatusRequest.cs
Generated on Fri Sep 22 2017 10:35:17 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: csRepeat.FW6.StatusResponse Class Reference

  • csRepeat
  • FW6
  • StatusResponse
Public Member Functions | Static Public Member Functions | Properties
csRepeat.FW6.StatusResponse Class Reference
Inheritance diagram for csRepeat.FW6.StatusResponse:
[legend]
Collaboration diagram for csRepeat.FW6.StatusResponse:
[legend]

List of all members.

Public Member Functions

StatusResponse (byte[] packetContent)

Static Public Member Functions

static bool | IsMatch (byte pid1, byte pid2)

Properties

int | FwVersionMajor [get]
int | FwVersionMinor [get]
int | FwBuildNumber [get]
int | FpgaVersionMajor [get]
int | FpgaVersionMinor [get]
uint | SerialNumber [get]
DeviceTypes | DeviceType [get]
override byte | PID1 [get]
override byte | PID2 [get]
override byte[] | Data [get]
Payload data.

Detailed Description

Definition at line 8 of file StatusResponse.cs.

Constructor & Destructor Documentation

csRepeat.FW6.StatusResponse.StatusResponse ( byte[] packetContent ) [inline]

Definition at line 96 of file StatusResponse.cs.

Member Function Documentation

static bool csRepeat.FW6.StatusResponse.IsMatch | ( | byte | pid1,
 |  | byte | pid2
 | ) |  | [inline, static]

Definition at line 101 of file StatusResponse.cs.

Here is the caller graph for this function:

Property Documentation

override byte [] csRepeat.FW6.StatusResponse.Data [get]

Payload data.

Reimplemented from csRepeat.FW6.FW6Packet.

Definition at line 87 of file StatusResponse.cs.

DeviceTypes csRepeat.FW6.StatusResponse.DeviceType [get]

Definition at line 66 of file StatusResponse.cs.

int csRepeat.FW6.StatusResponse.FpgaVersionMajor [get]

Definition at line 40 of file StatusResponse.cs.

int csRepeat.FW6.StatusResponse.FpgaVersionMinor [get]

Definition at line 48 of file StatusResponse.cs.

int csRepeat.FW6.StatusResponse.FwBuildNumber [get]

Definition at line 31 of file StatusResponse.cs.

int csRepeat.FW6.StatusResponse.FwVersionMajor [get]

Definition at line 14 of file StatusResponse.cs.

int csRepeat.FW6.StatusResponse.FwVersionMinor [get]

Definition at line 22 of file StatusResponse.cs.

override byte csRepeat.FW6.StatusResponse.PID1 [get]

Reimplemented from csRepeat.FW6.FW6Packet.

Definition at line 77 of file StatusResponse.cs.

override byte csRepeat.FW6.StatusResponse.PID2 [get]

Reimplemented from csRepeat.FW6.FW6Packet.

Definition at line 82 of file StatusResponse.cs.

uint csRepeat.FW6.StatusResponse.SerialNumber [get]

Definition at line 57 of file StatusResponse.cs.

The documentation for this class was generated from the following file:
  • FW6/StatusResponse.cs
Generated on Fri Sep 22 2017 10:35:17 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: csRepeat.FW6.uCDataPacket Class Reference

  • csRepeat
  • FW6
  • uCDataPacket
Public Member Functions | Properties
csRepeat.FW6.uCDataPacket Class Reference
Inheritance diagram for csRepeat.FW6.uCDataPacket:
[legend]
Collaboration diagram for csRepeat.FW6.uCDataPacket:
[legend]

List of all members.

Public Member Functions

uCDataPacket (byte[] data)

Properties

override byte | PID1 [get]
override byte | PID2 [get]
override byte[] | Data [get]
Payload data.

Detailed Description

Definition at line 7 of file uCDataPacket.cs.

Constructor & Destructor Documentation

csRepeat.FW6.uCDataPacket.uCDataPacket ( byte[] data ) [inline]

Definition at line 25 of file uCDataPacket.cs.

Property Documentation

override byte [] csRepeat.FW6.uCDataPacket.Data [get]

Payload data.

Reimplemented from csRepeat.FW6.FW6Packet.

Definition at line 21 of file uCDataPacket.cs.

override byte csRepeat.FW6.uCDataPacket.PID1 [get]

Reimplemented from csRepeat.FW6.FW6Packet.

Definition at line 10 of file uCDataPacket.cs.

override byte csRepeat.FW6.uCDataPacket.PID2 [get]

Reimplemented from csRepeat.FW6.FW6Packet.

Definition at line 15 of file uCDataPacket.cs.

The documentation for this class was generated from the following file:
  • FW6/uCDataPacket.cs
Generated on Fri Sep 22 2017 10:35:17 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: csRepeat.FW6.uCDataPacketv2 Class Reference

  • csRepeat
  • FW6
  • uCDataPacketv2
Public Member Functions | Properties
csRepeat.FW6.uCDataPacketv2 Class Reference

v2 uC data packet, requires firmware newer than v6.06.04 More...

Inheritance diagram for csRepeat.FW6.uCDataPacketv2:
[legend]
Collaboration diagram for csRepeat.FW6.uCDataPacketv2:
[legend]

List of all members.

Public Member Functions

uCDataPacketv2 (byte[] data)

Properties

override byte | PID1 [get]
override byte | PID2 [get]
override byte[] | Data [get]
Payload data.

Detailed Description

v2 uC data packet, requires firmware newer than v6.06.04

Definition at line 10 of file ucdatapacketv2.cs.

Constructor & Destructor Documentation

csRepeat.FW6.uCDataPacketv2.uCDataPacketv2 ( byte[] data ) [inline]

Definition at line 28 of file ucdatapacketv2.cs.

Property Documentation

override byte [] csRepeat.FW6.uCDataPacketv2.Data [get]

Payload data.

Reimplemented from csRepeat.FW6.FW6Packet.

Definition at line 24 of file ucdatapacketv2.cs.

override byte csRepeat.FW6.uCDataPacketv2.PID1 [get]

Reimplemented from csRepeat.FW6.FW6Packet.

Definition at line 13 of file ucdatapacketv2.cs.

override byte csRepeat.FW6.uCDataPacketv2.PID2 [get]

Reimplemented from csRepeat.FW6.FW6Packet.

Definition at line 18 of file ucdatapacketv2.cs.

The documentation for this class was generated from the following file:
  • FW6/ucdatapacketv2.cs
Generated on Fri Sep 22 2017 10:35:17 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: csRepeat.FW6.uCSwitchToImage Class Reference

  • csRepeat
  • FW6
  • uCSwitchToImage
Public Member Functions | Public Attributes | Properties
csRepeat.FW6.uCSwitchToImage Class Reference

Packet used to perform a uC image switch, also finishes up a uC firmware upload. More...

Inheritance diagram for csRepeat.FW6.uCSwitchToImage:
[legend]
Collaboration diagram for csRepeat.FW6.uCSwitchToImage:
[legend]

List of all members.

Public Member Functions

uCSwitchToImage (UInt16 uploadChecksum)

Public Attributes

byte[] | data

Properties

override byte | PID1 [get]
override byte | PID2 [get]
Switch to image #1.
override byte[] | Data [get]
Payload data.

Detailed Description

Packet used to perform a uC image switch, also finishes up a uC firmware upload.

Definition at line 10 of file uCSwitchToImage.cs.

Constructor & Destructor Documentation

csRepeat.FW6.uCSwitchToImage.uCSwitchToImage ( UInt16 uploadChecksum ) [inline]

Definition at line 31 of file uCSwitchToImage.cs.

Member Data Documentation

byte [] csRepeat.FW6.uCSwitchToImage.data

Definition at line 25 of file uCSwitchToImage.cs.

Property Documentation

override byte [] csRepeat.FW6.uCSwitchToImage.Data [get]

Payload data.

Reimplemented from csRepeat.FW6.FW6Packet.

Definition at line 27 of file uCSwitchToImage.cs.

override byte csRepeat.FW6.uCSwitchToImage.PID1 [get]

Reimplemented from csRepeat.FW6.FW6Packet.

Definition at line 13 of file uCSwitchToImage.cs.

override byte csRepeat.FW6.uCSwitchToImage.PID2 [get]

Switch to image #1.

Reimplemented from csRepeat.FW6.FW6Packet.

Definition at line 21 of file uCSwitchToImage.cs.

The documentation for this class was generated from the following file:
  • FW6/uCSwitchToImage.cs
Generated on Fri Sep 22 2017 10:35:17 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: MiscUtil.Conversion.BigEndianBitConverter Class Reference

  • MiscUtil
  • Conversion
  • BigEndianBitConverter
Public Member Functions | Protected Member Functions | Properties
MiscUtil.Conversion.BigEndianBitConverter Class Reference

Implementation of EndianBitConverter which converts to/from big-endian byte arrays. More...

Inheritance diagram for MiscUtil.Conversion.BigEndianBitConverter:
[legend]
Collaboration diagram for MiscUtil.Conversion.BigEndianBitConverter:
[legend]

List of all members.

Public Member Functions

sealed override bool | IsLittleEndian ()
Indicates the byte order ("endianess") in which data is converted using this class.

Protected Member Functions

override void | CopyBytesImpl (long value, int bytes, byte[] buffer, int index)
Copies the specified number of bytes from value to buffer, starting at index.
override long | FromBytes (byte[] buffer, int startIndex, int bytesToConvert)
Returns a value built from the specified number of bytes from the given buffer, starting at index.

Properties

sealed override Endianness | Endianness [get]
Indicates the byte order ("endianess") in which data is converted using this class.

Detailed Description

Implementation of EndianBitConverter which converts to/from big-endian byte arrays.

Definition at line 8 of file BigEndianBitConverter.cs.

Member Function Documentation

override void MiscUtil.Conversion.BigEndianBitConverter.CopyBytesImpl | ( | long | value,
 |  | int | bytes,
 |  | byte[] | buffer,
 |  | int | index
 | ) |  | [inline, protected, virtual]

Copies the specified number of bytes from value to buffer, starting at index.

Parameters:
value | The value to copy
bytes | The number of bytes to copy
buffer | The buffer to copy the bytes into
index | The index to start at

Implements MiscUtil.Conversion.EndianBitConverter.

Definition at line 39 of file BigEndianBitConverter.cs.

override long MiscUtil.Conversion.BigEndianBitConverter.FromBytes | ( | byte[] | buffer,
 |  | int | startIndex,
 |  | int | bytesToConvert
 | ) |  | [inline, protected, virtual]

Returns a value built from the specified number of bytes from the given buffer, starting at index.

Parameters:
buffer | The data in byte array format
startIndex | The first index to use
bytesToConvert | The number of bytes to use
Returns:
The value built from the given bytes

Implements MiscUtil.Conversion.EndianBitConverter.

Definition at line 57 of file BigEndianBitConverter.cs.

sealed override bool MiscUtil.Conversion.BigEndianBitConverter.IsLittleEndian ( ) [inline, virtual]

Indicates the byte order ("endianess") in which data is converted using this class.

Different computer architectures store data using different byte orders. "Big-endian" means the most significant byte is on the left end of a word. "Little-endian" means the most significant byte is on the right end of a word.

Returns:
true if this converter is little-endian, false otherwise.

Implements MiscUtil.Conversion.EndianBitConverter.

Definition at line 19 of file BigEndianBitConverter.cs.

Property Documentation

sealed override Endianness MiscUtil.Conversion.BigEndianBitConverter.Endianness [get]

Indicates the byte order ("endianess") in which data is converted using this class.

Reimplemented from MiscUtil.Conversion.EndianBitConverter.

Definition at line 28 of file BigEndianBitConverter.cs.

The documentation for this class was generated from the following file:
  • MiscUtil/Conversion/BigEndianBitConverter.cs
Generated on Fri Sep 22 2017 10:35:17 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: MiscUtil.Conversion.DoubleConverter Class Reference

  • MiscUtil
  • Conversion
  • DoubleConverter
Classes | Static Public Member Functions
MiscUtil.Conversion.DoubleConverter Class Reference

A class to allow the conversion of doubles to string representations of their exact decimal values. The implementation aims for readability over efficiency. More...

List of all members.

Classes

class | ArbitraryDecimal
Private class used for manipulating sequences of decimal digits.

Static Public Member Functions

static string | ToExactString (double d)
Converts the given double to a string representation of its exact decimal value.

Detailed Description

A class to allow the conversion of doubles to string representations of their exact decimal values. The implementation aims for readability over efficiency.

Definition at line 11 of file DoubleConverter.cs.

Member Function Documentation

static string MiscUtil.Conversion.DoubleConverter.ToExactString ( double d ) [inline, static]

Converts the given double to a string representation of its exact decimal value.

Parameters:
d The double to convert.
Returns:
A string representation of the double's exact decimal value.

Definition at line 19 of file DoubleConverter.cs.

The documentation for this class was generated from the following file:
  • MiscUtil/Conversion/DoubleConverter.cs
Generated on Fri Sep 22 2017 10:35:17 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: MiscUtil.Conversion.EndianBitConverter Class Reference

  • MiscUtil
  • Conversion
  • EndianBitConverter
Classes | Public Member Functions | Static Public Member Functions | Protected Member Functions | Properties
MiscUtil.Conversion.EndianBitConverter Class Reference

Equivalent of System.BitConverter, but with either endianness. More...

Inheritance diagram for MiscUtil.Conversion.EndianBitConverter:
[legend]

List of all members.

Classes

struct | Int32SingleUnion
Union used solely for the equivalent of DoubleToInt64Bits and vice versa.

Public Member Functions

abstract bool | IsLittleEndian ()
Indicates the byte order ("endianess") in which data is converted using this class.
long | DoubleToInt64Bits (double value)
Converts the specified double-precision floating point number to a 64-bit signed integer. Note: the endianness of this converter does not affect the returned value.
double | Int64BitsToDouble (long value)
Converts the specified 64-bit signed integer to a double-precision floating point number. Note: the endianness of this converter does not affect the returned value.
int | SingleToInt32Bits (float value)
Converts the specified single-precision floating point number to a 32-bit signed integer. Note: the endianness of this converter does not affect the returned value.
float | Int32BitsToSingle (int value)
Converts the specified 32-bit signed integer to a single-precision floating point number. Note: the endianness of this converter does not affect the returned value.
bool | ToBoolean (byte[] value, int startIndex)
Returns a Boolean value converted from one byte at a specified position in a byte array.
char | ToChar (byte[] value, int startIndex)
Returns a Unicode character converted from two bytes at a specified position in a byte array.
double | ToDouble (byte[] value, int startIndex)
Returns a double-precision floating point number converted from eight bytes at a specified position in a byte array.
float | ToSingle (byte[] value, int startIndex)
Returns a single-precision floating point number converted from four bytes at a specified position in a byte array.
short | ToInt16 (byte[] value, int startIndex)
Returns a 16-bit signed integer converted from two bytes at a specified position in a byte array.
int | ToInt32 (byte[] value, int startIndex)
Returns a 32-bit signed integer converted from four bytes at a specified position in a byte array.
long | ToInt64 (byte[] value, int startIndex)
Returns a 64-bit signed integer converted from eight bytes at a specified position in a byte array.
ushort | ToUInt16 (byte[] value, int startIndex)
Returns a 16-bit unsigned integer converted from two bytes at a specified position in a byte array.
uint | ToUInt32 (byte[] value, int startIndex)
Returns a 32-bit unsigned integer converted from four bytes at a specified position in a byte array.
ulong | ToUInt64 (byte[] value, int startIndex)
Returns a 64-bit unsigned integer converted from eight bytes at a specified position in a byte array.
decimal | ToDecimal (byte[] value, int startIndex)
Returns a decimal value converted from sixteen bytes at a specified position in a byte array.
byte[] | GetBytes (decimal value)
Returns the specified decimal value as an array of bytes.
void | CopyBytes (decimal value, byte[] buffer, int index)
Copies the specified decimal value into the specified byte array, beginning at the specified index.
byte[] | GetBytes (bool value)
Returns the specified Boolean value as an array of bytes.
byte[] | GetBytes (char value)
Returns the specified Unicode character value as an array of bytes.
byte[] | GetBytes (double value)
Returns the specified double-precision floating point value as an array of bytes.
byte[] | GetBytes (short value)
Returns the specified 16-bit signed integer value as an array of bytes.
byte[] | GetBytes (int value)
Returns the specified 32-bit signed integer value as an array of bytes.
byte[] | GetBytes (long value)
Returns the specified 64-bit signed integer value as an array of bytes.
byte[] | GetBytes (float value)
Returns the specified single-precision floating point value as an array of bytes.
byte[] | GetBytes (ushort value)
Returns the specified 16-bit unsigned integer value as an array of bytes.
byte[] | GetBytes (uint value)
Returns the specified 32-bit unsigned integer value as an array of bytes.
byte[] | GetBytes (ulong value)
Returns the specified 64-bit unsigned integer value as an array of bytes.
void | CopyBytes (bool value, byte[] buffer, int index)
Copies the specified Boolean value into the specified byte array, beginning at the specified index.
void | CopyBytes (char value, byte[] buffer, int index)
Copies the specified Unicode character value into the specified byte array, beginning at the specified index.
void | CopyBytes (double value, byte[] buffer, int index)
Copies the specified double-precision floating point value into the specified byte array, beginning at the specified index.
void | CopyBytes (short value, byte[] buffer, int index)
Copies the specified 16-bit signed integer value into the specified byte array, beginning at the specified index.
void | CopyBytes (int value, byte[] buffer, int index)
Copies the specified 32-bit signed integer value into the specified byte array, beginning at the specified index.
void | CopyBytes (long value, byte[] buffer, int index)
Copies the specified 64-bit signed integer value into the specified byte array, beginning at the specified index.
void | CopyBytes (float value, byte[] buffer, int index)
Copies the specified single-precision floating point value into the specified byte array, beginning at the specified index.
void | CopyBytes (ushort value, byte[] buffer, int index)
Copies the specified 16-bit unsigned integer value into the specified byte array, beginning at the specified index.
void | CopyBytes (uint value, byte[] buffer, int index)
Copies the specified 32-bit unsigned integer value into the specified byte array, beginning at the specified index.
void | CopyBytes (ulong value, byte[] buffer, int index)
Copies the specified 64-bit unsigned integer value into the specified byte array, beginning at the specified index.

Static Public Member Functions

static string | ToString (byte[] value)
Returns a String converted from the elements of a byte array.
static string | ToString (byte[] value, int startIndex)
Returns a String converted from the elements of a byte array starting at a specified array position.
static string | ToString (byte[] value, int startIndex, int length)
Returns a String converted from a specified number of bytes at a specified position in a byte array.

Protected Member Functions

abstract long | FromBytes (byte[] value, int startIndex, int bytesToConvert)
Convert the given number of bytes from the given array, from the given start position, into a long, using the bytes as the least significant part of the long. By the time this is called, the arguments have been checked for validity.
abstract void | CopyBytesImpl (long value, int bytes, byte[] buffer, int index)
Copies the given number of bytes from the least-specific end of the specified value into the specified byte array, beginning at the specified index. This must be implemented in concrete derived classes, but the implementation may assume that the value will fit into the buffer.

Properties

abstract Endianness | Endianness [get]
Indicates the byte order ("endianess") in which data is converted using this class.
static LittleEndianBitConverter | Little [get]
Returns a little-endian bit converter instance. The same instance is always returned.
static BigEndianBitConverter | Big [get]
Returns a big-endian bit converter instance. The same instance is always returned.

Detailed Description

Equivalent of System.BitConverter, but with either endianness.

Definition at line 9 of file EndianBitConverter.cs.

Member Function Documentation

void MiscUtil.Conversion.EndianBitConverter.CopyBytes | ( | decimal | value,
 |  | byte[] | buffer,
 |  | int | index
 | ) |  | [inline]

Copies the specified decimal value into the specified byte array, beginning at the specified index.

Parameters:
value | A character to convert.
buffer | The byte array to copy the bytes into
index | The first index into the array to copy the bytes into

Definition at line 354 of file EndianBitConverter.cs.

void MiscUtil.Conversion.EndianBitConverter.CopyBytes | ( | bool | value,
 |  | byte[] | buffer,
 |  | int | index
 | ) |  | [inline]

Copies the specified Boolean value into the specified byte array, beginning at the specified index.

Parameters:
value | A Boolean value.
buffer | The byte array to copy the bytes into
index | The first index into the array to copy the bytes into

Definition at line 525 of file EndianBitConverter.cs.

void MiscUtil.Conversion.EndianBitConverter.CopyBytes | ( | char | value,
 |  | byte[] | buffer,
 |  | int | index
 | ) |  | [inline]

Copies the specified Unicode character value into the specified byte array, beginning at the specified index.

Parameters:
value | A character to convert.
buffer | The byte array to copy the bytes into
index | The first index into the array to copy the bytes into

Definition at line 537 of file EndianBitConverter.cs.

void MiscUtil.Conversion.EndianBitConverter.CopyBytes | ( | double | value,
 |  | byte[] | buffer,
 |  | int | index
 | ) |  | [inline]

Copies the specified double-precision floating point value into the specified byte array, beginning at the specified index.

Parameters:
value | The number to convert.
buffer | The byte array to copy the bytes into
index | The first index into the array to copy the bytes into

Definition at line 549 of file EndianBitConverter.cs.

void MiscUtil.Conversion.EndianBitConverter.CopyBytes | ( | short | value,
 |  | byte[] | buffer,
 |  | int | index
 | ) |  | [inline]

Copies the specified 16-bit signed integer value into the specified byte array, beginning at the specified index.

Parameters:
value | The number to convert.
buffer | The byte array to copy the bytes into
index | The first index into the array to copy the bytes into

Definition at line 561 of file EndianBitConverter.cs.

void MiscUtil.Conversion.EndianBitConverter.CopyBytes | ( | int | value,
 |  | byte[] | buffer,
 |  | int | index
 | ) |  | [inline]

Copies the specified 32-bit signed integer value into the specified byte array, beginning at the specified index.

Parameters:
value | The number to convert.
buffer | The byte array to copy the bytes into
index | The first index into the array to copy the bytes into

Definition at line 573 of file EndianBitConverter.cs.

void MiscUtil.Conversion.EndianBitConverter.CopyBytes | ( | long | value,
 |  | byte[] | buffer,
 |  | int | index
 | ) |  | [inline]

Copies the specified 64-bit signed integer value into the specified byte array, beginning at the specified index.

Parameters:
value | The number to convert.
buffer | The byte array to copy the bytes into
index | The first index into the array to copy the bytes into

Definition at line 585 of file EndianBitConverter.cs.

void MiscUtil.Conversion.EndianBitConverter.CopyBytes | ( | float | value,
 |  | byte[] | buffer,
 |  | int | index
 | ) |  | [inline]

Copies the specified single-precision floating point value into the specified byte array, beginning at the specified index.

Parameters:
value | The number to convert.
buffer | The byte array to copy the bytes into
index | The first index into the array to copy the bytes into

Definition at line 597 of file EndianBitConverter.cs.

void MiscUtil.Conversion.EndianBitConverter.CopyBytes | ( | ushort | value,
 |  | byte[] | buffer,
 |  | int | index
 | ) |  | [inline]

Copies the specified 16-bit unsigned integer value into the specified byte array, beginning at the specified index.

Parameters:
value | The number to convert.
buffer | The byte array to copy the bytes into
index | The first index into the array to copy the bytes into

Definition at line 609 of file EndianBitConverter.cs.

void MiscUtil.Conversion.EndianBitConverter.CopyBytes | ( | uint | value,
 |  | byte[] | buffer,
 |  | int | index
 | ) |  | [inline]

Copies the specified 32-bit unsigned integer value into the specified byte array, beginning at the specified index.

Parameters:
value | The number to convert.
buffer | The byte array to copy the bytes into
index | The first index into the array to copy the bytes into

Definition at line 621 of file EndianBitConverter.cs.

void MiscUtil.Conversion.EndianBitConverter.CopyBytes | ( | ulong | value,
 |  | byte[] | buffer,
 |  | int | index
 | ) |  | [inline]

Copies the specified 64-bit unsigned integer value into the specified byte array, beginning at the specified index.

Parameters:
value | The number to convert.
buffer | The byte array to copy the bytes into
index | The first index into the array to copy the bytes into

Definition at line 633 of file EndianBitConverter.cs.

abstract void MiscUtil.Conversion.EndianBitConverter.CopyBytesImpl | ( | long | value,
 |  | int | bytes,
 |  | byte[] | buffer,
 |  | int | index
 | ) |  | [protected, pure virtual]

Copies the given number of bytes from the least-specific end of the specified value into the specified byte array, beginning at the specified index. This must be implemented in concrete derived classes, but the implementation may assume that the value will fit into the buffer.

Parameters:
value | The value to copy bytes for
bytes | The number of significant bytes to copy
buffer | The byte array to copy the bytes into
index | The first index into the array to copy the bytes into

Implemented in MiscUtil.Conversion.BigEndianBitConverter, and MiscUtil.Conversion.LittleEndianBitConverter.

long MiscUtil.Conversion.EndianBitConverter.DoubleToInt64Bits ( double value ) [inline]

Converts the specified double-precision floating point number to a 64-bit signed integer. Note: the endianness of this converter does not affect the returned value.

Parameters:
value The number to convert.
Returns:
A 64-bit signed integer whose value is equivalent to value.

Definition at line 59 of file EndianBitConverter.cs.

Here is the call graph for this function:

Here is the caller graph for this function:

abstract long MiscUtil.Conversion.EndianBitConverter.FromBytes | ( | byte[] | value,
 |  | int | startIndex,
 |  | int | bytesToConvert
 | ) |  | [protected, pure virtual]

Convert the given number of bytes from the given array, from the given start position, into a long, using the bytes as the least significant part of the long. By the time this is called, the arguments have been checked for validity.

Parameters:
value | The bytes to convert
startIndex | The index of the first byte to convert
bytesToConvert | The number of bytes to use in the conversion
Returns:
The converted number

Implemented in MiscUtil.Conversion.BigEndianBitConverter, and MiscUtil.Conversion.LittleEndianBitConverter.

byte [] MiscUtil.Conversion.EndianBitConverter.GetBytes ( decimal value ) [inline]

Returns the specified decimal value as an array of bytes.

Parameters:
value The number to convert.
Returns:
An array of bytes with length 16.

Definition at line 336 of file EndianBitConverter.cs.

byte [] MiscUtil.Conversion.EndianBitConverter.GetBytes ( bool value ) [inline]

Returns the specified Boolean value as an array of bytes.

Parameters:
value A Boolean value.
Returns:
An array of bytes with length 1.

Definition at line 384 of file EndianBitConverter.cs.

byte [] MiscUtil.Conversion.EndianBitConverter.GetBytes ( char value ) [inline]

Returns the specified Unicode character value as an array of bytes.

Parameters:
value A character to convert.
Returns:
An array of bytes with length 2.

Definition at line 394 of file EndianBitConverter.cs.

byte [] MiscUtil.Conversion.EndianBitConverter.GetBytes ( double value ) [inline]

Returns the specified double-precision floating point value as an array of bytes.

Parameters:
value The number to convert.
Returns:
An array of bytes with length 8.

Definition at line 404 of file EndianBitConverter.cs.

byte [] MiscUtil.Conversion.EndianBitConverter.GetBytes ( short value ) [inline]

Returns the specified 16-bit signed integer value as an array of bytes.

Parameters:
value The number to convert.
Returns:
An array of bytes with length 2.

Definition at line 414 of file EndianBitConverter.cs.

byte [] MiscUtil.Conversion.EndianBitConverter.GetBytes ( int value ) [inline]

Returns the specified 32-bit signed integer value as an array of bytes.

Parameters:
value The number to convert.
Returns:
An array of bytes with length 4.

Definition at line 424 of file EndianBitConverter.cs.

byte [] MiscUtil.Conversion.EndianBitConverter.GetBytes ( long value ) [inline]

Returns the specified 64-bit signed integer value as an array of bytes.

Parameters:
value The number to convert.
Returns:
An array of bytes with length 8.

Definition at line 434 of file EndianBitConverter.cs.

byte [] MiscUtil.Conversion.EndianBitConverter.GetBytes ( float value ) [inline]

Returns the specified single-precision floating point value as an array of bytes.

Parameters:
value The number to convert.
Returns:
An array of bytes with length 4.

Definition at line 444 of file EndianBitConverter.cs.

byte [] MiscUtil.Conversion.EndianBitConverter.GetBytes ( ushort value ) [inline]

Returns the specified 16-bit unsigned integer value as an array of bytes.

Parameters:
value The number to convert.
Returns:
An array of bytes with length 2.

Definition at line 454 of file EndianBitConverter.cs.

byte [] MiscUtil.Conversion.EndianBitConverter.GetBytes ( uint value ) [inline]

Returns the specified 32-bit unsigned integer value as an array of bytes.

Parameters:
value The number to convert.
Returns:
An array of bytes with length 4.

Definition at line 464 of file EndianBitConverter.cs.

byte [] MiscUtil.Conversion.EndianBitConverter.GetBytes ( ulong value ) [inline]

Returns the specified 64-bit unsigned integer value as an array of bytes.

Parameters:
value The number to convert.
Returns:
An array of bytes with length 8.

Definition at line 474 of file EndianBitConverter.cs.

float MiscUtil.Conversion.EndianBitConverter.Int32BitsToSingle ( int value ) [inline]

Converts the specified 32-bit signed integer to a single-precision floating point number. Note: the endianness of this converter does not affect the returned value.

Parameters:
value The number to convert.
Returns:
A single-precision floating point number whose value is equivalent to value.

Definition at line 95 of file EndianBitConverter.cs.

double MiscUtil.Conversion.EndianBitConverter.Int64BitsToDouble ( long value ) [inline]

Converts the specified 64-bit signed integer to a double-precision floating point number. Note: the endianness of this converter does not affect the returned value.

Parameters:
value The number to convert.
Returns:
A double-precision floating point number whose value is equivalent to value.

Definition at line 71 of file EndianBitConverter.cs.

abstract bool MiscUtil.Conversion.EndianBitConverter.IsLittleEndian ( ) [pure virtual]

Indicates the byte order ("endianess") in which data is converted using this class.

Different computer architectures store data using different byte orders. "Big-endian" means the most significant byte is on the left end of a word. "Little-endian" means the most significant byte is on the right end of a word.

Returns:
true if this converter is little-endian, false otherwise.

Implemented in MiscUtil.Conversion.BigEndianBitConverter, and MiscUtil.Conversion.LittleEndianBitConverter.

int MiscUtil.Conversion.EndianBitConverter.SingleToInt32Bits ( float value ) [inline]

Converts the specified single-precision floating point number to a 32-bit signed integer. Note: the endianness of this converter does not affect the returned value.

Parameters:
value The number to convert.
Returns:
A 32-bit signed integer whose value is equivalent to value.

Definition at line 83 of file EndianBitConverter.cs.

bool MiscUtil.Conversion.EndianBitConverter.ToBoolean | ( | byte[] | value,
 |  | int | startIndex
 | ) |  | [inline]

Returns a Boolean value converted from one byte at a specified position in a byte array.

Parameters:
value | An array of bytes.
startIndex | The starting position within value.
Returns:
true if the byte at startIndex in value is nonzero; otherwise, false.

Definition at line 108 of file EndianBitConverter.cs.

char MiscUtil.Conversion.EndianBitConverter.ToChar | ( | byte[] | value,
 |  | int | startIndex
 | ) |  | [inline]

Returns a Unicode character converted from two bytes at a specified position in a byte array.

Parameters:
value | An array of bytes.
startIndex | The starting position within value.
Returns:
A character formed by two bytes beginning at startIndex.

Definition at line 120 of file EndianBitConverter.cs.

decimal MiscUtil.Conversion.EndianBitConverter.ToDecimal | ( | byte[] | value,
 |  | int | startIndex
 | ) |  | [inline]

Returns a decimal value converted from sixteen bytes at a specified position in a byte array.

Parameters:
value | An array of bytes.
startIndex | The starting position within value.
Returns:
A decimal formed by sixteen bytes beginning at startIndex.

Definition at line 318 of file EndianBitConverter.cs.

double MiscUtil.Conversion.EndianBitConverter.ToDouble | ( | byte[] | value,
 |  | int | startIndex
 | ) |  | [inline]

Returns a double-precision floating point number converted from eight bytes at a specified position in a byte array.

Parameters:
value | An array of bytes.
startIndex | The starting position within value.
Returns:
A double precision floating point number formed by eight bytes beginning at startIndex.

Definition at line 132 of file EndianBitConverter.cs.

short MiscUtil.Conversion.EndianBitConverter.ToInt16 | ( | byte[] | value,
 |  | int | startIndex
 | ) |  | [inline]

Returns a 16-bit signed integer converted from two bytes at a specified position in a byte array.

Parameters:
value | An array of bytes.
startIndex | The starting position within value.
Returns:
A 16-bit signed integer formed by two bytes beginning at startIndex.

Definition at line 155 of file EndianBitConverter.cs.

int MiscUtil.Conversion.EndianBitConverter.ToInt32 | ( | byte[] | value,
 |  | int | startIndex
 | ) |  | [inline]

Returns a 32-bit signed integer converted from four bytes at a specified position in a byte array.

Parameters:
value | An array of bytes.
startIndex | The starting position within value.
Returns:
A 32-bit signed integer formed by four bytes beginning at startIndex.

Definition at line 166 of file EndianBitConverter.cs.

long MiscUtil.Conversion.EndianBitConverter.ToInt64 | ( | byte[] | value,
 |  | int | startIndex
 | ) |  | [inline]

Returns a 64-bit signed integer converted from eight bytes at a specified position in a byte array.

Parameters:
value | An array of bytes.
startIndex | The starting position within value.
Returns:
A 64-bit signed integer formed by eight bytes beginning at startIndex.

Definition at line 177 of file EndianBitConverter.cs.

float MiscUtil.Conversion.EndianBitConverter.ToSingle | ( | byte[] | value,
 |  | int | startIndex
 | ) |  | [inline]

Returns a single-precision floating point number converted from four bytes at a specified position in a byte array.

Parameters:
value | An array of bytes.
startIndex | The starting position within value.
Returns:
A single precision floating point number formed by four bytes beginning at startIndex.

Definition at line 144 of file EndianBitConverter.cs.

static string MiscUtil.Conversion.EndianBitConverter.ToString ( byte[] value ) [inline, static]

Returns a String converted from the elements of a byte array.

Parameters:
value An array of bytes.

All the elements of value are converted.

Returns:
A String of hexadecimal pairs separated by hyphens, where each pair represents the corresponding element in value; for example, "7F-2C-4A".

Definition at line 273 of file EndianBitConverter.cs.

static string MiscUtil.Conversion.EndianBitConverter.ToString | ( | byte[] | value,
 |  | int | startIndex
 | ) |  | [inline, static]

Returns a String converted from the elements of a byte array starting at a specified array position.

Parameters:
value | An array of bytes.
startIndex | The starting position within value.

The elements from array position startIndex to the end of the array are converted.

Returns:
A String of hexadecimal pairs separated by hyphens, where each pair represents the corresponding element in value; for example, "7F-2C-4A".

Definition at line 288 of file EndianBitConverter.cs.

static string MiscUtil.Conversion.EndianBitConverter.ToString | ( | byte[] | value,
 |  | int | startIndex,
 |  | int | length
 | ) |  | [inline, static]

Returns a String converted from a specified number of bytes at a specified position in a byte array.

Parameters:
value | An array of bytes.
startIndex | The starting position within value.
length | The number of bytes to convert.

The length elements from array position startIndex are converted.

Returns:
A String of hexadecimal pairs separated by hyphens, where each pair represents the corresponding element in value; for example, "7F-2C-4A".

Definition at line 304 of file EndianBitConverter.cs.

ushort MiscUtil.Conversion.EndianBitConverter.ToUInt16 | ( | byte[] | value,
 |  | int | startIndex
 | ) |  | [inline]

Returns a 16-bit unsigned integer converted from two bytes at a specified position in a byte array.

Parameters:
value | An array of bytes.
startIndex | The starting position within value.
Returns:
A 16-bit unsigned integer formed by two bytes beginning at startIndex.

Definition at line 188 of file EndianBitConverter.cs.

uint MiscUtil.Conversion.EndianBitConverter.ToUInt32 | ( | byte[] | value,
 |  | int | startIndex
 | ) |  | [inline]

Returns a 32-bit unsigned integer converted from four bytes at a specified position in a byte array.

Parameters:
value | An array of bytes.
startIndex | The starting position within value.
Returns:
A 32-bit unsigned integer formed by four bytes beginning at startIndex.

Definition at line 199 of file EndianBitConverter.cs.

ulong MiscUtil.Conversion.EndianBitConverter.ToUInt64 | ( | byte[] | value,
 |  | int | startIndex
 | ) |  | [inline]

Returns a 64-bit unsigned integer converted from eight bytes at a specified position in a byte array.

Parameters:
value | An array of bytes.
startIndex | The starting position within value.
Returns:
A 64-bit unsigned integer formed by eight bytes beginning at startIndex.

Definition at line 210 of file EndianBitConverter.cs.

Property Documentation

BigEndianBitConverter MiscUtil.Conversion.EndianBitConverter.Big [static, get]

Returns a big-endian bit converter instance. The same instance is always returned.

Definition at line 46 of file EndianBitConverter.cs.

abstract Endianness MiscUtil.Conversion.EndianBitConverter.Endianness [get]

Indicates the byte order ("endianess") in which data is converted using this class.

Reimplemented in MiscUtil.Conversion.BigEndianBitConverter, and MiscUtil.Conversion.LittleEndianBitConverter.

Definition at line 26 of file EndianBitConverter.cs.

LittleEndianBitConverter MiscUtil.Conversion.EndianBitConverter.Little [static, get]

Returns a little-endian bit converter instance. The same instance is always returned.

Definition at line 36 of file EndianBitConverter.cs.

The documentation for this class was generated from the following file:
  • MiscUtil/Conversion/EndianBitConverter.cs
Generated on Fri Sep 22 2017 10:35:17 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: MiscUtil.Conversion.LittleEndianBitConverter Class Reference

  • MiscUtil
  • Conversion
  • LittleEndianBitConverter
Public Member Functions | Protected Member Functions | Properties
MiscUtil.Conversion.LittleEndianBitConverter Class Reference

Implementation of EndianBitConverter which converts to/from little-endian byte arrays. More...

Inheritance diagram for MiscUtil.Conversion.LittleEndianBitConverter:
[legend]
Collaboration diagram for MiscUtil.Conversion.LittleEndianBitConverter:
[legend]

List of all members.

Public Member Functions

sealed override bool | IsLittleEndian ()
Indicates the byte order ("endianess") in which data is converted using this class.

Protected Member Functions

override void | CopyBytesImpl (long value, int bytes, byte[] buffer, int index)
Copies the specified number of bytes from value to buffer, starting at index.
override long | FromBytes (byte[] buffer, int startIndex, int bytesToConvert)
Returns a value built from the specified number of bytes from the given buffer, starting at index.

Properties

sealed override Endianness | Endianness [get]
Indicates the byte order ("endianess") in which data is converted using this class.

Detailed Description

Implementation of EndianBitConverter which converts to/from little-endian byte arrays.

Definition at line 8 of file LittleEndianBitConverter.cs.

Member Function Documentation

override void MiscUtil.Conversion.LittleEndianBitConverter.CopyBytesImpl | ( | long | value,
 |  | int | bytes,
 |  | byte[] | buffer,
 |  | int | index
 | ) |  | [inline, protected, virtual]

Copies the specified number of bytes from value to buffer, starting at index.

Parameters:
value | The value to copy
bytes | The number of bytes to copy
buffer | The buffer to copy the bytes into
index | The index to start at

Implements MiscUtil.Conversion.EndianBitConverter.

Definition at line 39 of file LittleEndianBitConverter.cs.

override long MiscUtil.Conversion.LittleEndianBitConverter.FromBytes | ( | byte[] | buffer,
 |  | int | startIndex,
 |  | int | bytesToConvert
 | ) |  | [inline, protected, virtual]

Returns a value built from the specified number of bytes from the given buffer, starting at index.

Parameters:
buffer | The data in byte array format
startIndex | The first index to use
bytesToConvert | The number of bytes to use
Returns:
The value built from the given bytes

Implements MiscUtil.Conversion.EndianBitConverter.

Definition at line 56 of file LittleEndianBitConverter.cs.

sealed override bool MiscUtil.Conversion.LittleEndianBitConverter.IsLittleEndian ( ) [inline, virtual]

Indicates the byte order ("endianess") in which data is converted using this class.

Different computer architectures store data using different byte orders. "Big-endian" means the most significant byte is on the left end of a word. "Little-endian" means the most significant byte is on the right end of a word.

Returns:
true if this converter is little-endian, false otherwise.

Implements MiscUtil.Conversion.EndianBitConverter.

Definition at line 19 of file LittleEndianBitConverter.cs.

Property Documentation

sealed override Endianness MiscUtil.Conversion.LittleEndianBitConverter.Endianness [get]

Indicates the byte order ("endianess") in which data is converted using this class.

Reimplemented from MiscUtil.Conversion.EndianBitConverter.

Definition at line 28 of file LittleEndianBitConverter.cs.

The documentation for this class was generated from the following file:
  • MiscUtil/Conversion/LittleEndianBitConverter.cs
Generated on Fri Sep 22 2017 10:35:17 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Package MiscUtil.Conversion

  • Namespace List
  • Namespace Members
  • MiscUtil
  • Conversion
Classes | Enumerations
Package MiscUtil.Conversion

Classes

class | BigEndianBitConverter
Implementation of EndianBitConverter which converts to/from big-endian byte arrays. More...
class | DoubleConverter
A class to allow the conversion of doubles to string representations of their exact decimal values. The implementation aims for readability over efficiency. More...
class | EndianBitConverter
Equivalent of System.BitConverter, but with either endianness. More...
class | LittleEndianBitConverter
Implementation of EndianBitConverter which converts to/from little-endian byte arrays. More...

Enumerations

enum | Endianness { LittleEndian, BigEndian }
Endianness of a converter. More...

Enumeration Type Documentation

enum MiscUtil::Conversion::Endianness

Endianness of a converter.

Enumerator:
LittleEndian

Little endian - least significant byte first.

BigEndian

Big endian - most significant byte first.

Definition at line 7 of file Endianness.cs.

Generated on Fri Sep 22 2017 10:35:17 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: MiscUtil.IO.EndianBinaryReader Class Reference

  • MiscUtil
  • IO
  • EndianBinaryReader
Public Member Functions | Properties
MiscUtil.IO.EndianBinaryReader Class Reference

Equivalent of System.IO.BinaryReader, but with either endianness, depending on the EndianBitConverter it is constructed with. No data is buffered in the reader; the client may seek within the stream at will. More...

List of all members.

Public Member Functions

EndianBinaryReader (EndianBitConverter bitConverter, Stream stream)
Equivalent of System.IO.BinaryWriter, but with either endianness, depending on the EndianBitConverter it is constructed with.
EndianBinaryReader (EndianBitConverter bitConverter, Stream stream, Encoding encoding)
Constructs a new binary reader with the given bit converter, reading to the given stream, using the given encoding.
void | Close ()
Closes the reader, including the underlying stream..
void | Seek (int offset, SeekOrigin origin)
Seeks within the stream.
byte | ReadByte ()
Reads a single byte from the stream.
sbyte | ReadSByte ()
Reads a single signed byte from the stream.
bool | ReadBoolean ()
Reads a boolean from the stream. 1 byte is read.
short | ReadInt16 ()
Reads a 16-bit signed integer from the stream, using the bit converter for this reader. 2 bytes are read.
int | ReadInt32 ()
Reads a 32-bit signed integer from the stream, using the bit converter for this reader. 4 bytes are read.
long | ReadInt64 ()
Reads a 64-bit signed integer from the stream, using the bit converter for this reader. 8 bytes are read.
ushort | ReadUInt16 ()
Reads a 16-bit unsigned integer from the stream, using the bit converter for this reader. 2 bytes are read.
uint | ReadUInt32 ()
Reads a 32-bit unsigned integer from the stream, using the bit converter for this reader. 4 bytes are read.
ulong | ReadUInt64 ()
Reads a 64-bit unsigned integer from the stream, using the bit converter for this reader. 8 bytes are read.
float | ReadSingle ()
Reads a single-precision floating-point value from the stream, using the bit converter for this reader. 4 bytes are read.
double | ReadDouble ()
Reads a double-precision floating-point value from the stream, using the bit converter for this reader. 8 bytes are read.
decimal | ReadDecimal ()
Reads a decimal value from the stream, using the bit converter for this reader. 16 bytes are read.
int | Read ()
Reads a single character from the stream, using the character encoding for this reader. If no characters have been fully read by the time the stream ends,.
int | Read (char[] data, int index, int count)
Reads the specified number of characters into the given buffer, starting at the given index.
int | Read (byte[] buffer, int index, int count)
Reads the specified number of bytes into the given buffer, starting at the given index.
byte[] | ReadBytes (int count)
Reads the specified number of bytes, returning them in a new byte array. If not enough bytes are available before the end of the stream, this method will return what is available.
byte[] | ReadBytesOrThrow (int count)
Reads the specified number of bytes, returning them in a new byte array. If not enough bytes are available before the end of the stream, this method will throw an IOException.
int | Read7BitEncodedInt ()
Reads a 7-bit encoded integer from the stream. This is stored with the least significant information first, with 7 bits of information per byte of value, and the top bit as a continuation flag. This method is not affected by the endianness of the bit converter.
int | ReadBigEndian7BitEncodedInt ()
Reads a 7-bit encoded integer from the stream. This is stored with the most significant information first, with 7 bits of information per byte of value, and the top bit as a continuation flag. This method is not affected by the endianness of the bit converter.
string | ReadString ()
Reads a length-prefixed string from the stream, using the encoding for this reader. A 7-bit encoded integer is first read, which specifies the number of bytes to read from the stream. These bytes are then converted into a string with the encoding for this reader.
void | Dispose ()
Disposes of the underlying stream.

Properties

EndianBitConverter | BitConverter [get]
The bit converter used to read values from the stream.
Encoding | Encoding [get]
The encoding used to read strings.
Stream | BaseStream [get]
Gets the underlying stream of the EndianBinaryReader.

Detailed Description

Equivalent of System.IO.BinaryReader, but with either endianness, depending on the EndianBitConverter it is constructed with. No data is buffered in the reader; the client may seek within the stream at will.

Definition at line 13 of file EndianBinaryReader.cs.

Constructor & Destructor Documentation

MiscUtil.IO.EndianBinaryReader.EndianBinaryReader | ( | EndianBitConverter | bitConverter,
 |  | Stream | stream
 | ) |  | [inline]

Equivalent of System.IO.BinaryWriter, but with either endianness, depending on the EndianBitConverter it is constructed with.

Parameters:
bitConverter | Converter to use when reading data
stream | Stream to read data from

Definition at line 45 of file EndianBinaryReader.cs.

MiscUtil.IO.EndianBinaryReader.EndianBinaryReader | ( | EndianBitConverter | bitConverter,
 |  | Stream | stream,
 |  | Encoding | encoding
 | ) |  | [inline]

Constructs a new binary reader with the given bit converter, reading to the given stream, using the given encoding.

Parameters:
bitConverter | Converter to use when reading data
stream | Stream to read data from
encoding | Encoding to use when reading character data

Definition at line 57 of file EndianBinaryReader.cs.

Member Function Documentation

void MiscUtil.IO.EndianBinaryReader.Close ( ) [inline]

Closes the reader, including the underlying stream..

Definition at line 121 of file EndianBinaryReader.cs.

void MiscUtil.IO.EndianBinaryReader.Dispose ( ) [inline]

Disposes of the underlying stream.

Definition at line 589 of file EndianBinaryReader.cs.

int MiscUtil.IO.EndianBinaryReader.Read ( ) [inline]

Reads a single character from the stream, using the character encoding for this reader. If no characters have been fully read by the time the stream ends,.

-1 is returned.

Returns:
The character read, or -1 for end of stream.

Definition at line 272 of file EndianBinaryReader.cs.

int MiscUtil.IO.EndianBinaryReader.Read | ( | char[] | data,
 |  | int | index,
 |  | int | count
 | ) |  | [inline]

Reads the specified number of characters into the given buffer, starting at the given index.

Parameters:
data | The buffer to copy data into
index | The first index to copy data into
count | The number of characters to read
Returns:
The number of characters actually read. This will only be less than the requested number of characters if the end of the stream is reached.

Definition at line 295 of file EndianBinaryReader.cs.

int MiscUtil.IO.EndianBinaryReader.Read | ( | byte[] | buffer,
 |  | int | index,
 |  | int | count
 | ) |  | [inline]

Reads the specified number of bytes into the given buffer, starting at the given index.

Parameters:
buffer | The buffer to copy data into
index | The first index to copy data into
count | The number of bytes to read
Returns:
The number of bytes actually read. This will only be less than the requested number of bytes if the end of the stream is reached.

Definition at line 369 of file EndianBinaryReader.cs.

int MiscUtil.IO.EndianBinaryReader.Read7BitEncodedInt ( ) [inline]

Reads a 7-bit encoded integer from the stream. This is stored with the least significant information first, with 7 bits of information per byte of value, and the top bit as a continuation flag. This method is not affected by the endianness of the bit converter.

Returns:
The 7-bit encoded integer read from the stream.

Definition at line 456 of file EndianBinaryReader.cs.

int MiscUtil.IO.EndianBinaryReader.ReadBigEndian7BitEncodedInt ( ) [inline]

Reads a 7-bit encoded integer from the stream. This is stored with the most significant information first, with 7 bits of information per byte of value, and the top bit as a continuation flag. This method is not affected by the endianness of the bit converter.

Returns:
The 7-bit encoded integer read from the stream.

Definition at line 485 of file EndianBinaryReader.cs.

bool MiscUtil.IO.EndianBinaryReader.ReadBoolean ( ) [inline]

Reads a boolean from the stream. 1 byte is read.

Returns:
The boolean read

Definition at line 161 of file EndianBinaryReader.cs.

byte MiscUtil.IO.EndianBinaryReader.ReadByte ( ) [inline]

Reads a single byte from the stream.

Returns:
The byte read

Definition at line 141 of file EndianBinaryReader.cs.

byte [] MiscUtil.IO.EndianBinaryReader.ReadBytes ( int count ) [inline]

Reads the specified number of bytes, returning them in a new byte array. If not enough bytes are available before the end of the stream, this method will return what is available.

Parameters:
count The number of bytes to read
Returns:
The bytes read

Definition at line 411 of file EndianBinaryReader.cs.

byte [] MiscUtil.IO.EndianBinaryReader.ReadBytesOrThrow ( int count ) [inline]

Reads the specified number of bytes, returning them in a new byte array. If not enough bytes are available before the end of the stream, this method will throw an IOException.

Parameters:
count The number of bytes to read
Returns:
The bytes read

Definition at line 442 of file EndianBinaryReader.cs.

decimal MiscUtil.IO.EndianBinaryReader.ReadDecimal ( ) [inline]

Reads a decimal value from the stream, using the bit converter for this reader. 16 bytes are read.

Returns:
The decimal value read

Definition at line 260 of file EndianBinaryReader.cs.

double MiscUtil.IO.EndianBinaryReader.ReadDouble ( ) [inline]

Reads a double-precision floating-point value from the stream, using the bit converter for this reader. 8 bytes are read.

Returns:
The floating point value read

Definition at line 249 of file EndianBinaryReader.cs.

short MiscUtil.IO.EndianBinaryReader.ReadInt16 ( ) [inline]

Reads a 16-bit signed integer from the stream, using the bit converter for this reader. 2 bytes are read.

Returns:
The 16-bit integer read

Definition at line 172 of file EndianBinaryReader.cs.

int MiscUtil.IO.EndianBinaryReader.ReadInt32 ( ) [inline]

Reads a 32-bit signed integer from the stream, using the bit converter for this reader. 4 bytes are read.

Returns:
The 32-bit integer read

Definition at line 183 of file EndianBinaryReader.cs.

long MiscUtil.IO.EndianBinaryReader.ReadInt64 ( ) [inline]

Reads a 64-bit signed integer from the stream, using the bit converter for this reader. 8 bytes are read.

Returns:
The 64-bit integer read

Definition at line 194 of file EndianBinaryReader.cs.

sbyte MiscUtil.IO.EndianBinaryReader.ReadSByte ( ) [inline]

Reads a single signed byte from the stream.

Returns:
The byte read

Definition at line 151 of file EndianBinaryReader.cs.

float MiscUtil.IO.EndianBinaryReader.ReadSingle ( ) [inline]

Reads a single-precision floating-point value from the stream, using the bit converter for this reader. 4 bytes are read.

Returns:
The floating point value read

Definition at line 238 of file EndianBinaryReader.cs.

string MiscUtil.IO.EndianBinaryReader.ReadString ( ) [inline]

Reads a length-prefixed string from the stream, using the encoding for this reader. A 7-bit encoded integer is first read, which specifies the number of bytes to read from the stream. These bytes are then converted into a string with the encoding for this reader.

Returns:
The string read from the stream.

Definition at line 514 of file EndianBinaryReader.cs.

ushort MiscUtil.IO.EndianBinaryReader.ReadUInt16 ( ) [inline]

Reads a 16-bit unsigned integer from the stream, using the bit converter for this reader. 2 bytes are read.

Returns:
The 16-bit unsigned integer read

Definition at line 205 of file EndianBinaryReader.cs.

uint MiscUtil.IO.EndianBinaryReader.ReadUInt32 ( ) [inline]

Reads a 32-bit unsigned integer from the stream, using the bit converter for this reader. 4 bytes are read.

Returns:
The 32-bit unsigned integer read

Definition at line 216 of file EndianBinaryReader.cs.

ulong MiscUtil.IO.EndianBinaryReader.ReadUInt64 ( ) [inline]

Reads a 64-bit unsigned integer from the stream, using the bit converter for this reader. 8 bytes are read.

Returns:
The 64-bit unsigned integer read

Definition at line 227 of file EndianBinaryReader.cs.

void MiscUtil.IO.EndianBinaryReader.Seek | ( | int | offset,
 |  | SeekOrigin | origin
 | ) |  | [inline]

Seeks within the stream.

Parameters:
offset | Offset to seek to.
origin | Origin of seek operation.

Definition at line 131 of file EndianBinaryReader.cs.

Property Documentation

Stream MiscUtil.IO.EndianBinaryReader.BaseStream [get]

Gets the underlying stream of the EndianBinaryReader.

Definition at line 112 of file EndianBinaryReader.cs.

EndianBitConverter MiscUtil.IO.EndianBinaryReader.BitConverter [get]

The bit converter used to read values from the stream.

Definition at line 94 of file EndianBinaryReader.cs.

Encoding MiscUtil.IO.EndianBinaryReader.Encoding [get]

The encoding used to read strings.

Definition at line 103 of file EndianBinaryReader.cs.

The documentation for this class was generated from the following file:
  • MiscUtil/IO/EndianBinaryReader.cs
Generated on Fri Sep 22 2017 10:35:17 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: MiscUtil.IO.EndianBinaryWriter Class Reference

  • MiscUtil
  • IO
  • EndianBinaryWriter
Public Member Functions | Properties
MiscUtil.IO.EndianBinaryWriter Class Reference

Equivalent of System.IO.BinaryWriter, but with either endianness, depending on the EndianBitConverter it is constructed with. More...

List of all members.

Public Member Functions

EndianBinaryWriter (EndianBitConverter bitConverter, Stream stream)
Constructs a new binary writer with the given bit converter, writing to the given stream, using UTF-8 encoding.
EndianBinaryWriter (EndianBitConverter bitConverter, Stream stream, Encoding encoding)
Constructs a new binary writer with the given bit converter, writing to the given stream, using the given encoding.
void | Close ()
Closes the writer, including the underlying stream.
void | Flush ()
Flushes the underlying stream.
void | Seek (int offset, SeekOrigin origin)
Seeks within the stream.
void | Write (bool value)
Writes a boolean value to the stream. 1 byte is written.
void | Write (short value)
Writes a 16-bit signed integer to the stream, using the bit converter for this writer. 2 bytes are written.
void | Write (int value)
Writes a 32-bit signed integer to the stream, using the bit converter for this writer. 4 bytes are written.
void | Write (long value)
Writes a 64-bit signed integer to the stream, using the bit converter for this writer. 8 bytes are written.
void | Write (ushort value)
Writes a 16-bit unsigned integer to the stream, using the bit converter for this writer. 2 bytes are written.
void | Write (uint value)
Writes a 32-bit unsigned integer to the stream, using the bit converter for this writer. 4 bytes are written.
void | Write (ulong value)
Writes a 64-bit unsigned integer to the stream, using the bit converter for this writer. 8 bytes are written.
void | Write (float value)
Writes a single-precision floating-point value to the stream, using the bit converter for this writer. 4 bytes are written.
void | Write (double value)
Writes a double-precision floating-point value to the stream, using the bit converter for this writer. 8 bytes are written.
void | Write (decimal value)
Writes a decimal value to the stream, using the bit converter for this writer. 16 bytes are written.
void | Write (byte value)
Writes a signed byte to the stream.
void | Write (sbyte value)
Writes an unsigned byte to the stream.
void | Write (byte[] value)
Writes an array of bytes to the stream.
void | Write (byte[] value, int offset, int count)
Writes a portion of an array of bytes to the stream.
void | Write (char value)
Writes a single character to the stream, using the encoding for this writer.
void | Write (char[] value)
Writes an array of characters to the stream, using the encoding for this writer.
void | Write (string value)
Writes a string to the stream, using the encoding for this writer.
void | Write7BitEncodedInt (int value)
Writes a 7-bit encoded integer from the stream. This is stored with the least significant information first, with 7 bits of information per byte of value, and the top bit as a continuation flag.
void | Dispose ()
Disposes of the underlying stream.

Properties

EndianBitConverter | BitConverter [get]
The bit converter used to write values to the stream.
Encoding | Encoding [get]
The encoding used to write strings.
Stream | BaseStream [get]
Gets the underlying stream of the EndianBinaryWriter.

Detailed Description

Equivalent of System.IO.BinaryWriter, but with either endianness, depending on the EndianBitConverter it is constructed with.

Definition at line 12 of file EndianBinaryWriter.cs.

Constructor & Destructor Documentation

MiscUtil.IO.EndianBinaryWriter.EndianBinaryWriter | ( | EndianBitConverter | bitConverter,
 |  | Stream | stream
 | ) |  | [inline]

Constructs a new binary writer with the given bit converter, writing to the given stream, using UTF-8 encoding.

Parameters:
bitConverter | Converter to use when writing data
stream | Stream to write data to

Definition at line 36 of file EndianBinaryWriter.cs.

MiscUtil.IO.EndianBinaryWriter.EndianBinaryWriter | ( | EndianBitConverter | bitConverter,
 |  | Stream | stream,
 |  | Encoding | encoding
 | ) |  | [inline]

Constructs a new binary writer with the given bit converter, writing to the given stream, using the given encoding.

Parameters:
bitConverter | Converter to use when writing data
stream | Stream to write data to
encoding | Encoding to use when writing character data

Definition at line 48 of file EndianBinaryWriter.cs.

Member Function Documentation

void MiscUtil.IO.EndianBinaryWriter.Close ( ) [inline]

Closes the writer, including the underlying stream.

Definition at line 105 of file EndianBinaryWriter.cs.

void MiscUtil.IO.EndianBinaryWriter.Dispose ( ) [inline]

Disposes of the underlying stream.

Definition at line 381 of file EndianBinaryWriter.cs.

void MiscUtil.IO.EndianBinaryWriter.Flush ( ) [inline]

Flushes the underlying stream.

Definition at line 113 of file EndianBinaryWriter.cs.

void MiscUtil.IO.EndianBinaryWriter.Seek | ( | int | offset,
 |  | SeekOrigin | origin
 | ) |  | [inline]

Seeks within the stream.

Parameters:
offset | Offset to seek to.
origin | Origin of seek operation.

Definition at line 124 of file EndianBinaryWriter.cs.

void MiscUtil.IO.EndianBinaryWriter.Write ( bool value ) [inline]

Writes a boolean value to the stream. 1 byte is written.

Parameters:
value The value to write

Definition at line 134 of file EndianBinaryWriter.cs.

void MiscUtil.IO.EndianBinaryWriter.Write ( short value ) [inline]

Writes a 16-bit signed integer to the stream, using the bit converter for this writer. 2 bytes are written.

Parameters:
value The value to write

Definition at line 145 of file EndianBinaryWriter.cs.

void MiscUtil.IO.EndianBinaryWriter.Write ( int value ) [inline]

Writes a 32-bit signed integer to the stream, using the bit converter for this writer. 4 bytes are written.

Parameters:
value The value to write

Definition at line 156 of file EndianBinaryWriter.cs.

void MiscUtil.IO.EndianBinaryWriter.Write ( long value ) [inline]

Writes a 64-bit signed integer to the stream, using the bit converter for this writer. 8 bytes are written.

Parameters:
value The value to write

Definition at line 167 of file EndianBinaryWriter.cs.

void MiscUtil.IO.EndianBinaryWriter.Write ( ushort value ) [inline]

Writes a 16-bit unsigned integer to the stream, using the bit converter for this writer. 2 bytes are written.

Parameters:
value The value to write

Definition at line 178 of file EndianBinaryWriter.cs.

void MiscUtil.IO.EndianBinaryWriter.Write ( uint value ) [inline]

Writes a 32-bit unsigned integer to the stream, using the bit converter for this writer. 4 bytes are written.

Parameters:
value The value to write

Definition at line 189 of file EndianBinaryWriter.cs.

void MiscUtil.IO.EndianBinaryWriter.Write ( ulong value ) [inline]

Writes a 64-bit unsigned integer to the stream, using the bit converter for this writer. 8 bytes are written.

Parameters:
value The value to write

Definition at line 200 of file EndianBinaryWriter.cs.

void MiscUtil.IO.EndianBinaryWriter.Write ( float value ) [inline]

Writes a single-precision floating-point value to the stream, using the bit converter for this writer. 4 bytes are written.

Parameters:
value The value to write

Definition at line 211 of file EndianBinaryWriter.cs.

void MiscUtil.IO.EndianBinaryWriter.Write ( double value ) [inline]

Writes a double-precision floating-point value to the stream, using the bit converter for this writer. 8 bytes are written.

Parameters:
value The value to write

Definition at line 222 of file EndianBinaryWriter.cs.

void MiscUtil.IO.EndianBinaryWriter.Write ( decimal value ) [inline]

Writes a decimal value to the stream, using the bit converter for this writer. 16 bytes are written.

Parameters:
value The value to write

Definition at line 233 of file EndianBinaryWriter.cs.

void MiscUtil.IO.EndianBinaryWriter.Write ( byte value ) [inline]

Writes a signed byte to the stream.

Parameters:
value The value to write

Definition at line 243 of file EndianBinaryWriter.cs.

void MiscUtil.IO.EndianBinaryWriter.Write ( sbyte value ) [inline]

Writes an unsigned byte to the stream.

Parameters:
value The value to write

Definition at line 253 of file EndianBinaryWriter.cs.

void MiscUtil.IO.EndianBinaryWriter.Write ( byte[] value ) [inline]

Writes an array of bytes to the stream.

Parameters:
value The values to write

Definition at line 263 of file EndianBinaryWriter.cs.

void MiscUtil.IO.EndianBinaryWriter.Write | ( | byte[] | value,
 |  | int | offset,
 |  | int | count
 | ) |  | [inline]

Writes a portion of an array of bytes to the stream.

Parameters:
value | An array containing the bytes to write
offset | The index of the first byte to write within the array
count | The number of bytes to write

Definition at line 278 of file EndianBinaryWriter.cs.

void MiscUtil.IO.EndianBinaryWriter.Write ( char value ) [inline]

Writes a single character to the stream, using the encoding for this writer.

Parameters:
value The value to write

Definition at line 288 of file EndianBinaryWriter.cs.

void MiscUtil.IO.EndianBinaryWriter.Write ( char[] value ) [inline]

Writes an array of characters to the stream, using the encoding for this writer.

Parameters:
value An array containing the characters to write

Definition at line 298 of file EndianBinaryWriter.cs.

void MiscUtil.IO.EndianBinaryWriter.Write ( string value ) [inline]

Writes a string to the stream, using the encoding for this writer.

Parameters:
value The value to write. Must not be null.
Exceptions:
ArgumentNullException value is null

Definition at line 314 of file EndianBinaryWriter.cs.

void MiscUtil.IO.EndianBinaryWriter.Write7BitEncodedInt ( int value ) [inline]

Writes a 7-bit encoded integer from the stream. This is stored with the least significant information first, with 7 bits of information per byte of value, and the top bit as a continuation flag.

Parameters:
value The 7-bit encoded integer to write to the stream

Definition at line 332 of file EndianBinaryWriter.cs.

Property Documentation

Stream MiscUtil.IO.EndianBinaryWriter.BaseStream [get]

Gets the underlying stream of the EndianBinaryWriter.

Definition at line 96 of file EndianBinaryWriter.cs.

EndianBitConverter MiscUtil.IO.EndianBinaryWriter.BitConverter [get]

The bit converter used to write values to the stream.

Definition at line 78 of file EndianBinaryWriter.cs.

Encoding MiscUtil.IO.EndianBinaryWriter.Encoding [get]

The encoding used to write strings.

Definition at line 87 of file EndianBinaryWriter.cs.

The documentation for this class was generated from the following file:
  • MiscUtil/IO/EndianBinaryWriter.cs
Generated on Fri Sep 22 2017 10:35:17 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: WinUsb.DeviceManagement Class Reference

  • WinUsb
  • DeviceManagement
Classes | Public Member Functions | Static Public Member Functions | Public Attributes
WinUsb.DeviceManagement Class Reference

Routines for detecting devices and receiving device notifications. More...

List of all members.

Classes

class | DEV_BROADCAST_DEVICEINTERFACE
class | DEV_BROADCAST_DEVICEINTERFACE_1
class | DEV_BROADCAST_HDR
struct | SP_DEVICE_INTERFACE_DATA

Public Member Functions

Boolean | RegisterForDeviceNotifications (String devicePathName, IntPtr formHandle, Guid classGuid, ref IntPtr deviceNotificationHandle)
Requests to receive a notification when a device is attached or removed.

Static Public Member Functions

static Boolean | FindDeviceFromGuid (System.Guid myGuid, out List< String > devicePathNames)
Use SetupDi API functions to retrieve the device path name of an attached device that belongs to a device interface class.

Public Attributes

const Int32 | DBT_DEVICEARRIVAL = 0X8000
const Int32 | DBT_DEVICEREMOVECOMPLETE = 0X8004
const Int32 | DBT_DEVTYP_DEVICEINTERFACE = 5
const Int32 | DBT_DEVTYP_HANDLE = 6
const Int32 | DEVICE_NOTIFY_ALL_INTERFACE_CLASSES = 4
const Int32 | DEVICE_NOTIFY_SERVICE_HANDLE = 1
const Int32 | DEVICE_NOTIFY_WINDOW_HANDLE = 0
const Int32 | WM_DEVICECHANGE = 0X219

Detailed Description

Routines for detecting devices and receiving device notifications.

Definition at line 11 of file DeviceManagement.cs.

Member Function Documentation

static Boolean WinUsb.DeviceManagement.FindDeviceFromGuid | ( | System.Guid | myGuid,
 |  | out List< String > | devicePathNames
 | ) |  | [inline, static]

Use SetupDi API functions to retrieve the device path name of an attached device that belongs to a device interface class.

Parameters:
myGuid | an interface class GUID.
devicePathNames | Array of paths to devices
Returns:
True if a device is found, False if not.

Definition at line 102 of file DeviceManagement.cs.

Here is the caller graph for this function:

Boolean WinUsb.DeviceManagement.RegisterForDeviceNotifications | ( | String | devicePathName,
 |  | IntPtr | formHandle,
 |  | Guid | classGuid,
 |  | ref IntPtr | deviceNotificationHandle
 | ) |  | [inline]

Requests to receive a notification when a device is attached or removed.

Parameters:
devicePathName | handle to a device.
formHandle | handle to the window that will receive device events.
classGuid | device interface GUID.
deviceNotificationHandle | returned device notification handle.
Returns:
True on success.

Definition at line 304 of file DeviceManagement.cs.

Member Data Documentation

const Int32 WinUsb.DeviceManagement.DBT_DEVICEARRIVAL = 0X8000

Definition at line 14 of file DeviceManagementApi.cs.

const Int32 WinUsb.DeviceManagement.DBT_DEVICEREMOVECOMPLETE = 0X8004

Definition at line 15 of file DeviceManagementApi.cs.

const Int32 WinUsb.DeviceManagement.DBT_DEVTYP_DEVICEINTERFACE = 5

Definition at line 16 of file DeviceManagementApi.cs.

const Int32 WinUsb.DeviceManagement.DBT_DEVTYP_HANDLE = 6

Definition at line 17 of file DeviceManagementApi.cs.

const Int32 WinUsb.DeviceManagement.DEVICE_NOTIFY_ALL_INTERFACE_CLASSES = 4

Definition at line 18 of file DeviceManagementApi.cs.

const Int32 WinUsb.DeviceManagement.DEVICE_NOTIFY_SERVICE_HANDLE = 1

Definition at line 19 of file DeviceManagementApi.cs.

const Int32 WinUsb.DeviceManagement.DEVICE_NOTIFY_WINDOW_HANDLE = 0

Definition at line 20 of file DeviceManagementApi.cs.

const Int32 WinUsb.DeviceManagement.WM_DEVICECHANGE = 0X219

Definition at line 21 of file DeviceManagementApi.cs.

The documentation for this class was generated from the following files:
  • WinUsb/DeviceManagement.cs
  • WinUsb/DeviceManagementApi.cs
Generated on Fri Sep 22 2017 10:35:17 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: WinUsb.FileIO Class Reference

  • WinUsb
  • FileIO
WinUsb.FileIO Class Reference

API declarations relating to file I/O (and used by WinUsb). More...

List of all members.

Detailed Description

API declarations relating to file I/O (and used by WinUsb).

Definition at line 11 of file FileIOApi.cs.

The documentation for this class was generated from the following file:
  • WinUsb/FileIOApi.cs
Generated on Fri Sep 22 2017 10:35:17 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: WinUsb.SafeNativeMethods Class Reference

  • WinUsb
  • SafeNativeMethods
Classes | Public Member Functions
WinUsb.SafeNativeMethods Class Reference

These declarations are translated from the C declarations in multiple files in the Windows DDK. The files are: More...

List of all members.

Classes

struct | USB_CONFIGURATION_DESCRIPTOR
struct | USB_INTERFACE_DESCRIPTOR
struct | WINUSB_PIPE_INFORMATION
struct | WINUSB_SETUP_PACKET

Public Member Functions

static Boolean | WinUsb_ReadPipe (IntPtr InterfaceHandle, Byte PipeID, Byte[] Buffer, UInt32 BufferLength, ref UInt32 LengthTransferred, IntPtr Overlapped)
static Boolean | WinUsb_WritePipe (IntPtr InterfaceHandle, Byte PipeID, Byte[] Buffer, UInt32 BufferLength, ref UInt32 LengthTransferred, IntPtr Overlapped)

Detailed Description

These declarations are translated from the C declarations in multiple files in the Windows DDK. The files are:

winddk\6001\inc\api\usb.h winddk\6001\inc\api\usb100.h winddk\6001\inc\api\winusbio.h

(your home directory and release number may be different)

Definition at line 17 of file SafeNativeMethods.cs.

Member Function Documentation

static Boolean WinUsb.SafeNativeMethods.WinUsb_ReadPipe | ( | IntPtr | InterfaceHandle,
 |  | Byte | PipeID,
 |  | Byte[] | Buffer,
 |  | UInt32 | BufferLength,
 |  | ref UInt32 | LengthTransferred,
 |  | IntPtr | Overlapped
 | ) |  |

Here is the caller graph for this function:

static Boolean WinUsb.SafeNativeMethods.WinUsb_WritePipe | ( | IntPtr | InterfaceHandle,
 |  | Byte | PipeID,
 |  | Byte[] | Buffer,
 |  | UInt32 | BufferLength,
 |  | ref UInt32 | LengthTransferred,
 |  | IntPtr | Overlapped
 | ) |  |

Here is the caller graph for this function:

The documentation for this class was generated from the following file:
  • WinUsb/SafeNativeMethods.cs
Generated on Fri Sep 22 2017 10:35:18 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: WinUsb.WinUsbDevice Class Reference

  • WinUsb
  • WinUsbDevice
Classes | Public Member Functions | Public Attributes
WinUsb.WinUsbDevice Class Reference

Routines for the WinUsb driver supported by Windows Vista and Windows XP. More...

Collaboration diagram for WinUsb.WinUsbDevice:
[legend]

List of all members.

Classes

struct | devInfo

Public Member Functions

void | CloseDeviceHandle ()
Closes the device handle obtained with CreateFile and frees resources.
Boolean | GetDeviceHandle (String devicePathName)
Requests a handle with CreateFile.
Boolean | InitializeDevice ()
Initializes a device interface and obtains information about it. Calls these winusb API functions: WinUsb_Initialize WinUsb_QueryInterfaceSettings WinUsb_QueryPipe.
void | ReadViaBulkTransfer (Byte pipeID, UInt32 bytesToRead, ref Byte[] buffer, ref UInt32 bytesRead, ref Boolean success)
Attempts to read data from a bulk IN endpoint.
Boolean | SendViaBulkTransfer (ref Byte[] buffer, UInt32 bytesToWrite)
Attempts to send data via a bulk OUT endpoint.

Public Attributes

devInfo | myDevInfo = new devInfo()

Detailed Description

Routines for the WinUsb driver supported by Windows Vista and Windows XP.

Definition at line 11 of file WinUsbDevice.cs.

Member Function Documentation

void WinUsb.WinUsbDevice.CloseDeviceHandle ( ) [inline]

Closes the device handle obtained with CreateFile and frees resources.

Definition at line 30 of file WinUsbDevice.cs.

Here is the caller graph for this function:

Boolean WinUsb.WinUsbDevice.GetDeviceHandle ( String devicePathName ) [inline]

Requests a handle with CreateFile.

Parameters:
devicePathName Returned by SetupDiGetDeviceInterfaceDetail in an SP_DEVICE_INTERFACE_DETAIL_DATA structure.
Returns:
The handle.

Definition at line 211 of file WinUsbDevice.cs.

Boolean WinUsb.WinUsbDevice.InitializeDevice ( ) [inline]

Initializes a device interface and obtains information about it. Calls these winusb API functions: WinUsb_Initialize WinUsb_QueryInterfaceSettings WinUsb_QueryPipe.

Parameters:
deviceHandle A handle obtained in a call to winusb_initialize.
Returns:
True on success, False on failure.

Definition at line 265 of file WinUsbDevice.cs.

void WinUsb.WinUsbDevice.ReadViaBulkTransfer | ( | Byte | pipeID,
 |  | UInt32 | bytesToRead,
 |  | ref Byte[] | buffer,
 |  | ref UInt32 | bytesRead,
 |  | ref Boolean | success
 | ) |  | [inline]

Attempts to read data from a bulk IN endpoint.

Parameters:
InterfaceHandle | Device interface handle.
PipeID | Endpoint address.
bytesToRead | Number of bytes to read.
Buffer | Buffer for storing the bytes read.
bytesRead | Number of bytes read.
success | Success or failure status.

Definition at line 534 of file WinUsbDevice.cs.

Here is the call graph for this function:

Boolean WinUsb.WinUsbDevice.SendViaBulkTransfer | ( | ref Byte[] | buffer,
 |  | UInt32 | bytesToWrite
 | ) |  | [inline]

Attempts to send data via a bulk OUT endpoint.

Parameters:
buffer | Buffer containing the bytes to write.
bytesToWrite | Number of bytes to write.
Returns:
True on success, False on failure.

Definition at line 647 of file WinUsbDevice.cs.

Here is the call graph for this function:

Member Data Documentation

devInfo WinUsb.WinUsbDevice.myDevInfo = new devInfo()

Definition at line 24 of file WinUsbDevice.cs.

The documentation for this class was generated from the following file:
  • WinUsb/WinUsbDevice.cs
Generated on Fri Sep 22 2017 10:35:18 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Namespace Members

  • Namespace List
  • Namespace Members
  • All
  • Enumerations
Here is a list of all namespace members with links to the namespace documentation for each member:
  • DeviceTypes : csRepeat
  • Endianness : MiscUtil::Conversion
Generated on Fri Sep 22 2017 10:35:18 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Namespace Members

  • Namespace List
  • Namespace Members
  • All
  • Enumerations
  • DeviceTypes : csRepeat
  • Endianness : MiscUtil::Conversion
Generated on Fri Sep 22 2017 10:35:18 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: WinUsb.WinUsbDevice.devInfo Struct Reference

  • WinUsb
  • WinUsbDevice
  • devInfo
Public Attributes
WinUsb.WinUsbDevice.devInfo Struct Reference

List of all members.

Public Attributes

internal SafeFileHandle | deviceHandle
internal IntPtr | winUsbHandle
Byte | bulkInPipe
internal Byte | bulkOutPipe
internal Byte | interruptInPipe
internal Byte | interruptOutPipe
internal UInt32 | devicespeed

Detailed Description

Definition at line 13 of file WinUsbDevice.cs.

Member Data Documentation

Byte WinUsb.WinUsbDevice.devInfo.bulkInPipe

Definition at line 17 of file WinUsbDevice.cs.

internal Byte WinUsb.WinUsbDevice.devInfo.bulkOutPipe

Definition at line 18 of file WinUsbDevice.cs.

internal SafeFileHandle WinUsb.WinUsbDevice.devInfo.deviceHandle

Definition at line 15 of file WinUsbDevice.cs.

internal UInt32 WinUsb.WinUsbDevice.devInfo.devicespeed

Definition at line 21 of file WinUsbDevice.cs.

internal Byte WinUsb.WinUsbDevice.devInfo.interruptInPipe

Definition at line 19 of file WinUsbDevice.cs.

internal Byte WinUsb.WinUsbDevice.devInfo.interruptOutPipe

Definition at line 20 of file WinUsbDevice.cs.

internal IntPtr WinUsb.WinUsbDevice.devInfo.winUsbHandle

Definition at line 16 of file WinUsbDevice.cs.

The documentation for this struct was generated from the following file:
  • WinUsb/WinUsbDevice.cs
Generated on Fri Sep 22 2017 10:35:18 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Class Members

  • All
  • Functions
  • Variables
  • Enumerations
  • Properties
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • 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 : csRepeat.FW6DppStatus
  • AckResponse() : csRepeat.FW6.AckResponse
  • AckType : csRepeat.FW6.AckResponse
  • AckTypes : csRepeat.FW6.AckResponse
  • ADCGainCalibration : csRepeat.FW6.DiagnosticResponse
  • ADCOffsetCalibration : csRepeat.FW6.DiagnosticResponse
  • Address : csRepeat.FW6.AckResponse
  • AddressLsbOffset : csRepeat.FW6.AckResponse
  • AddressMsbOffset : csRepeat.FW6.AckResponse
Generated on Fri Sep 22 2017 10:35:18 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Class Members

  • All
  • Functions
  • Variables
  • Enumerations
  • Properties
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • 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 -

  • BaseStream : MiscUtil.IO.EndianBinaryReader , MiscUtil.IO.EndianBinaryWriter
  • Big : MiscUtil.Conversion.EndianBitConverter
  • BitConverter : MiscUtil.IO.EndianBinaryReader , MiscUtil.IO.EndianBinaryWriter
  • bulkInPipe : WinUsb.WinUsbDevice.devInfo
  • bulkOutPipe : WinUsb.WinUsbDevice.devInfo
  • buttonFindUsbDevices : csDP5.Form1
  • buttonFindUsbDevices_Click() : csDP5.Form1
  • buttonRunFW6Tests : csDP5.Form1
  • buttonRunFW6Tests_Click() : csDP5.Form1
Generated on Fri Sep 22 2017 10:35:18 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Class Members

  • All
  • Functions
  • Variables
  • Enumerations
  • Properties
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • 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 -

  • Calculate16bitChecksum() : csRepeat.FW6.FW6Packet
  • ChecksumLength : csRepeat.FW6.FW6Packet
  • ClearDppData() : csRepeat.FW6.DPDeviceSerialFW6 , csRepeat.FW6.DPDeviceUsb , csRepeat.FW6.DPDeviceEthernet , csRepeat.FW6.FW6Device
  • ClearSpectrum() : csRepeat.FW6.ClearSpectrum
  • Close() : MiscUtil.IO.EndianBinaryReader , MiscUtil.IO.EndianBinaryWriter
  • CloseDeviceHandle() : WinUsb.WinUsbDevice
  • Configuration() : csRepeat.FW6.Configuration
  • ConfigurationReadback() : csRepeat.FW6.ConfigurationReadback
  • ConfigurationResponse() : csRepeat.FW6.ConfigurationResponse
  • Connect() : csRepeat.FW6.DPDeviceUsb , csRepeat.FW6.FW6Device , csRepeat.FW6.DPDeviceEthernet , csRepeat.FW6.DPDeviceSerialFW6
  • ConnectForTesting() : csRepeat.FW6.DPDeviceEthernet , csRepeat.FW6.DPDeviceSerialFW6 , csRepeat.FW6.DPDeviceUsb , csRepeat.FW6.FW6Device
  • CopyBytes() : MiscUtil.Conversion.EndianBitConverter
  • CopyBytesImpl() : MiscUtil.Conversion.BigEndianBitConverter , MiscUtil.Conversion.EndianBitConverter , MiscUtil.Conversion.LittleEndianBitConverter
  • CreateFullReadBackCmd() : AsciiCmdUtilities.CommandFilters
  • CreateResTestReadBackCmd() : AsciiCmdUtilities.CommandFilters
  • CreateSpectrumConfig() : AsciiCmdUtilities.CommandFilters
Generated on Fri Sep 22 2017 10:35:18 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Class Members

  • All
  • Functions
  • Variables
  • Enumerations
  • Properties
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • 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 : csRepeat.FW6.AckResponse , csRepeat.FW6.Configuration , csRepeat.FW6.ConfigurationResponse , csRepeat.FW6.fpgaDataPacketv2 , csRepeat.FW6.StartFpgaUpload , csRepeat.FW6.StartUCUpload , csRepeat.FW6.FW6Packet , csRepeat.FW6.StatusRequest , csRepeat.FW6.ClearSpectrum , csRepeat.FW6.DiagnosticRequest , csRepeat.FW6.SetADCCalibrationRequest , csRepeat.FW6.EnableMCA , csRepeat.FW6.DisableMCA , csRepeat.FW6.SetDCalRequest , csRepeat.FW6.StatusResponse , csRepeat.FW6.uCDataPacket , csRepeat.FW6.ConfigurationReadback , csRepeat.FW6.DiagnosticResponse , csRepeat.FW6.SetPZCorrectionRequest , csRepeat.FW6.uCDataPacketv2 , csRepeat.FW6.uCSwitchToImage , csRepeat.FW6.SetuCTemperatureCalibrationRequest
  • data : csRepeat.FW6.uCSwitchToImage
  • Data : csRepeat.FW6.fpgaDataPacket , csRepeat.FW6.SpectrumRequest , csRepeat.FW6.SpectrumResponse
  • DataPacketAckTimeoutMS : csRepeat.FW6.DPDeviceEthernet , csRepeat.FW6.DPDeviceSerialFW6 , csRepeat.FW6.DPDeviceUsb , csRepeat.FW6.FW6Device
  • DBT_DEVICEARRIVAL : WinUsb.DeviceManagement
  • DBT_DEVICEREMOVECOMPLETE : WinUsb.DeviceManagement
  • DBT_DEVTYP_DEVICEINTERFACE : WinUsb.DeviceManagement
  • DBT_DEVTYP_HANDLE : WinUsb.DeviceManagement
  • DCalSetting : csRepeat.FW6.DiagnosticResponse
  • DetectDevices() : csRepeat.FW6.DPDeviceEthernet , csRepeat.FW6.DPDeviceSerialFW6 , csRepeat.FW6.DPDeviceUsb
  • detectingDevices : csDP5.Form1
  • DEVICE_ID : csRepeat.FW6DppStatus
  • DEVICE_NOTIFY_ALL_INTERFACE_CLASSES : WinUsb.DeviceManagement
  • DEVICE_NOTIFY_SERVICE_HANDLE : WinUsb.DeviceManagement
  • DEVICE_NOTIFY_WINDOW_HANDLE : WinUsb.DeviceManagement
  • deviceEndPoint : csRepeat.FW6.DPDeviceEthernet
  • deviceHandle : WinUsb.WinUsbDevice.devInfo
  • devicespeed : WinUsb.WinUsbDevice.devInfo
  • DeviceType : csRepeat.DPDevice , csRepeat.FW6.StatusResponse
  • DiagnosticResponse() : csRepeat.FW6.DiagnosticResponse
  • DisableMCA() : csRepeat.FW6.DisableMCA
  • Disconnect() : csRepeat.FW6.DPDeviceSerialFW6 , csRepeat.FW6.DPDeviceUsb , csRepeat.FW6.FW6Device , csRepeat.FW6.DPDeviceEthernet
  • DisconnectForTesting() : csRepeat.FW6.DPDeviceUsb , csRepeat.FW6.DPDeviceEthernet , csRepeat.FW6.FW6Device , csRepeat.FW6.DPDeviceSerialFW6
  • DiscoverDevices() : csDP5.Form1
  • DisplayConfiguration() : csRepeat.FW6.FW6Device , csRepeat.FW6.DPDeviceSerialFW6 , csRepeat.FW6.DPDeviceEthernet , csRepeat.FW6.DPDeviceUsb
  • Dispose() : MiscUtil.IO.EndianBinaryWriter , csDP5.Form1 , MiscUtil.IO.EndianBinaryReader
  • DoubleToInt64Bits() : MiscUtil.Conversion.EndianBitConverter
  • DPDevice() : csRepeat.DPDevice
  • DPDeviceEthernet() : csRepeat.FW6.DPDeviceEthernet
  • DPDeviceSerialFW6() : csRepeat.FW6.DPDeviceSerialFW6
  • DPDeviceUsb() : csRepeat.FW6.DPDeviceUsb
  • DPP_ECO : csRepeat.FW6DppStatus
  • dppDP5 : csRepeat.FW6DppStatus
  • dppDP5G : csRepeat.FW6DppStatus
  • dppDP5X : csRepeat.FW6DppStatus
  • dppMCA8000D : csRepeat.FW6DppStatus
  • dppPX5 : csRepeat.FW6DppStatus
  • dppTB5 : csRepeat.FW6DppStatus
Generated on Fri Sep 22 2017 10:35:18 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Class Members

  • All
  • Functions
  • Variables
  • Enumerations
  • Properties
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • 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 -

  • EnableMCA() : csRepeat.FW6.EnableMCA
  • EncodedPacket : csRepeat.FW6.FW6Packet
  • Encoding : MiscUtil.IO.EndianBinaryWriter , MiscUtil.IO.EndianBinaryReader
  • EndianBinaryReader() : MiscUtil.IO.EndianBinaryReader
  • EndianBinaryWriter() : MiscUtil.IO.EndianBinaryWriter
  • Endianness : MiscUtil.Conversion.LittleEndianBitConverter , MiscUtil.Conversion.EndianBitConverter , MiscUtil.Conversion.BigEndianBitConverter
Generated on Fri Sep 22 2017 10:35:18 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Class Members

  • All
  • Functions
  • Variables
  • Enumerations
  • Properties
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • 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 -

  • FindDeviceFromGuid() : WinUsb.DeviceManagement
  • FirmwareMajor : csRepeat.FW6.DiagnosticResponse
  • FirmwareMinor : csRepeat.FW6.DiagnosticResponse
  • FirmwareVersion : csRepeat.DPDevice
  • Flush() : MiscUtil.IO.EndianBinaryWriter
  • Form1() : csDP5.Form1
  • fpgaDataPacket() : csRepeat.FW6.fpgaDataPacket
  • fpgaDataPacketv2() : csRepeat.FW6.fpgaDataPacketv2
  • FpgaEncryptionFailureVersion : csRepeat.DPDevice
  • FpgaMajor : csRepeat.FW6.DiagnosticResponse
  • FpgaMinor : csRepeat.FW6.DiagnosticResponse
  • FpgaState : csRepeat.DPDevice
  • FpgaStates : csRepeat.DPDevice
  • FpgaVersion : csRepeat.DPDevice
  • FpgaVersionMajor : csRepeat.FW6.StatusResponse
  • FpgaVersionMinor : csRepeat.FW6.StatusResponse
  • FromBytes() : MiscUtil.Conversion.BigEndianBitConverter , MiscUtil.Conversion.EndianBitConverter , MiscUtil.Conversion.LittleEndianBitConverter
  • FW6Device() : csRepeat.FW6.FW6Device
  • FW6PacketParser() : csRepeat.FW6.FW6PacketParser
  • FwBuildNumber : csRepeat.FW6.StatusResponse
  • FwVersionMajor : csRepeat.FW6.StatusResponse
  • FwVersionMinor : csRepeat.FW6.StatusResponse
Generated on Fri Sep 22 2017 10:35:18 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Class Members

  • All
  • Functions
  • Variables
  • Enumerations
  • Properties
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • 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 -

  • GetBytes() : MiscUtil.Conversion.EndianBitConverter
  • GetCmdDesc() : AsciiCmdUtilities.CommandFilters
  • GetConfiguration() : csRepeat.FW6.FW6Device , csRepeat.FW6.DPDeviceEthernet , csRepeat.FW6.DPDeviceSerialFW6 , csRepeat.FW6.DPDeviceUsb
  • GetDeviceHandle() : WinUsb.WinUsbDevice
  • GetDeviceNameFromVal() : csRepeat.FW6DppStatus
  • GetDiagnosticResponse : csRepeat.FW6.FW6Device
  • GetFullConfiguration() : csRepeat.FW6.DPDeviceEthernet , csRepeat.FW6.DPDeviceSerialFW6 , csRepeat.FW6.DPDeviceUsb , csRepeat.FW6.FW6Device
  • GetRawStatus() : csRepeat.FW6.DPDeviceEthernet , csRepeat.FW6.FW6Device , csRepeat.FW6.DPDeviceUsb , csRepeat.FW6.DPDeviceSerialFW6
  • GetSpectrumData() : csRepeat.FW6.DPDeviceEthernet , csRepeat.FW6.FW6Device , csRepeat.FW6.DPDeviceUsb , csRepeat.FW6.DPDeviceSerialFW6
  • GetStatusValueStrings() : csRepeat.FW6DppStatus
  • GetULong() : csRepeat.FW6DppStatus
Generated on Fri Sep 22 2017 10:35:18 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Class Members

  • All
  • Functions
  • Variables
  • Enumerations
  • Properties
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • 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 -

  • HandleBytes() : csRepeat.FW6.FW6PacketParser
  • HandleStates : csRepeat.FW6.FW6PacketParser
  • HasFirmwareLoadBeenCancelled : csRepeat.DPDevice
  • HasFirmwareLoadBeenCancelledDelegate() : csRepeat.DPDevice
Generated on Fri Sep 22 2017 10:35:18 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Class Members

  • All
  • Functions
  • Variables
  • Enumerations
  • Properties
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • 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 -

  • InitializeDevice() : WinUsb.WinUsbDevice
  • Int32BitsToSingle() : MiscUtil.Conversion.EndianBitConverter
  • Int64BitsToDouble() : MiscUtil.Conversion.EndianBitConverter
  • InterfaceType : csRepeat.DPDevice
  • InterfaceTypes : csRepeat.DPDevice
  • interruptInPipe : WinUsb.WinUsbDevice.devInfo
  • interruptOutPipe : WinUsb.WinUsbDevice.devInfo
  • isDP5_RevDxGains : csRepeat.FW6DppStatus
  • IsLittleEndian() : MiscUtil.Conversion.BigEndianBitConverter , MiscUtil.Conversion.EndianBitConverter , MiscUtil.Conversion.LittleEndianBitConverter
  • IsMatch() : csRepeat.FW6.SpectrumResponse , csRepeat.FW6.ConfigurationResponse , csRepeat.FW6.DiagnosticResponse , csRepeat.FW6.AckResponse , csRepeat.FW6.StatusResponse
Generated on Fri Sep 22 2017 10:35:18 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Class Members

  • All
  • Functions
  • Variables
  • Enumerations
  • Properties
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • 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 -

  • Little : MiscUtil.Conversion.EndianBitConverter
Generated on Fri Sep 22 2017 10:35:18 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Class Members

  • All
  • Functions
  • Variables
  • Enumerations
  • Properties
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • 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 -

  • MakeDp5CmdList() : AsciiCmdUtilities.CommandFilters
  • MCA_EN : csRepeat.FW6DppStatus
  • mcaChannels : csRepeat.FW6.DPDeviceSerialFW6 , csRepeat.FW6.FW6Device , csRepeat.FW6.DPDeviceUsb , csRepeat.FW6.DPDeviceEthernet
  • MessageHandler() : csRepeat.FW6.MessageHandler
  • myDevInfo : WinUsb.WinUsbDevice
Generated on Fri Sep 22 2017 10:35:18 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Class Members

  • All
  • Functions
  • Variables
  • Enumerations
  • Properties
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • 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() : csRepeat.FW6DppStatus
Generated on Fri Sep 22 2017 10:35:18 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Class Members

  • All
  • Functions
  • Variables
  • Enumerations
  • Properties
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • 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 -

  • PacketHeaderLength : csRepeat.FW6.FW6Packet
  • PauseDppData() : csRepeat.FW6.DPDeviceEthernet , csRepeat.FW6.DPDeviceUsb , csRepeat.FW6.FW6Device , csRepeat.FW6.DPDeviceSerialFW6
  • PC5_PRESENT : csRepeat.FW6DppStatus
  • PerformDeviceDetection() : csRepeat.DPDevice
  • PID1 : csRepeat.FW6.AckResponse , csRepeat.FW6.FW6Packet , csRepeat.FW6.uCSwitchToImage , csRepeat.FW6.SetADCCalibrationRequest , csRepeat.FW6.Configuration , csRepeat.FW6.SetDCalRequest , csRepeat.FW6.SetPZCorrectionRequest , csRepeat.FW6.ConfigurationReadback , csRepeat.FW6.SetuCTemperatureCalibrationRequest , csRepeat.FW6.SpectrumRequest , csRepeat.FW6.ConfigurationResponse , csRepeat.FW6.SpectrumResponse , csRepeat.FW6.StartFpgaUpload , csRepeat.FW6.DiagnosticRequest , csRepeat.FW6.StartUCUpload , csRepeat.FW6.StatusRequest , csRepeat.FW6.DiagnosticResponse , csRepeat.FW6.ClearSpectrum , csRepeat.FW6.EnableMCA , csRepeat.FW6.fpgaDataPacket , csRepeat.FW6.DisableMCA , csRepeat.FW6.StatusResponse , csRepeat.FW6.fpgaDataPacketv2 , csRepeat.FW6.uCDataPacket , csRepeat.FW6.uCDataPacketv2
  • PID1Offset : csRepeat.FW6.FW6Packet
  • PID2 : csRepeat.FW6.SetADCCalibrationRequest , csRepeat.FW6.AckResponse , csRepeat.FW6.Configuration , csRepeat.FW6.ConfigurationReadback , csRepeat.FW6.ConfigurationResponse , csRepeat.FW6.DiagnosticRequest , csRepeat.FW6.DiagnosticResponse , csRepeat.FW6.uCDataPacketv2 , csRepeat.FW6.fpgaDataPacket , csRepeat.FW6.fpgaDataPacketv2 , csRepeat.FW6.FW6Packet , csRepeat.FW6.uCSwitchToImage , csRepeat.FW6.SetDCalRequest , csRepeat.FW6.SetuCTemperatureCalibrationRequest , csRepeat.FW6.uCDataPacket , csRepeat.FW6.EnableMCA , csRepeat.FW6.DisableMCA , csRepeat.FW6.StartUCUpload , csRepeat.FW6.StatusRequest , csRepeat.FW6.StatusResponse , csRepeat.FW6.SpectrumResponse , csRepeat.FW6.ClearSpectrum , csRepeat.FW6.SetPZCorrectionRequest , csRepeat.FW6.StartFpgaUpload , csRepeat.FW6.SpectrumRequest
  • PID2Offset : csRepeat.FW6.FW6Packet
  • PlotData() : csDP5.Form1
  • PortName : csRepeat.FW6.DPDeviceSerialFW6
  • PRECNT_REACHED : csRepeat.FW6DppStatus
  • PresetLtDone : csRepeat.FW6DppStatus
  • PresetRtDone : csRepeat.FW6DppStatus
  • Process_Status() : csRepeat.FW6DppStatus
  • PX5_OPTION_HPGe_HVPS : csRepeat.FW6DppStatus
  • PX5_OPTION_NONE : csRepeat.FW6DppStatus
  • PX5_OPTION_TEST_AMP : csRepeat.FW6DppStatus
  • PX5_OPTION_TEST_MODE_1 : csRepeat.FW6DppStatus
  • PX5_OPTION_TEST_MODE_2 : csRepeat.FW6DppStatus
  • PX5_OPTION_TEST_MOX : csRepeat.FW6DppStatus
  • PX5_OPTION_TEST_TEK : csRepeat.FW6DppStatus
  • PX5_OptionsString() : csRepeat.FW6DppStatus
  • pzCorrection : csRepeat.FW6.DiagnosticResponse
Generated on Fri Sep 22 2017 10:35:18 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Class Members

  • All
  • Functions
  • Variables
  • Enumerations
  • Properties
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • 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 -

  • Read() : MiscUtil.IO.EndianBinaryReader
  • Read7BitEncodedInt() : MiscUtil.IO.EndianBinaryReader
  • ReadBigEndian7BitEncodedInt() : MiscUtil.IO.EndianBinaryReader
  • ReadBoolean() : MiscUtil.IO.EndianBinaryReader
  • ReadByte() : MiscUtil.IO.EndianBinaryReader
  • ReadBytes() : MiscUtil.IO.EndianBinaryReader
  • ReadBytesOrThrow() : MiscUtil.IO.EndianBinaryReader
  • ReadData() : csRepeat.FW6.DPDeviceUsb
  • ReadDecimal() : MiscUtil.IO.EndianBinaryReader
  • ReadDouble() : MiscUtil.IO.EndianBinaryReader
  • ReadInt16() : MiscUtil.IO.EndianBinaryReader
  • ReadInt32() : MiscUtil.IO.EndianBinaryReader
  • ReadInt64() : MiscUtil.IO.EndianBinaryReader
  • ReadSByte() : MiscUtil.IO.EndianBinaryReader
  • ReadSingle() : MiscUtil.IO.EndianBinaryReader
  • ReadString() : MiscUtil.IO.EndianBinaryReader
  • ReadUInt16() : MiscUtil.IO.EndianBinaryReader
  • ReadUInt32() : MiscUtil.IO.EndianBinaryReader
  • ReadUInt64() : MiscUtil.IO.EndianBinaryReader
  • ReadViaBulkTransfer() : WinUsb.WinUsbDevice
  • RecordTypeOffset : csRepeat.FW6.AckResponse
  • RegisterForDeviceNotifications() : WinUsb.DeviceManagement
  • RemoveCmd() : AsciiCmdUtilities.CommandFilters
  • RemoveCmdByDeviceType() : AsciiCmdUtilities.CommandFilters
Generated on Fri Sep 22 2017 10:35:18 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Class Members

  • All
  • Functions
  • Variables
  • Enumerations
  • Properties
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • 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 -

  • Seek() : MiscUtil.IO.EndianBinaryReader , MiscUtil.IO.EndianBinaryWriter
  • SendAndGetResponse() : csRepeat.FW6.DPDeviceEthernet , csRepeat.FW6.DPDeviceUsb , csRepeat.FW6.FW6Device , csRepeat.FW6.DPDeviceSerialFW6 , csRepeat.FW6.FW6Device , csRepeat.FW6.DPDeviceEthernet , csRepeat.FW6.DPDeviceSerialFW6 , csRepeat.FW6.DPDeviceUsb
  • SendAndWaitForAck() : csRepeat.FW6.FW6Device
  • SendCommand() : csRepeat.FW6.DPDeviceUsb
  • SendConfiguration() : csRepeat.FW6.DPDeviceUsb , csRepeat.FW6.FW6Device , csRepeat.FW6.DPDeviceEthernet , csRepeat.FW6.DPDeviceSerialFW6
  • SendViaBulkTransfer() : WinUsb.WinUsbDevice
  • SerialNumber : csRepeat.DPDevice , csRepeat.FW6.StatusResponse
  • SetAdcCalibration() : csRepeat.FW6.FW6Device
  • SetADCCalibrationRequest() : csRepeat.FW6.SetADCCalibrationRequest
  • SetDCalCalibration() : csRepeat.FW6.FW6Device
  • SetDCalRequest() : csRepeat.FW6.SetDCalRequest
  • SetPZCorrection() : csRepeat.FW6.FW6Device
  • SetPZCorrectionRequest() : csRepeat.FW6.SetPZCorrectionRequest
  • SetuCTemperatureCalibration() : csRepeat.FW6.FW6Device
  • SetuCTemperatureCalibrationRequest() : csRepeat.FW6.SetuCTemperatureCalibrationRequest
  • ShowStatusValueStrings() : csRepeat.FW6DppStatus
  • SingleToInt32Bits() : MiscUtil.Conversion.EndianBitConverter
  • SpectrumRequest() : csRepeat.FW6.SpectrumRequest
  • SpectrumResponse() : csRepeat.FW6.SpectrumResponse
  • SpectrumResponseTypePids : csRepeat.FW6.SpectrumResponse
  • StartAutodetection() : csDP5.Form1
  • StartDppData() : csRepeat.FW6.DPDeviceSerialFW6 , csRepeat.FW6.DPDeviceUsb , csRepeat.FW6.DPDeviceEthernet , csRepeat.FW6.FW6Device
  • StatusRequest() : csRepeat.FW6.StatusRequest
  • StatusResponse() : csRepeat.FW6.StatusResponse
  • SYNC1 : csRepeat.FW6.FW6Packet
  • SYNC2 : csRepeat.FW6.FW6Packet
Generated on Fri Sep 22 2017 10:35:18 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Class Members

  • All
  • Functions
  • Variables
  • Enumerations
  • Properties
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • 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 -

  • ToBoolean() : MiscUtil.Conversion.EndianBitConverter
  • ToChar() : MiscUtil.Conversion.EndianBitConverter
  • ToDecimal() : MiscUtil.Conversion.EndianBitConverter
  • ToDouble() : MiscUtil.Conversion.EndianBitConverter
  • ToExactString() : MiscUtil.Conversion.DoubleConverter
  • ToInt16() : MiscUtil.Conversion.EndianBitConverter
  • ToInt32() : MiscUtil.Conversion.EndianBitConverter
  • ToInt64() : MiscUtil.Conversion.EndianBitConverter
  • ToSingle() : MiscUtil.Conversion.EndianBitConverter
  • ToString() : csRepeat.FW6.DPDeviceSerialFW6 , MiscUtil.Conversion.EndianBitConverter , csRepeat.DPDevice , MiscUtil.Conversion.EndianBitConverter , csRepeat.FW6.FW6Packet , MiscUtil.Conversion.EndianBitConverter
  • ToUInt16() : MiscUtil.Conversion.EndianBitConverter
  • ToUInt32() : MiscUtil.Conversion.EndianBitConverter
  • ToUInt64() : MiscUtil.Conversion.EndianBitConverter
Generated on Fri Sep 22 2017 10:35:18 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Class Members

  • All
  • Functions
  • Variables
  • Enumerations
  • Properties
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • 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 -

  • uCDataPacket() : csRepeat.FW6.uCDataPacket
  • uCDataPacketv2() : csRepeat.FW6.uCDataPacketv2
  • uCSwitchToImage() : csRepeat.FW6.uCSwitchToImage
  • uCTemperatureCalibration : csRepeat.FW6.DiagnosticResponse
  • udpClient : csRepeat.FW6.DPDeviceEthernet
  • udpDiscoveryPort : csRepeat.FW6.DPDeviceEthernet
  • UploadProgressUpdateDelegate() : csRepeat.DPDevice
Generated on Fri Sep 22 2017 10:35:18 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Class Members

  • All
  • Functions
  • Variables
  • Enumerations
  • Properties
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • 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 -

  • VersionString() : csRepeat.DisplayVersion
  • VersionToStr() : csRepeat.FW6DppStatus
Generated on Fri Sep 22 2017 10:35:18 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Class Members

  • All
  • Functions
  • Variables
  • Enumerations
  • Properties
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • 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_ReadPipe() : WinUsb.SafeNativeMethods
  • WinUsb_WritePipe() : WinUsb.SafeNativeMethods
  • winUsbHandle : WinUsb.WinUsbDevice.devInfo
  • WM_DEVICECHANGE : WinUsb.DeviceManagement
  • WndProc() : csRepeat.FW6.MessageHandler
  • Write() : MiscUtil.IO.EndianBinaryWriter
  • Write7BitEncodedInt() : MiscUtil.IO.EndianBinaryWriter
Generated on Fri Sep 22 2017 10:35:18 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Class Members - Functions

  • All
  • Functions
  • Variables
  • Enumerations
  • Properties
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • m
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- a -

  • AckResponse() : csRepeat.FW6.AckResponse
Generated on Fri Sep 22 2017 10:35:18 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Class Members - Functions

  • All
  • Functions
  • Variables
  • Enumerations
  • Properties
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • m
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- b -

  • buttonFindUsbDevices_Click() : csDP5.Form1
  • buttonRunFW6Tests_Click() : csDP5.Form1
Generated on Fri Sep 22 2017 10:35:18 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Class Members - Functions

  • All
  • Functions
  • Variables
  • Enumerations
  • Properties
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • m
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- c -

  • Calculate16bitChecksum() : csRepeat.FW6.FW6Packet
  • ClearDppData() : csRepeat.FW6.DPDeviceEthernet , csRepeat.FW6.DPDeviceUsb , csRepeat.FW6.FW6Device , csRepeat.FW6.DPDeviceSerialFW6
  • ClearSpectrum() : csRepeat.FW6.ClearSpectrum
  • Close() : MiscUtil.IO.EndianBinaryWriter , MiscUtil.IO.EndianBinaryReader
  • CloseDeviceHandle() : WinUsb.WinUsbDevice
  • Configuration() : csRepeat.FW6.Configuration
  • ConfigurationReadback() : csRepeat.FW6.ConfigurationReadback
  • ConfigurationResponse() : csRepeat.FW6.ConfigurationResponse
  • Connect() : csRepeat.FW6.FW6Device , csRepeat.FW6.DPDeviceEthernet , csRepeat.FW6.DPDeviceSerialFW6 , csRepeat.FW6.DPDeviceUsb
  • ConnectForTesting() : csRepeat.FW6.DPDeviceEthernet , csRepeat.FW6.DPDeviceSerialFW6 , csRepeat.FW6.DPDeviceUsb , csRepeat.FW6.FW6Device
  • CopyBytes() : MiscUtil.Conversion.EndianBitConverter
  • CopyBytesImpl() : MiscUtil.Conversion.EndianBitConverter , MiscUtil.Conversion.BigEndianBitConverter , MiscUtil.Conversion.LittleEndianBitConverter
  • CreateFullReadBackCmd() : AsciiCmdUtilities.CommandFilters
  • CreateResTestReadBackCmd() : AsciiCmdUtilities.CommandFilters
  • CreateSpectrumConfig() : AsciiCmdUtilities.CommandFilters
Generated on Fri Sep 22 2017 10:35:18 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Class Members - Functions

  • All
  • Functions
  • Variables
  • Enumerations
  • Properties
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • m
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- d -

  • DetectDevices() : csRepeat.FW6.DPDeviceEthernet , csRepeat.FW6.DPDeviceSerialFW6 , csRepeat.FW6.DPDeviceUsb
  • DiagnosticResponse() : csRepeat.FW6.DiagnosticResponse
  • DisableMCA() : csRepeat.FW6.DisableMCA
  • Disconnect() : csRepeat.FW6.DPDeviceUsb , csRepeat.FW6.FW6Device , csRepeat.FW6.DPDeviceEthernet , csRepeat.FW6.DPDeviceSerialFW6
  • DisconnectForTesting() : csRepeat.FW6.DPDeviceEthernet , csRepeat.FW6.DPDeviceSerialFW6 , csRepeat.FW6.DPDeviceUsb , csRepeat.FW6.FW6Device
  • DiscoverDevices() : csDP5.Form1
  • DisplayConfiguration() : csRepeat.FW6.DPDeviceSerialFW6 , csRepeat.FW6.DPDeviceUsb , csRepeat.FW6.FW6Device , csRepeat.FW6.DPDeviceEthernet
  • Dispose() : MiscUtil.IO.EndianBinaryWriter , MiscUtil.IO.EndianBinaryReader , csDP5.Form1
  • DoubleToInt64Bits() : MiscUtil.Conversion.EndianBitConverter
  • DPDevice() : csRepeat.DPDevice
  • DPDeviceEthernet() : csRepeat.FW6.DPDeviceEthernet
  • DPDeviceSerialFW6() : csRepeat.FW6.DPDeviceSerialFW6
  • DPDeviceUsb() : csRepeat.FW6.DPDeviceUsb
Generated on Fri Sep 22 2017 10:35:18 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Class Members - Functions

  • All
  • Functions
  • Variables
  • Enumerations
  • Properties
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • m
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- e -

  • EnableMCA() : csRepeat.FW6.EnableMCA
  • EndianBinaryReader() : MiscUtil.IO.EndianBinaryReader
  • EndianBinaryWriter() : MiscUtil.IO.EndianBinaryWriter
Generated on Fri Sep 22 2017 10:35:18 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Class Members - Functions

  • All
  • Functions
  • Variables
  • Enumerations
  • Properties
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • m
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- f -

  • FindDeviceFromGuid() : WinUsb.DeviceManagement
  • Flush() : MiscUtil.IO.EndianBinaryWriter
  • Form1() : csDP5.Form1
  • fpgaDataPacket() : csRepeat.FW6.fpgaDataPacket
  • fpgaDataPacketv2() : csRepeat.FW6.fpgaDataPacketv2
  • FromBytes() : MiscUtil.Conversion.EndianBitConverter , MiscUtil.Conversion.LittleEndianBitConverter , MiscUtil.Conversion.BigEndianBitConverter
  • FW6Device() : csRepeat.FW6.FW6Device
  • FW6PacketParser() : csRepeat.FW6.FW6PacketParser
Generated on Fri Sep 22 2017 10:35:18 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Class Members - Functions

  • All
  • Functions
  • Variables
  • Enumerations
  • Properties
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • m
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- g -

  • GetBytes() : MiscUtil.Conversion.EndianBitConverter
  • GetCmdDesc() : AsciiCmdUtilities.CommandFilters
  • GetConfiguration() : csRepeat.FW6.FW6Device , csRepeat.FW6.DPDeviceEthernet , csRepeat.FW6.DPDeviceSerialFW6 , csRepeat.FW6.DPDeviceUsb
  • GetDeviceHandle() : WinUsb.WinUsbDevice
  • GetDeviceNameFromVal() : csRepeat.FW6DppStatus
  • GetFullConfiguration() : csRepeat.FW6.DPDeviceEthernet , csRepeat.FW6.DPDeviceSerialFW6 , csRepeat.FW6.DPDeviceUsb , csRepeat.FW6.FW6Device
  • GetRawStatus() : csRepeat.FW6.FW6Device , csRepeat.FW6.DPDeviceUsb , csRepeat.FW6.DPDeviceEthernet , csRepeat.FW6.DPDeviceSerialFW6
  • GetSpectrumData() : csRepeat.FW6.DPDeviceEthernet , csRepeat.FW6.DPDeviceSerialFW6 , csRepeat.FW6.DPDeviceUsb , csRepeat.FW6.FW6Device
  • GetStatusValueStrings() : csRepeat.FW6DppStatus
  • GetULong() : csRepeat.FW6DppStatus
Generated on Fri Sep 22 2017 10:35:18 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Class Members - Functions

  • All
  • Functions
  • Variables
  • Enumerations
  • Properties
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • m
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- h -

  • HandleBytes() : csRepeat.FW6.FW6PacketParser
  • HasFirmwareLoadBeenCancelledDelegate() : csRepeat.DPDevice
Generated on Fri Sep 22 2017 10:35:18 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Class Members - Functions

  • All
  • Functions
  • Variables
  • Enumerations
  • Properties
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • m
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- i -

  • InitializeDevice() : WinUsb.WinUsbDevice
  • Int32BitsToSingle() : MiscUtil.Conversion.EndianBitConverter
  • Int64BitsToDouble() : MiscUtil.Conversion.EndianBitConverter
  • IsLittleEndian() : MiscUtil.Conversion.BigEndianBitConverter , MiscUtil.Conversion.EndianBitConverter , MiscUtil.Conversion.LittleEndianBitConverter
  • IsMatch() : csRepeat.FW6.SpectrumResponse , csRepeat.FW6.DiagnosticResponse , csRepeat.FW6.StatusResponse , csRepeat.FW6.AckResponse , csRepeat.FW6.ConfigurationResponse
Generated on Fri Sep 22 2017 10:35:18 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Class Members - Functions

  • All
  • Functions
  • Variables
  • Enumerations
  • Properties
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • m
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- m -

  • MakeDp5CmdList() : AsciiCmdUtilities.CommandFilters
  • MessageHandler() : csRepeat.FW6.MessageHandler
Generated on Fri Sep 22 2017 10:35:18 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Class Members - Functions

  • All
  • Functions
  • Variables
  • Enumerations
  • Properties
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • m
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- o -

  • OnOffStr() : csRepeat.FW6DppStatus
Generated on Fri Sep 22 2017 10:35:18 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Class Members - Functions

  • All
  • Functions
  • Variables
  • Enumerations
  • Properties
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • m
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- p -

  • PauseDppData() : csRepeat.FW6.DPDeviceEthernet , csRepeat.FW6.DPDeviceSerialFW6 , csRepeat.FW6.FW6Device , csRepeat.FW6.DPDeviceUsb
  • PerformDeviceDetection() : csRepeat.DPDevice
  • PlotData() : csDP5.Form1
  • Process_Status() : csRepeat.FW6DppStatus
  • PX5_OptionsString() : csRepeat.FW6DppStatus
Generated on Fri Sep 22 2017 10:35:18 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Class Members - Functions

  • All
  • Functions
  • Variables
  • Enumerations
  • Properties
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • m
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- r -

  • Read() : MiscUtil.IO.EndianBinaryReader
  • Read7BitEncodedInt() : MiscUtil.IO.EndianBinaryReader
  • ReadBigEndian7BitEncodedInt() : MiscUtil.IO.EndianBinaryReader
  • ReadBoolean() : MiscUtil.IO.EndianBinaryReader
  • ReadByte() : MiscUtil.IO.EndianBinaryReader
  • ReadBytes() : MiscUtil.IO.EndianBinaryReader
  • ReadBytesOrThrow() : MiscUtil.IO.EndianBinaryReader
  • ReadData() : csRepeat.FW6.DPDeviceUsb
  • ReadDecimal() : MiscUtil.IO.EndianBinaryReader
  • ReadDouble() : MiscUtil.IO.EndianBinaryReader
  • ReadInt16() : MiscUtil.IO.EndianBinaryReader
  • ReadInt32() : MiscUtil.IO.EndianBinaryReader
  • ReadInt64() : MiscUtil.IO.EndianBinaryReader
  • ReadSByte() : MiscUtil.IO.EndianBinaryReader
  • ReadSingle() : MiscUtil.IO.EndianBinaryReader
  • ReadString() : MiscUtil.IO.EndianBinaryReader
  • ReadUInt16() : MiscUtil.IO.EndianBinaryReader
  • ReadUInt32() : MiscUtil.IO.EndianBinaryReader
  • ReadUInt64() : MiscUtil.IO.EndianBinaryReader
  • ReadViaBulkTransfer() : WinUsb.WinUsbDevice
  • RegisterForDeviceNotifications() : WinUsb.DeviceManagement
  • RemoveCmd() : AsciiCmdUtilities.CommandFilters
  • RemoveCmdByDeviceType() : AsciiCmdUtilities.CommandFilters
Generated on Fri Sep 22 2017 10:35:18 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Class Members - Functions

  • All
  • Functions
  • Variables
  • Enumerations
  • Properties
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • m
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- s -

  • Seek() : MiscUtil.IO.EndianBinaryReader , MiscUtil.IO.EndianBinaryWriter
  • SendAndGetResponse() : csRepeat.FW6.DPDeviceEthernet , csRepeat.FW6.DPDeviceUsb , csRepeat.FW6.FW6Device , csRepeat.FW6.DPDeviceSerialFW6 , csRepeat.FW6.FW6Device , csRepeat.FW6.DPDeviceEthernet , csRepeat.FW6.DPDeviceSerialFW6 , csRepeat.FW6.DPDeviceUsb
  • SendAndWaitForAck() : csRepeat.FW6.FW6Device
  • SendCommand() : csRepeat.FW6.DPDeviceUsb
  • SendConfiguration() : csRepeat.FW6.DPDeviceUsb , csRepeat.FW6.FW6Device , csRepeat.FW6.DPDeviceEthernet , csRepeat.FW6.DPDeviceSerialFW6
  • SendViaBulkTransfer() : WinUsb.WinUsbDevice
  • SetAdcCalibration() : csRepeat.FW6.FW6Device
  • SetADCCalibrationRequest() : csRepeat.FW6.SetADCCalibrationRequest
  • SetDCalCalibration() : csRepeat.FW6.FW6Device
  • SetDCalRequest() : csRepeat.FW6.SetDCalRequest
  • SetPZCorrection() : csRepeat.FW6.FW6Device
  • SetPZCorrectionRequest() : csRepeat.FW6.SetPZCorrectionRequest
  • SetuCTemperatureCalibration() : csRepeat.FW6.FW6Device
  • SetuCTemperatureCalibrationRequest() : csRepeat.FW6.SetuCTemperatureCalibrationRequest
  • ShowStatusValueStrings() : csRepeat.FW6DppStatus
  • SingleToInt32Bits() : MiscUtil.Conversion.EndianBitConverter
  • SpectrumRequest() : csRepeat.FW6.SpectrumRequest
  • SpectrumResponse() : csRepeat.FW6.SpectrumResponse
  • StartAutodetection() : csDP5.Form1
  • StartDppData() : csRepeat.FW6.FW6Device , csRepeat.FW6.DPDeviceEthernet , csRepeat.FW6.DPDeviceUsb , csRepeat.FW6.DPDeviceSerialFW6
  • StatusRequest() : csRepeat.FW6.StatusRequest
  • StatusResponse() : csRepeat.FW6.StatusResponse
Generated on Fri Sep 22 2017 10:35:18 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Class Members - Functions

  • All
  • Functions
  • Variables
  • Enumerations
  • Properties
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • m
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- t -

  • ToBoolean() : MiscUtil.Conversion.EndianBitConverter
  • ToChar() : MiscUtil.Conversion.EndianBitConverter
  • ToDecimal() : MiscUtil.Conversion.EndianBitConverter
  • ToDouble() : MiscUtil.Conversion.EndianBitConverter
  • ToExactString() : MiscUtil.Conversion.DoubleConverter
  • ToInt16() : MiscUtil.Conversion.EndianBitConverter
  • ToInt32() : MiscUtil.Conversion.EndianBitConverter
  • ToInt64() : MiscUtil.Conversion.EndianBitConverter
  • ToSingle() : MiscUtil.Conversion.EndianBitConverter
  • ToString() : csRepeat.FW6.DPDeviceSerialFW6 , MiscUtil.Conversion.EndianBitConverter , csRepeat.DPDevice , MiscUtil.Conversion.EndianBitConverter , csRepeat.FW6.FW6Packet , MiscUtil.Conversion.EndianBitConverter
  • ToUInt16() : MiscUtil.Conversion.EndianBitConverter
  • ToUInt32() : MiscUtil.Conversion.EndianBitConverter
  • ToUInt64() : MiscUtil.Conversion.EndianBitConverter
Generated on Fri Sep 22 2017 10:35:18 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Class Members - Functions

  • All
  • Functions
  • Variables
  • Enumerations
  • Properties
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • m
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- u -

  • uCDataPacket() : csRepeat.FW6.uCDataPacket
  • uCDataPacketv2() : csRepeat.FW6.uCDataPacketv2
  • uCSwitchToImage() : csRepeat.FW6.uCSwitchToImage
  • UploadProgressUpdateDelegate() : csRepeat.DPDevice
Generated on Fri Sep 22 2017 10:35:18 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Class Members - Functions

  • All
  • Functions
  • Variables
  • Enumerations
  • Properties
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • m
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- v -

  • VersionString() : csRepeat.DisplayVersion
  • VersionToStr() : csRepeat.FW6DppStatus
Generated on Fri Sep 22 2017 10:35:18 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Class Members - Functions

  • All
  • Functions
  • Variables
  • Enumerations
  • Properties
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • m
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- w -

  • WinUsb_ReadPipe() : WinUsb.SafeNativeMethods
  • WinUsb_WritePipe() : WinUsb.SafeNativeMethods
  • WndProc() : csRepeat.FW6.MessageHandler
  • Write() : MiscUtil.IO.EndianBinaryWriter
  • Write7BitEncodedInt() : MiscUtil.IO.EndianBinaryWriter
Generated on Fri Sep 22 2017 10:35:18 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Class Members - Variables

  • All
  • Functions
  • Variables
  • Enumerations
  • Properties
  • a
  • b
  • c
  • d
  • f
  • h
  • i
  • m
  • p
  • r
  • u
  • w

- a -

  • AccumulationTime : csRepeat.FW6DppStatus
  • AddressLsbOffset : csRepeat.FW6.AckResponse
  • AddressMsbOffset : csRepeat.FW6.AckResponse

- b -

  • bulkInPipe : WinUsb.WinUsbDevice.devInfo
  • bulkOutPipe : WinUsb.WinUsbDevice.devInfo
  • buttonFindUsbDevices : csDP5.Form1
  • buttonRunFW6Tests : csDP5.Form1

- c -

  • ChecksumLength : csRepeat.FW6.FW6Packet

- d -

  • data : csRepeat.FW6.uCSwitchToImage
  • DBT_DEVICEARRIVAL : WinUsb.DeviceManagement
  • DBT_DEVICEREMOVECOMPLETE : WinUsb.DeviceManagement
  • DBT_DEVTYP_DEVICEINTERFACE : WinUsb.DeviceManagement
  • DBT_DEVTYP_HANDLE : WinUsb.DeviceManagement
  • detectingDevices : csDP5.Form1
  • DEVICE_ID : csRepeat.FW6DppStatus
  • DEVICE_NOTIFY_ALL_INTERFACE_CLASSES : WinUsb.DeviceManagement
  • DEVICE_NOTIFY_SERVICE_HANDLE : WinUsb.DeviceManagement
  • DEVICE_NOTIFY_WINDOW_HANDLE : WinUsb.DeviceManagement
  • deviceEndPoint : csRepeat.FW6.DPDeviceEthernet
  • deviceHandle : WinUsb.WinUsbDevice.devInfo
  • devicespeed : WinUsb.WinUsbDevice.devInfo
  • DPP_ECO : csRepeat.FW6DppStatus
  • dppDP5 : csRepeat.FW6DppStatus
  • dppDP5G : csRepeat.FW6DppStatus
  • dppDP5X : csRepeat.FW6DppStatus
  • dppMCA8000D : csRepeat.FW6DppStatus
  • dppPX5 : csRepeat.FW6DppStatus
  • dppTB5 : csRepeat.FW6DppStatus

- f -

  • FirmwareVersion : csRepeat.DPDevice
  • FpgaEncryptionFailureVersion : csRepeat.DPDevice
  • FpgaVersion : csRepeat.DPDevice

- h -

  • HasFirmwareLoadBeenCancelled : csRepeat.DPDevice

- i -

  • interruptInPipe : WinUsb.WinUsbDevice.devInfo
  • interruptOutPipe : WinUsb.WinUsbDevice.devInfo
  • isDP5_RevDxGains : csRepeat.FW6DppStatus

- m -

  • MCA_EN : csRepeat.FW6DppStatus
  • myDevInfo : WinUsb.WinUsbDevice

- p -

  • PacketHeaderLength : csRepeat.FW6.FW6Packet
  • PC5_PRESENT : csRepeat.FW6DppStatus
  • PID1Offset : csRepeat.FW6.FW6Packet
  • PID2Offset : csRepeat.FW6.FW6Packet
  • PRECNT_REACHED : csRepeat.FW6DppStatus
  • PresetLtDone : csRepeat.FW6DppStatus
  • PresetRtDone : csRepeat.FW6DppStatus
  • PX5_OPTION_HPGe_HVPS : csRepeat.FW6DppStatus
  • PX5_OPTION_NONE : csRepeat.FW6DppStatus
  • PX5_OPTION_TEST_AMP : csRepeat.FW6DppStatus
  • PX5_OPTION_TEST_MODE_1 : csRepeat.FW6DppStatus
  • PX5_OPTION_TEST_MODE_2 : csRepeat.FW6DppStatus
  • PX5_OPTION_TEST_MOX : csRepeat.FW6DppStatus
  • PX5_OPTION_TEST_TEK : csRepeat.FW6DppStatus

- r -

  • RecordTypeOffset : csRepeat.FW6.AckResponse

- u -

  • udpClient : csRepeat.FW6.DPDeviceEthernet
  • udpDiscoveryPort : csRepeat.FW6.DPDeviceEthernet

- w -

  • winUsbHandle : WinUsb.WinUsbDevice.devInfo
  • WM_DEVICECHANGE : WinUsb.DeviceManagement
Generated on Fri Sep 22 2017 10:35:18 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Class Members - Enumerations

  • All
  • Functions
  • Variables
  • Enumerations
  • Properties
  • AckTypes : csRepeat.FW6.AckResponse
  • FpgaStates : csRepeat.DPDevice
  • HandleStates : csRepeat.FW6.FW6PacketParser
  • InterfaceTypes : csRepeat.DPDevice
  • SpectrumResponseTypePids : csRepeat.FW6.SpectrumResponse
Generated on Fri Sep 22 2017 10:35:18 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Class Members - Properties

  • All
  • Functions
  • Variables
  • Enumerations
  • Properties
  • a
  • b
  • d
  • e
  • f
  • g
  • i
  • l
  • m
  • p
  • s
  • u

- a -

  • AckType : csRepeat.FW6.AckResponse
  • ADCGainCalibration : csRepeat.FW6.DiagnosticResponse
  • ADCOffsetCalibration : csRepeat.FW6.DiagnosticResponse
  • Address : csRepeat.FW6.AckResponse

- b -

  • BaseStream : MiscUtil.IO.EndianBinaryReader , MiscUtil.IO.EndianBinaryWriter
  • Big : MiscUtil.Conversion.EndianBitConverter
  • BitConverter : MiscUtil.IO.EndianBinaryReader , MiscUtil.IO.EndianBinaryWriter

- d -

  • Data : csRepeat.FW6.AckResponse , csRepeat.FW6.Configuration , csRepeat.FW6.ConfigurationResponse , csRepeat.FW6.fpgaDataPacketv2 , csRepeat.FW6.StartFpgaUpload , csRepeat.FW6.StartUCUpload , csRepeat.FW6.FW6Packet , csRepeat.FW6.StatusRequest , csRepeat.FW6.uCSwitchToImage , csRepeat.FW6.uCDataPacketv2 , csRepeat.FW6.uCDataPacket , csRepeat.FW6.StatusResponse , csRepeat.FW6.DisableMCA , csRepeat.FW6.EnableMCA , csRepeat.FW6.ClearSpectrum , csRepeat.FW6.DiagnosticRequest , csRepeat.FW6.SetADCCalibrationRequest , csRepeat.FW6.SetDCalRequest , csRepeat.FW6.SpectrumResponse , csRepeat.FW6.SpectrumRequest , csRepeat.FW6.SetuCTemperatureCalibrationRequest , csRepeat.FW6.SetPZCorrectionRequest , csRepeat.FW6.ConfigurationReadback , csRepeat.FW6.DiagnosticResponse , csRepeat.FW6.fpgaDataPacket
  • DataPacketAckTimeoutMS : csRepeat.FW6.DPDeviceEthernet , csRepeat.FW6.DPDeviceSerialFW6 , csRepeat.FW6.DPDeviceUsb , csRepeat.FW6.FW6Device
  • DCalSetting : csRepeat.FW6.DiagnosticResponse
  • DeviceType : csRepeat.DPDevice , csRepeat.FW6.StatusResponse

- e -

  • EncodedPacket : csRepeat.FW6.FW6Packet
  • Encoding : MiscUtil.IO.EndianBinaryReader , MiscUtil.IO.EndianBinaryWriter
  • Endianness : MiscUtil.Conversion.BigEndianBitConverter , MiscUtil.Conversion.EndianBitConverter , MiscUtil.Conversion.LittleEndianBitConverter

- f -

  • FirmwareMajor : csRepeat.FW6.DiagnosticResponse
  • FirmwareMinor : csRepeat.FW6.DiagnosticResponse
  • FpgaMajor : csRepeat.FW6.DiagnosticResponse
  • FpgaMinor : csRepeat.FW6.DiagnosticResponse
  • FpgaState : csRepeat.DPDevice
  • FpgaVersionMajor : csRepeat.FW6.StatusResponse
  • FpgaVersionMinor : csRepeat.FW6.StatusResponse
  • FwBuildNumber : csRepeat.FW6.StatusResponse
  • FwVersionMajor : csRepeat.FW6.StatusResponse
  • FwVersionMinor : csRepeat.FW6.StatusResponse

- g -

  • GetDiagnosticResponse : csRepeat.FW6.FW6Device

- i -

  • InterfaceType : csRepeat.DPDevice

- l -

  • Little : MiscUtil.Conversion.EndianBitConverter

- m -

  • mcaChannels : csRepeat.FW6.DPDeviceEthernet , csRepeat.FW6.FW6Device , csRepeat.FW6.DPDeviceUsb , csRepeat.FW6.DPDeviceSerialFW6

- p -

  • PID1 : csRepeat.FW6.AckResponse , csRepeat.FW6.Configuration , csRepeat.FW6.ConfigurationResponse , csRepeat.FW6.fpgaDataPacketv2 , csRepeat.FW6.StartFpgaUpload , csRepeat.FW6.StartUCUpload , csRepeat.FW6.FW6Packet , csRepeat.FW6.StatusRequest , csRepeat.FW6.ClearSpectrum , csRepeat.FW6.DiagnosticRequest , csRepeat.FW6.SetADCCalibrationRequest , csRepeat.FW6.EnableMCA , csRepeat.FW6.DisableMCA , csRepeat.FW6.SetDCalRequest , csRepeat.FW6.StatusResponse , csRepeat.FW6.uCDataPacket , csRepeat.FW6.ConfigurationReadback , csRepeat.FW6.DiagnosticResponse , csRepeat.FW6.SetPZCorrectionRequest , csRepeat.FW6.uCDataPacketv2 , csRepeat.FW6.uCSwitchToImage , csRepeat.FW6.SetuCTemperatureCalibrationRequest , csRepeat.FW6.fpgaDataPacket , csRepeat.FW6.SpectrumRequest , csRepeat.FW6.SpectrumResponse
  • PID2 : csRepeat.FW6.SetuCTemperatureCalibrationRequest , csRepeat.FW6.Configuration , csRepeat.FW6.DisableMCA , csRepeat.FW6.SetDCalRequest , csRepeat.FW6.SetPZCorrectionRequest , csRepeat.FW6.StartFpgaUpload , csRepeat.FW6.StartUCUpload , csRepeat.FW6.ClearSpectrum , csRepeat.FW6.EnableMCA , csRepeat.FW6.uCDataPacket , csRepeat.FW6.uCDataPacketv2 , csRepeat.FW6.uCSwitchToImage , csRepeat.FW6.fpgaDataPacket , csRepeat.FW6.DiagnosticResponse , csRepeat.FW6.ConfigurationReadback , csRepeat.FW6.AckResponse , csRepeat.FW6.SetADCCalibrationRequest , csRepeat.FW6.SpectrumResponse , csRepeat.FW6.StatusRequest , csRepeat.FW6.FW6Packet , csRepeat.FW6.StatusResponse , csRepeat.FW6.DiagnosticRequest , csRepeat.FW6.fpgaDataPacketv2 , csRepeat.FW6.SpectrumRequest , csRepeat.FW6.ConfigurationResponse
  • PortName : csRepeat.FW6.DPDeviceSerialFW6
  • pzCorrection : csRepeat.FW6.DiagnosticResponse

- s -

  • SerialNumber : csRepeat.DPDevice , csRepeat.FW6.StatusResponse
  • SYNC1 : csRepeat.FW6.FW6Packet
  • SYNC2 : csRepeat.FW6.FW6Packet

- u -

  • uCTemperatureCalibration : csRepeat.FW6.DiagnosticResponse
Generated on Fri Sep 22 2017 10:35:18 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: AssemblyInfo.cs File Reference

  • File List
AssemblyInfo.cs File Reference

Go to the source code of this file.

Generated on Fri Sep 22 2017 10:35:16 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Form1.cs File Reference

  • File List
Classes | Namespaces
Form1.cs File Reference

Go to the source code of this file.

Classes

class | csDP5.Form1
Summary description for Form1. More...

Namespaces

package | csDP5
Generated on Fri Sep 22 2017 10:35:16 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: FW6/AckResponse.cs File Reference

  • File List
Classes | Namespaces
FW6/AckResponse.cs File Reference

Go to the source code of this file.

Classes

class | csRepeat.FW6.AckResponse

Namespaces

package | csRepeat.FW6
Generated on Fri Sep 22 2017 10:35:16 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: FW6/AsciiCmdUtilities.cs File Reference

  • File List
Classes | Namespaces
FW6/AsciiCmdUtilities.cs File Reference

Go to the source code of this file.

Classes

class | AsciiCmdUtilities.CommandFilters

Namespaces

package | AsciiCmdUtilities
Generated on Fri Sep 22 2017 10:35:16 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: FW6/Configuration.cs File Reference

  • File List
Classes | Namespaces
FW6/Configuration.cs File Reference

Go to the source code of this file.

Classes

class | csRepeat.FW6.Configuration
Sends a Text Configuration packet. More...

Namespaces

package | csRepeat.FW6
Generated on Fri Sep 22 2017 10:35:16 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: FW6/ConfigurationReadback.cs File Reference

  • File List
Classes | Namespaces
FW6/ConfigurationReadback.cs File Reference

Go to the source code of this file.

Classes

class | csRepeat.FW6.ConfigurationReadback
Sends a Text Configuration Readback Request. More...

Namespaces

package | csRepeat.FW6
Generated on Fri Sep 22 2017 10:35:16 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: FW6/ConfigurationResponse.cs File Reference

  • File List
Classes | Namespaces
FW6/ConfigurationResponse.cs File Reference

Go to the source code of this file.

Classes

class | csRepeat.FW6.ConfigurationResponse
Configuration response that is returned from a configuration readback request. More...

Namespaces

package | csRepeat.FW6
Generated on Fri Sep 22 2017 10:35:16 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: FW6/DiagnosticRequest.cs File Reference

  • File List
Classes | Namespaces
FW6/DiagnosticRequest.cs File Reference

Go to the source code of this file.

Classes

class | csRepeat.FW6.DiagnosticRequest
Diagnostic data request packet. More...

Namespaces

package | csRepeat.FW6
Generated on Fri Sep 22 2017 10:35:16 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: FW6/DiagnosticResponse.cs File Reference

  • File List
Classes | Namespaces
FW6/DiagnosticResponse.cs File Reference

Go to the source code of this file.

Classes

class | csRepeat.FW6.DiagnosticResponse
Diagnostic data response packet. More...

Namespaces

package | csRepeat.FW6
Generated on Fri Sep 22 2017 10:35:16 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: FW6/DisplayVersion.cs File Reference

  • File List
Classes | Namespaces
FW6/DisplayVersion.cs File Reference

Go to the source code of this file.

Classes

class | csRepeat.DisplayVersion

Namespaces

package | csRepeat
Generated on Fri Sep 22 2017 10:35:16 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: FW6/DPDevice.cs File Reference

  • File List
Classes | Namespaces
FW6/DPDevice.cs File Reference

Go to the source code of this file.

Classes

class | csRepeat.DPDevice

Namespaces

package | csRepeat
Generated on Fri Sep 22 2017 10:35:16 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: FW6/DPDeviceEthernet.cs File Reference

  • File List
Classes | Namespaces
FW6/DPDeviceEthernet.cs File Reference

Go to the source code of this file.

Classes

class | csRepeat.FW6.DPDeviceEthernet

Namespaces

package | csRepeat.FW6
Generated on Fri Sep 22 2017 10:35:16 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: FW6/DPDeviceSerialFW6.cs File Reference

  • File List
Classes | Namespaces
FW6/DPDeviceSerialFW6.cs File Reference

Go to the source code of this file.

Classes

class | csRepeat.FW6.DPDeviceSerialFW6

Namespaces

package | csRepeat.FW6
Generated on Fri Sep 22 2017 10:35:16 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: FW6/DPDeviceUsb.cs File Reference

  • File List
Classes | Namespaces
FW6/DPDeviceUsb.cs File Reference

Go to the source code of this file.

Classes

class | csRepeat.FW6.MessageHandler
class | csRepeat.FW6.DPDeviceUsb

Namespaces

package | csRepeat.FW6
Generated on Fri Sep 22 2017 10:35:16 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: FW6/fpgaDataPacket.cs File Reference

  • File List
Classes | Namespaces
FW6/fpgaDataPacket.cs File Reference

Go to the source code of this file.

Classes

class | csRepeat.FW6.fpgaDataPacket

Namespaces

package | csRepeat.FW6
Generated on Fri Sep 22 2017 10:35:16 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: FW6/fpgadatapacketv2.cs File Reference

  • File List
Classes | Namespaces
FW6/fpgadatapacketv2.cs File Reference

Go to the source code of this file.

Classes

class | csRepeat.FW6.fpgaDataPacketv2
v2 uC data packet, requires firmware newer than v6.06.04 More...

Namespaces

package | csRepeat.FW6
Generated on Fri Sep 22 2017 10:35:16 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: FW6/FW6Device.cs File Reference

  • File List
Classes | Namespaces
FW6/FW6Device.cs File Reference

Go to the source code of this file.

Classes

class | csRepeat.FW6.FW6Device

Namespaces

package | csRepeat.FW6
Generated on Fri Sep 22 2017 10:35:16 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: FW6/FW6DppStatus.cs File Reference

  • File List
Classes | Namespaces
FW6/FW6DppStatus.cs File Reference

Go to the source code of this file.

Classes

class | csRepeat.FW6DppStatus
Parse FW6 Dpp Status data packets. More...

Namespaces

package | csRepeat
Generated on Fri Sep 22 2017 10:35:16 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: FW6/FW6Packet.cs File Reference

  • File List
Classes | Namespaces
FW6/FW6Packet.cs File Reference

Go to the source code of this file.

Classes

class | csRepeat.FW6.FW6Packet
Packet layout looks like: [SYNC1][SYNC2][PID1][PID2][LEN1][LEN2][data bytes, length][CHECKSUM MSB][CHECKSUM LSB]. More...

Namespaces

package | csRepeat.FW6
Generated on Fri Sep 22 2017 10:35:16 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: FW6/FW6PacketParser.cs File Reference

  • File List
Classes | Namespaces
FW6/FW6PacketParser.cs File Reference

Go to the source code of this file.

Classes

class | csRepeat.FW6.FW6PacketParser

Namespaces

package | csRepeat.FW6
Generated on Fri Sep 22 2017 10:35:16 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: FW6/SetADCCalibrationRequest.cs File Reference

  • File List
Classes | Namespaces
FW6/SetADCCalibrationRequest.cs File Reference

Go to the source code of this file.

Classes

class | csRepeat.FW6.SetADCCalibrationRequest

Namespaces

package | csRepeat.FW6
Generated on Fri Sep 22 2017 10:35:16 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: FW6/SetDCalRequest.cs File Reference

  • File List
Classes | Namespaces
FW6/SetDCalRequest.cs File Reference

Go to the source code of this file.

Classes

class | csRepeat.FW6.SetDCalRequest

Namespaces

package | csRepeat.FW6
Generated on Fri Sep 22 2017 10:35:16 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: FW6/SetPZCorrectionRequest.cs File Reference

  • File List
Classes | Namespaces
FW6/SetPZCorrectionRequest.cs File Reference

Go to the source code of this file.

Classes

class | csRepeat.FW6.SetPZCorrectionRequest

Namespaces

package | csRepeat.FW6
Generated on Fri Sep 22 2017 10:35:16 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: FW6/SetuCTemperatureCalibrationRequest.cs File Reference

  • File List
Classes | Namespaces
FW6/SetuCTemperatureCalibrationRequest.cs File Reference

Go to the source code of this file.

Classes

class | csRepeat.FW6.SetuCTemperatureCalibrationRequest

Namespaces

package | csRepeat.FW6
Generated on Fri Sep 22 2017 10:35:16 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: FW6/SpectrumRequest.cs File Reference

  • File List
Classes | Namespaces
FW6/SpectrumRequest.cs File Reference

Go to the source code of this file.

Classes

class | csRepeat.FW6.SpectrumRequest
Request device spectrum data. More...

Namespaces

package | csRepeat.FW6
Generated on Fri Sep 22 2017 10:35:16 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: FW6/SpectrumResponse.cs File Reference

  • File List
Classes | Namespaces
FW6/SpectrumResponse.cs File Reference

Go to the source code of this file.

Classes

class | csRepeat.FW6.SpectrumResponse
Encompases the several kinds of spectrum responses that can be returned from a spectrum request NOTE: The spectrum responses with status are handled elsewhere as they have a status field that the responses handled here do not have. More...

Namespaces

package | csRepeat.FW6
Generated on Fri Sep 22 2017 10:35:16 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: FW6/StartFpgaUpload.cs File Reference

  • File List
Classes | Namespaces
FW6/StartFpgaUpload.cs File Reference

Go to the source code of this file.

Classes

class | csRepeat.FW6.StartFpgaUpload

Namespaces

package | csRepeat.FW6
Generated on Fri Sep 22 2017 10:35:16 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: FW6/StartUCUpload.cs File Reference

  • File List
Classes | Namespaces
FW6/StartUCUpload.cs File Reference

Go to the source code of this file.

Classes

class | csRepeat.FW6.StartUCUpload

Namespaces

package | csRepeat.FW6
Generated on Fri Sep 22 2017 10:35:16 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: FW6/StatusRequest.cs File Reference

  • File List
Classes | Namespaces
FW6/StatusRequest.cs File Reference

Go to the source code of this file.

Classes

class | csRepeat.FW6.StatusRequest
class | csRepeat.FW6.ClearSpectrum
class | csRepeat.FW6.EnableMCA
class | csRepeat.FW6.DisableMCA

Namespaces

package | csRepeat.FW6
Generated on Fri Sep 22 2017 10:35:16 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: FW6/StatusResponse.cs File Reference

  • File List
Classes | Namespaces
FW6/StatusResponse.cs File Reference

Go to the source code of this file.

Classes

class | csRepeat.FW6.StatusResponse

Namespaces

package | csRepeat.FW6
Generated on Fri Sep 22 2017 10:35:16 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: FW6/uCDataPacket.cs File Reference

  • File List
Classes | Namespaces
FW6/uCDataPacket.cs File Reference

Go to the source code of this file.

Classes

class | csRepeat.FW6.uCDataPacket

Namespaces

package | csRepeat.FW6
Generated on Fri Sep 22 2017 10:35:16 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: FW6/ucdatapacketv2.cs File Reference

  • File List
Classes | Namespaces
FW6/ucdatapacketv2.cs File Reference

Go to the source code of this file.

Classes

class | csRepeat.FW6.uCDataPacketv2
v2 uC data packet, requires firmware newer than v6.06.04 More...

Namespaces

package | csRepeat.FW6
Generated on Fri Sep 22 2017 10:35:16 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: FW6/uCSwitchToImage.cs File Reference

  • File List
Classes | Namespaces
FW6/uCSwitchToImage.cs File Reference

Go to the source code of this file.

Classes

class | csRepeat.FW6.uCSwitchToImage
Packet used to perform a uC image switch, also finishes up a uC firmware upload. More...

Namespaces

package | csRepeat.FW6
Generated on Fri Sep 22 2017 10:35:16 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: MiscUtil/Conversion/BigEndianBitConverter.cs File Reference

  • File List
Classes | Namespaces
MiscUtil/Conversion/BigEndianBitConverter.cs File Reference

Go to the source code of this file.

Classes

class | MiscUtil.Conversion.BigEndianBitConverter
Implementation of EndianBitConverter which converts to/from big-endian byte arrays. More...

Namespaces

package | MiscUtil.Conversion
Generated on Fri Sep 22 2017 10:35:16 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: MiscUtil/Conversion/DoubleConverter.cs File Reference

  • File List
Classes | Namespaces
MiscUtil/Conversion/DoubleConverter.cs File Reference

Go to the source code of this file.

Classes

class | MiscUtil.Conversion.DoubleConverter
A class to allow the conversion of doubles to string representations of their exact decimal values. The implementation aims for readability over efficiency. More...
class | MiscUtil.Conversion.DoubleConverter.ArbitraryDecimal
Private class used for manipulating sequences of decimal digits.

Namespaces

package | MiscUtil.Conversion
Generated on Fri Sep 22 2017 10:35:16 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: MiscUtil/Conversion/EndianBitConverter.cs File Reference

  • File List
Classes | Namespaces
MiscUtil/Conversion/EndianBitConverter.cs File Reference

Go to the source code of this file.

Classes

class | MiscUtil.Conversion.EndianBitConverter
Equivalent of System.BitConverter, but with either endianness. More...
struct | MiscUtil.Conversion.EndianBitConverter.Int32SingleUnion
Union used solely for the equivalent of DoubleToInt64Bits and vice versa.

Namespaces

package | MiscUtil.Conversion
Generated on Fri Sep 22 2017 10:35:16 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: MiscUtil/Conversion/LittleEndianBitConverter.cs File Reference

  • File List
Classes | Namespaces
MiscUtil/Conversion/LittleEndianBitConverter.cs File Reference

Go to the source code of this file.

Classes

class | MiscUtil.Conversion.LittleEndianBitConverter
Implementation of EndianBitConverter which converts to/from little-endian byte arrays. More...

Namespaces

package | MiscUtil.Conversion
Generated on Fri Sep 22 2017 10:35:16 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: MiscUtil/IO/EndianBinaryReader.cs File Reference

  • File List
Classes | Namespaces
MiscUtil/IO/EndianBinaryReader.cs File Reference

Go to the source code of this file.

Classes

class | MiscUtil.IO.EndianBinaryReader
Equivalent of System.IO.BinaryReader, but with either endianness, depending on the EndianBitConverter it is constructed with. No data is buffered in the reader; the client may seek within the stream at will. More...

Namespaces

package | MiscUtil.IO
Generated on Fri Sep 22 2017 10:35:16 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: MiscUtil/IO/EndianBinaryWriter.cs File Reference

  • File List
Classes | Namespaces
MiscUtil/IO/EndianBinaryWriter.cs File Reference

Go to the source code of this file.

Classes

class | MiscUtil.IO.EndianBinaryWriter
Equivalent of System.IO.BinaryWriter, but with either endianness, depending on the EndianBitConverter it is constructed with. More...

Namespaces

package | MiscUtil.IO
Generated on Fri Sep 22 2017 10:35:16 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Properties/Resources.Designer.cs File Reference

  • File List
Classes | Namespaces
Properties/Resources.Designer.cs File Reference

Go to the source code of this file.

Classes

class | csDP5.Properties.Resources
A strongly-typed resource class, for looking up localized strings, etc. More...

Namespaces

package | csDP5.Properties
Generated on Fri Sep 22 2017 10:35:16 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: WinUsb/DeviceManagement.cs File Reference

  • File List
Classes | Namespaces
WinUsb/DeviceManagement.cs File Reference

Go to the source code of this file.

Classes

class | WinUsb.DeviceManagement
Routines for detecting devices and receiving device notifications. More...

Namespaces

package | WinUsb
Generated on Fri Sep 22 2017 10:35:16 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: WinUsb/DeviceManagementApi.cs File Reference

  • File List
Classes | Namespaces
WinUsb/DeviceManagementApi.cs File Reference

Go to the source code of this file.

Classes

class | WinUsb.DeviceManagement
Routines for detecting devices and receiving device notifications. More...
class | WinUsb.DeviceManagement.DEV_BROADCAST_DEVICEINTERFACE
class | WinUsb.DeviceManagement.DEV_BROADCAST_DEVICEINTERFACE_1
class | WinUsb.DeviceManagement.DEV_BROADCAST_HDR
struct | WinUsb.DeviceManagement.SP_DEVICE_INTERFACE_DATA

Namespaces

package | WinUsb
Generated on Fri Sep 22 2017 10:35:16 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: WinUsb/FileIOApi.cs File Reference

  • File List
Classes | Namespaces
WinUsb/FileIOApi.cs File Reference

Go to the source code of this file.

Classes

class | WinUsb.FileIO
API declarations relating to file I/O (and used by WinUsb). More...

Namespaces

package | WinUsb
Generated on Fri Sep 22 2017 10:35:16 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: WinUsb/SafeNativeMethods.cs File Reference

  • File List
Classes | Namespaces
WinUsb/SafeNativeMethods.cs File Reference

Go to the source code of this file.

Classes

class | WinUsb.SafeNativeMethods
These declarations are translated from the C declarations in multiple files in the Windows DDK. The files are: More...
struct | WinUsb.SafeNativeMethods.USB_CONFIGURATION_DESCRIPTOR
struct | WinUsb.SafeNativeMethods.USB_INTERFACE_DESCRIPTOR
struct | WinUsb.SafeNativeMethods.WINUSB_PIPE_INFORMATION
struct | WinUsb.SafeNativeMethods.WINUSB_SETUP_PACKET

Namespaces

package | WinUsb
Generated on Fri Sep 22 2017 10:35:16 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: WinUsb/WinUsbDevice.cs File Reference

  • File List
Classes | Namespaces
WinUsb/WinUsbDevice.cs File Reference

Go to the source code of this file.

Classes

class | WinUsb.WinUsbDevice
Routines for the WinUsb driver supported by Windows Vista and Windows XP. More...
struct | WinUsb.WinUsbDevice.devInfo

Namespaces

package | WinUsb
Generated on Fri Sep 22 2017 10:35:16 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: FW6/AckResponse.cs Source File

  • File List
FW6/AckResponse.cs
Go to the documentation of this file.
00001 ﻿using System;
00002 using System.Collections.Generic;
00003 using System.Text;
00004
00005 namespace csRepeat.FW6
00006 {
00007     public class AckResponse : FW6Packet
00008     {
00009         private byte[] packetContent;
00010
00011         public AckResponse(byte[] packetContent)
00012         {
00013             this.packetContent = packetContent;
00014         }
00015
00016         private const byte thisPID1 = 0xFF;
00017
00018         public override byte PID1
00019         {
00020             get { return packetContent[PID1Offset]; }
00021         }
00022
00023         public override byte PID2
00024         {
00025             get { return packetContent[PID2Offset]; }
00026         }
00027
00031         public const int AddressMsbOffset = 0;
00032
00036         public const int AddressLsbOffset = 1;
00037
00041         public const int RecordTypeOffset = 2;
00042
00047         public int Address
00048         {
00049             get
00050             {
00051                 // field is only valid if given the specific type
00052                 if (AckType != AckTypes.UploadAckPacket)
00053                 {
00054                     throw new System.InvalidOperationException();
00055                 }
00056
00057                 return (Data[AddressMsbOffset] << 8) + Data[AddressLsbOffset];
00058             }
00059         }
00060
00061         public override byte[] Data
00062         {
00063             get
00064             {
00065                 byte[] returnValue = new byte[packetContent.Length - PacketHeaderLength];
00066                 Array.Copy(packetContent, PacketHeaderLength, returnValue, 0, returnValue.Length);
00067                 return returnValue;
00068             }
00069         }
00070
00071         public enum AckTypes
00072         {
00073             Ok = 0x0,
00074             SyncError,
00075             PidError,
00076             LenError,
00077             ChecksumError,
00078             BadParameter,
00079             BadHexRecord,
00080             UnrecognizedCommand,
00081             FpgaError,
00082             Cp2201NotFound,
00083             ScopeDataNotAvailable,
00084             Pc5NotPresent,
00085             OkInterfaceSharingRequest,
00086             BusyAnotherInterfaceIsInUse,
00087             I2cError,
00088             UploadAckPacket = 0x0F
00089         }
00090
00091         public AckTypes AckType
00092         {
00093             get
00094             {
00095                 return (AckTypes)PID2;
00096             }
00097         }
00098
00099         public static bool IsMatch(byte pid1, byte pid2)
00100         {
00101             if (thisPID1 == pid1)
00102             {
00103                 return true;
00104             }
00105
00106             return false;
00107         }
00108     }
00109 }
Generated on Fri Sep 22 2017 10:35:16 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: FW6/AsciiCmdUtilities.cs Source File

  • File List
FW6/AsciiCmdUtilities.cs
Go to the documentation of this file.
00001 using System;
00002 using System.Collections;
00003 using System.Globalization;
00004 using System.Runtime.InteropServices;
00005 using System.Text;
00006 using csRepeat;
00007
00008 namespace AsciiCmdUtilities
00009 {
00010     public class CommandFilters
00011     {
00012         public string CreateResTestReadBackCmd(bool bSendCoarseFineGain, int DppType)
00013         {
00014             string strCfg = "";
00015             bool isINOF;
00016
00017             isINOF = (DppType != FW6DppStatus.dppDP5G) && (DppType != FW6DppStatus.dppTB5);
00018             strCfg = "";
00019             strCfg += "CLCK=?;";
00020             strCfg += "TPEA=?;";
00021             if (bSendCoarseFineGain) { strCfg += "GAIF=?;"; }
00022             if (!bSendCoarseFineGain) { strCfg += "GAIN=?;"; }
00023             strCfg += "RESL=?;";
00024             strCfg += "TFLA=?;";
00025             strCfg += "TPFA=?;";
00026             strCfg += "PURE=?;";
00027             strCfg += "RTDE=?;";
00028             strCfg += "MCAS=?;";
00029             strCfg += "MCAC=?;";
00030             strCfg += "SOFF=?;";
00031             strCfg += "AINP=?;";
00032             if (isINOF) { strCfg += "INOF=?;"; }
00033             if (bSendCoarseFineGain) { strCfg += "GAIA=?;"; }
00034             return strCfg;
00035         }
00036
00037         public string CreateFullReadBackCmd(bool PC5_PRESENT, int DppType, bool isDP5_RevDxGains, byte DPP_ECO)
00038         {
00039             string strCfg = "";
00040             bool isHVSE;
00041             bool isPAPS;
00042             bool isTECS;
00043             bool isVOLU;
00044             bool isCON1;
00045             bool isCON2;
00046             bool isINOF;
00047             bool isBOOT;
00048             bool isGATE;
00049             bool isPAPZ;
00050             bool isSCTC;
00051             bool isDP5_DxK = false;
00052             bool isDP5_DxL = false;
00053
00054             if (DppType == FW6DppStatus.dppMCA8000D)
00055             {
00056                 strCfg = CreateFullReadBackCmdMCA8000D(DppType);
00057                 return strCfg;
00058             }
00059
00060             // DP5 Rev Dx K,L needs PAPZ
00061             if ((DppType == FW6DppStatus.dppDP5) && isDP5_RevDxGains)
00062             {
00063                 if ((DPP_ECO & 0x0F) == 0x0A)
00064                 {
00065                     isDP5_DxK = true;
00066                 }
00067                 if ((DPP_ECO & 0x0F) == 0x0B)
00068                 {
00069                     isDP5_DxL = true;
00070                 }
00071             }
00072
00073             isHVSE = (((DppType != FW6DppStatus.dppPX5) && PC5_PRESENT) || DppType == FW6DppStatus.dppPX5);
00074             isPAPS = (DppType != FW6DppStatus.dppDP5G) && (DppType != FW6DppStatus.dppTB5);
00075             isTECS = (((DppType == FW6DppStatus.dppDP5) && PC5_PRESENT) || (DppType == FW6DppStatus.dppPX5) || (DppType == FW6DppStatus.dppDP5X));
00076             isVOLU = (DppType == FW6DppStatus.dppPX5);
00077             isCON1 = ((DppType != FW6DppStatus.dppDP5) && (DppType != FW6DppStatus.dppDP5X));
00078             isCON2 = ((DppType != FW6DppStatus.dppDP5) && (DppType != FW6DppStatus.dppDP5X));
00079             isINOF = (DppType != FW6DppStatus.dppDP5G) && (DppType != FW6DppStatus.dppTB5);
00080             isSCTC = (DppType == FW6DppStatus.dppDP5G) || (DppType == FW6DppStatus.dppTB5);
00081             isBOOT = ((DppType == FW6DppStatus.dppDP5) || (DppType == FW6DppStatus.dppDP5X));
00082             isGATE = ((DppType == FW6DppStatus.dppDP5) || (DppType == FW6DppStatus.dppDP5X));
00083             isPAPZ = (DppType == FW6DppStatus.dppPX5) || isDP5_DxK || isDP5_DxL;
00084
00085             strCfg = "";
00086             strCfg += "RESC=?;";
00087             strCfg += "CLCK=?;";
00088             strCfg += "TPEA=?;";
00089             strCfg += "GAIF=?;";
00090             strCfg += "GAIN=?;";
00091             strCfg += "RESL=?;";
00092             strCfg += "TFLA=?;";
00093             strCfg += "TPFA=?;";
00094             strCfg += "PURE=?;";
00095             if (isSCTC) { strCfg += "SCTC=?;"; }
00096             strCfg += "RTDE=?;";
00097             strCfg += "MCAS=?;";
00098             strCfg += "MCAC=?;";
00099             strCfg += "SOFF=?;";
00100             strCfg += "AINP=?;";
00101             if (isINOF) { strCfg += "INOF=?;"; }
00102             strCfg += "GAIA=?;";
00103             strCfg += "CUSP=?;";
00104             strCfg += "PDMD=?;";
00105             strCfg += "THSL=?;";
00106             strCfg += "TLLD=?;";
00107             strCfg += "THFA=?;";
00108             strCfg += "DACO=?;";
00109             strCfg += "DACF=?;";
00110             strCfg += "RTDS=?;";
00111             strCfg += "RTDT=?;";
00112             strCfg += "BLRM=?;";
00113             strCfg += "BLRD=?;";
00114             strCfg += "BLRU=?;";
00115             if (isGATE) { strCfg += "GATE=?;"; }
00116             strCfg += "AUO1=?;";
00117             strCfg += "PRET=?;";
00118             strCfg += "PRER=?;";
00119             strCfg += "PREC=?;";
00120             strCfg += "PRCL=?;";
00121             strCfg += "PRCH=?;";
00122             if (isHVSE) { strCfg += "HVSE=?;"; }
00123             if (isTECS) { strCfg += "TECS=?;"; }
00124             if (isPAPZ) { strCfg += "PAPZ=?;"; }
00125             if (isPAPS) { strCfg += "PAPS=?;"; }
00126             strCfg += "SCOE=?;";
00127             strCfg += "SCOT=?;";
00128             strCfg += "SCOG=?;";
00129             strCfg += "MCSL=?;";
00130             strCfg += "MCSH=?;";
00131             strCfg += "MCST=?;";
00132             strCfg += "AUO2=?;";
00133             strCfg += "TPMO=?;";
00134             strCfg += "GPED=?;";
00135             strCfg += "GPIN=?;";
00136             strCfg += "GPME=?;";
00137             strCfg += "GPGA=?;";
00138             strCfg += "GPMC=?;";
00139             strCfg += "MCAE=?;";
00140             if (isVOLU) { strCfg += "VOLU=?;"; }
00141             if (isCON1) { strCfg += "CON1=?;"; }
00142             if (isCON2) { strCfg += "CON2=?;"; }
00143             if (isBOOT) { strCfg += "BOOT=?;"; }
00144             return strCfg;
00145         }
00146
00147         string CreateFullReadBackCmdMCA8000D(int DppType)
00148         {
00149             string strCfg = "";
00150
00151             if (DppType == FW6DppStatus.dppMCA8000D)
00152             {
00153                 strCfg += "RESC=?;";
00154                 strCfg += "PURE=?;";
00155                 strCfg += "MCAS=?;";
00156                 strCfg += "MCAC=?;";
00157                 strCfg += "SOFF=?;";
00158                 strCfg += "GAIA=?;";
00159                 strCfg += "PDMD=?;";
00160                 strCfg += "THSL=?;";
00161                 strCfg += "TLLD=?;";
00162                 strCfg += "GATE=?;";
00163                 strCfg += "AUO1=?;";
00164                 //strCfg += "PRET=?;";
00165                 strCfg += "PRER=?;";
00166                 strCfg += "PREL=?;";
00167                 strCfg += "PREC=?;";
00168                 strCfg += "PRCL=?;";
00169                 strCfg += "PRCH=?;";
00170                 strCfg += "SCOE=?;";
00171                 strCfg += "SCOT=?;";
00172                 strCfg += "SCOG=?;";
00173                 strCfg += "MCSL=?;";
00174                 strCfg += "MCSH=?;";
00175                 strCfg += "MCST=?;";
00176                 strCfg += "AUO2=?;";
00177                 strCfg += "GPED=?;";
00178                 strCfg += "GPIN=?;";
00179                 strCfg += "GPME=?;";
00180                 strCfg += "GPGA=?;";
00181                 strCfg += "GPMC=?;";
00182                 strCfg += "MCAE=?;";
00183                 //strCfg += "VOLU=?;";
00184                 //strCfg += "CON1=?;";
00185                 //strCfg += "CON2=?;";
00186                 strCfg += "PDMD=?;";
00187             }
00188             return strCfg;
00189         }
00190
00191         public static string RemoveCmd(string strCmd, string strCfgData)
00192         {
00193             int iStart, iEnd, iCmd;
00194             string strNew = "";
00195
00196             strNew = strCfgData;
00197             if (strCfgData.Length < 7) { return strCfgData; }   // no data
00198             if (strCmd.Length != 4) { return strCfgData; }              // bad command
00199             iCmd = (int)strCfgData.IndexOf(strCmd + "=", 0);
00200             if (iCmd == -1) { return strCfgData; }                                              // cmd not found
00201             iStart = iCmd;
00202             iEnd = (int)strCfgData.IndexOf(";", iCmd);
00203             if (iEnd == -1) { return strCfgData; }                                              // end not found
00204             if (iEnd <= iStart) { return strCfgData; }                                  // unknown error
00205             strNew = strCfgData.Substring(0, iStart) + strCfgData.Substring(iEnd + 1);
00206             return strNew;
00207         }
00208
00210         public string RemoveCmdByDeviceType(string strCfgDataIn, bool PC5_PRESENT, int DppType, bool isDP5_RevDxGains, byte DPP_ECO)
00211         {
00212             string strCfgData;
00213             bool isHVSE;
00214             bool isPAPS;
00215             bool isTECS;
00216             bool isVOLU;
00217             bool isCON1;
00218             bool isCON2;
00219             bool isINOF;
00220             bool isBOOT;
00221             bool isGATE;
00222             bool isPAPZ;
00223             bool isSCTC;
00224             bool isPREL;
00225             bool isDP5_DxK = false;
00226             bool isDP5_DxL = false;
00227
00228             strCfgData = strCfgDataIn;
00229             if (DppType == FW6DppStatus.dppMCA8000D)
00230             {
00231                 strCfgData = Remove_MCA8000D_Cmds(strCfgData, DppType);
00232                 return strCfgData;
00233             }
00234
00235             // DP5 Rev Dx K,L needs PAPZ
00236             if ((DppType == FW6DppStatus.dppDP5) && isDP5_RevDxGains)
00237             {
00238                 if ((DPP_ECO & 0x0F) == 0x0A)
00239                 {
00240                     isDP5_DxK = true;
00241                 }
00242                 if ((DPP_ECO & 0x0F) == 0x0B)
00243                 {
00244                     isDP5_DxL = true;
00245                 }
00246             }
00247
00248             isHVSE = (((DppType != FW6DppStatus.dppPX5) && PC5_PRESENT) || DppType == FW6DppStatus.dppPX5);
00249             isPAPS = (DppType != FW6DppStatus.dppDP5G) && (DppType != FW6DppStatus.dppTB5);
00250             isTECS = (((DppType == FW6DppStatus.dppDP5) && PC5_PRESENT) || (DppType == FW6DppStatus.dppPX5) || (DppType == FW6DppStatus.dppDP5X));
00251             isVOLU = (DppType == FW6DppStatus.dppPX5);
00252             isCON1 = ((DppType != FW6DppStatus.dppDP5) && (DppType != FW6DppStatus.dppDP5X));
00253             isCON2 = ((DppType != FW6DppStatus.dppDP5) && (DppType != FW6DppStatus.dppDP5X));
00254             isINOF = (DppType != FW6DppStatus.dppDP5G) && (DppType != FW6DppStatus.dppTB5);
00255             isSCTC = (DppType == FW6DppStatus.dppDP5G) || (DppType == FW6DppStatus.dppTB5);
00256             isBOOT = ((DppType == FW6DppStatus.dppDP5) || (DppType == FW6DppStatus.dppDP5X));
00257             isGATE = ((DppType == FW6DppStatus.dppDP5) || (DppType == FW6DppStatus.dppDP5X));
00258             isPAPZ = (DppType == FW6DppStatus.dppPX5) || isDP5_DxK || isDP5_DxL;
00259             isPREL = (DppType == FW6DppStatus.dppMCA8000D);
00260             if (!isHVSE) { strCfgData = RemoveCmd("HVSE", strCfgData); }  //High Voltage Bias
00261             if (!isPAPS) { strCfgData = RemoveCmd("PAPS", strCfgData); }  //Preamp Voltage
00262             if (!isTECS) { strCfgData = RemoveCmd("TECS", strCfgData); }  //Cooler Temperature
00263             if (!isVOLU) { strCfgData = RemoveCmd("VOLU", strCfgData); }  //px5 speaker
00264             if (!isCON1) { strCfgData = RemoveCmd("CON1", strCfgData); }  //connector 1
00265             if (!isCON2) { strCfgData = RemoveCmd("CON2", strCfgData); }  //connector 2
00266             if (!isINOF) { strCfgData = RemoveCmd("INOF", strCfgData); }  //input offset
00267             if (!isBOOT) { strCfgData = RemoveCmd("BOOT", strCfgData); }  //PC5 On At StartUp
00268             if (!isGATE) { strCfgData = RemoveCmd("GATE", strCfgData); }  //Gate input
00269             if (!isPAPZ) { strCfgData = RemoveCmd("PAPZ", strCfgData); }  //Pole-Zero
00270             if (!isSCTC) { strCfgData = RemoveCmd("SCTC", strCfgData); }  //Scintillator Time Constant
00271             if (!isPREL) { strCfgData = RemoveCmd("PREL", strCfgData); }  //Preset Live Time
00272             return strCfgData;
00273         }
00274
00276         string Remove_MCA8000D_Cmds(string strCfgDataIn, int DppType)
00277         {
00278             string strCfgData;
00279
00280             strCfgData = strCfgDataIn;
00281             if (DppType == FW6DppStatus.dppMCA8000D)
00282             {
00283                 strCfgData = RemoveCmd("CLCK", strCfgData);
00284                 strCfgData = RemoveCmd("TPEA", strCfgData);
00285                 strCfgData = RemoveCmd("GAIF", strCfgData);
00286                 strCfgData = RemoveCmd("GAIN", strCfgData);
00287                 strCfgData = RemoveCmd("RESL", strCfgData);
00288                 strCfgData = RemoveCmd("TFLA", strCfgData);
00289                 strCfgData = RemoveCmd("TPFA", strCfgData);
00290                 //strCfgData = RemoveCmd("PURE", strCfgData);
00291                 strCfgData = RemoveCmd("RTDE", strCfgData);
00292                 strCfgData = RemoveCmd("AINP", strCfgData);
00293                 strCfgData = RemoveCmd("INOF", strCfgData);
00294                 strCfgData = RemoveCmd("CUSP", strCfgData);
00295                 strCfgData = RemoveCmd("THFA", strCfgData);
00296                 strCfgData = RemoveCmd("DACO", strCfgData);
00297                 strCfgData = RemoveCmd("DACF", strCfgData);
00298                 strCfgData = RemoveCmd("RTDS", strCfgData);
00299                 strCfgData = RemoveCmd("RTDT", strCfgData);
00300                 strCfgData = RemoveCmd("BLRM", strCfgData);
00301                 strCfgData = RemoveCmd("BLRD", strCfgData);
00302                 strCfgData = RemoveCmd("BLRU", strCfgData);
00303                 strCfgData = RemoveCmd("PRET", strCfgData);
00304                 strCfgData = RemoveCmd("HVSE", strCfgData);
00305                 strCfgData = RemoveCmd("TECS", strCfgData);
00306                 strCfgData = RemoveCmd("PAPZ", strCfgData);
00307                 strCfgData = RemoveCmd("PAPS", strCfgData);
00308                 strCfgData = RemoveCmd("TPMO", strCfgData);
00309                 strCfgData = RemoveCmd("SCAH", strCfgData);
00310                 strCfgData = RemoveCmd("SCAI", strCfgData);
00311                 strCfgData = RemoveCmd("SCAL", strCfgData);
00312                 strCfgData = RemoveCmd("SCAO", strCfgData);
00313                 strCfgData = RemoveCmd("SCAW", strCfgData);
00314                 strCfgData = RemoveCmd("BOOT", strCfgData);
00315
00316                 // added to list late, recheck at later date 20120817
00317                 strCfgData = RemoveCmd("CON1", strCfgData);
00318                 strCfgData = RemoveCmd("CON2", strCfgData);
00319
00320                 // not implemented as of 20120817, will be implemented at some time
00321                 strCfgData = RemoveCmd("VOLU", strCfgData);
00322             }
00323             return strCfgData;
00324         }
00325
00326         public string GetCmdDesc(string strCmd)
00327         {
00328             string strCmdName = "";
00329             if (strCmd == "RESC")
00330             {
00331                 strCmdName = "Reset Configuration";
00332             }
00333             else if (strCmd == "CLCK")
00334             {
00335                 strCmdName = "20MHz/80MHz";
00336             }
00337             else if (strCmd == "TPEA")
00338             {
00339                 strCmdName = "Peaking Time";
00340             }
00341             else if (strCmd == "GAIF")
00342             {
00343                 strCmdName = "Fine Gain";
00344             }
00345             else if (strCmd == "GAIN")
00346             {
00347                 strCmdName = "Total Gain (Analog * Fine)";
00348             }
00349             else if (strCmd == "RESL")
00350             {
00351                 strCmdName = "Detector Reset Lockout";
00352             }
00353             else if (strCmd == "TFLA")
00354             {
00355                 strCmdName = "Flat Top";
00356             }
00357             else if (strCmd == "TPFA")
00358             {
00359                 strCmdName = "Fast Channel Peaking Time";
00360             }
00361             else if (strCmd == "PURE")
00362             {
00363                 strCmdName = "PUR Interval On/Off";
00364             }
00365             else if (strCmd == "RTDE")
00366             {
00367                 strCmdName = "RTD On/Off";
00368             }
00369             else if (strCmd == "MCAS")
00370             {
00371                 strCmdName = "MCA Source";
00372             }
00373             else if (strCmd == "MCAC")
00374             {
00375                 strCmdName = "MCA/MCS Channels";
00376             }
00377             else if (strCmd == "SOFF")
00378             {
00379                 strCmdName = "Set Spectrum Offset";
00380             }
00381             else if (strCmd == "AINP")
00382             {
00383                 strCmdName = "Analog Input Pos/Neg";
00384             }
00385             else if (strCmd == "INOF")
00386             {
00387                 strCmdName = "Input Offset";
00388             }
00389             else if (strCmd == "GAIA")
00390             {
00391                 strCmdName = "Analog Gain Index";
00392             }
00393             else if (strCmd == "CUSP")
00394             {
00395                 strCmdName = "Non-Trapezoidal Shaping";
00396             }
00397             else if (strCmd == "PDMD")
00398             {
00399                 strCmdName = "Peak Detect Mode (Min/Max)";
00400             }
00401             else if (strCmd == "THSL")
00402             {
00403                 strCmdName = "Slow Threshold";
00404             }
00405             else if (strCmd == "TLLD")
00406             {
00407                 strCmdName = "LLD Threshold";
00408             }
00409             else if (strCmd == "THFA")
00410             {
00411                 strCmdName = "Fast Threshold";
00412             }
00413             else if (strCmd == "DACO")
00414             {
00415                 strCmdName = "DAC Output";
00416             }
00417             else if (strCmd == "DACF")
00418             {
00419                 strCmdName = "DAC Offset";
00420             }
00421             else if (strCmd == "RTDS")
00422             {
00423                 strCmdName = "RTD Sensitivity";
00424             }
00425             else if (strCmd == "RTDT")
00426             {
00427                 strCmdName = "RTD Threshold";
00428             }
00429             else if (strCmd == "RTDD")
00430             {
00431                 strCmdName = "Custom RTD Oneshot Delay";
00432             }
00433             else if (strCmd == "RTDW")
00434             {
00435                 strCmdName = "Custom RTD Oneshot Width";
00436             }
00437             else if (strCmd == "BLRM")
00438             {
00439                 strCmdName = "BLR Mode";
00440             }
00441             else if (strCmd == "BLRD")
00442             {
00443                 strCmdName = "BLR Down Correction";
00444             }
00445             else if (strCmd == "BLRU")
00446             {
00447                 strCmdName = "BLR Up Correction";
00448             }
00449             else if (strCmd == "GATE")
00450             {
00451                 strCmdName = "Gate Control";
00452             }
00453             else if (strCmd == "AUO1")
00454             {
00455                 strCmdName = "AUX_OUT Selection";
00456             }
00457             else if (strCmd == "PRET")
00458             {
00459                 strCmdName = "Preset Time";
00460             }
00461             else if (strCmd == "PRER")
00462             {
00463                 strCmdName = "Preset Real Time";
00464             }
00465             else if (strCmd == "PREL")
00466             {
00467                 strCmdName = "Preset Live Time";
00468             }
00469             else if (strCmd == "PREC")
00470             {
00471                 strCmdName = "Preset Counts";
00472             }
00473             else if (strCmd == "PRCL")
00474             {
00475                 strCmdName = "Preset Counts Low Threshold";
00476             }
00477             else if (strCmd == "PRCH")
00478             {
00479                 strCmdName = "Preset Counts High Threshold";
00480             }
00481             else if (strCmd == "HVSE")
00482             {
00483                 strCmdName = "HV Set";
00484             }
00485             else if (strCmd == "TECS")
00486             {
00487                 strCmdName = "TEC Set";
00488             }
00489             else if (strCmd == "PAPZ")
00490             {
00491                 strCmdName = "Pole-Zero";
00492             }
00493             else if (strCmd == "PAPS")
00494             {
00495                 strCmdName = "Preamp 8.5/5 (N/A)";
00496             }
00497             else if (strCmd == "SCOE")
00498             {
00499                 strCmdName = "Scope Trigger Edge";
00500             }
00501             else if (strCmd == "SCOT")
00502             {
00503                 strCmdName = "Scope Trigger Position";
00504             }
00505             else if (strCmd == "SCOG")
00506             {
00507                 strCmdName = "Digital Scope Gain";
00508             }
00509             else if (strCmd == "MCSL")
00510             {
00511                 strCmdName = "MCS Low Threshold";
00512             }
00513             else if (strCmd == "MCSH")
00514             {
00515                 strCmdName = "MCS High Threshold";
00516             }
00517             else if (strCmd == "MCST")
00518             {
00519                 strCmdName = "MCS Timebase";
00520             }
00521             else if (strCmd == "AUO2")
00522             {
00523                 strCmdName = "AUX_OUT2 Selection";
00524             }
00525             else if (strCmd == "TPMO")
00526             {
00527                 strCmdName = "Test Pulser On/Off";
00528             }
00529             else if (strCmd == "GPED")
00530             {
00531                 strCmdName = "G.P. Counter Edge";
00532             }
00533             else if (strCmd == "GPIN")
00534             {
00535                 strCmdName = "G.P. Counter Input";
00536             }
00537             else if (strCmd == "GPME")
00538             {
00539                 strCmdName = "G.P. Counter Uses MCA_EN?";
00540             }
00541             else if (strCmd == "GPGA")
00542             {
00543                 strCmdName = "G.P. Counter Uses GATE?";
00544             }
00545             else if (strCmd == "GPMC")
00546             {
00547                 strCmdName = "G.P. Counter Cleared With MCA Counters?";
00548             }
00549             else if (strCmd == "MCAE")
00550             {
00551                 strCmdName = "MCA/MCS Enable";
00552             }
00553             else if (strCmd == "VOLU")
00554             {
00555                 strCmdName = "Speaker On/Off";
00556             }
00557             else if (strCmd == "CON1")
00558             {
00559                 strCmdName = "Connector 1";
00560             }
00561             else if (strCmd == "CON2")
00562             {
00563                 strCmdName = "Connector 2";
00564             }
00565             else if (strCmd == "SCAH")
00566             {
00567                 strCmdName = "SCAx High Threshold";
00568             }
00569             else if (strCmd == "SCAI")
00570             {
00571                 strCmdName = "SCA Index";
00572             }
00573             else if (strCmd == "SCAL")
00574             {
00575                 strCmdName = "SCAx Low Theshold";
00576             }
00577             else if (strCmd == "SCAO")
00578             {
00579                 strCmdName = "SCAx Output (SCA1-8 Only)";
00580             }
00581             else if (strCmd == "SCAW")
00582             {
00583                 strCmdName = "SCA Pulse Width (Not Indexed - SCA1-8)";
00584             }
00585             else if (strCmd == "BOOT")
00586             {
00587                 strCmdName = "Turn Supplies On/Off At Power Up";
00588             }
00589             return strCmdName;
00590         }
00591
00592         string AppendCmdDesc(string strCmd, string strCfgData)
00593         {
00594                 int iStart,iEnd,iCmd;
00595                 string strNew;
00596                 string strDesc;
00597
00598                 strNew = "";
00599                 if (strCfgData.Length < 7)
00600             {
00601                 return strCfgData;
00602             }   // no data
00603                 if (strCmd.Length != 4)
00604             {
00605                 return strCfgData;
00606             }           // bad command
00607             iCmd = (int)strCfgData.IndexOf(strCmd + "=", 0);
00608                 if (iCmd == -1)
00609             {
00610                 return strCfgData;
00611             }                                           // cmd not found
00612             iEnd = (int)strCfgData.IndexOf(";", iCmd);
00613                 if (iEnd == -1)
00614             {
00615                 return strCfgData;
00616             }                   // data end found
00617             iStart = (int)strCfgData.IndexOf("=", iCmd);
00618                 if (iStart != (iCmd + 4))
00619             {
00620                 return strCfgData;
00621             }                   // data start not found
00622                 if (iStart >= iEnd)
00623             {
00624                 return strCfgData;
00625             }           // data error
00626                 strDesc = GetCmdDesc(strCmd);
00627                 if (strDesc.Length == 0)
00628             {
00629                 return strCfgData;
00630             }           // cmd desc  not found
00631             strNew = strCfgData.Substring(0, iEnd + 1) + "    " + strDesc + strCfgData.Substring(iEnd + 1);
00632                 return strNew;
00633         }
00634
00635         public string CreateSpectrumConfig(string strRawCfgIn)
00636         {
00637             string strDisplayCfgOut = "";
00638             string strCmdD = "";
00639             ArrayList Dp5CmdList;
00640
00641             Dp5CmdList = MakeDp5CmdList();
00642             strDisplayCfgOut = strRawCfgIn;
00643             if (Dp5CmdList.Count > 0) {
00644                 foreach (object lstCmd in Dp5CmdList)
00645                 {
00646                     strCmdD = (string)lstCmd;
00647                     if (strCmdD.Length > 0)
00648                     {
00649                         strDisplayCfgOut = AppendCmdDesc(strCmdD, strDisplayCfgOut);
00650                     }
00651                 }
00652             }
00653             return strDisplayCfgOut;
00654         }
00655
00656         public ArrayList MakeDp5CmdList()
00657         {
00658             ArrayList strCfgArr = new ArrayList();
00659             strCfgArr.Clear();
00660             strCfgArr.Add("RESC");
00661             strCfgArr.Add("CLCK");
00662             strCfgArr.Add("TPEA");
00663             strCfgArr.Add("GAIF");
00664             strCfgArr.Add("GAIN");
00665             strCfgArr.Add("RESL");
00666             strCfgArr.Add("TFLA");
00667             strCfgArr.Add("TPFA");
00668             strCfgArr.Add("PURE");
00669             strCfgArr.Add("RTDE");
00670             strCfgArr.Add("MCAS");
00671             strCfgArr.Add("MCAC");
00672             strCfgArr.Add("SOFF");
00673             strCfgArr.Add("AINP");
00674             strCfgArr.Add("INOF");
00675             strCfgArr.Add("GAIA");
00676             strCfgArr.Add("CUSP");
00677             strCfgArr.Add("PDMD");
00678             strCfgArr.Add("THSL");
00679             strCfgArr.Add("TLLD");
00680             strCfgArr.Add("THFA");
00681             strCfgArr.Add("DACO");
00682             strCfgArr.Add("DACF");
00683             strCfgArr.Add("RTDS");
00684             strCfgArr.Add("RTDT");
00685             strCfgArr.Add("BLRM");
00686             strCfgArr.Add("BLRD");
00687             strCfgArr.Add("BLRU");
00688             strCfgArr.Add("GATE");
00689             strCfgArr.Add("AUO1");
00690             strCfgArr.Add("PRET");
00691             strCfgArr.Add("PRER");
00692             strCfgArr.Add("PREL");
00693             strCfgArr.Add("PREC");
00694             strCfgArr.Add("PRCL");
00695             strCfgArr.Add("PRCH");
00696             strCfgArr.Add("HVSE");
00697             strCfgArr.Add("TECS");
00698             strCfgArr.Add("PAPZ");
00699             strCfgArr.Add("PAPS");
00700             strCfgArr.Add("SCOE");
00701             strCfgArr.Add("SCOT");
00702             strCfgArr.Add("SCOG");
00703             strCfgArr.Add("MCSL");
00704             strCfgArr.Add("MCSH");
00705             strCfgArr.Add("MCST");
00706             strCfgArr.Add("AUO2");
00707             strCfgArr.Add("TPMO");
00708             strCfgArr.Add("GPED");
00709             strCfgArr.Add("GPIN");
00710             strCfgArr.Add("GPME");
00711             strCfgArr.Add("GPGA");
00712             strCfgArr.Add("GPMC");
00713             strCfgArr.Add("MCAE");
00714             strCfgArr.Add("VOLU");
00715             strCfgArr.Add("CON1");
00716             strCfgArr.Add("CON2");
00717             strCfgArr.Add("BOOT");
00718             return strCfgArr;
00719         }
00720
00721         // replaces all occurrences of substring in string
00722         string ReplaceCmdText(string strInTextIn, string strFrom, string strTo)
00723         {
00724             string strReplaceText;
00725             string strInText;
00726             string strOutText;
00727             int lFromLen;
00728             int lMatchPos;
00729
00730             strInText = strInTextIn;
00731             strOutText = "";
00732             lFromLen = (int)strFrom.Length;
00733             while (strInText.Length > 0)
00734             {
00735                 lMatchPos = (1 + (int)strInText.IndexOf(strFrom));
00736                 if (lMatchPos == 0)
00737                 {
00738                     strOutText = strOutText + strInText;
00739                     strInText = "";
00740                 }
00741                 else
00742                 {
00743                     strOutText = strOutText + strInText.Substring(0, lMatchPos - 1) + strTo;
00744                     strInText = strInText.Substring(lMatchPos + lFromLen - 1);
00745                 }
00746             }
00747             strReplaceText = strOutText;
00748             return strReplaceText;
00749         }
00750
00751         // demonstrates replacing a ASCII configuration string values
00752         private void ReplaceCmdValues(string strCmdStringIn)
00753         {
00754             string strCfg = "";
00755             int lLenCmdString;
00756             int lBlock1Length;
00757
00758             strCmdStringIn = strCmdStringIn.Trim();
00759             lLenCmdString = strCmdStringIn.Length;
00760             if (lLenCmdString > 0)
00761             {
00762                 strCfg = strCmdStringIn;
00763                 strCfg = ReplaceCmdText(strCfg, "US;", ";");
00764                 strCfg = ReplaceCmdText(strCfg, "OFF;", "OF;");
00765                 strCfg = ReplaceCmdText(strCfg, "RISING;", "RI;");
00766                 strCfg = ReplaceCmdText(strCfg, "FALLING;", "FA;");
00767                 lBlock1Length = strCfg.Length;
00768             }
00769         }
00770
00771         // demonstrates splitting a ASCII configuration string
00772         private void SplitConfig(string strCmdStringIn)
00773         {
00774             string strConfigOutBlock1 = "";
00775             string strConfigOutBlock2 = "";
00776             int lLenCmdString;
00777             int lSplitPosition;
00778             int lBlock1Length;
00779             int lBlock2Length;
00780             int lTotalCfgOutLength;
00781
00782             strCmdStringIn = strCmdStringIn.Trim();
00783             lLenCmdString = strCmdStringIn.Length;
00784             lSplitPosition = GetCmdChunk(strCmdStringIn);
00785             strConfigOutBlock1 = strCmdStringIn.Substring(0, lSplitPosition);
00786             strConfigOutBlock2 = strCmdStringIn.Substring(lSplitPosition + 1);
00787             lBlock1Length = strConfigOutBlock1.Length;
00788             lBlock2Length = strConfigOutBlock2.Length;
00789             lTotalCfgOutLength = lBlock1Length + lBlock2Length;
00790         }
00791
00792         // breaks ASCII Command string into two chuncks, returns split position
00793         int GetCmdChunk(string strCmd)
00794         {
00795             int GetCmdChunk = 0;
00796             int idxCfg;
00797             int lChunk;
00798             int lEnd;
00799             GetCmdChunk = 0;
00800             lChunk = 0;
00801             lEnd = 0;
00802             for (idxCfg = 1; idxCfg <= (int)strCmd.Length; idxCfg++)
00803             {
00804                 lChunk = (int)(1 + strCmd.IndexOf(";", lEnd));
00805                 if ((lChunk == 0) || (lChunk > 512))
00806                 {
00807                     break;
00808                 }
00809                 lEnd = lChunk;
00810             }
00811             GetCmdChunk = lEnd;
00812             return GetCmdChunk;
00813         }
00814
00816         bool CopyAsciiData(byte[] Data, string strCfg, long lLen)
00817         {
00818             if (strCfg.Length > 0)
00819             {
00820                 Data = Encoding.ASCII.GetBytes(strCfg);
00821                 return true;
00822             }
00823             else
00824             {
00825                 return false;
00826             }
00827         }
00828     }
00829
00830 }
Generated on Fri Sep 22 2017 10:35:16 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: AssemblyInfo.cs Source File

  • File List
AssemblyInfo.cs
Go to the documentation of this file.
00001 using System.Reflection;
00002 using System.Runtime.CompilerServices;
00003
00004 //
00005 // General Information about an assembly is controlled through the following
00006 // set of attributes. Change these attribute values to modify the information
00007 // associated with an assembly.
00008 //
00009 [assembly: AssemblyTitle("")]
00010 [assembly: AssemblyDescription("")]
00011 [assembly: AssemblyConfiguration("")]
00012 [assembly: AssemblyCompany("")]
00013 [assembly: AssemblyProduct("")]
00014 [assembly: AssemblyCopyright("")]
00015 [assembly: AssemblyTrademark("")]
00016 [assembly: AssemblyCulture("")]
00017
00018 //
00019 // Version information for an assembly consists of the following four values:
00020 //
00021 //      Major Version
00022 //      Minor Version
00023 //      Build Number
00024 //      Revision
00025 //
00026 // You can specify all the values or you can default the Revision and Build Numbers
00027 // by using the '*' as shown below:
00028
00029 [assembly: AssemblyVersion("1.0.*")]
00030
00031 //
00032 // In order to sign your assembly you must specify a key to use. Refer to the
00033 // Microsoft .NET Framework documentation for more information on assembly signing.
00034 //
00035 // Use the attributes below to control which key is used for signing.
00036 //
00037 // Notes:
00038 //   (*) If no key is specified, the assembly is not signed.
00039 //   (*) KeyName refers to a key that has been installed in the Crypto Service
00040 //       Provider (CSP) on your machine. KeyFile refers to a file which contains
00041 //       a key.
00042 //   (*) If the KeyFile and the KeyName values are both specified, the
00043 //       following processing occurs:
00044 //       (1) If the KeyName can be found in the CSP, that key is used.
00045 //       (2) If the KeyName does not exist and the KeyFile does exist, the key
00046 //           in the KeyFile is installed into the CSP and used.
00047 //   (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility.
00048 //       When specifying the KeyFile, the location of the KeyFile should be
00049 //       relative to the project output directory which is
00050 //       %Project Directory%\obj<configuration>. For example, if your KeyFile is
00051 //       located in the project directory, you would specify the AssemblyKeyFile
00052 //       attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")]
00053 //   (*) Delay Signing is an advanced option - see the Microsoft .NET Framework
00054 //       documentation for more information on this.
00055 //
00056 [assembly: AssemblyDelaySign(false)]
00057 [assembly: AssemblyKeyFile("")]
00058 [assembly: AssemblyKeyName("")]
Generated on Fri Sep 22 2017 10:35:16 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: MiscUtil/Conversion/BigEndianBitConverter.cs Source File

  • File List
MiscUtil/Conversion/BigEndianBitConverter.cs
Go to the documentation of this file.
00001
00002 namespace MiscUtil.Conversion
00003 {
00008     public sealed class BigEndianBitConverter : EndianBitConverter
00009     {
00019         public sealed override bool IsLittleEndian()
00020         {
00021             return false;
00022         }
00023
00027         public sealed override Endianness Endianness
00028         {
00029             get { return Endianness.BigEndian; }
00030         }
00031
00039         protected override void CopyBytesImpl(long value, int bytes, byte[] buffer, int index)
00040         {
00041             int endOffset = index+bytes-1;
00042             for (int i=0; i < bytes; i++)
00043             {
00044                 buffer[endOffset-i] = unchecked((byte)(value&0xff));
00045                 value = value >> 8;
00046             }
00047         }
00048
00057         protected override long FromBytes(byte[] buffer, int startIndex, int bytesToConvert)
00058         {
00059             long ret = 0;
00060             for (int i=0; i < bytesToConvert; i++)
00061             {
00062                 ret = unchecked((ret << 8) | buffer[startIndex+i]);
00063             }
00064             return ret;
00065         }
00066     }
00067 }
Generated on Fri Sep 22 2017 10:35:16 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: FW6/Configuration.cs Source File

  • File List
FW6/Configuration.cs
Go to the documentation of this file.
00001 using System;
00002 using System.Collections.Generic;
00003 using System.Text;
00004
00005 namespace csRepeat.FW6
00006 {
00010     class Configuration : FW6Packet
00011     {
00012         public override byte PID1
00013         {
00014             get { return 0x20; }
00015         }
00016
00017         public override byte PID2
00018         {
00019             get { return 0x2; }
00020         }
00021
00022         private byte[] data;
00023         public override byte[] Data
00024         {
00025             get { return data; }
00026         }
00027
00028         public Configuration(byte[] data)
00029         {
00030             this.data = data;
00031         }
00032     }
00033 }
Generated on Fri Sep 22 2017 10:35:16 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: FW6/ConfigurationReadback.cs Source File

  • File List
FW6/ConfigurationReadback.cs
Go to the documentation of this file.
00001 ﻿using System;
00002 using System.Collections.Generic;
00003 using System.Text;
00004
00005 namespace csRepeat.FW6
00006 {
00010     class ConfigurationReadback : FW6Packet
00011     {
00012         public override byte PID1
00013         {
00014             get { return 0x20; }
00015         }
00016
00017         public override byte PID2
00018         {
00019             get { return 0x3; }
00020         }
00021
00022         private byte[] data;
00023         public override byte[] Data
00024         {
00025             get { return data; }
00026         }
00027
00028         public ConfigurationReadback(byte[] data)
00029         {
00030             this.data = data;
00031         }
00032     }
00033 }
Generated on Fri Sep 22 2017 10:35:16 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: FW6/ConfigurationResponse.cs Source File

  • File List
FW6/ConfigurationResponse.cs
Go to the documentation of this file.
00001 using System;
00002 using System.Collections.Generic;
00003 using System.Text;
00004
00005 namespace csRepeat.FW6
00006 {
00010     public class ConfigurationResponse : FW6Packet
00011     {
00012         private const byte thisPID1 = 0x82;
00013         private const byte thisPID2 = 0x07;
00014
00015         private byte[] packetContent;
00016
00017         public override byte PID1
00018         {
00019             get { return thisPID1; }
00020         }
00021
00022         public override byte PID2
00023         {
00024             get { return thisPID2; }
00025         }
00026
00027         public override byte[] Data
00028         {
00029             get
00030             {
00031                 byte[] returnValue = new byte[packetContent.Length - (PacketHeaderLength+ChecksumLength)];
00032                 Array.Copy(packetContent, PacketHeaderLength, returnValue, 0, returnValue.Length);
00033                 return returnValue;
00034             }
00035         }
00036
00037         public ConfigurationResponse(byte[] packetContent)
00038         {
00039             this.packetContent = packetContent;
00040         }
00041
00042         public static bool IsMatch(byte pid1, byte pid2)
00043         {
00044             if ((thisPID1 == pid1) && (thisPID2 == pid2))
00045             {
00046                 return true;
00047             }
00048
00049             return false;
00050         }
00051     }
00052 }
Generated on Fri Sep 22 2017 10:35:16 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: FW6/DPDevice.cs Source File

  • File List
FW6/DPDevice.cs
Go to the documentation of this file.
00001 ﻿using System;
00002 using System.Collections.Generic;
00003 using System.Text;
00004
00005 namespace csRepeat
00006 {
00007     public abstract class DPDevice
00008     {
00009         public enum InterfaceTypes
00010         {
00011             ethernet,
00012             rs232,
00013             usb
00014         }
00015
00016         //public InterfaceTypes InterfaceType { get; set; }
00017         private InterfaceTypes _InterfaceType;
00018         public InterfaceTypes InterfaceType {
00019             get { return _InterfaceType; }
00020             set { _InterfaceType = value; }
00021         }
00022
00023         //public DeviceTypes DeviceType { get; set; }
00024         private DeviceTypes _DeviceType;
00025         public DeviceTypes DeviceType {
00026             get { return _DeviceType; }
00027             set { _DeviceType = value; }
00028         }
00029
00030         public Version FirmwareVersion;
00031         public Version FpgaVersion;
00032
00033         //public string SerialNumber { get; set; }
00034         private string _SerialNumber;
00035         public string SerialNumber {
00036             get { return _SerialNumber; }
00037             set { _SerialNumber = value; }
00038         }
00039
00040         public DPDevice(InterfaceTypes interfaceType,
00041                         DeviceTypes deviceType,
00042                         Version firmwareVersion,
00043                         Version fpgaVersion,
00044                         string serialNumber)
00045         {
00046             this.InterfaceType = interfaceType;
00047             this.DeviceType = deviceType;
00048             this.FirmwareVersion = firmwareVersion;
00049             this.FpgaVersion = fpgaVersion;
00050             this.SerialNumber = serialNumber;
00051
00052             // default to Normal state
00053             FpgaState = FpgaStates.Normal;
00054
00055             // see if we saw an encryption failure
00056             if (fpgaVersion.Equals(FpgaEncryptionFailureVersion))
00057             {
00058                 FpgaState = FpgaStates.EncryptionFailure;
00059             }
00060         }
00061
00065         public enum FpgaStates
00066         {
00070             Normal,
00071
00075             EncryptionFailure,
00076
00080             Unprogrammed
00081         }
00082
00086         public static readonly Version FpgaEncryptionFailureVersion = new Version(14, 14);
00087
00091
00092         private FpgaStates _FpgaState;
00093         public FpgaStates FpgaState
00094         {
00095             get { return _FpgaState; }
00096             internal set { _FpgaState = value; }
00097         }
00098
00099         public delegate void UploadProgressUpdateDelegate(long currentByteOffset, long totalBytes);
00100
00101         public delegate bool HasFirmwareLoadBeenCancelledDelegate();
00102         public HasFirmwareLoadBeenCancelledDelegate HasFirmwareLoadBeenCancelled;
00103
00104         public static List<DPDevice> PerformDeviceDetection()
00105         {
00106             List<DPDevice> devices = new List<DPDevice>();
00107             List<DPDevice> fw6UsbDevices = FW6.DPDeviceUsb.DetectDevices();
00108             List<DPDevice> fw6SerialDevices = FW6.DPDeviceSerialFW6.DetectDevices();
00109
00110             if (fw6SerialDevices != null)
00111             {
00112                 foreach (DPDevice a in fw6SerialDevices)
00113                 {
00114                     devices.Add(a);
00115                 }
00116             }
00117
00118             if (fw6UsbDevices != null)
00119             {
00120                 foreach (DPDevice a in fw6UsbDevices)
00121                 {
00122                     devices.Add(a);
00123                 }
00124             }
00125             return devices;
00126         }
00127
00128
00129         public override string ToString()
00130         {
00131             return String.Format("Amptek {0} - S/N {1} - uC Ver {2}  FPGA Ver {3} - {4}",
00132                                  DeviceType, SerialNumber, DisplayVersion.VersionString(this, FirmwareVersion, false), DisplayVersion.VersionString(this, FpgaVersion, true), InterfaceType);
00133         }
00134     }
00135 }
Generated on Fri Sep 22 2017 10:35:16 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: FW6/DPDeviceEthernet.cs Source File

  • File List
FW6/DPDeviceEthernet.cs
Go to the documentation of this file.
00001 using System;
00002 using System.Collections.Generic;
00003 using System.Text;
00004 using System.Net;
00005 using System.Net.Sockets;
00006 using System.Net.NetworkInformation;
00007 using System.IO;
00008 using AsciiCmdUtilities;
00009
00010 namespace csRepeat.FW6
00011 {
00012     public class DPDeviceEthernet : FW6Device
00013     {
00014         public const int udpDiscoveryPort = 10001;
00015
00016         public IPEndPoint deviceEndPoint;
00017
00018         protected override int DataPacketAckTimeoutMS
00019         {
00020             get
00021             {
00022                 // Ethernet data packets are a special case. Something on the DP5 side is causing
00023                 // ack packets to be delayed, if the pc resends the packet and the previous ack is
00024                 // finally delivered then the pc can interpret the delayed ack as an ack for the next
00025                 // data packet causing a gap in programming. So we wait a long time for the packets
00026                 //
00027                 // Dave@Amptek asked for a delay of 6 seconds here
00028                 return 6000;
00029             }
00030         }
00031
00032         public DPDeviceEthernet(DeviceTypes deviceType,
00033                                 Version firmwareVersion,
00034                                 Version fpgaVersion,
00035                                 string serialNumber,
00036                                 IPEndPoint deviceEndPoint)
00037             : base(InterfaceTypes.ethernet, deviceType,
00038                    firmwareVersion,
00039                    fpgaVersion,
00040                    serialNumber)
00041         {
00042             this.deviceEndPoint = deviceEndPoint;
00043
00044             // update fpga state, have to call this here because performing it in
00045             // FW6Device() constructor meas it would happen before
00046             // the code here so internal state storage wouldn't be set up
00047             UpdateFpgaState();
00048         }
00049
00050         public static List<DPDevice> DetectDevices()
00051         {
00052             List<DPDevice> devices = new List<DPDevice>();
00053
00054             foreach (System.Net.NetworkInformation.NetworkInterface i in System.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces())
00055             {
00056                 foreach (System.Net.NetworkInformation.UnicastIPAddressInformation ua in i.GetIPProperties().UnicastAddresses)
00057                 {
00058                     Console.WriteLine(ua.Address);
00059                     List<DPDeviceEthernet> newDevices = DetectFromAddress(ua.Address);
00060                     if (newDevices != null)
00061                     {
00062                         foreach (DPDeviceEthernet d in newDevices)
00063                         {
00064                             devices.Add(d);
00065                         }
00066                     }
00067                 }
00068             }
00069
00070             return devices;
00071         }
00072
00073         private static List<DPDeviceEthernet> DetectFromAddress(IPAddress localIP)
00074         {
00075             List<DPDeviceEthernet> devices = new List<DPDeviceEthernet>();
00076
00077             // skip detection on ipv6 networks for now
00078             if (localIP.AddressFamily == AddressFamily.InterNetworkV6)
00079                 return null;
00080
00081             StatusRequest statusRequest = new FW6.StatusRequest();
00082
00083             // create and bind to the local ip address
00084             // NOTE: We use a custom socket so we can control its settings and bind it
00085             int port = 0; // picks any appropriate port
00086             Socket socket = new Socket(localIP.AddressFamily, SocketType.Dgram, ProtocolType.Udp);
00087             try
00088             {
00089                 IPEndPoint localEndPoint = new IPEndPoint(localIP, port);
00090                 socket.Bind(localEndPoint);
00091             }
00092             catch
00093             {
00094                 return null;
00095             }
00096
00097             UdpClient udpClient = new UdpClient();
00098             udpClient.Client = socket;
00099             udpClient.Client.ReceiveTimeout = 500; // timeout in milliseconds
00100
00101             // Creates an IPEndPoint to record the IP Address and port number of the sender.
00102             IPEndPoint remoteEndPoint;
00103             remoteEndPoint = new IPEndPoint(IPAddress.Broadcast, udpDiscoveryPort);
00104
00105             // Creates an IPEndPoint to record the IP Address and port number of the sender.
00106             // The IPEndPoint will allow you to read datagrams sent from any source.
00107             IPEndPoint remoteIpEndPoint = new IPEndPoint(IPAddress.Any, 0);
00108
00109             byte[] receivedBytes = null;
00110
00111             udpClient.Send(statusRequest.EncodedPacket, statusRequest.EncodedPacket.Length, remoteEndPoint);
00112
00113             // receive data
00114             receivedBytes = null;
00115             try
00116             {
00117                 // receive all responses and attempt to handle them as new devices
00118                 while (true)
00119                 {
00120                     receivedBytes = udpClient.Receive(ref remoteIpEndPoint);
00121                     DPDeviceEthernet newDevice = HandleReceivedBytes(receivedBytes, remoteIpEndPoint);
00122                     if (newDevice != null)
00123                     {
00124                         int iMatchingDevices = 0;
00125                         int iDev = 0;
00126                         DPDeviceEthernet d;
00127                         d = newDevice;
00128                         for (iDev = 0; iDev < devices.Count; iDev++)
00129                         {
00130                             d = devices[iDev];
00131                             if ((d.SerialNumber == newDevice.SerialNumber) &&
00132                                               d.udpClient.Client.RemoteEndPoint.Equals(newDevice.udpClient.Client.RemoteEndPoint))
00133                             {
00134                                 iMatchingDevices++;
00135                             }
00136                         }
00137                         if (iMatchingDevices == 0)
00138                         {
00139                             devices.Add(newDevice);
00140                         }
00141                     }
00142                 }
00143             }
00144             catch (System.Net.Sockets.SocketException ex)
00145             {
00146                 if (ex.SocketErrorCode == SocketError.TimedOut)
00147                 {
00148                     // Delay for 5 seconds - this is a workaround for the following:
00149                     //   Once a packet exchange has taken place on this port, the socket is bound to the
00150                     //   IP address and source port of the host it exchanged packets with.
00151                     //   Once the socket is bound, packets from other IP addresses will be ignored (including the IP address it is bound to).
00152                     //   After approx. 4-5 seconds of inactivity on the socket,
00153                     //   the socket is reset so that it can once again connect to any IP.
00154                     // This allows repeated discovery of ethernet devices
00155                     int sleepMS = 5000;
00156                     System.Threading.Thread.Sleep(sleepMS);
00157                 }
00158                 else
00159                 {
00160                     throw; // rethrow the exception
00161                 }
00162             }
00163             catch (System.Exception)
00164             {
00165                 // ignore exceptions
00166             }
00167
00168             if (receivedBytes == null)
00169             {
00170                 return null;
00171             }
00172
00173             // Return list of discovered devices
00174             return devices;
00175         }
00176
00177         private static DPDeviceEthernet HandleReceivedBytes(byte[] receivedBytes, IPEndPoint remoteIpEndPoint)
00178         {
00179             // what command did we get?
00180             FW6PacketParser.HandleStates state;
00181             FW6PacketParser packetParser = new FW6PacketParser();
00182             FW6Packet packetResponse = packetParser.HandleBytes(out state, receivedBytes, receivedBytes.Length);
00183
00184             if (state == FW6PacketParser.HandleStates.CommandComplete)
00185             {
00186                 // did we get a status response back?
00187                 if (packetResponse is StatusResponse)
00188                 {
00189                     StatusResponse statusPacket = packetResponse as StatusResponse;
00190                     string serialNumber = String.Format("{0:D6}", statusPacket.SerialNumber);
00191                     DPDeviceEthernet newDevice = new DPDeviceEthernet(statusPacket.DeviceType,
00192                                                          new Version(statusPacket.FwVersionMajor, statusPacket.FwVersionMinor, statusPacket.FwBuildNumber),
00193                                                          new Version(statusPacket.FpgaVersionMajor, statusPacket.FpgaVersionMinor),
00194                                                          serialNumber,
00195                                                          remoteIpEndPoint);
00196                     return newDevice;
00197                 }
00198             }
00199
00200             return null;
00201         }
00202
00203         protected UdpClient udpClient;
00204
00205         protected override void Connect()
00206         {
00207             // open a socket to the device
00208             udpClient = new UdpClient();
00209             udpClient.Connect(deviceEndPoint);
00210             int receiveTimeoutMilliseconds = 100;
00211             udpClient.Client.ReceiveTimeout = receiveTimeoutMilliseconds;
00212         }
00213
00214         protected override void Disconnect()
00215         {
00216             udpClient.Close();
00217             udpClient = null;
00218         }
00219
00226         protected override FW6Packet SendAndGetResponse(FW6Packet packetToSend, int timeoutMS)
00227         {
00228             int delayBeforeReadMS = 0;
00229             return SendAndGetResponse(packetToSend, delayBeforeReadMS, timeoutMS);
00230         }
00231
00239         protected override FW6Packet SendAndGetResponse(FW6Packet packetToSend, int delayBeforeReadMS, int timeoutMS)
00240         {
00241             int retries = 5;
00242
00243             do
00244             {
00245                 FW6Packet response = null;
00246                 try
00247                 {
00248                     response = _SendAndGetResponse(udpClient, packetToSend, delayBeforeReadMS, timeoutMS);
00249                 } catch
00250                 {
00251                 }
00252
00253                 if (response != null)
00254                 {
00255                     return response;
00256                 }
00257
00258                 retries--;
00259             } while (retries > 0);
00260
00261             return null;
00262         }
00263
00271         private FW6Packet _SendAndGetResponse(UdpClient udpClient, FW6Packet packetToSend, int delayBeforeReadMS, int timeoutMS)
00272         {
00273             udpClient.Send(packetToSend.EncodedPacket, packetToSend.EncodedPacket.Length);
00274
00275             // delay before reading the response
00276             System.Threading.Thread.Sleep(delayBeforeReadMS);
00277
00278             // read the response
00279             FW6PacketParser fw6PacketParser = new FW6.FW6PacketParser();
00280
00281             DateTime start = DateTime.Now;
00282             int timeoutMilliseconds = timeoutMS;
00283             TimeSpan timeoutSpan = new TimeSpan(0, 0, 0, 0, timeoutMilliseconds);
00284             DateTime timeoutTime = start + timeoutSpan;
00285             byte[] bytes = null;
00286             FW6.FW6PacketParser.HandleStates state = FW6PacketParser.HandleStates.NeedMoreData;
00287
00288             FW6Packet packet = null;
00289             IPEndPoint remoteEndPoint = new IPEndPoint(IPAddress.Any, 0);
00290
00291             do
00292             {
00293                 try
00294                 {
00295                     bytes = udpClient.Receive(ref remoteEndPoint);
00296                 }
00297                 catch (SocketException)
00298                 {
00299                 }
00300
00301                 // pass the bytes to the packet parser
00302                 if (bytes != null)
00303                 {
00304                     packet = fw6PacketParser.HandleBytes(out state, bytes, bytes.Length);
00305                 }
00306
00307                 if (state == FW6.FW6PacketParser.HandleStates.CommandComplete)
00308                 {
00309                     return packet;
00310                 }
00311                 else if (state == FW6.FW6PacketParser.HandleStates.InvalidChecksum)
00312                 {
00313                     return null;
00314                 }
00315                 else if (state == FW6.FW6PacketParser.HandleStates.NeedMoreData)
00316                 {
00317                 }
00318             } while (DateTime.Now < timeoutTime);
00319
00320             return null;
00321         }
00322
00323         public override bool ConnectForTesting()
00324         {
00325             FW6Packet respPacket;
00326             bool success = false;
00327             int delayBeforeReadMS = 20;
00328             int timeoutMS = 30;
00329             Connect();
00330             StatusRequest statusRequest = new FW6.StatusRequest();
00331             respPacket = SendAndGetResponse(statusRequest, delayBeforeReadMS, timeoutMS);
00332             success = FW6.StatusResponse.IsMatch(respPacket.PID1, respPacket.PID2);
00333             if (!success)
00334             {
00335                 Disconnect();
00336             }
00337             return success;
00338         }
00339
00340         public override void DisconnectForTesting()
00341         {
00342             Disconnect();
00343         }
00344
00345         public override bool StartDppData()
00346         {
00347             FW6Packet respPacket;
00348             bool success = false;
00349             int delayBeforeReadMS = 20;
00350             int timeoutMS = 30;
00351             //Connect();
00352             EnableMCA dppRequest = new FW6.EnableMCA();
00353             respPacket = SendAndGetResponse(dppRequest, delayBeforeReadMS, timeoutMS);
00354             success = FW6.AckResponse.IsMatch(respPacket.PID1, respPacket.PID2);
00355             success = (success && (respPacket.PID2 == 0x00));
00356             return success;
00357         }
00358
00359         public override bool PauseDppData()
00360         {
00361             FW6Packet respPacket;
00362             bool success = false;
00363             int delayBeforeReadMS = 20;
00364             int timeoutMS = 30;
00365             //Connect();
00366             DisableMCA dppRequest = new FW6.DisableMCA();
00367             respPacket = SendAndGetResponse(dppRequest, delayBeforeReadMS, timeoutMS);
00368             success = FW6.AckResponse.IsMatch(respPacket.PID1, respPacket.PID2);
00369             success = (success && (respPacket.PID2 == 0x00));
00370             return success;
00371         }
00372
00373         public override bool ClearDppData()
00374         {
00375             FW6Packet respPacket;
00376             bool success = false;
00377             int delayBeforeReadMS = 20;
00378             int timeoutMS = 30;
00379             //Connect();
00380             ClearSpectrum dppRequest = new FW6.ClearSpectrum();
00381             respPacket = SendAndGetResponse(dppRequest, delayBeforeReadMS, timeoutMS);
00382             success = FW6.AckResponse.IsMatch(respPacket.PID1, respPacket.PID2);
00383             success = (success && (respPacket.PID2 == 0x00));
00384             return success;
00385         }
00386
00387         //10 MSec per 100 bytes (no less than 10) each way + 10 MSec for Request/Response
00388         private int CalcMsgDelay(int ibytesTotal)
00389         {
00390             int iMsgDelay = 0;
00391             double dblBytes = 0;
00392             double dblMSecPerByte = 0.1;
00393             dblBytes = (double)ibytesTotal;
00394             iMsgDelay = (int)(dblBytes * dblMSecPerByte) + 10;
00395             return iMsgDelay;
00396         }
00397
00398         public override bool GetConfiguration(string strCommands, ref byte[] readBuffer, out uint bytesRead)
00399         {
00400             FW6Packet respPacket;
00401             bool success = false;
00402             int delayBeforeReadMS = 20;
00403             int timeoutMS = 30;
00404
00405             readBuffer = new byte[520];
00406             bytesRead = 0;
00407             if (strCommands.Length == 0)
00408             {
00409                 return success;
00410             }
00411             byte[] cfgCommands = Encoding.ASCII.GetBytes(strCommands);
00412             //Connect();
00413             ConfigurationReadback cfgReadback = new FW6.ConfigurationReadback(cfgCommands);
00414             int ibytesTotal = 520;
00415             delayBeforeReadMS = CalcMsgDelay(ibytesTotal);
00416             timeoutMS = delayBeforeReadMS + 20;
00417             respPacket = SendAndGetResponse(cfgReadback, delayBeforeReadMS, timeoutMS);
00418             success = FW6.ConfigurationResponse.IsMatch(respPacket.PID1, respPacket.PID2);
00419             if (!success)
00420             {
00421                 Disconnect();
00422             }
00423             else
00424             {
00425                 int lMsgLen = respPacket.Data.GetLength(0);
00426                 bytesRead = (uint)lMsgLen;
00427                 for (int i = 0; i < lMsgLen; i++)
00428                 {
00429                     readBuffer[i] = respPacket.Data[i];
00430                 }
00431             }
00432             return success;
00433         }
00434
00435         public override string GetFullConfiguration(bool PC5_PRESENT, int DppType, bool isDP5_RevDxGains, byte DPP_ECO)
00436         {
00437             FW6Packet respPacket;
00438             bool success = false;
00439             int delayBeforeReadMS = 20;
00440             int timeoutMS = 30;
00441             AsciiCmdUtilities.CommandFilters CmdUtil = new CommandFilters();
00442             string strCommands = CmdUtil.CreateFullReadBackCmd(PC5_PRESENT, DppType, isDP5_RevDxGains, DPP_ECO);
00443             byte[] readBuffer = new byte[520];
00444             byte[] cfgCommands = Encoding.ASCII.GetBytes(strCommands);
00445             string strCmdReadback = "";
00446             //Connect();
00447             ConfigurationReadback cfgReadback = new FW6.ConfigurationReadback(cfgCommands);
00448
00449             int ibytesTotal = 1024;
00450             delayBeforeReadMS = CalcMsgDelay(ibytesTotal);
00451             timeoutMS = delayBeforeReadMS + 20;
00452             respPacket = SendAndGetResponse(cfgReadback, delayBeforeReadMS, timeoutMS);
00453             success = FW6.ConfigurationResponse.IsMatch(respPacket.PID1, respPacket.PID2);
00454             if (!success)
00455             {
00456                 Disconnect();
00457             }
00458             else           // read the response
00459             {
00460                 int lMsgLen = respPacket.Data.GetLength(0);
00461                 if (success)
00462                 {
00463                     strCmdReadback = ASCIIEncoding.ASCII.GetString(respPacket.Data);
00464                     return strCmdReadback;
00465                 }
00466             }
00467             return "";
00468         }
00469
00470         public override string DisplayConfiguration(string strCommands)
00471         {
00472             string strDisplay = "";
00473             string strChar = "";
00474             for (int idxChar = 0; idxChar < strCommands.Length; idxChar++)
00475             {
00476                 strChar = strCommands.Substring(idxChar, 1);
00477                 strDisplay += strChar;
00478                 if (strChar == ";")
00479                 {
00480                     strDisplay += "\r\n";
00481                 }
00482             }
00483             return strDisplay;
00484         }
00485
00486         public override bool SendConfiguration(string strCommands)
00487         {
00488             FW6Packet respPacket;
00489             bool success = false;
00490             int delayBeforeReadMS = 20;
00491             int timeoutMS = 30;
00492             if (strCommands.Length == 0)
00493             {
00494                 return success;
00495             }
00496             byte[] cfgCommands = Encoding.ASCII.GetBytes(strCommands);
00497             //Connect();
00498             Configuration cfgSend = new FW6.Configuration(cfgCommands);
00499             int ibytesTotal = 512;
00500             delayBeforeReadMS = CalcMsgDelay(ibytesTotal);
00501             timeoutMS = delayBeforeReadMS + 20;
00502             respPacket = SendAndGetResponse(cfgSend, delayBeforeReadMS, timeoutMS);
00503             success = FW6.AckResponse.IsMatch(respPacket.PID1, respPacket.PID2);
00504             success = (success && (respPacket.PID2 == 0x00));
00505             return success;
00506         }
00507
00508         public override bool GetRawStatus(ref byte[] readBuffer, out uint bytesRead)
00509         {
00510             FW6Packet respPacket;
00511             bool success = false;
00512             int delayBeforeReadMS = 20;
00513             int timeoutMS = 30;
00514             int idx = 0;
00515
00516             readBuffer = new byte[512];
00517             bytesRead = 0;
00518             //Connect();
00519             StatusRequest statusRequest = new FW6.StatusRequest();
00520             respPacket = SendAndGetResponse(statusRequest, delayBeforeReadMS, timeoutMS);
00521             success = FW6.StatusResponse.IsMatch(respPacket.PID1, respPacket.PID2);
00522             if (!success)
00523             {
00524                 bytesRead = 0;
00525                 Disconnect();
00526             }
00527             else
00528             {
00529                 // read the response
00530                 bytesRead = 64;
00531                 for (idx = 0; idx < 64; idx++)
00532                 {
00533                     readBuffer[idx] = respPacket.Data[idx];
00534                 }
00535             }
00536             return success;
00537         }
00538
00539         public override bool GetSpectrumData(ref byte[] readBuffer, out uint bytesRead)
00540         {
00541             FW6Packet respPacket;
00542             bool success = false;
00543             int delayBeforeReadMS = 20;
00544             int timeoutMS = 30;
00545             readBuffer = new byte[24648];
00546             bytesRead = 0;
00547             //Connect();
00548             SpectrumRequest spectrumRequest = new FW6.SpectrumRequest();
00549             int ibytesTotal = mcaChannels * 3;
00550             delayBeforeReadMS = CalcMsgDelay(ibytesTotal);
00551             timeoutMS = delayBeforeReadMS + 20;
00552             respPacket = SendAndGetResponse(spectrumRequest, delayBeforeReadMS, timeoutMS);
00553             success = FW6.SpectrumResponse.IsMatch(respPacket.PID1, respPacket.PID2);
00554             if (!success)
00555             {
00556                 Disconnect();
00557             }
00558             else
00559             {
00560                 int lMsgLen = respPacket.Data.GetLength(0);
00561                 bytesRead = (uint)lMsgLen;
00562                 for (int i = 0; i < lMsgLen; i++)
00563                 {
00564                     readBuffer[i] = respPacket.Data[i];
00565                 }
00566             }
00567             return success;
00568         }
00569
00572         private int _mcaChannels;
00573         public override int mcaChannels
00574         {
00575             get { return _mcaChannels; }
00576             set { _mcaChannels = value; }
00577         }
00578
00579
00580     }
00581 }
Generated on Fri Sep 22 2017 10:35:16 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: FW6/DPDeviceSerialFW6.cs Source File

  • File List
FW6/DPDeviceSerialFW6.cs
Go to the documentation of this file.
00001 ﻿using System;
00002 using System.Collections.Generic;
00003 using System.Text;
00004 using System.IO;
00005 using System.IO.Ports;
00006 using System.Threading;
00007 using AsciiCmdUtilities;
00008
00009 namespace csRepeat.FW6
00010 {
00011     public class DPDeviceSerialFW6 : FW6Device
00012     {
00013
00014         //public string PortName { get; set; }
00015         private string _PortName;
00016         public string PortName
00017         {
00018             get { return _PortName; }
00019             set { _PortName= value; }
00020         }
00021
00024         private int _mcaChannels;
00025         public override int mcaChannels
00026         {
00027             get { return _mcaChannels; }
00028             set { _mcaChannels = value; }
00029         }
00030
00031         protected override int DataPacketAckTimeoutMS
00032         {
00033             get { return 750; }
00034         }
00035
00036         public DPDeviceSerialFW6(DeviceTypes deviceType,
00037                                  Version firmwareVersion,
00038                                  Version fpgaVersion,
00039                                  string serialNumber,
00040                                  string portName) : base(InterfaceTypes.rs232,
00041                                                          deviceType,
00042                                                          firmwareVersion,
00043                                                          fpgaVersion,
00044                                                          serialNumber)
00045         {
00046             this.PortName = portName;
00047
00048             // update fpga state, have to call this here because performing it in
00049             // FW6Device() constructor meas it would happen before
00050             // the code here so internal state storage wouldn't be set up
00051             UpdateFpgaState();
00052         }
00053
00054         private static object detectLock = new Object();
00055
00056         public override bool ConnectForTesting()
00057         {
00058             FW6Packet respPacket;
00059             bool success = false;
00060             int delayBeforeReadMS = 20;
00061             int timeoutMS = 30;
00062             Connect();
00063             StatusRequest statusRequest = new FW6.StatusRequest();
00064             respPacket = SendAndGetResponse(statusRequest, delayBeforeReadMS, timeoutMS);
00065             success = FW6.StatusResponse.IsMatch(respPacket.PID1, respPacket.PID2);
00066             if (!success)
00067             {
00068                 Disconnect();
00069             }
00070             return success;
00071         }
00072
00073         public override void DisconnectForTesting()
00074         {
00075             Disconnect();
00076         }
00077
00078         public override bool GetRawStatus(ref byte[] readBuffer, out uint bytesRead)
00079         {
00080             FW6Packet respPacket;
00081             bool success = false;
00082             int delayBeforeReadMS = 20;
00083             int timeoutMS = 30;
00084             int idx=0;
00085
00086             readBuffer = new byte[512];
00087             bytesRead = 0;
00088             //Connect();
00089             StatusRequest statusRequest = new FW6.StatusRequest();
00090             respPacket = SendAndGetResponse(statusRequest, delayBeforeReadMS, timeoutMS);
00091             success = FW6.StatusResponse.IsMatch(respPacket.PID1, respPacket.PID2);
00092             if (!success)
00093             {
00094                 bytesRead = 0;
00095                 Disconnect();
00096             }
00097             else
00098             {
00099                 // read the response
00100                 bytesRead = 64;
00101                 for (idx = 0; idx < 64; idx++)
00102                 {
00103                     readBuffer[idx] = respPacket.Data[idx];
00104                 }
00105             }
00106             return success;
00107         }
00108
00109         //10 MSec per 100 bytes (no less than 10) each way + 10 MSec for Request/Response
00110         private int CalcMsgDelay(int ibytesTotal)
00111         {
00112             int iMsgDelay = 0;
00113             double dblBytes = 0;
00114             double dblMSecPerByte = 0.1;
00115             dblBytes = (double)ibytesTotal;
00116             iMsgDelay = (int)(dblBytes * dblMSecPerByte) + 10;
00117             return iMsgDelay;
00118         }
00119
00120         public override string GetFullConfiguration(bool PC5_PRESENT, int DppType, bool isDP5_RevDxGains, byte DPP_ECO)
00121         {
00122             FW6Packet respPacket;
00123             bool success = false;
00124             int delayBeforeReadMS = 20;
00125             int timeoutMS = 30;
00126             AsciiCmdUtilities.CommandFilters CmdUtil = new CommandFilters();
00127             string strCommands = CmdUtil.CreateFullReadBackCmd(PC5_PRESENT, DppType, isDP5_RevDxGains, DPP_ECO);
00128             byte[] readBuffer = new byte[520];
00129             byte[] cfgCommands = Encoding.ASCII.GetBytes(strCommands);
00130             string strCmdReadback = "";
00131             //Connect();
00132             ConfigurationReadback cfgReadback = new FW6.ConfigurationReadback(cfgCommands);
00133
00134             int ibytesTotal = 1024;
00135             delayBeforeReadMS = CalcMsgDelay(ibytesTotal);
00136             timeoutMS = delayBeforeReadMS + 20;
00137             respPacket = SendAndGetResponse(cfgReadback, delayBeforeReadMS, timeoutMS);
00138             success = FW6.ConfigurationResponse.IsMatch(respPacket.PID1, respPacket.PID2);
00139             if (!success)
00140             {
00141                 Disconnect();
00142             }
00143             else           // read the response
00144             {
00145                 int lMsgLen = respPacket.Data.GetLength(0);
00146                 if (success)
00147                 {
00148                     strCmdReadback = ASCIIEncoding.ASCII.GetString(respPacket.Data);
00149                     return strCmdReadback;
00150                 }
00151             }
00152             return "";
00153         }
00154
00155
00156         public override string DisplayConfiguration(string strCommands)
00157         {
00158             string strDisplay = "";
00159             string strChar = "";
00160             for (int idxChar = 0; idxChar < strCommands.Length; idxChar++)
00161             {
00162                 strChar = strCommands.Substring(idxChar, 1);
00163                 strDisplay += strChar;
00164                 if (strChar == ";")
00165                 {
00166                     strDisplay += "\r\n";
00167                 }
00168             }
00169             return strDisplay;
00170         }
00171
00172         public override bool GetConfiguration(string strCommands, ref byte[] readBuffer, out uint bytesRead)
00173         {
00174             FW6Packet respPacket;
00175             bool success = false;
00176             int delayBeforeReadMS = 20;
00177             int timeoutMS = 30;
00178
00179             readBuffer = new byte[520];
00180             bytesRead = 0;
00181             if (strCommands.Length == 0)
00182             {
00183                 return success;
00184             }
00185             byte[] cfgCommands = Encoding.ASCII.GetBytes(strCommands);
00186             //Connect();
00187             ConfigurationReadback cfgReadback = new FW6.ConfigurationReadback(cfgCommands);
00188             int ibytesTotal = 520;
00189             delayBeforeReadMS = CalcMsgDelay(ibytesTotal);
00190             timeoutMS = delayBeforeReadMS + 20;
00191             respPacket = SendAndGetResponse(cfgReadback, delayBeforeReadMS, timeoutMS);
00192             success = FW6.ConfigurationResponse.IsMatch(respPacket.PID1, respPacket.PID2);
00193             if (!success)
00194             {
00195                 Disconnect();
00196             }
00197             else
00198             {
00199                 int lMsgLen = respPacket.Data.GetLength(0);
00200                 bytesRead = (uint)lMsgLen;
00201                 for (int i = 0; i < lMsgLen; i++)
00202                 {
00203                     readBuffer[i] = respPacket.Data[i];
00204                 }
00205             }
00206             return success;
00207         }
00208
00209         public override bool SendConfiguration(string strCommands)
00210         {
00211             FW6Packet respPacket;
00212             bool success = false;
00213             int delayBeforeReadMS = 20;
00214             int timeoutMS = 30;
00215             if (strCommands.Length == 0)
00216             {
00217                 return success;
00218             }
00219             byte[] cfgCommands = Encoding.ASCII.GetBytes(strCommands);
00220             //Connect();
00221             Configuration cfgSend = new FW6.Configuration(cfgCommands);
00222             int ibytesTotal = 512;
00223             delayBeforeReadMS = CalcMsgDelay(ibytesTotal);
00224             timeoutMS = delayBeforeReadMS + 20;
00225             respPacket = SendAndGetResponse(cfgSend, delayBeforeReadMS, timeoutMS);
00226             success = FW6.AckResponse.IsMatch(respPacket.PID1, respPacket.PID2);
00227             success = (success && (respPacket.PID2 == 0x00));
00228             return success;
00229         }
00230
00231         public override bool ClearDppData()
00232         {
00233             FW6Packet respPacket;
00234             bool success = false;
00235             int delayBeforeReadMS = 20;
00236             int timeoutMS = 30;
00237             //Connect();
00238             ClearSpectrum dppRequest = new FW6.ClearSpectrum();
00239             respPacket = SendAndGetResponse(dppRequest, delayBeforeReadMS, timeoutMS);
00240             success = FW6.AckResponse.IsMatch(respPacket.PID1, respPacket.PID2);
00241             success = (success && (respPacket.PID2 == 0x00));
00242             return success;
00243         }
00244
00245         public override bool StartDppData()
00246         {
00247             FW6Packet respPacket;
00248             bool success = false;
00249             int delayBeforeReadMS = 20;
00250             int timeoutMS = 30;
00251             //Connect();
00252             EnableMCA dppRequest = new FW6.EnableMCA();
00253             respPacket = SendAndGetResponse(dppRequest, delayBeforeReadMS, timeoutMS);
00254             success = FW6.AckResponse.IsMatch(respPacket.PID1, respPacket.PID2);
00255             success = (success && (respPacket.PID2 == 0x00));
00256             return success;
00257         }
00258
00259         public override bool PauseDppData()
00260         {
00261             FW6Packet respPacket;
00262             bool success = false;
00263             int delayBeforeReadMS = 20;
00264             int timeoutMS = 30;
00265             //Connect();
00266             DisableMCA dppRequest = new FW6.DisableMCA();
00267             respPacket = SendAndGetResponse(dppRequest, delayBeforeReadMS, timeoutMS);
00268             success = FW6.AckResponse.IsMatch(respPacket.PID1, respPacket.PID2);
00269             success = (success && (respPacket.PID2 == 0x00));
00270             return success;
00271         }
00272
00273         public override bool GetSpectrumData(ref byte[] readBuffer, out uint bytesRead)
00274         {
00275             FW6Packet respPacket;
00276             bool success = false;
00277             int delayBeforeReadMS = 20;
00278             int timeoutMS = 30;
00279             readBuffer = new byte[24648];
00280             bytesRead = 0;
00281             //Connect();
00282             SpectrumRequest spectrumRequest = new FW6.SpectrumRequest();
00283             int ibytesTotal = mcaChannels * 3;
00284             delayBeforeReadMS = CalcMsgDelay(ibytesTotal);
00285             timeoutMS = delayBeforeReadMS + 20;
00286             respPacket = SendAndGetResponse(spectrumRequest, delayBeforeReadMS, timeoutMS);
00287             success = FW6.SpectrumResponse.IsMatch(respPacket.PID1, respPacket.PID2);
00288             if (!success)
00289             {
00290                 Disconnect();
00291             }
00292             else
00293             {
00294                 int lMsgLen = respPacket.Data.GetLength(0);
00295                 bytesRead = (uint)lMsgLen;
00296                 for (int i = 0; i < lMsgLen; i++)
00297                 {
00298                     readBuffer[i] = respPacket.Data[i];
00299                 }
00300             }
00301             return success;
00302         }
00303
00304         public static List<DPDevice> DetectDevices()
00305         {
00306             string[] ports = SerialPort.GetPortNames();
00307             List<DPDevice> detectedDevices = new List<DPDevice>();
00308
00309             // prevent multiple calls to DetectDevices at the same time
00310             lock (detectLock)
00311             {
00312                 foreach (string portName in ports)
00313                 {
00314                     FW6Packet packet = TryToDetectDevice(portName);
00315                     if ((packet != null) && (packet is StatusResponse))
00316                     {
00317                         StatusResponse statusPacket = packet as StatusResponse;
00318                         string firmwareVersion = String.Format("{0}.{1}",
00319                                                                             statusPacket.FwVersionMajor, statusPacket.FwVersionMinor);
00320                         string fpgaVersion = String.Format("{0}.{1}",
00321                                                                                 statusPacket.FpgaVersionMajor, statusPacket.FpgaVersionMinor);
00322                         string serialNumber = String.Format("{0:D6}", statusPacket.SerialNumber);
00323                         DPDeviceSerialFW6 newDevice = new DPDeviceSerialFW6(statusPacket.DeviceType,
00324                                                                                       new Version(statusPacket.FwVersionMajor, statusPacket.FwVersionMinor, statusPacket.FwBuildNumber),
00325                                                                                       new Version(statusPacket.FpgaVersionMajor, statusPacket.FpgaVersionMinor),
00326                                                                                       serialNumber,
00327                                                                                       portName);
00328                         detectedDevices.Add(newDevice);
00329                     }
00330                 }
00331             }
00332
00333             return detectedDevices;
00334         }
00335
00336         private static SerialPort GetPort(string portName)
00337         {
00338             SerialPort port = new SerialPort();
00339             port.PortName = portName;
00340             port.BaudRate = 115200;
00341             port.DataBits = 8;
00342             port.StopBits = StopBits.One;
00343             port.Parity = Parity.None;
00344             port.Handshake = Handshake.None;
00345             port.WriteTimeout = 10000;
00346             port.ReadTimeout = 10000;
00347
00348             return port;
00349         }
00350
00351         private static FW6Packet TryToDetectDevice(string portName)
00352         {
00353             SerialPort port = GetPort(portName);
00354
00355             try
00356             {
00357                 port.Open();
00358
00359                 // send the status request
00360                 FW6.StatusRequest statusRequest = new FW6.StatusRequest();
00361                 port.Write(statusRequest.EncodedPacket, 0, statusRequest.EncodedPacket.Length);
00362
00363                 // read the response
00364                 FW6.FW6PacketParser fw6PacketParser = new FW6.FW6PacketParser();
00365
00366                 // read data until we get a timeout
00367                 DateTime start = DateTime.Now;
00368                 int timeoutMilliseconds = 300;
00369                 TimeSpan timeoutSpan = new TimeSpan(0, 0, 0, 0, timeoutMilliseconds);
00370                 DateTime timeoutTime = start + timeoutSpan;
00371                 int bytesToRead = 128;
00372                 byte[] bytes = new byte[bytesToRead];
00373                 int bytesRead = 0;
00374                 FW6.FW6PacketParser.HandleStates state;
00375
00376                 try
00377                 {
00378                     do
00379                     {
00380                         bytesRead = port.Read(bytes, 0, bytesToRead);
00381
00382                         // pass the bytes to the packet parser
00383                         FW6Packet packet;
00384                         try
00385                         {
00386                             packet = fw6PacketParser.HandleBytes(out state, bytes, bytesRead);
00387                         }
00388                         catch
00389                         {
00390                             // parsing error, may be a v5.x device
00391                             return null;
00392                         }
00393
00394                         if (state == FW6.FW6PacketParser.HandleStates.CommandComplete)
00395                         {
00396                             return packet;
00397                         }
00398                         else if (state == FW6.FW6PacketParser.HandleStates.InvalidChecksum)
00399                         {
00400                             return null;
00401                         }
00402                     } while (DateTime.Now < timeoutTime);
00403                 }
00404                 catch (System.TimeoutException)
00405                 {
00406                     if (bytesRead != 0)
00407                     {
00408                         // pass the bytes to the packet parser
00409                         try
00410                         {
00411                             FW6Packet packet = fw6PacketParser.HandleBytes(out state, bytes, bytesRead);
00412                             return packet;
00413                         }
00414                         catch
00415                         {
00416                             // parsing error, may be a v5.x device
00417                             return null;
00418                         }
00419                     }
00420                 }
00421             }
00422             catch
00423             {
00424                 return null;
00425             }
00426             finally
00427             {
00428                 // close the port when we exit this routine
00429                 port.Close();
00430             }
00431
00432             return null;
00433         }
00434
00435         private SerialPort port;
00436
00437         protected override void Connect()
00438         {
00439             port = GetPort(PortName);
00440             port.Open();
00441         }
00442
00443         protected override void Disconnect()
00444         {
00445             port.Close();
00446             port = null;
00447         }
00448
00449         protected override FW6Packet SendAndGetResponse(FW6Packet packetToSend, int timeoutMS)
00450         {
00451             int delayBeforeReadMS = 0;
00452             return SendAndGetResponse(packetToSend, delayBeforeReadMS, timeoutMS);
00453         }
00454
00455         protected override FW6Packet SendAndGetResponse(FW6Packet packetToSend, int delayBeforeReadMS, int timeoutMS)
00456         {
00457             port.ReadTimeout = timeoutMS;
00458             port.Write(packetToSend.EncodedPacket, 0, packetToSend.EncodedPacket.Length);
00459
00460             // sleep before reading the response
00461             System.Threading.Thread.Sleep(delayBeforeReadMS);
00462
00463             // read the response
00464             FW6.FW6PacketParser fw6PacketParser = new FW6.FW6PacketParser();
00465
00466             DateTime start = DateTime.Now;
00467             int timeoutMilliseconds = timeoutMS;
00468             TimeSpan timeoutSpan = new TimeSpan(0, 0, 0, 0, timeoutMilliseconds);
00469             DateTime timeoutTime = start + timeoutSpan;
00470             int bytesToRead = 128;
00471             byte[] bytes = new byte[bytesToRead];
00472             int bytesRead = 0;
00473             FW6.FW6PacketParser.HandleStates state = FW6PacketParser.HandleStates.NeedMoreData;
00474
00475             FW6Packet packet = null;
00476
00477             do
00478             {
00479                 try
00480                 {
00481                     bytesRead = port.Read(bytes, 0, bytesToRead);
00482                 }
00483                 catch (System.TimeoutException ex)
00484                 {
00485                     string strErr = ex.ToString();
00486                     return null;
00487                 }
00488
00489                 try
00490                 {
00491                     // pass the bytes to the packet parser
00492                     if (bytesRead != 0)
00493                     {
00494                         packet = fw6PacketParser.HandleBytes(out state, bytes, bytesRead);
00495                     }
00496
00497                     if (state == FW6.FW6PacketParser.HandleStates.CommandComplete)
00498                     {
00499                         return packet;
00500                     }
00501                     else if (state == FW6.FW6PacketParser.HandleStates.InvalidChecksum)
00502                     {
00503                         return null;
00504                     }
00505                     else if (state == FW6.FW6PacketParser.HandleStates.NeedMoreData)
00506                     {
00507                     }
00508                 }
00509                 catch(System.Exception ex)
00510                 {
00511                     string strErr = ex.ToString();
00512                     return null;
00513                 }
00514             } while (DateTime.Now < timeoutTime);
00515
00516             return null;
00517         }
00518
00519         public override string ToString()
00520         {
00521             return base.ToString() + string.Format(", PortName: {0}", PortName);
00522         }
00523     }
00524 }
Generated on Fri Sep 22 2017 10:35:16 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: FW6/DPDeviceUsb.cs Source File

  • File List
FW6/DPDeviceUsb.cs
Go to the documentation of this file.
00001 ﻿using System;
00002 using System.Collections.Generic;
00003 using System.Text;
00004 using System.Net;
00005 using System.Net.Sockets;
00006 using System.IO;
00007 using System.Windows.Forms;
00008 using WinUsb;
00009 using System.Threading;
00010 using AsciiCmdUtilities;
00011
00012 namespace csRepeat.FW6
00013 {
00014     internal class MessageHandler : NativeWindow
00015     {
00016 //        public event EventHandler<MessageData> MessageReceived;
00017
00018         public MessageHandler()
00019         {
00020             CreateHandle(new CreateParams());
00021         }
00022
00023         protected override void WndProc(ref Message msg)
00024         {
00025             // filter messages here for your purposes
00026 //            EventHandler<MessageData> = MessageReceived;
00027 //            if (handler != null) handler(ref msg);
00028                         try
00029                         {
00030                                 // The OnDeviceChange routine processes WM_DEVICECHANGE messages.
00031
00032                                 if (msg.Msg == DeviceManagement.WM_DEVICECHANGE)
00033                                 {
00034                     Console.WriteLine("on change");
00035                                         //OnDeviceChange(m);
00036                                 }
00037                                 // Let the base form process the message.
00038
00039                                 base.WndProc(ref msg);
00040                         }
00041                         catch (Exception ex)
00042                         {
00043                 string strEx;
00044                 strEx = ex.Message;
00045                 throw;
00046             }
00047         }
00048     }
00049
00050     class DPDeviceUsb : FW6Device
00051     {
00056         private const String WINUSB_GUID_STRING = "{5A8ED6A1-7FC3-4b6a-A536-95DF35D03448}";
00057
00058         private WinUsbDevice theWinUsbDevice;
00059         private string DevicePath;
00060
00061         protected override int DataPacketAckTimeoutMS
00062         {
00063             get
00064             {
00065                 return 200;
00066             }
00067         }
00068
00069         private int _mcaChannels;
00070         public override int mcaChannels
00071         {
00072             get { return _mcaChannels; }
00073             set { _mcaChannels = value; }
00074         }
00075
00076         public DPDeviceUsb(DeviceTypes deviceType,
00077                            Version firmwareVersion,
00078                            Version fpgaVersion,
00079                            string serialNumber,
00080                            string devicePath)
00081             : base(InterfaceTypes.usb, deviceType,
00082                    firmwareVersion,
00083                    fpgaVersion,
00084                    serialNumber)
00085         {
00086             DevicePath = devicePath;
00087
00088             // update fpga state, have to call this here because performing it in
00089             // FW6Device() constructor meas it would happen before
00090             // the code here so internal state storage wouldn't be set up
00091             UpdateFpgaState();
00092         }
00093
00094         ~DPDeviceUsb()
00095         {
00096             Disconnect();
00097         }
00098
00099         //  Convert the device interface GUID String to a GUID object:
00100         private static Guid winUsbGuid = new System.Guid(WINUSB_GUID_STRING);
00101
00102         private DeviceManagement myDeviceManagement = new DeviceManagement();
00103
00104         // Create control to handle windows messages
00105         private MessageHandler messageHandler = new MessageHandler();
00106
00107 #if false
00108         // Notification handle returned by DeviceManagement.RegisterForDeviceNotifications
00109         private IntPtr deviceNotificationHandle = IntPtr.Zero;
00110 #endif
00111
00117         public bool SendCommand(FW6Packet packet)
00118         {
00119             byte[] writeData = new byte[packet.EncodedPacket.Length];
00120             Array.Copy(packet.EncodedPacket, writeData, writeData.Length);
00121             bool success = theWinUsbDevice.SendViaBulkTransfer(ref writeData,
00122                                                                           (uint)writeData.Length);
00123             return success;
00124         }
00125
00126         public bool ReadData(ref byte[] readBuffer, out uint bytesRead)
00127         {
00128             bytesRead = 0;
00129             bool success = false;
00130             theWinUsbDevice.ReadViaBulkTransfer(System.Convert.ToByte(theWinUsbDevice.myDevInfo.bulkInPipe),
00131                                                         (uint)readBuffer.Length,
00132                                                         ref readBuffer,
00133                                                         ref bytesRead,
00134                                                         ref success);
00135
00136             return success;
00137         }
00138
00139         public override bool ConnectForTesting()
00140         {
00141             bool success = false;
00142             Connect();
00143             StatusRequest statusRequest = new FW6.StatusRequest();
00144             success = SendCommand(statusRequest);
00145             if (!success)
00146             {
00147                 Disconnect();
00148             }
00149             return success;
00150         }
00151
00152         public override void DisconnectForTesting()
00153         {
00154             Disconnect();
00155         }
00156
00157         public override bool GetRawStatus(ref byte[] readBuffer, out uint bytesRead)
00158         {
00159             bool success = false;
00160
00161             readBuffer = new byte[512];
00162             bytesRead = 0;
00163             Connect();
00164             StatusRequest statusRequest = new FW6.StatusRequest();
00165             success = SendCommand(statusRequest);
00166             if (!success)
00167             {
00168                 Disconnect();
00169             }
00170             else
00171             {
00172                 // read the response
00173                 success = ReadData(ref readBuffer, out bytesRead);
00174                 if (success)
00175                 {
00176                     if (bytesRead == 72)
00177                     {
00178                         for (int idx = 0; idx < 64; idx++)
00179                         {
00180                             readBuffer[idx] = readBuffer[idx+6];
00181                         }
00182                         for (int idx = 64; idx < 72; idx++)
00183                         {
00184                             readBuffer[idx] = 0;
00185                         }
00186                         bytesRead = 64;
00187                     }
00188                 }
00189             }
00190             return success;
00191         }
00192
00193         public override string GetFullConfiguration(bool PC5_PRESENT, int DppType, bool isDP5_RevDxGains, byte DPP_ECO)
00194         {
00195             //
00196             bool success = false;
00197             AsciiCmdUtilities.CommandFilters CmdUtil = new CommandFilters();
00198             string strCommands = CmdUtil.CreateFullReadBackCmd(PC5_PRESENT, DppType, isDP5_RevDxGains, DPP_ECO);
00199             byte[] readBuffer = new byte[520];
00200             uint bytesRead = 0;
00201             byte[] cfgCommands = Encoding.ASCII.GetBytes(strCommands);
00202             string strCmdReadback = "";
00203             Connect();
00204             ConfigurationReadback cfgReadback = new FW6.ConfigurationReadback(cfgCommands);
00205             success = SendCommand(cfgReadback);
00206             if (!success)
00207             {
00208                 Disconnect();
00209             }
00210             else
00211             {
00212                 success = ReadData(ref readBuffer, out bytesRead);
00213                 if (success)
00214                 {
00215                     byte[] cfgBuffer = new byte[bytesRead - 8];
00216                     for (int idxCfg = 0; idxCfg < (bytesRead - 8); idxCfg++)
00217                     {
00218                         cfgBuffer[idxCfg] = readBuffer[idxCfg + 6];
00219                     }
00220                     strCmdReadback = ASCIIEncoding.ASCII.GetString(cfgBuffer);
00221                     return strCmdReadback;
00222                 }
00223             }
00224             return "";
00225         }
00226
00227         public override string DisplayConfiguration(string strCommands)
00228         {
00229             string strDisplay = "";
00230             string strChar = "";
00231             for (int idxChar = 0; idxChar < strCommands.Length; idxChar++)
00232             {
00233                 strChar = strCommands.Substring(idxChar, 1);
00234                 strDisplay += strChar;
00235                 if (strChar == ";")
00236                 {
00237                     strDisplay += "\r\n";
00238                 }
00239             }
00240             return strDisplay;
00241         }
00242
00243         public override bool GetConfiguration(string strCommands, ref byte[] readBuffer, out uint bytesRead)
00244         {
00245             bool success = false;
00246
00247             readBuffer = new byte[520];
00248             bytesRead = 0;
00249             if (strCommands.Length == 0)
00250             {
00251                 return success;
00252             }
00253             byte[] cfgCommands = Encoding.ASCII.GetBytes(strCommands);
00254             Connect();
00255             ConfigurationReadback cfgReadback = new FW6.ConfigurationReadback(cfgCommands);
00256             success = SendCommand(cfgReadback);
00257             //Application.DoEvents();
00258             //Thread.Sleep(100);
00259
00260             if (!success)
00261             {
00262                 Disconnect();
00263             }
00264             else
00265             {
00266                 success = ReadData(ref readBuffer, out bytesRead);
00267                 if (success)
00268                 {
00269                     bytesRead -= 8;
00270                     for (int idx = 0; idx < bytesRead; idx++)
00271                     {
00272                         readBuffer[idx] = readBuffer[idx + 6];
00273                     }
00274                     for (int idx = ((int)bytesRead); idx < ((int)bytesRead + 8); idx++)
00275                     {
00276                         readBuffer[idx] = 0;
00277                     }
00278                 }
00279             }
00280             return success;
00281         }
00282
00283         public override bool SendConfiguration(string strCommands)
00284         {
00285             bool success = false;
00286             if (strCommands.Length == 0)
00287             {
00288                 return success;
00289             }
00290             byte[] cfgCommands = Encoding.ASCII.GetBytes(strCommands);
00291             Connect();
00292             Configuration cfgSend = new FW6.Configuration(cfgCommands);
00293             success = SendCommand(cfgSend);
00294             return success;
00295         }
00296
00297         public override bool ClearDppData()
00298         {
00299             bool success = false;
00300             Connect();
00301             ClearSpectrum dppRequest = new FW6.ClearSpectrum();
00302             success = SendCommand(dppRequest);
00303             return success;
00304         }
00305
00306         public override bool StartDppData()
00307         {
00308             bool success = false;
00309             Connect();
00310             EnableMCA dppRequest = new FW6.EnableMCA();
00311             success = SendCommand(dppRequest);
00312             return success;
00313         }
00314
00315         public override bool PauseDppData()
00316         {
00317             bool success = false;
00318             Connect();
00319             DisableMCA dppRequest = new FW6.DisableMCA();
00320             success = SendCommand(dppRequest);
00321             return success;
00322         }
00323
00324         public override bool GetSpectrumData(ref byte[] readBuffer, out uint bytesRead)
00325         {
00326             bool success = false;
00327
00328             readBuffer = new byte[24648];
00329             bytesRead = 0;
00330             Connect();
00331             SpectrumRequest spectrumRequest = new FW6.SpectrumRequest();
00332             success = SendCommand(spectrumRequest);
00333             Application.DoEvents();
00334             Thread.Sleep(10);
00335             if (!success)
00336             {
00337                 Disconnect();
00338             }
00339             else
00340             {
00341                 success = ReadData(ref readBuffer, out bytesRead);
00342                 if (success)
00343                 {
00344                     bytesRead -= 8;
00345                     for (int idx = 0; idx < bytesRead; idx++)
00346                     {
00347                         readBuffer[idx] = readBuffer[idx + 6];
00348                     }
00349                     for (int idx = ((int)bytesRead); idx < ((int)bytesRead + 8); idx++)
00350                     {
00351                         readBuffer[idx] = 0;
00352                     }
00353                 }
00354
00355             }
00356             return success;
00357         }
00358
00359         public static List<DPDevice> DetectDevices()
00360         {
00361             List<DPDevice> devices = new List<DPDevice>();
00362             List<String> devicePathNames;
00363
00364             // Fill an array with the device path names of all attached devices with matching GUIDs.
00365             bool devicesFound = DeviceManagement.FindDeviceFromGuid(winUsbGuid, out devicePathNames);
00366
00367             if(devicesFound)
00368             {
00369                 foreach (string devicePathName in devicePathNames)
00370                 {
00371                     // attempt to connect to this device
00372                     DPDeviceUsb newDevice;
00373
00374                     try
00375                     {
00376                         newDevice = new DPDeviceUsb(DeviceTypes.DP5, new Version(0, 0), new Version(0, 0), null, devicePathName);
00377                         newDevice.Connect();
00378                     }
00379                     catch
00380                     {
00381                         return null;
00382                     }
00383
00384                     //Commented out due to unreliable response from WinUsb_QueryDeviceInformation.
00385                     //DisplayDeviceSpeed();
00386                     Application.DoEvents();
00387                     Thread.Sleep(20);
00388
00389                     // build the command
00390                     StatusRequest statusRequest = new FW6.StatusRequest();
00391                     bool success = newDevice.SendCommand(statusRequest);
00392
00393                     // send the command to the device
00394                     if (!success)
00395                     {
00396                         newDevice.Disconnect();
00397                         return null;
00398                     }
00399
00400                     Application.DoEvents();
00401                     Thread.Sleep(20);
00402
00403                     // read the response
00404                     byte[] readBuffer = new byte[512];
00405                     uint bytesRead;
00406                     success = newDevice.ReadData(ref readBuffer, out bytesRead);
00407
00408                     // disconnect, this device might not be used and if it is left open
00409                     // it won't be disconnected until gc runs the finalizer (destructor) and
00410                     // if a list of devices is retrieved the device can't be opened again
00411                     newDevice.Disconnect();
00412
00413                     if (!(success))
00414                     {
00415                         return null;
00416                     }
00417
00418                     // what command did we get?
00419                     FW6PacketParser.HandleStates state;
00420                     FW6PacketParser packetParser = new FW6PacketParser();
00421                     FW6Packet packetResponse = packetParser.HandleBytes(out state, readBuffer, (int)bytesRead);
00422
00423                     if (state == FW6PacketParser.HandleStates.CommandComplete)
00424                     {
00425                         // did we get a status response back?
00426                         if (packetResponse is StatusResponse)
00427                         {
00428                             StatusResponse statusPacket = packetResponse as StatusResponse;
00429                             string serialNumber = String.Format("{0:D6}", statusPacket.SerialNumber);
00430
00431                             newDevice.DeviceType = statusPacket.DeviceType;
00432                             newDevice.SerialNumber = serialNumber;
00433                             newDevice.FirmwareVersion = new Version(statusPacket.FwVersionMajor, statusPacket.FwVersionMinor, statusPacket.FwBuildNumber);
00434                             newDevice.FpgaVersion = new Version(statusPacket.FpgaVersionMajor, statusPacket.FpgaVersionMinor);
00435
00436                             devices.Add(newDevice);
00437                         }
00438                     }
00439                 }
00440             }
00441
00442             return devices;
00443         }
00444
00445         protected override void Connect()
00446         {
00447             // if we have a valid device return, we are already connected
00448             if (theWinUsbDevice != null)
00449             {
00450                 return;
00451             }
00452
00453             theWinUsbDevice = new WinUsbDevice();
00454
00455             bool success = theWinUsbDevice.GetDeviceHandle(DevicePath);
00456             if (!success)
00457             {
00458                 theWinUsbDevice.CloseDeviceHandle();
00459
00460                 InvalidOperationException exception = new System.InvalidOperationException("cannot find device");
00461                 throw exception;
00462             }
00463
00464 #if false
00465             if (deviceDetected)
00466             {
00467                 // The device was detected.
00468                 // Register to receive notifications if the device is removed or attached.
00469                 success = myDeviceManagement.RegisterForDeviceNotifications
00470                                                     (DevicePath,
00471                                                     messageHandler.Handle,
00472                                                     winUsbGuid,
00473                                                     ref deviceNotificationHandle);
00474
00475                 if (success)
00476                 {
00477                     theWinUsbDevice.InitializeDevice();
00478                 }
00479                 else
00480                 {
00481                     Disconnect();
00482                     throw new System.InvalidOperationException("unable to register notifications");
00483                 }
00484             }
00485 #else
00486             if (!theWinUsbDevice.InitializeDevice())
00487             {
00488                 InvalidOperationException exception = new System.InvalidOperationException("InitializeDevice() failed");
00489                 throw exception;
00490             }
00491
00492 #endif
00493         }
00494
00495         protected override void Disconnect()
00496         {
00497             if (theWinUsbDevice != null)
00498             {
00499                 theWinUsbDevice.CloseDeviceHandle();
00500                 theWinUsbDevice = null;
00501             }
00502             else
00503             {
00504                 //
00505             }
00506
00507 #if false
00508             if(deviceNotificationHandle != IntPtr.Zero)
00509             {
00510                 myDeviceManagement.StopReceivingDeviceNotifications(deviceNotificationHandle);
00511                 deviceNotificationHandle = IntPtr.Zero;
00512             }
00513 #endif
00514         }
00515
00522         protected override FW6Packet SendAndGetResponse(FW6Packet packetToSend, int timeoutMS)
00523         {
00524             int delayBeforeReadMS = 20;
00525             return SendAndGetResponse(packetToSend, delayBeforeReadMS, timeoutMS);
00526         }
00527
00531         protected override FW6Packet SendAndGetResponse(FW6Packet packetToSend, int delayBeforeReadMS, int timeoutMS)
00532         {
00533             // send the command to the device
00534             byte[] writeData = new byte[packetToSend.EncodedPacket.Length];
00535             Array.Copy(packetToSend.EncodedPacket, writeData, writeData.Length);
00536             bool success = theWinUsbDevice.SendViaBulkTransfer(ref writeData,
00537                                                                           (uint)writeData.Length);
00538             if (!success)
00539             {
00540                 return null;
00541             }
00542
00543             // delay before reading the response
00544             Application.DoEvents();
00545             System.Threading.Thread.Sleep(delayBeforeReadMS);
00546
00547             // read the response
00548             byte[] readBuffer = new byte[1024 * 8];
00549             uint bytesRead = 0;
00550             theWinUsbDevice.ReadViaBulkTransfer(System.Convert.ToByte(theWinUsbDevice.myDevInfo.bulkInPipe),
00551                                                 (uint)readBuffer.Length,
00552                                                 ref readBuffer,
00553                                                 ref bytesRead,
00554                                                 ref success);
00555
00556             if (!(success))
00557             {
00558                 return null;
00559             }
00560
00561             // what command did we get?
00562             FW6PacketParser.HandleStates state;
00563             FW6PacketParser packetParser = new FW6PacketParser();
00564             FW6Packet packet = packetParser.HandleBytes(out state, readBuffer, (int)bytesRead);
00565
00566             if (state == FW6PacketParser.HandleStates.CommandComplete)
00567             {
00568                 return packet;
00569             }
00570             return null;
00571         }
00572     }
00573 }
Generated on Fri Sep 22 2017 10:35:16 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: WinUsb/DeviceManagement.cs Source File

  • File List
WinUsb/DeviceManagement.cs
Go to the documentation of this file.
00001 using System;
00002 using System.Runtime.InteropServices;
00003 using System.Windows.Forms;
00004 using System.Collections.Generic;
00005
00006 namespace WinUsb
00007 {
00011         public partial class DeviceManagement
00012         {
00028                 internal Boolean DeviceNameMatch(Message m, String mydevicePathName)
00029                 {
00030                         Int32 stringSize;
00031
00032                         try
00033                         {
00034                                 DEV_BROADCAST_DEVICEINTERFACE_1 devBroadcastDeviceInterface = new DEV_BROADCAST_DEVICEINTERFACE_1();
00035                                 DEV_BROADCAST_HDR devBroadcastHeader = new DEV_BROADCAST_HDR();
00036
00037                                 // The LParam parameter of Message is a pointer to a DEV_BROADCAST_HDR structure.
00038
00039                                 Marshal.PtrToStructure(m.LParam, devBroadcastHeader);
00040
00041                                 if ((devBroadcastHeader.dbch_devicetype == DBT_DEVTYP_DEVICEINTERFACE))
00042                                 {
00043                                         // The dbch_devicetype parameter indicates that the event applies to a device interface.
00044                                         // So the structure in LParam is actually a DEV_BROADCAST_INTERFACE structure,
00045                                         // which begins with a DEV_BROADCAST_HDR.
00046
00047                                         // Obtain the number of characters in dbch_name by subtracting the 32 bytes
00048                                         // in the strucutre that are not part of dbch_name and dividing by 2 because there are
00049                                         // 2 bytes per character.
00050
00051                                         stringSize = System.Convert.ToInt32((devBroadcastHeader.dbch_size - 32) / 2);
00052
00053                                         // The dbcc_name parameter of devBroadcastDeviceInterface contains the device name.
00054                                         // Trim dbcc_name to match the size of the String.
00055
00056                                         devBroadcastDeviceInterface.dbcc_name = new Char[stringSize + 1];
00057
00058                                         // Marshal data from the unmanaged block pointed to by m.LParam
00059                                         // to the managed object devBroadcastDeviceInterface.
00060
00061                                         Marshal.PtrToStructure(m.LParam, devBroadcastDeviceInterface);
00062
00063                                         // Store the device name in a String.
00064
00065                                         String DeviceNameString = new String(devBroadcastDeviceInterface.dbcc_name, 0, stringSize);
00066
00067                                         // Compare the name of the newly attached device with the name of the device
00068                                         // the application is accessing (mydevicePathName).
00069                                         // Set ignorecase True.
00070
00071                                         if ((String.Compare(DeviceNameString, mydevicePathName, true) == 0))
00072                                         {
00073                                                 return true;
00074                                         }
00075                                         else
00076                                         {
00077                                                 return false;
00078                                         }
00079                                 }
00080                         }
00081                         catch (Exception ex)
00082                         {
00083                                 string strEx;
00084                                 strEx = ex.Message;
00085                                 throw;
00086                         }
00087
00088                         return false;
00089                 }
00090
00102                 public static Boolean FindDeviceFromGuid(System.Guid myGuid, out List<String> devicePathNames)
00103                 {
00104                         Int32 bufferSize = 0;
00105                         IntPtr detailDataBuffer = IntPtr.Zero;
00106                         Boolean deviceFound;
00107                         IntPtr deviceInfoSet = new System.IntPtr();
00108                         Boolean lastDevice = false;
00109                         Int32 memberIndex = 0;
00110                         SP_DEVICE_INTERFACE_DATA MyDeviceInterfaceData = new SP_DEVICE_INTERFACE_DATA();
00111                         Boolean success;
00112
00113                         devicePathNames = new List<string>();
00114
00115                         try
00116                         {
00117                                 // ***
00118                                 //  API function
00119
00120                                 //  summary
00121                                 //  Retrieves a device information set for a specified group of devices.
00122                                 //  SetupDiEnumDeviceInterfaces uses the device information set.
00123
00124                                 //  parameters
00125                                 //  Interface class GUID.
00126                                 //  Null to retrieve information for all device instances.
00127                                 //  Optional handle to a top-level window (unused here).
00128                                 //  Flags to limit the returned information to currently present devices
00129                                 //  and devices that expose interfaces in the class specified by the GUID.
00130
00131                                 //  Returns
00132                                 //  Handle to a device information set for the devices.
00133                                 // ***
00134
00135                                 deviceInfoSet = SetupDiGetClassDevs(ref myGuid, IntPtr.Zero, IntPtr.Zero, DIGCF_PRESENT | DIGCF_DEVICEINTERFACE);
00136
00137                                 deviceFound = false;
00138                                 memberIndex = 0;
00139
00140                                 // The cbSize element of the MyDeviceInterfaceData structure must be set to
00141                                 // the structure's size in bytes.
00142                                 // The size is 28 bytes for 32-bit code and 32 bits for 64-bit code.
00143
00144                                 MyDeviceInterfaceData.cbSize = Marshal.SizeOf(MyDeviceInterfaceData);
00145
00146                                 do
00147                                 {
00148                                         // Begin with 0 and increment through the device information set until
00149                                         // no more devices are available.
00150
00151                                         // ***
00152                                         //  API function
00153
00154                                         //  summary
00155                                         //  Retrieves a handle to a SP_DEVICE_INTERFACE_DATA structure for a device.
00156                                         //  On return, MyDeviceInterfaceData contains the handle to a
00157                                         //  SP_DEVICE_INTERFACE_DATA structure for a detected device.
00158
00159                                         //  parameters
00160                                         //  DeviceInfoSet returned by SetupDiGetClassDevs.
00161                                         //  Optional SP_DEVINFO_DATA structure that defines a device instance
00162                                         //  that is a member of a device information set.
00163                                         //  Device interface GUID.
00164                                         //  Index to specify a device in a device information set.
00165                                         //  Pointer to a handle to a SP_DEVICE_INTERFACE_DATA structure for a device.
00166
00167                                         //  Returns
00168                                         //  True on success.
00169                                         // ***
00170
00171                                         success = SetupDiEnumDeviceInterfaces
00172                                                 (deviceInfoSet,
00173                                                 IntPtr.Zero,
00174                                                 ref myGuid,
00175                                                 memberIndex,
00176                                                 ref MyDeviceInterfaceData);
00177
00178                                         // Find out if a device information set was retrieved.
00179
00180                                         if (!success)
00181                                         {
00182                                                 lastDevice = true;
00183                                         }
00184                                         else
00185                                         {
00186                                                 // A device is present.
00187
00188                                                 // ***
00189                                                 //  API function:
00190
00191                                                 //  summary:
00192                                                 //  Retrieves an SP_DEVICE_INTERFACE_DETAIL_DATA structure
00193                                                 //  containing information about a device.
00194                                                 //  To retrieve the information, call this function twice.
00195                                                 //  The first time returns the size of the structure.
00196                                                 //  The second time returns a pointer to the data.
00197
00198                                                 //  parameters
00199                                                 //  DeviceInfoSet returned by SetupDiGetClassDevs
00200                                                 //  SP_DEVICE_INTERFACE_DATA structure returned by SetupDiEnumDeviceInterfaces
00201                                                 //  A returned pointer to an SP_DEVICE_INTERFACE_DETAIL_DATA
00202                                                 //  Structure to receive information about the specified interface.
00203                                                 //  The size of the SP_DEVICE_INTERFACE_DETAIL_DATA structure.
00204                                                 //  Pointer to a int that will receive the returned required size of the
00205                                                 //  SP_DEVICE_INTERFACE_DETAIL_DATA structure.
00206                                                 //  Returned pointer to an SP_DEVINFO_DATA structure to receive information about the device.
00207
00208                                                 //  Returns
00209                                                 //  True on success.
00210                                                 // ***
00211
00212                                                 success = SetupDiGetDeviceInterfaceDetail
00213                                                         (deviceInfoSet,
00214                                                         ref MyDeviceInterfaceData,
00215                                                         IntPtr.Zero,
00216                                                         0,
00217                                                         ref bufferSize,
00218                                                         IntPtr.Zero);
00219
00220                                                 // Allocate memory for the SP_DEVICE_INTERFACE_DETAIL_DATA structure using the returned buffer size.
00221
00222                                                 detailDataBuffer = Marshal.AllocHGlobal(bufferSize);
00223
00224                                                 // Store cbSize in the first bytes of the array. The number of bytes are different with 32- and 64-bit systems.
00225
00226                                                 Marshal.WriteInt32(detailDataBuffer, (IntPtr.Size == 4) ? (4 + Marshal.SystemDefaultCharSize) : 8);
00227
00228                                                 // Call SetupDiGetDeviceInterfaceDetail again.
00229                                                 // This time, pass a pointer to DetailDataBuffer
00230                                                 // and the returned required buffer size.
00231
00232                                                 success = SetupDiGetDeviceInterfaceDetail
00233                                                         (deviceInfoSet,
00234                                                         ref MyDeviceInterfaceData,
00235                                                         detailDataBuffer,
00236                                                         bufferSize,
00237                                                         ref bufferSize,
00238                                                         IntPtr.Zero);
00239
00240                                                 // Skip over cbsize (4 bytes) to get the address of the devicePathName.
00241
00242                                                 IntPtr pDevicePathName = new IntPtr(detailDataBuffer.ToInt32() + 4);
00243
00244                                                 // Get the String containing the devicePathName.
00245
00246                                                 string devicePathName = Marshal.PtrToStringAuto(pDevicePathName);
00247                                                 devicePathNames.Add(devicePathName);
00248
00249                                                 deviceFound = true;
00250                                         }
00251                                         memberIndex = memberIndex + 1;
00252                                 }
00253                                 while (!((lastDevice == true)));
00254
00255                                 return deviceFound;
00256                         }
00257                         catch (Exception ex)
00258                         {
00259                                 string strEx;
00260                                 strEx = ex.Message;
00261                                 throw;
00262                         }
00263                                 finally
00264                         {
00265                                 if (detailDataBuffer != IntPtr.Zero)
00266                                 {
00267                                         // Free the memory allocated previously by AllocHGlobal.
00268
00269                                         Marshal.FreeHGlobal(detailDataBuffer);
00270                                 }
00271                                 if (deviceInfoSet != IntPtr.Zero)
00272                                 {
00273                                         // ***
00274                                         //  API function
00275
00276                                         //  summary
00277                                         //  Frees the memory reserved for the DeviceInfoSet returned by SetupDiGetClassDevs.
00278
00279                                         //  parameters
00280                                         //  DeviceInfoSet returned by SetupDiGetClassDevs.
00281
00282                                         //  returns
00283                                         //  True on success.
00284                                         // ***
00285
00286                                         SetupDiDestroyDeviceInfoList(deviceInfoSet);
00287                                 }
00288                         }
00289                 }
00290
00304                 public Boolean RegisterForDeviceNotifications(String devicePathName, IntPtr formHandle, Guid classGuid, ref IntPtr deviceNotificationHandle)
00305                 {
00306                         // A DEV_BROADCAST_DEVICEINTERFACE header holds information about the request.
00307
00308                         DEV_BROADCAST_DEVICEINTERFACE devBroadcastDeviceInterface = new DEV_BROADCAST_DEVICEINTERFACE();
00309                         IntPtr devBroadcastDeviceInterfaceBuffer = IntPtr.Zero;
00310                         Int32 size = 0;
00311
00312                         try
00313                         {
00314                                 // Set the parameters in the DEV_BROADCAST_DEVICEINTERFACE structure.
00315
00316                                 // Set the size.
00317
00318                                 size = Marshal.SizeOf(devBroadcastDeviceInterface);
00319                                 devBroadcastDeviceInterface.dbcc_size = size;
00320
00321                                 // Request to receive notifications about a class of devices.
00322
00323                                 devBroadcastDeviceInterface.dbcc_devicetype = DBT_DEVTYP_DEVICEINTERFACE;
00324
00325                                 devBroadcastDeviceInterface.dbcc_reserved = 0;
00326
00327                                 // Specify the interface class to receive notifications about.
00328
00329                                 devBroadcastDeviceInterface.dbcc_classguid = classGuid;
00330
00331                                 // Allocate memory for the buffer that holds the DEV_BROADCAST_DEVICEINTERFACE structure.
00332
00333                                 devBroadcastDeviceInterfaceBuffer = Marshal.AllocHGlobal(size);
00334
00335                                 // Copy the DEV_BROADCAST_DEVICEINTERFACE structure to the buffer.
00336                                 // Set fDeleteOld True to prevent memory leaks.
00337
00338                                 Marshal.StructureToPtr(devBroadcastDeviceInterface, devBroadcastDeviceInterfaceBuffer, true);
00339
00340                                 // ***
00341                                 //  API function
00342
00343                                 //  summary
00344                                 //  Request to receive notification messages when a device in an interface class
00345                                 //  is attached or removed.
00346
00347                                 //  parameters
00348                                 //  Handle to the window that will receive device events.
00349                                 //  Pointer to a DEV_BROADCAST_DEVICEINTERFACE to specify the type of
00350                                 //  device to send notifications for.
00351                                 //  DEVICE_NOTIFY_WINDOW_HANDLE indicates the handle is a window handle.
00352
00353                                 //  Returns
00354                                 //  Device notification handle or NULL on failure.
00355                                 // ***
00356
00357                                 deviceNotificationHandle = RegisterDeviceNotification(formHandle, devBroadcastDeviceInterfaceBuffer, DEVICE_NOTIFY_WINDOW_HANDLE);
00358
00359                                 // Marshal data from the unmanaged block devBroadcastDeviceInterfaceBuffer to
00360                                 // the managed object devBroadcastDeviceInterface
00361
00362                                 Marshal.PtrToStructure(devBroadcastDeviceInterfaceBuffer, devBroadcastDeviceInterface);
00363
00364                                 if ((deviceNotificationHandle.ToInt32() == IntPtr.Zero.ToInt32()))
00365                                 {
00366                                         return false;
00367                                 }
00368                                 else
00369                                 {
00370                                         return true;
00371                                 }
00372                         }
00373                         catch (Exception ex)
00374                         {
00375                                 string strEx;
00376                                 strEx = ex.Message;
00377                                 throw;
00378                         }
00379                         finally
00380                         {
00381                                 if (devBroadcastDeviceInterfaceBuffer != IntPtr.Zero)
00382                                 {
00383                                         // Free the memory allocated previously by AllocHGlobal.
00384
00385                                         Marshal.FreeHGlobal(devBroadcastDeviceInterfaceBuffer);
00386                                 }
00387                         }
00388                 }
00389
00397
00398                 internal void StopReceivingDeviceNotifications(IntPtr deviceNotificationHandle)
00399                 {
00400                         try
00401                         {
00402                                 // ***
00403                                 //  API function
00404
00405                                 //  summary
00406                                 //  Stop receiving notification messages.
00407
00408                                 //  parameters
00409                                 //  Handle returned previously by RegisterDeviceNotification.
00410
00411                                 //  returns
00412                                 //  True on success.
00413                                 // ***
00414
00415                                 //  Ignore failures.
00416
00417                                 DeviceManagement.UnregisterDeviceNotification(deviceNotificationHandle);
00418                         }
00419                         catch (Exception ex)
00420                         {
00421                                 string strEx;
00422                                 strEx = ex.Message;
00423                                 throw;
00424                         }
00425                 }
00426         }
00427 }
Generated on Fri Sep 22 2017 10:35:16 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: WinUsb/DeviceManagementApi.cs Source File

  • File List
WinUsb/DeviceManagementApi.cs
Go to the documentation of this file.
00001 using System;
00002 using System.Runtime.InteropServices;
00003
00004 namespace WinUsb
00005 {
00007         // API declarations relating to device management (SetupDixxx and
00008         // RegisterDeviceNotification functions).
00010         public partial class DeviceManagement
00011         {
00012                 // from dbt.h
00013
00014                 public const Int32 DBT_DEVICEARRIVAL = 0X8000;
00015                 public const Int32 DBT_DEVICEREMOVECOMPLETE = 0X8004;
00016                 public const Int32 DBT_DEVTYP_DEVICEINTERFACE = 5;
00017                 public const Int32 DBT_DEVTYP_HANDLE = 6;
00018                 public const Int32 DEVICE_NOTIFY_ALL_INTERFACE_CLASSES = 4;
00019                 public const Int32 DEVICE_NOTIFY_SERVICE_HANDLE = 1;
00020                 public const Int32 DEVICE_NOTIFY_WINDOW_HANDLE = 0;
00021                 public const Int32 WM_DEVICECHANGE = 0X219;
00022
00023                 // from setupapi.h
00024
00025                 internal const Int32 DIGCF_PRESENT = 2;
00026                 internal const Int32 DIGCF_DEVICEINTERFACE = 0X10;
00027
00028                 // Two declarations for the DEV_BROADCAST_DEVICEINTERFACE structure.
00029
00030                 // Use this one in the call to RegisterDeviceNotification() and
00031                 // in checking dbch_devicetype in a DEV_BROADCAST_HDR structure:
00032
00033                 [StructLayout(LayoutKind.Sequential)]
00034                 internal class DEV_BROADCAST_DEVICEINTERFACE
00035                 {
00036                         internal Int32 dbcc_size;
00037                         internal Int32 dbcc_devicetype;
00038                         internal Int32 dbcc_reserved;
00039                         internal Guid dbcc_classguid;
00040                         internal Int16 dbcc_name;
00041                 }
00042
00043                 // Use this to read the dbcc_name String and classguid:
00044
00045                 [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)]
00046                 internal class DEV_BROADCAST_DEVICEINTERFACE_1
00047                 {
00048                         internal Int32 dbcc_size;
00049                         internal Int32 dbcc_devicetype;
00050                         internal Int32 dbcc_reserved;
00051                         [MarshalAs(UnmanagedType.ByValArray, ArraySubType = UnmanagedType.U1, SizeConst = 16)]
00052                         internal Byte[] dbcc_classguid;
00053                         [MarshalAs(UnmanagedType.ByValArray, SizeConst = 255)]
00054                         internal Char[] dbcc_name;
00055                 }
00056
00057                 [StructLayout(LayoutKind.Sequential)]
00058                 internal class DEV_BROADCAST_HDR
00059                 {
00060                         internal Int32 dbch_size;
00061                         internal Int32 dbch_devicetype;
00062                         internal Int32 dbch_reserved;
00063                 }
00064
00065                 internal struct SP_DEVICE_INTERFACE_DATA
00066                 {
00067                         internal Int32 cbSize;
00068                         internal System.Guid InterfaceClassGuid;
00069                         internal Int32 Flags;
00070                         internal IntPtr Reserved;
00071                 }
00072
00073         // // / // // // Save these structs for future use // // // // // //
00074         //internal struct SP_DEVICE_INTERFACE_DETAIL_DATA
00075         //{
00076         //    internal Int32 cbSize;
00077         //    internal String DevicePath;
00078         //}
00079
00080         //internal struct SP_DEVINFO_DATA
00081         //{
00082         //    internal Int32 cbSize;
00083         //    internal System.Guid ClassGuid;
00084         //    internal Int32 DevInst;
00085         //    internal Int32 Reserved;
00086         //}
00087         // // / // // // Save these structs for future use // // // // // //
00088
00089                 [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
00090                 internal static extern IntPtr RegisterDeviceNotification(IntPtr hRecipient, IntPtr NotificationFilter, Int32 Flags);
00091
00092                 [DllImport("setupapi.dll", SetLastError = true)]
00093                 internal static extern Int32 SetupDiCreateDeviceInfoList(ref System.Guid ClassGuid, Int32 hwndParent);
00094
00095                 [DllImport("setupapi.dll", SetLastError = true)]
00096                 internal static extern Int32 SetupDiDestroyDeviceInfoList(IntPtr DeviceInfoSet);
00097
00098                 [DllImport("setupapi.dll", SetLastError = true)]
00099                 internal static extern Boolean SetupDiEnumDeviceInterfaces(IntPtr DeviceInfoSet, IntPtr DeviceInfoData, ref System.Guid InterfaceClassGuid, Int32 MemberIndex, ref SP_DEVICE_INTERFACE_DATA DeviceInterfaceData);
00100
00101                 [DllImport("setupapi.dll", SetLastError = true, CharSet = CharSet.Auto)]
00102                 internal static extern IntPtr SetupDiGetClassDevs(ref System.Guid ClassGuid, IntPtr Enumerator, IntPtr hwndParent, Int32 Flags);
00103
00104                 [DllImport("setupapi.dll", SetLastError = true, CharSet = CharSet.Auto)]
00105                 internal static extern Boolean SetupDiGetDeviceInterfaceDetail(IntPtr DeviceInfoSet, ref SP_DEVICE_INTERFACE_DATA DeviceInterfaceData, IntPtr DeviceInterfaceDetailData, Int32 DeviceInterfaceDetailDataSize, ref Int32 RequiredSize, IntPtr DeviceInfoData);
00106
00107                 [DllImport("user32.dll", SetLastError = true)]
00108                 internal static extern Boolean UnregisterDeviceNotification(IntPtr Handle);
00109         }
00110 }
Generated on Fri Sep 22 2017 10:35:16 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: FW6/DeviceTypes.cs File Reference

  • File List
Namespaces | Enumerations
FW6/DeviceTypes.cs File Reference

Go to the source code of this file.

Namespaces

package csRepeat

Enumerations

enum csRepeat.DeviceTypes {
csRepeat.DP5 = 0, csRepeat.PX5 = 1,
csRepeat.DP5G = 2, csRepeat.MCA8000D = 3,
csRepeat.TB5 = 4, csRepeat.DP5X = 5,
csRepeat.ANY
}
Generated on Fri Sep 22 2017 10:35:16 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: FW6/DeviceTypes.cs Source File

  • File List
FW6/DeviceTypes.cs
Go to the documentation of this file.
00001 using System;
00002 using System.Collections.Generic;
00003 using System.Text;
00004
00005 namespace csRepeat
00006 {
00007     public enum DeviceTypes
00008     {
00009         DP5 = 0,
00010         PX5 = 1,
00011         DP5G = 2,
00012         MCA8000D = 3,
00013         TB5 = 4,
00014         DP5X = 5,
00015         ANY
00016     };
00017 }
Generated on Fri Sep 22 2017 10:35:16 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: FW6/DiagnosticRequest.cs Source File

  • File List
FW6/DiagnosticRequest.cs
Go to the documentation of this file.
00001 ﻿using System;
00002 using System.Collections.Generic;
00003 using System.Text;
00004
00005 namespace csRepeat.FW6
00006 {
00010     class DiagnosticRequest : FW6Packet
00011     {
00015         public override byte[] Data
00016         {
00017             get
00018             {
00019                 return null;
00020             }
00021         }
00022
00026         public override byte PID1
00027         {
00028             get { return 0x3; }
00029         }
00030
00034         public override byte PID2
00035         {
00036             get { return 0x5; }
00037         }
00038     }
00039 }
Generated on Fri Sep 22 2017 10:35:16 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: FW6/DiagnosticResponse.cs Source File

  • File List
FW6/DiagnosticResponse.cs
Go to the documentation of this file.
00001 ﻿using System;
00002 using System.Collections.Generic;
00003 using System.Text;
00004
00005 namespace csRepeat.FW6
00006 {
00010     public class DiagnosticResponse : FW6Packet
00011     {
00012         private byte[] packetContent;
00013
00014         public override byte[] Data
00015         {
00016             get { throw new NotImplementedException(); }
00017         }
00018
00019         private int FirmwareVersionOffset = 0;
00020
00021         public int FirmwareMajor
00022         {
00023             get
00024             {
00025                 return packetContent[FirmwareVersionOffset] >> 8;
00026             }
00027         }
00028
00029         public int FirmwareMinor
00030         {
00031             get
00032             {
00033                 return packetContent[FirmwareVersionOffset] & 0xF;
00034             }
00035         }
00036
00037         private int FpgaVersionOffset = 1;
00038
00039         public int FpgaMajor
00040         {
00041             get
00042             {
00043                 return packetContent[FpgaVersionOffset] >> 8;
00044             }
00045         }
00046
00047         public int FpgaMinor
00048         {
00049             get
00050             {
00051                 return packetContent[FpgaVersionOffset] & 0xF;
00052             }
00053         }
00054
00055         private int DCalSettingOffset = 177;
00056
00057         public UInt16 DCalSetting
00058         {
00059             get
00060             {
00061                 return (UInt16)((packetContent[DCalSettingOffset] << 8) | packetContent[DCalSettingOffset + 1]);
00062             }
00063         }
00064
00065         private int pzCorrectionOffset = 179;
00066
00067         public byte pzCorrection
00068         {
00069             get
00070             {
00071                 return packetContent[pzCorrectionOffset];
00072             }
00073         }
00074
00075         private int uCTemperatureCalibrationOffset = 180;
00076
00077         public byte uCTemperatureCalibration
00078         {
00079             get
00080             {
00081                 return packetContent[uCTemperatureCalibrationOffset];
00082             }
00083         }
00084
00085         private int ADCGainCalibrationOffset = 181;
00086
00087         public byte ADCGainCalibration
00088         {
00089             get
00090             {
00091                 return packetContent[ADCGainCalibrationOffset];
00092             }
00093         }
00094
00095         private int ADCOffsetCalibrationOffset = 182;
00096
00097         public byte ADCOffsetCalibration
00098         {
00099             get
00100             {
00101                 return packetContent[ADCOffsetCalibrationOffset];
00102             }
00103         }
00104
00105         private const byte thisPID1 = 0x82;
00106         private const byte thisPID2 = 0x5;
00107
00108         public override byte PID1
00109         {
00110             get { return thisPID1; }
00111         }
00112
00113         public override byte PID2
00114         {
00115             get { return thisPID2; }
00116         }
00117
00118         public static bool IsMatch(byte pid1, byte pid2)
00119         {
00120             if (thisPID1 == pid1)
00121             {
00122                 return true;
00123             }
00124
00125             return false;
00126         }
00127
00128         public DiagnosticResponse(byte[] packetContent)
00129         {
00130             this.packetContent = packetContent;
00131         }
00132     }
00133 }
Generated on Fri Sep 22 2017 10:35:16 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: FW6/DisplayVersion.cs Source File

  • File List
FW6/DisplayVersion.cs
Go to the documentation of this file.
00001 ﻿using System;
00002 using System.Collections.Generic;
00003 using System.Text;
00004
00005 namespace csRepeat
00006 {
00007     // Display the version in Amptek format M.NN.BB
00008     //
00009     //    Where M = Major version #
00010     //          N = Minor version #
00011     //          B = Build (if available)
00012     //
00013     class DisplayVersion
00014     {
00015         //public static string VersionString(DPDevice device, Version version, bool isFPGA = false)
00016         public static string VersionString(DPDevice device, Version version, bool isFPGA)
00017         {
00018             try
00019             {
00020                 if ((device != null) && isFPGA)
00021                 {
00022                     if (device.FpgaState == DPDevice.FpgaStates.Unprogrammed)
00023                     {
00024                         return "Unprogrammed";
00025                     }
00026                     else if (device.FpgaState == DPDevice.FpgaStates.EncryptionFailure)
00027                     {
00028                         return "Encryption failure";
00029                     }
00030                 }
00031
00032                 if (version.Build > 0)
00033                 {
00034                     return string.Format("{0}.{1:D2}.{2:D2}", version.Major, version.Minor, version.Build);
00035                 }
00036                 {
00037                     return string.Format("{0}.{1:D2}", version.Major, version.Minor);
00038                 }
00039             }
00040             catch
00041             {
00042                 return ("");
00043             }
00044         }
00045     }
00046 }
Generated on Fri Sep 22 2017 10:35:16 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: MiscUtil/Conversion/DoubleConverter.cs Source File

  • File List
MiscUtil/Conversion/DoubleConverter.cs
Go to the documentation of this file.
00001 using System;
00002 using System.Globalization;
00003
00004 namespace MiscUtil.Conversion
00005 {
00011     public class DoubleConverter
00012     {
00019         public static string ToExactString (double d)
00020         {
00021             if (double.IsPositiveInfinity(d))
00022                 return "+Infinity";
00023             if (double.IsNegativeInfinity(d))
00024                 return "-Infinity";
00025             if (double.IsNaN(d))
00026                 return "NaN";
00027
00028             // Translate the double into sign, exponent and mantissa.
00029             long bits = BitConverter.DoubleToInt64Bits(d);
00030             bool negative = (bits < 0);
00031             int exponent = (int) ((bits >> 52) & 0x7ffL);
00032             long mantissa = bits & 0xfffffffffffffL;
00033
00034             // Subnormal numbers; exponent is effectively one higher,
00035             // but there's no extra normalisation bit in the mantissa
00036             if (exponent==0)
00037             {
00038                 exponent++;
00039             }
00040             // Normal numbers; leave exponent as it is but add extra
00041             // bit to the front of the mantissa
00042             else
00043             {
00044                 mantissa = mantissa | (1L<<52);
00045             }
00046
00047             // Bias the exponent. It's actually biased by 1023, but we're
00048             // treating the mantissa as m.0 rather than 0.m, so we need
00049             // to subtract another 52 from it.
00050             exponent -= 1075;
00051
00052             if (mantissa == 0)
00053             {
00054                 return "0";
00055             }
00056
00057             /* Normalize */
00058             while((mantissa & 1) == 0)
00059             {    /*  i.e., Mantissa is even */
00060                 mantissa >>= 1;
00061                 exponent++;
00062             }
00063
00064             // Construct a new decimal expansion with the mantissa
00065             ArbitraryDecimal ad = new ArbitraryDecimal (mantissa);
00066
00067             // If the exponent is less than 0, we need to repeatedly
00068             // divide by 2 - which is the equivalent of multiplying
00069             // by 5 and dividing by 10.
00070             if (exponent < 0)
00071             {
00072                 for (int i=0; i < -exponent; i++)
00073                     ad.MultiplyBy(5);
00074                 ad.Shift(-exponent);
00075             }
00076                 // Otherwise, we need to repeatedly multiply by 2
00077             else
00078             {
00079                 for (int i=0; i < exponent; i++)
00080                     ad.MultiplyBy(2);
00081             }
00082
00083             // Finally, return the string with an appropriate sign
00084             if (negative)
00085                 return "-"+ad.ToString();
00086             else
00087                 return ad.ToString();
00088         }
00089
00093         class ArbitraryDecimal
00094         {
00096             byte[] digits;
00100             int decimalPoint=0;
00101
00106             internal ArbitraryDecimal (long x)
00107             {
00108                 string tmp = x.ToString(CultureInfo.InvariantCulture);
00109                 digits = new byte[tmp.Length];
00110                 for (int i=0; i < tmp.Length; i++)
00111                     digits[i] = (byte) (tmp[i]-'0');
00112                 Normalize();
00113             }
00114
00119             internal void MultiplyBy(int amount)
00120             {
00121                 byte[] result = new byte[digits.Length+1];
00122                 for (int i=digits.Length-1; i >= 0; i--)
00123                 {
00124                     int resultDigit = digits[i]*amount+result[i+1];
00125                     result[i]=(byte)(resultDigit/10);
00126                     result[i+1]=(byte)(resultDigit%10);
00127                 }
00128                 if (result[0] != 0)
00129                 {
00130                     digits=result;
00131                 }
00132                 else
00133                 {
00134                     Array.Copy (result, 1, digits, 0, digits.Length);
00135                 }
00136                 Normalize();
00137             }
00138
00145             internal void Shift (int amount)
00146             {
00147                 decimalPoint += amount;
00148             }
00149
00153             internal void Normalize()
00154             {
00155                 int first;
00156                 for (first=0; first < digits.Length; first++)
00157                     if (digits[first]!=0)
00158                         break;
00159                 int last;
00160                 for (last=digits.Length-1; last >= 0; last--)
00161                     if (digits[last]!=0)
00162                         break;
00163
00164                 if (first==0 && last==digits.Length-1)
00165                     return;
00166
00167                 byte[] tmp = new byte[last-first+1];
00168                 for (int i=0; i < tmp.Length; i++)
00169                     tmp[i]=digits[i+first];
00170
00171                 decimalPoint -= digits.Length-(last+1);
00172                 digits=tmp;
00173             }
00174
00178             public override String ToString()
00179             {
00180                 char[] digitString = new char[digits.Length];
00181                 for (int i=0; i < digits.Length; i++)
00182                     digitString[i] = (char)(digits[i]+'0');
00183
00184                 // Simplest case - nothing after the decimal point,
00185                 // and last real digit is non-zero, eg value=35
00186                 if (decimalPoint==0)
00187                 {
00188                     return new string (digitString);
00189                 }
00190
00191                 // Fairly simple case - nothing after the decimal
00192                 // point, but some 0s to add, eg value=350
00193                 if (decimalPoint < 0)
00194                 {
00195                     return new string (digitString)+
00196                         new string ('0', -decimalPoint);
00197                 }
00198
00199                 // Nothing before the decimal point, eg 0.035
00200                 if (decimalPoint >= digitString.Length)
00201                 {
00202                     return "0."+
00203                         new string ('0',(decimalPoint-digitString.Length))+
00204                         new string (digitString);
00205                 }
00206
00207                 // Most complicated case - part of the string comes
00208                 // before the decimal point, part comes after it,
00209                 // eg 3.5
00210                 return new string (digitString, 0,
00211                     digitString.Length-decimalPoint)+
00212                     "."+
00213                     new string (digitString,
00214                     digitString.Length-decimalPoint,
00215                     decimalPoint);
00216             }
00217         }
00218     }
00219 }
Generated on Fri Sep 22 2017 10:35:16 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: MiscUtil/IO/EndianBinaryReader.cs Source File

  • File List
MiscUtil/IO/EndianBinaryReader.cs
Go to the documentation of this file.
00001 using System;
00002 using System.IO;
00003 using System.Text;
00004 using MiscUtil.Conversion;
00005
00006 namespace MiscUtil.IO
00007 {
00013     public class EndianBinaryReader : IDisposable
00014     {
00015         #region Fields not directly related to properties
00016
00017
00018
00019         bool disposed=false;
00023         Decoder decoder;
00027         byte[] buffer = new byte[16];
00031         char[] charBuffer = new char[1];
00035         int minBytesPerChar;
00036         #endregion
00037
00038         #region Constructors
00039
00040
00041
00042
00043
00044
00045         public EndianBinaryReader (EndianBitConverter bitConverter,
00046                                    Stream stream) : this (bitConverter, stream, Encoding.UTF8)
00047         {
00048         }
00049
00057         public EndianBinaryReader (EndianBitConverter bitConverter,    Stream stream, Encoding encoding)
00058         {
00059             if (bitConverter==null)
00060             {
00061                 throw new ArgumentNullException("bitConverter");
00062             }
00063             if (stream==null)
00064             {
00065                 throw new ArgumentNullException("stream");
00066             }
00067             if (encoding==null)
00068             {
00069                 throw new ArgumentNullException("encoding");
00070             }
00071             if (!stream.CanRead)
00072             {
00073                 throw new ArgumentException("Stream isn't writable", "stream");
00074             }
00075             this.stream = stream;
00076             this.bitConverter = bitConverter;
00077             this.encoding = encoding;
00078             this.decoder = encoding.GetDecoder();
00079             this.minBytesPerChar = 1;
00080
00081             if (encoding is UnicodeEncoding)
00082             {
00083                 minBytesPerChar = 2;
00084             }
00085         }
00086         #endregion
00087
00088         #region Properties
00089         EndianBitConverter bitConverter;
00093         public EndianBitConverter BitConverter
00094         {
00095             get { return bitConverter; }
00096         }
00097
00098         Encoding encoding;
00102         public Encoding Encoding
00103         {
00104             get { return encoding; }
00105         }
00106
00107         Stream stream;
00111         public Stream BaseStream
00112         {
00113             get { return stream; }
00114         }
00115         #endregion
00116
00117         #region Public methods
00118
00119
00120
00121         public void Close()
00122         {
00123             Dispose();
00124         }
00125
00131         public void Seek (int offset, SeekOrigin origin)
00132         {
00133             CheckDisposed();
00134             stream.Seek (offset, origin);
00135         }
00136
00141         public byte ReadByte()
00142         {
00143             ReadInternal(buffer, 1);
00144             return buffer[0];
00145         }
00146
00151         public sbyte ReadSByte()
00152         {
00153             ReadInternal(buffer, 1);
00154             return unchecked((sbyte)buffer[0]);
00155         }
00156
00161         public bool ReadBoolean()
00162         {
00163             ReadInternal(buffer, 1);
00164             return bitConverter.ToBoolean(buffer, 0);
00165         }
00166
00172         public short ReadInt16()
00173         {
00174             ReadInternal(buffer, 2);
00175             return bitConverter.ToInt16(buffer, 0);
00176         }
00177
00183         public int ReadInt32()
00184         {
00185             ReadInternal(buffer, 4);
00186             return bitConverter.ToInt32(buffer, 0);
00187         }
00188
00194         public long ReadInt64()
00195         {
00196             ReadInternal(buffer, 8);
00197             return bitConverter.ToInt64(buffer, 0);
00198         }
00199
00205         public ushort ReadUInt16()
00206         {
00207             ReadInternal(buffer, 2);
00208             return bitConverter.ToUInt16(buffer, 0);
00209         }
00210
00216         public uint ReadUInt32()
00217         {
00218             ReadInternal(buffer, 4);
00219             return bitConverter.ToUInt32(buffer, 0);
00220         }
00221
00227         public ulong ReadUInt64()
00228         {
00229             ReadInternal(buffer, 8);
00230             return bitConverter.ToUInt64(buffer, 0);
00231         }
00232
00238         public float ReadSingle()
00239         {
00240             ReadInternal(buffer, 4);
00241             return bitConverter.ToSingle(buffer, 0);
00242         }
00243
00249         public double ReadDouble()
00250         {
00251             ReadInternal(buffer, 8);
00252             return bitConverter.ToDouble(buffer, 0);
00253         }
00254
00260         public decimal ReadDecimal()
00261         {
00262             ReadInternal(buffer, 16);
00263             return bitConverter.ToDecimal(buffer, 0);
00264         }
00265
00272         public int Read()
00273         {
00274             int charsRead = Read(charBuffer, 0, 1);
00275             if (charsRead==0)
00276             {
00277                 return -1;
00278             }
00279             else
00280             {
00281                 return charBuffer[0];
00282             }
00283         }
00284
00295         public int Read(char[] data, int index, int count)
00296         {
00297             CheckDisposed();
00298             if (buffer==null)
00299             {
00300                 throw new ArgumentNullException("buffer");
00301             }
00302             if (index < 0)
00303             {
00304                 throw new ArgumentOutOfRangeException("index");
00305             }
00306             if (count < 0)
00307             {
00308                 throw new ArgumentOutOfRangeException("index");
00309             }
00310             if (count+index > data.Length)
00311             {
00312                 throw new ArgumentException
00313                     ("Not enough space in buffer for specified number of characters starting at specified index");
00314             }
00315
00316             int read=0;
00317             bool firstTime=true;
00318
00319             // Use the normal buffer if we're only reading a small amount, otherwise
00320             // use at most 4K at a time.
00321             byte[] byteBuffer = buffer;
00322
00323             if (byteBuffer.Length < count*minBytesPerChar)
00324             {
00325                 byteBuffer = new byte[4096];
00326             }
00327
00328             while (read < count)
00329             {
00330                 int amountToRead;
00331                 // First time through we know we haven't previously read any data
00332                 if (firstTime)
00333                 {
00334                     amountToRead = count*minBytesPerChar;
00335                     firstTime=false;
00336                 }
00337                 // After that we can only assume we need to fully read "chars left -1" characters
00338                 // and a single byte of the character we may be in the middle of
00339                 else
00340                 {
00341                     amountToRead = ((count-read-1)*minBytesPerChar)+1;
00342                 }
00343                 if (amountToRead > byteBuffer.Length)
00344                 {
00345                     amountToRead = byteBuffer.Length;
00346                 }
00347                 int bytesRead = TryReadInternal(byteBuffer, amountToRead);
00348                 if (bytesRead==0)
00349                 {
00350                     return read;
00351                 }
00352                 int decoded = decoder.GetChars(byteBuffer, 0, bytesRead, data, index);
00353                 read += decoded;
00354                 index += decoded;
00355             }
00356             return read;
00357         }
00358
00369         public int Read(byte[] buffer, int index, int count)
00370         {
00371             CheckDisposed();
00372             if (buffer==null)
00373             {
00374                 throw new ArgumentNullException("buffer");
00375             }
00376             if (index < 0)
00377             {
00378                 throw new ArgumentOutOfRangeException("index");
00379             }
00380             if (count < 0)
00381             {
00382                 throw new ArgumentOutOfRangeException("index");
00383             }
00384             if (count+index > buffer.Length)
00385             {
00386                 throw new ArgumentException
00387                     ("Not enough space in buffer for specified number of bytes starting at specified index");
00388             }
00389             int read=0;
00390             while (count > 0)
00391             {
00392                 int block = stream.Read(buffer, index, count);
00393                 if (block==0)
00394                 {
00395                     return read;
00396                 }
00397                 index += block;
00398                 read += block;
00399                 count -= block;
00400             }
00401             return read;
00402         }
00403
00411         public byte[] ReadBytes(int count)
00412         {
00413             CheckDisposed();
00414             if (count < 0)
00415             {
00416                 throw new ArgumentOutOfRangeException("count");
00417             }
00418             byte[] ret = new byte[count];
00419             int index=0;
00420             while (index < count)
00421             {
00422                 int read = stream.Read(ret, index, count-index);
00423                 // Stream has finished half way through. That's fine, return what we've got.
00424                 if (read==0)
00425                 {
00426                     byte[] copy = new byte[index];
00427                     Buffer.BlockCopy(ret, 0, copy, 0, index);
00428                     return copy;
00429                 }
00430                 index += read;
00431             }
00432             return ret;
00433         }
00434
00442         public byte[] ReadBytesOrThrow(int count)
00443         {
00444             byte[] ret = new byte[count];
00445             ReadInternal(ret, count);
00446             return ret;
00447         }
00448
00456         public int Read7BitEncodedInt()
00457         {
00458             CheckDisposed();
00459
00460             int ret=0;
00461             for (int shift = 0; shift < 35; shift+=7)
00462             {
00463                 int b = stream.ReadByte();
00464                 if (b==-1)
00465                 {
00466                     throw new EndOfStreamException();
00467                 }
00468                 ret = ret | ((b&0x7f) << shift);
00469                 if ((b & 0x80) == 0)
00470                 {
00471                     return ret;
00472                 }
00473             }
00474             // Still haven't seen a byte with the high bit unset? Dodgy data.
00475             throw new IOException("Invalid 7-bit encoded integer in stream.");
00476         }
00477
00485         public int ReadBigEndian7BitEncodedInt()
00486         {
00487             CheckDisposed();
00488
00489             int ret=0;
00490             for (int i=0; i < 5; i++)
00491             {
00492                 int b = stream.ReadByte();
00493                 if (b==-1)
00494                 {
00495                     throw new EndOfStreamException();
00496                 }
00497                 ret = (ret << 7) | (b&0x7f);
00498                 if ((b & 0x80) == 0)
00499                 {
00500                     return ret;
00501                 }
00502             }
00503             // Still haven't seen a byte with the high bit unset? Dodgy data.
00504             throw new IOException("Invalid 7-bit encoded integer in stream.");
00505         }
00506
00514         public string ReadString()
00515         {
00516             int bytesToRead = Read7BitEncodedInt();
00517
00518             byte[] data = new byte[bytesToRead];
00519             ReadInternal(data, bytesToRead);
00520             return encoding.GetString(data, 0, data.Length);
00521         }
00522
00523         #endregion
00524
00525         #region Private methods
00526
00527
00528
00529         void CheckDisposed()
00530         {
00531             if (disposed)
00532             {
00533                 throw new ObjectDisposedException("EndianBinaryReader");
00534             }
00535         }
00536
00543         void ReadInternal (byte[] data, int size)
00544         {
00545             CheckDisposed();
00546             int index=0;
00547             while (index < size)
00548             {
00549                 int read = stream.Read(data, index, size-index);
00550                 if (read==0)
00551                 {
00552                     throw new EndOfStreamException
00553                         (String.Format("End of stream reached with {0} byte{1} left to read.", size-index,
00554                         size-index==1 ? "s" : ""));
00555                 }
00556                 index += read;
00557             }
00558         }
00559
00568         int TryReadInternal (byte[] data, int size)
00569         {
00570             CheckDisposed();
00571             int index=0;
00572             while (index < size)
00573             {
00574                 int read = stream.Read(data, index, size-index);
00575                 if (read==0)
00576                 {
00577                     return index;
00578                 }
00579                 index += read;
00580             }
00581             return index;
00582         }
00583         #endregion
00584
00585         #region IDisposable Members
00586
00587
00588
00589         public void Dispose()
00590         {
00591             if (!disposed)
00592             {
00593                 disposed = true;
00594                 ((IDisposable)stream).Dispose();
00595             }
00596         }
00597         #endregion
00598     }
00599 }
Generated on Fri Sep 22 2017 10:35:16 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: MiscUtil/IO/EndianBinaryWriter.cs Source File

  • File List
MiscUtil/IO/EndianBinaryWriter.cs
Go to the documentation of this file.
00001 using System;
00002 using System.IO;
00003 using System.Text;
00004 using MiscUtil.Conversion;
00005
00006 namespace MiscUtil.IO
00007 {
00012     public class EndianBinaryWriter : IDisposable
00013     {
00014         #region Fields not directly related to properties
00015
00016
00017
00018         bool disposed=false;
00022         byte[] buffer = new byte[16];
00026         char[] charBuffer = new char[1];
00027         #endregion
00028
00029         #region Constructors
00030
00031
00032
00033
00034
00035
00036         public EndianBinaryWriter (EndianBitConverter bitConverter,
00037             Stream stream) : this (bitConverter, stream, Encoding.UTF8)
00038         {
00039         }
00040
00048         public EndianBinaryWriter (EndianBitConverter bitConverter,    Stream stream, Encoding encoding)
00049         {
00050             if (bitConverter==null)
00051             {
00052                 throw new ArgumentNullException("bitConverter");
00053             }
00054             if (stream==null)
00055             {
00056                 throw new ArgumentNullException("stream");
00057             }
00058             if (encoding==null)
00059             {
00060                 throw new ArgumentNullException("encoding");
00061             }
00062             if (!stream.CanWrite)
00063             {
00064                 throw new ArgumentException("Stream isn't writable", "stream");
00065             }
00066             this.stream = stream;
00067             this.bitConverter = bitConverter;
00068             this.encoding = encoding;
00069         }
00070         #endregion
00071
00072         #region Properties
00073         EndianBitConverter bitConverter;
00077         public EndianBitConverter BitConverter
00078         {
00079             get { return bitConverter; }
00080         }
00081
00082         Encoding encoding;
00086         public Encoding Encoding
00087         {
00088             get { return encoding; }
00089         }
00090
00091         Stream stream;
00095         public Stream BaseStream
00096         {
00097             get { return stream; }
00098         }
00099         #endregion
00100
00101         #region Public methods
00102
00103
00104
00105         public void Close()
00106         {
00107             Dispose();
00108         }
00109
00113         public void Flush()
00114         {
00115             CheckDisposed();
00116             stream.Flush();
00117         }
00118
00124         public void Seek (int offset, SeekOrigin origin)
00125         {
00126             CheckDisposed();
00127             stream.Seek (offset, origin);
00128         }
00129
00134         public void Write (bool value)
00135         {
00136             bitConverter.CopyBytes(value, buffer, 0);
00137             WriteInternal(buffer, 1);
00138         }
00139
00145         public void Write (short value)
00146         {
00147             bitConverter.CopyBytes(value, buffer, 0);
00148             WriteInternal(buffer, 2);
00149         }
00150
00156         public void Write (int value)
00157         {
00158             bitConverter.CopyBytes(value, buffer, 0);
00159             WriteInternal(buffer, 4);
00160         }
00161
00167         public void Write (long value)
00168         {
00169             bitConverter.CopyBytes(value, buffer, 0);
00170             WriteInternal(buffer, 8);
00171         }
00172
00178         public void Write (ushort value)
00179         {
00180             bitConverter.CopyBytes(value, buffer, 0);
00181             WriteInternal(buffer, 2);
00182         }
00183
00189         public void Write (uint value)
00190         {
00191             bitConverter.CopyBytes(value, buffer, 0);
00192             WriteInternal(buffer, 4);
00193         }
00194
00200         public void Write (ulong value)
00201         {
00202             bitConverter.CopyBytes(value, buffer, 0);
00203             WriteInternal(buffer, 8);
00204         }
00205
00211         public void Write (float value)
00212         {
00213             bitConverter.CopyBytes(value, buffer, 0);
00214             WriteInternal(buffer, 4);
00215         }
00216
00222         public void Write (double value)
00223         {
00224             bitConverter.CopyBytes(value, buffer, 0);
00225             WriteInternal(buffer, 8);
00226         }
00227
00233         public void Write (decimal value)
00234         {
00235             bitConverter.CopyBytes(value, buffer, 0);
00236             WriteInternal(buffer, 16);
00237         }
00238
00243         public void Write (byte value)
00244         {
00245             buffer[0] = value;
00246             WriteInternal(buffer, 1);
00247         }
00248
00253         public void Write (sbyte value)
00254         {
00255             buffer[0] = unchecked((byte)value);
00256             WriteInternal(buffer, 1);
00257         }
00258
00263         public void Write (byte[] value)
00264         {
00265             if (value == null)
00266             {
00267                 throw (new System.ArgumentNullException("value"));
00268             }
00269             WriteInternal(value, value.Length);
00270         }
00271
00278         public void Write (byte[] value, int offset, int count)
00279         {
00280             CheckDisposed();
00281             stream.Write(value, offset, count);
00282         }
00283
00288         public void Write(char value)
00289         {
00290             charBuffer[0] = value;
00291             Write(charBuffer);
00292         }
00293
00298         public void Write(char[] value)
00299         {
00300             if (value==null)
00301             {
00302                 throw new ArgumentNullException("value");
00303             }
00304             CheckDisposed();
00305             byte[] data = Encoding.GetBytes(value, 0, value.Length);
00306             WriteInternal(data, data.Length);
00307         }
00308
00314         public void Write(string value)
00315         {
00316             if (value==null)
00317             {
00318                 throw new ArgumentNullException("value");
00319             }
00320             CheckDisposed();
00321             byte[] data = Encoding.GetBytes(value);
00322             Write7BitEncodedInt(data.Length);
00323             WriteInternal(data, data.Length);
00324         }
00325
00332         public void Write7BitEncodedInt(int value)
00333         {
00334             CheckDisposed();
00335             if (value < 0)
00336             {
00337                 throw new ArgumentOutOfRangeException("value", "Value must be greater than or equal to 0.");
00338             }
00339             int index=0;
00340             while (value >= 128)
00341             {
00342                 buffer[index++]= (byte)((value&0x7f) | 0x80);
00343                 value = value >> 7;
00344                 index++;
00345             }
00346             buffer[index++]=(byte)value;
00347             stream.Write(buffer, 0, index);
00348         }
00349
00350         #endregion
00351
00352         #region Private methods
00353
00354
00355
00356         void CheckDisposed()
00357         {
00358             if (disposed)
00359             {
00360                 throw new ObjectDisposedException("EndianBinaryWriter");
00361             }
00362         }
00363
00370         void WriteInternal (byte[] bytes, int length)
00371         {
00372             CheckDisposed();
00373             stream.Write(bytes, 0, length);
00374         }
00375         #endregion
00376
00377         #region IDisposable Members
00378
00379
00380
00381         public void Dispose()
00382         {
00383             if (!disposed)
00384             {
00385                 Flush();
00386                 disposed = true;
00387                 ((IDisposable)stream).Dispose();
00388             }
00389         }
00390         #endregion
00391     }
00392 }
Generated on Fri Sep 22 2017 10:35:16 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: MiscUtil/Conversion/EndianBitConverter.cs Source File

  • File List
MiscUtil/Conversion/EndianBitConverter.cs
Go to the documentation of this file.
00001 using System;
00002 using System.Runtime.InteropServices;
00003
00004 namespace MiscUtil.Conversion
00005 {
00009     public abstract class EndianBitConverter
00010     {
00011         #region Endianness of this converter
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021         public abstract bool IsLittleEndian();
00022
00026         public abstract Endianness Endianness { get; }
00027         #endregion
00028
00029         #region Factory properties
00030         static LittleEndianBitConverter little = new LittleEndianBitConverter();
00035         public static LittleEndianBitConverter Little
00036         {
00037             get { return little; }
00038         }
00039
00040         static BigEndianBitConverter big = new BigEndianBitConverter();
00045         public static BigEndianBitConverter Big
00046         {
00047             get { return big; }
00048         }
00049         #endregion
00050
00051         #region Double/primitive conversions
00052
00053
00054
00055
00056
00057
00058
00059         public long DoubleToInt64Bits(double value)
00060         {
00061             return BitConverter.DoubleToInt64Bits(value);
00062         }
00063
00071         public double Int64BitsToDouble (long value)
00072         {
00073             return BitConverter.Int64BitsToDouble(value);
00074         }
00075
00083         public int SingleToInt32Bits(float value)
00084         {
00085             return new Int32SingleUnion(value).AsInt32;
00086         }
00087
00095         public float Int32BitsToSingle (int value)
00096         {
00097             return new Int32SingleUnion(value).AsSingle;
00098         }
00099         #endregion
00100
00101         #region To(PrimitiveType) conversions
00102
00103
00104
00105
00106
00107
00108         public bool ToBoolean (byte[] value, int startIndex)
00109         {
00110             CheckByteArgument(value, startIndex, 1);
00111             return BitConverter.ToBoolean(value, startIndex);
00112         }
00113
00120         public char ToChar (byte[] value, int startIndex)
00121         {
00122             return unchecked((char) (CheckedFromBytes(value, startIndex, 2)));
00123         }
00124
00132         public double ToDouble (byte[] value, int startIndex)
00133         {
00134             return Int64BitsToDouble(ToInt64(value, startIndex));
00135         }
00136
00144         public float ToSingle (byte[] value, int startIndex)
00145         {
00146             return Int32BitsToSingle(ToInt32(value, startIndex));
00147         }
00148
00155         public short ToInt16 (byte[] value, int startIndex)
00156         {
00157             return unchecked((short) (CheckedFromBytes(value, startIndex, 2)));
00158         }
00159
00166         public int ToInt32 (byte[] value, int startIndex)
00167         {
00168             return unchecked((int) (CheckedFromBytes(value, startIndex, 4)));
00169         }
00170
00177         public long ToInt64 (byte[] value, int startIndex)
00178         {
00179             return CheckedFromBytes(value, startIndex, 8);
00180         }
00181
00188         public ushort ToUInt16 (byte[] value, int startIndex)
00189         {
00190             return unchecked((ushort) (CheckedFromBytes(value, startIndex, 2)));
00191         }
00192
00199         public uint ToUInt32 (byte[] value, int startIndex)
00200         {
00201             return unchecked((uint) (CheckedFromBytes(value, startIndex, 4)));
00202         }
00203
00210         public ulong ToUInt64 (byte[] value, int startIndex)
00211         {
00212             return unchecked((ulong) (CheckedFromBytes(value, startIndex, 8)));
00213         }
00214
00225         static void CheckByteArgument(byte[] value, int startIndex, int bytesRequired)
00226         {
00227             if (value==null)
00228             {
00229                 throw new ArgumentNullException("value");
00230             }
00231             if (startIndex < 0 || startIndex > value.Length-bytesRequired)
00232             {
00233                 throw new ArgumentOutOfRangeException("startIndex");
00234             }
00235         }
00236
00245         long CheckedFromBytes(byte[] value, int startIndex, int bytesToConvert)
00246         {
00247             CheckByteArgument(value, startIndex, bytesToConvert);
00248             return FromBytes(value, startIndex, bytesToConvert);
00249         }
00250
00260         protected abstract long FromBytes(byte[] value, int startIndex, int bytesToConvert);
00261         #endregion
00262
00263         #region ToString conversions
00264
00265
00266
00267
00268
00269
00270
00271
00272
00273         public static string ToString(byte[] value)
00274         {
00275             return BitConverter.ToString(value);
00276         }
00277
00288         public static string ToString(byte[] value, int startIndex)
00289         {
00290             return BitConverter.ToString(value, startIndex);
00291         }
00292
00304         public static string ToString(byte[] value, int startIndex, int length)
00305         {
00306             return BitConverter.ToString(value, startIndex, length);
00307         }
00308         #endregion
00309
00310         #region    Decimal conversions
00311
00312
00313
00314
00315
00316
00317
00318         public decimal ToDecimal (byte[] value, int startIndex)
00319         {
00320             // HACK: This always assumes four parts, each in their own endianness,
00321             // starting with the first part at the start of the byte array.
00322             // On the other hand, there's no real format specified...
00323             int[] parts = new int[4];
00324             for (int i=0; i < 4; i++)
00325             {
00326                 parts[i] = ToInt32(value, startIndex+i*4);
00327             }
00328             return new Decimal(parts);
00329         }
00330
00336         public byte[] GetBytes(decimal value)
00337         {
00338             byte[] bytes = new byte[16];
00339             int[] parts = decimal.GetBits(value);
00340             for (int i=0; i < 4; i++)
00341             {
00342                 CopyBytesImpl(parts[i], 4, bytes, i*4);
00343             }
00344             return bytes;
00345         }
00346
00354         public void CopyBytes(decimal value, byte[] buffer, int index)
00355         {
00356             int[] parts = decimal.GetBits(value);
00357             for (int i=0; i < 4; i++)
00358             {
00359                 CopyBytesImpl(parts[i], 4, buffer, i*4+index);
00360             }
00361         }
00362         #endregion
00363
00364         #region GetBytes conversions
00365
00366
00367
00368
00369
00370
00371
00372         byte[] GetBytes(long value, int bytes)
00373         {
00374             byte[] buffer = new byte[bytes];
00375             CopyBytes(value, bytes, buffer, 0);
00376             return buffer;
00377         }
00378
00384         public byte[] GetBytes(bool value)
00385         {
00386             return BitConverter.GetBytes(value);
00387         }
00388
00394         public byte[] GetBytes(char value)
00395         {
00396             return GetBytes(value, 2);
00397         }
00398
00404         public byte[] GetBytes(double value)
00405         {
00406             return GetBytes(DoubleToInt64Bits(value), 8);
00407         }
00408
00414         public byte[] GetBytes(short value)
00415         {
00416             return GetBytes(value, 2);
00417         }
00418
00424         public byte[] GetBytes(int value)
00425         {
00426             return GetBytes(value, 4);
00427         }
00428
00434         public byte[] GetBytes(long value)
00435         {
00436             return GetBytes(value, 8);
00437         }
00438
00444         public byte[] GetBytes(float value)
00445         {
00446             return GetBytes(SingleToInt32Bits(value), 4);
00447         }
00448
00454         public byte[] GetBytes(ushort value)
00455         {
00456             return GetBytes(value, 2);
00457         }
00458
00464         public byte[] GetBytes(uint value)
00465         {
00466             return GetBytes(value, 4);
00467         }
00468
00474         public byte[] GetBytes(ulong value)
00475         {
00476             return GetBytes(unchecked((long)value), 8);
00477         }
00478
00479         #endregion
00480
00481         #region CopyBytes conversions
00482
00483
00484
00485
00486
00487
00488
00489
00490
00491
00492         void CopyBytes(long value, int bytes, byte[] buffer, int index)
00493         {
00494             if (buffer==null)
00495             {
00496                 throw new ArgumentNullException("buffer", "Byte array must not be null");
00497             }
00498             if (buffer.Length < index+bytes)
00499             {
00500                 throw new ArgumentOutOfRangeException("Buffer not big enough for value");
00501             }
00502             CopyBytesImpl(value, bytes, buffer, index);
00503         }
00504
00516         protected abstract void CopyBytesImpl(long value, int bytes, byte[] buffer, int index);
00517
00525         public void CopyBytes(bool value, byte[] buffer, int index)
00526         {
00527             CopyBytes(value ? 1 : 0, 1, buffer, index);
00528         }
00529
00537         public void CopyBytes(char value, byte[] buffer, int index)
00538         {
00539             CopyBytes(value, 2, buffer, index);
00540         }
00541
00549         public void CopyBytes(double value, byte[] buffer, int index)
00550         {
00551             CopyBytes(DoubleToInt64Bits(value), 8, buffer, index);
00552         }
00553
00561         public void CopyBytes(short value, byte[] buffer, int index)
00562         {
00563             CopyBytes(value, 2, buffer, index);
00564         }
00565
00573         public void CopyBytes(int value, byte[] buffer, int index)
00574         {
00575             CopyBytes(value, 4, buffer, index);
00576         }
00577
00585         public void CopyBytes(long value, byte[] buffer, int index)
00586         {
00587             CopyBytes(value, 8, buffer, index);
00588         }
00589
00597         public void CopyBytes(float value, byte[] buffer, int index)
00598         {
00599             CopyBytes(SingleToInt32Bits(value), 4, buffer, index);
00600         }
00601
00609         public void CopyBytes(ushort value, byte[] buffer, int index)
00610         {
00611             CopyBytes(value, 2, buffer, index);
00612         }
00613
00621         public void CopyBytes(uint value, byte[] buffer, int index)
00622         {
00623             CopyBytes(value, 4, buffer, index);
00624         }
00625
00633         public void CopyBytes(ulong value, byte[] buffer, int index)
00634         {
00635             CopyBytes(unchecked((long)value), 8, buffer, index);
00636         }
00637
00638         #endregion
00639
00640         #region Private struct used for Single/Int32 conversions
00641
00642
00643
00644         [StructLayout(LayoutKind.Explicit)]
00645             struct Int32SingleUnion
00646         {
00650             [FieldOffset(0)]
00651             int i;
00655             [FieldOffset(0)]
00656             float f;
00657
00662             internal Int32SingleUnion(int i)
00663             {
00664                 this.f = 0; // Just to keep the compiler happy
00665                 this.i = i;
00666             }
00667
00672             internal Int32SingleUnion(float f)
00673             {
00674                 this.i = 0; // Just to keep the compiler happy
00675                 this.f = f;
00676             }
00677
00681             internal int AsInt32
00682             {
00683                 get { return i; }
00684             }
00685
00689             internal float AsSingle
00690             {
00691                 get { return f; }
00692             }
00693         }
00694         #endregion
00695     }
00696 }
Generated on Fri Sep 22 2017 10:35:16 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: MiscUtil/Conversion/Endianness.cs File Reference

  • File List
Namespaces | Enumerations
MiscUtil/Conversion/Endianness.cs File Reference

Go to the source code of this file.

Namespaces

package | MiscUtil.Conversion

Enumerations

enum | MiscUtil.Conversion.Endianness { MiscUtil.Conversion.LittleEndian, MiscUtil.Conversion.BigEndian }
Endianness of a converter. More...
Generated on Fri Sep 22 2017 10:35:16 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: MiscUtil/Conversion/Endianness.cs Source File

  • File List
MiscUtil/Conversion/Endianness.cs
Go to the documentation of this file.
00001
00002 namespace MiscUtil.Conversion
00003 {
00007     public enum Endianness
00008     {
00012         LittleEndian,
00016         BigEndian
00017     }
00018 }
Generated on Fri Sep 22 2017 10:35:16 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: FW6/FW6Device.cs Source File

  • File List
FW6/FW6Device.cs
Go to the documentation of this file.
00001 ﻿using System;
00002 using System.Collections.Generic;
00003 using System.Text;
00004 using System.IO;
00005
00006 namespace csRepeat.FW6
00007 {
00008     public abstract class FW6Device : DPDevice
00009     {
00010
00011         protected abstract void Connect();
00012         protected abstract void Disconnect();
00013
00020         protected AckResponse SendAndWaitForAck(FW6Packet packetToSend, int timeoutMS)
00021         {
00022             int delayBeforeReadMS = 0;
00023             return SendAndWaitForAck(packetToSend, delayBeforeReadMS, timeoutMS);
00024         }
00025
00032         protected AckResponse SendAndWaitForAck(FW6Packet packetToSend, int delayBeforeReadMS, int timeoutMS)
00033         {
00034             FW6Packet packet = SendAndGetResponse(packetToSend, delayBeforeReadMS, timeoutMS);
00035
00036             if (packet is AckResponse)
00037             {
00038                 return packet as AckResponse;
00039             }
00040             else
00041             {
00042                 return null;
00043             }
00044         }
00045
00052         protected abstract FW6Packet SendAndGetResponse(FW6Packet packetToSend, int timeoutMS);
00053
00061         protected abstract FW6Packet SendAndGetResponse(FW6Packet packetToSend, int delayBeforeReadMS, int timeoutMS);
00062
00066         protected abstract int DataPacketAckTimeoutMS
00067         {
00068             get;
00069         }
00070
00071         public abstract int mcaChannels
00072         {
00073             get;
00074             set;
00075         }
00076
00077         public FW6Device(InterfaceTypes interfaceType,
00078                          DeviceTypes deviceType,
00079                          Version firmwareVersion,
00080                          Version fpgaVersion,
00081                          string serialNumber)
00082             : base(interfaceType, deviceType,
00083                    firmwareVersion, fpgaVersion,
00084                    serialNumber)
00085         {
00086         }
00087
00091         internal void UpdateFpgaState()
00092         {
00093             try
00094             {
00095                 // connect
00096                 Connect();
00097
00098                 // we can detect unprogrammed FPGAs for FW6 devices by attempting to retrieve the spectrum
00099                 SpectrumRequest spectrumRequest = new SpectrumRequest();
00100                 FW6Packet response = SendAndGetResponse(spectrumRequest, DataPacketAckTimeoutMS);
00101                 if (!(response is SpectrumResponse))
00102                 {
00103                     FpgaState = FpgaStates.Unprogrammed;
00104                 }
00105             }
00106             finally
00107             {
00108                 Disconnect();
00109             }
00110         }
00111
00112         public DiagnosticResponse GetDiagnosticResponse
00113         {
00114             get
00115             {
00116                 try
00117                 {
00118                     Connect();
00119
00120                     // retrieve the device calibration values via the DiagnosticRequest command
00121                     DiagnosticRequest diagnosticRequest = new DiagnosticRequest();
00122
00123                     int responseTimeoutMS = 2500; // spec says maximum of 2.5 seconds before the response
00124                     FW6Packet response = SendAndGetResponse(diagnosticRequest, responseTimeoutMS);
00125                     if (response is DiagnosticResponse)
00126                     {
00127                         return response as DiagnosticResponse;
00128                     }
00129                     else
00130                     {
00131                         return null;
00132                     }
00133                 }
00134                 finally
00135                 {
00136                     Disconnect();
00137                 }
00138             }
00139         }
00140
00141         public void SetAdcCalibration(byte adcGain, byte adcOffset)
00142         {
00143             try
00144             {
00145                 Connect();
00146
00147                 SetADCCalibrationRequest setAdcCalibrationRequest = new SetADCCalibrationRequest(adcGain, adcOffset);
00148
00149                 AckResponse ackResponse = SendAndWaitForAck(setAdcCalibrationRequest, DataPacketAckTimeoutMS);
00150
00151                 if (ackResponse.AckType != AckResponse.AckTypes.Ok)
00152                 {
00153                     InvalidOperationException exception = new System.InvalidOperationException("ack response of " + ackResponse.AckType);
00154                     throw exception;
00155                 }
00156             }
00157             finally
00158             {
00159                 Disconnect();
00160             }
00161         }
00162
00163         public void SetuCTemperatureCalibration(byte uCTempCalibration)
00164         {
00165             try
00166             {
00167                 Connect();
00168
00169                 SetuCTemperatureCalibrationRequest setuCTemperatureCalibrationRequest = new SetuCTemperatureCalibrationRequest(uCTempCalibration);
00170
00171                 AckResponse ackResponse = SendAndWaitForAck(setuCTemperatureCalibrationRequest, DataPacketAckTimeoutMS);
00172
00173                 if (ackResponse.AckType != AckResponse.AckTypes.Ok)
00174                 {
00175                     InvalidOperationException exception = new System.InvalidOperationException("ack response of " + ackResponse.AckType);
00176                     throw exception;
00177                 }
00178             }
00179             finally
00180             {
00181                 Disconnect();
00182             }
00183         }
00184
00185         public void SetPZCorrection(byte pzCorrection)
00186         {
00187             try
00188             {
00189                 Connect();
00190
00191                 SetPZCorrectionRequest setPZCorrection = new SetPZCorrectionRequest(pzCorrection);
00192
00193                 AckResponse ackResponse = SendAndWaitForAck(setPZCorrection, DataPacketAckTimeoutMS);
00194
00195                 if (ackResponse.AckType != AckResponse.AckTypes.Ok)
00196                 {
00197                     InvalidOperationException exception = new System.InvalidOperationException("ack response of " + ackResponse.AckType);
00198                     throw exception;
00199                 }
00200             }
00201             finally
00202             {
00203                 Disconnect();
00204             }
00205         }
00206
00207         public void SetDCalCalibration(ushort dcalValue)
00208         {
00209             try
00210             {
00211                 Connect();
00212
00213                 SetDCalRequest setDCalCalibration = new SetDCalRequest(dcalValue);
00214
00215                 AckResponse ackResponse = SendAndWaitForAck(setDCalCalibration, DataPacketAckTimeoutMS);
00216
00217                 if (ackResponse.AckType != AckResponse.AckTypes.Ok)
00218                 {
00219                     InvalidOperationException exception = new System.InvalidOperationException("ack response of " + ackResponse.AckType);
00220                     throw exception;
00221                 }
00222             }
00223             finally
00224             {
00225                 Disconnect();
00226             }
00227         }
00228
00229         public abstract bool ConnectForTesting();
00230         public abstract void DisconnectForTesting();
00231
00232         public abstract bool StartDppData();
00233         public abstract bool PauseDppData();
00234         public abstract bool ClearDppData();
00235
00236         public abstract bool GetConfiguration(string strCommands, ref byte[] readBuffer, out uint bytesRead);
00237         public abstract string GetFullConfiguration(bool PC5_PRESENT, int DppType, bool isDP5_RevDxGains, byte DPP_ECO);
00238         public abstract string DisplayConfiguration(string strCommands);
00239         public abstract bool SendConfiguration(string strCommands);
00240
00241         public abstract bool GetRawStatus(ref byte[] readBuffer, out uint bytesRead);
00242         public abstract bool GetSpectrumData(ref byte[] readBuffer, out uint bytesRead);
00243
00244     }
00245 }
Generated on Fri Sep 22 2017 10:35:16 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: FW6/FW6DppStatus.cs Source File

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


DPP csDP5 WinUSB RS232: FW6/FW6Packet.cs Source File

  • File List
FW6/FW6Packet.cs
Go to the documentation of this file.
00001 ﻿using System;
00002 using System.Collections.Generic;
00003 using System.Text;
00004 using System.IO;
00005
00006 namespace csRepeat.FW6
00007 {
00014     public abstract class FW6Packet
00015     {
00019         public const int PID1Offset = 2;
00020
00024         public const int PID2Offset = 3;
00025
00029         public const int PacketHeaderLength = 2 + 2 + 2; // 2 sync bytes + 2 pid bytes + 2 length bytes
00030
00034         public const int ChecksumLength = 2;
00035
00036         public static UInt16 Calculate16bitChecksum(byte[] array, int length)
00037         {
00038             UInt16 sum = 0;
00039
00040             for (int x = 0; x < length; x++)
00041             {
00042                 sum += array[x];
00043             }
00044
00045             return (UInt16)(sum & 0xFFFF);
00046         }
00047
00048         public abstract byte PID1
00049         {
00050             get;
00051         }
00052
00053         public abstract byte PID2
00054         {
00055             get;
00056         }
00057
00061         public abstract byte[] Data
00062         {
00063             get;
00064         }
00065
00066         public byte SYNC1
00067         {
00068             get
00069             {
00070                 return 0xF5;
00071             }
00072         }
00073
00074         public byte SYNC2
00075         {
00076             get
00077             {
00078                 return 0xFA;
00079             }
00080         }
00081
00082         public byte[] EncodedPacket
00083         {
00084             get
00085             {
00086                 // build the output packet
00087                 MemoryStream outputMemoryStream = new MemoryStream();
00088                 BinaryWriter outputBinaryWriter = new BinaryWriter(outputMemoryStream);
00089
00090                 outputBinaryWriter.Write(SYNC1);
00091                 outputBinaryWriter.Write(SYNC2);
00092                 outputBinaryWriter.Write(PID1);
00093                 outputBinaryWriter.Write(PID2);
00094
00095                 if (Data == null)
00096                 {
00097                     outputBinaryWriter.Write((byte)0x0);
00098                     outputBinaryWriter.Write((byte)0x0);
00099                 }
00100                 else
00101                 {
00102                     outputBinaryWriter.Write((byte)(Data.Length >> 8)); // length msb
00103                     outputBinaryWriter.Write((byte)(Data.Length & 0xFF)); // length lsb
00104                 }
00105
00106                 if (Data != null)
00107                 {
00108                     outputBinaryWriter.Write(Data);
00109                 }
00110
00111                 // calculate the checksum of the packet thus far
00112                 byte[] packetArray = outputMemoryStream.ToArray();
00113                 ushort checksum = Calculate16bitChecksum(packetArray, packetArray.Length);
00114
00115                 // generate the output value
00116                 checksum = (UInt16)((Int16)(-checksum));
00117
00118                 // append the checksum
00119                 outputBinaryWriter.Write((byte)(checksum >> 8));
00120                 outputBinaryWriter.Write((byte)(checksum & 0xFF));
00121
00122                 return outputMemoryStream.ToArray();
00123             }
00124         }
00125
00126         public override string ToString()
00127         {
00128             return base.ToString() + string.Format(" PID1: {0}, PID2: {1}", PID1, PID2);
00129         }
00130     }
00131 }
Generated on Fri Sep 22 2017 10:35:16 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: FW6/FW6PacketParser.cs Source File

  • File List
FW6/FW6PacketParser.cs
Go to the documentation of this file.
00001 ﻿using System;
00002 using System.Collections.Generic;
00003 using System.Text;
00004 using System.IO;
00005
00006 namespace csRepeat.FW6
00007 {
00008     class FW6PacketParser
00009     {
00010         private MemoryStream memoryStream;
00011         private BinaryWriter binaryWriter;
00012
00013         public enum HandleStates
00014         {
00015             NeedMoreData,
00016             CommandComplete,
00017             InvalidChecksum
00018         }
00019
00020         private const int lengthMsbOffset = 4;
00021         private const int lengthLsbOffset = 5;
00022
00023         public FW6PacketParser()
00024         {
00025             memoryStream = new MemoryStream();
00026             binaryWriter = new BinaryWriter(memoryStream);
00027         }
00028
00029         public FW6Packet HandleBytes(out HandleStates state, byte[] data, int dataLength)
00030         {
00031             binaryWriter.Write(data, 0, dataLength);
00032
00033             // do we have enough bytes to determine its overall length?
00034             byte[] array = memoryStream.ToArray();
00035             int packetDataLength = 0;
00036             if (memoryStream.Length > 6)
00037             {
00038                 packetDataLength = (array[lengthMsbOffset] << 8) + array[lengthLsbOffset];
00039             }
00040             else
00041             {
00042                 state = HandleStates.NeedMoreData;
00043                 return null;
00044             }
00045
00046             // do we have all of the bytes?
00047             int expectedTotalLength = FW6Packet.PacketHeaderLength + packetDataLength + FW6Packet.ChecksumLength;
00048             if (expectedTotalLength == array.Length)
00049             {
00050                 // make sure the checksum is valid
00051                 ushort packetChecksum = FW6Packet.Calculate16bitChecksum(array, expectedTotalLength - 2);
00052                 UInt16 checksumEntry = (UInt16)((array[expectedTotalLength - 2] << 8) + array[expectedTotalLength - 1]);
00053                 packetChecksum += checksumEntry;
00054
00055                 if (packetChecksum != 0)
00056                 {
00057                     state = HandleStates.InvalidChecksum;
00058                     return null;
00059                 }
00060
00061                 // parse this packet and return it
00062                 byte pid1 = array[FW6Packet.PID1Offset];
00063                 byte pid2 = array[FW6Packet.PID2Offset];
00064
00065                 if (ConfigurationResponse.IsMatch(pid1, pid2))
00066                 {
00067                     state = HandleStates.CommandComplete;
00068                     return new ConfigurationResponse(array);
00069                 }
00070                 else if (StatusResponse.IsMatch(pid1, pid2))
00071                 {
00072                     state = HandleStates.CommandComplete;
00073                     return new StatusResponse(array);
00074                 }
00075                 else if (AckResponse.IsMatch(pid1, pid2))
00076                 {
00077                     state = HandleStates.CommandComplete;
00078                     return new AckResponse(array);
00079                 }
00080                 else if (DiagnosticResponse.IsMatch(pid1, pid2))
00081                 {
00082                     state = HandleStates.CommandComplete;
00083                     return new DiagnosticResponse(array);
00084                 }
00085                 else if (SpectrumResponse.IsMatch(pid1, pid2))
00086                 {
00087                     state = HandleStates.CommandComplete;
00088                     return new SpectrumResponse(array);
00089                 }
00090                 else
00091                 {
00092                     throw new System.NotImplementedException(string.Format("unable to parse pid1 {0:x}, pid2 {1:x}",
00093                                                              pid1, pid2));
00094                 }
00095             }
00096             else if (array.Length > expectedTotalLength)
00097             {
00098                 throw new System.InvalidOperationException("too many bytes");
00099             }
00100             else
00101             {
00102                 state = HandleStates.NeedMoreData;
00103                 return null;
00104             }
00105         }
00106     }
00107 }
Generated on Fri Sep 22 2017 10:35:16 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: WinUsb/FileIOApi.cs Source File

  • File List
WinUsb/FileIOApi.cs
Go to the documentation of this file.
00001 using System;
00002 using Microsoft.Win32.SafeHandles;
00003 using System.Runtime.InteropServices;
00004
00005 namespace WinUsb
00006 {
00010
00011         sealed internal class FileIO
00012         {
00013                 internal const Int32 FILE_ATTRIBUTE_NORMAL = 0X80;
00014                 internal const Int32 FILE_FLAG_OVERLAPPED = 0X40000000;
00015                 internal const Int32 FILE_SHARE_READ = 1;
00016                 internal const Int32 FILE_SHARE_WRITE = 2;
00017                 internal const UInt32 GENERIC_READ = 0X80000000;
00018                 internal const UInt32 GENERIC_WRITE = 0X40000000;
00019                 internal const Int32 INVALID_HANDLE_VALUE = -1;
00020                 internal const Int32 OPEN_EXISTING = 3;
00021
00022                 [DllImport("kernel32.dll", SetLastError = true, CharSet = CharSet.Auto)]
00023                 internal static extern SafeFileHandle CreateFile(String lpFileName, UInt32 dwDesiredAccess, Int32 dwShareMode, IntPtr lpSecurityAttributes, Int32 dwCreationDisposition, Int32 dwFlagsAndAttributes, Int32 hTemplateFile);
00024     }
00025
00026 }
Generated on Fri Sep 22 2017 10:35:16 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Form1.cs Source File

  • File List
Form1.cs
Go to the documentation of this file.
00001 using System;
00002 using System.IO;
00003 using System.Text;
00004 using System.Drawing;
00005 using System.Collections;
00006 using System.ComponentModel;
00007 using System.Windows.Forms;
00008 using System.Data;
00009 using System.Drawing.Drawing2D;
00010 using System.Threading;
00011 using WinUsb;
00012 using csRepeat;
00013 using csRepeat.FW6;
00014 using System.Collections.Generic;
00015 using AsciiCmdUtilities;
00016
00017 namespace csDP5
00018 {
00019
00023         public unsafe class Form1 : System.Windows.Forms.Form
00024     {
00025         private System.Windows.Forms.PictureBox picPlot;
00026         public Button buttonFindUsbDevices;
00030                 private System.ComponentModel.Container components = null;
00031
00032         private const String WINUSB_GUID_STRING = "{5A8ED6A1-7FC3-4b6a-A536-95DF35D03448}";
00033         private Label labelFW6Devices;
00034         private ListBox listboxDevices;
00035         public Button buttonRunFW6Tests;
00036         private TabControl tabControl1;
00037         private TabPage tabStatus;
00038         private TabPage tabCfgInit;
00039         private TabPage tabCfgTest;
00040         private Label label5;
00041         private Label lblChannels;
00042         private Label labelPlot;
00043         private TextBox textCfgInit;
00044         private TextBox textCfgTest;
00045         private TextBox textStatus;
00046
00047         //  Convert the device interface GUID String to a GUID object:
00048         private static Guid winUsbGuid = new System.Guid(WINUSB_GUID_STRING);
00049
00050
00051                 public Form1()
00052                 {
00053                         //
00054                         // Required for Windows Form Designer support
00055                         //
00056                         InitializeComponent();
00057
00058                         //
00059                         // TODO: Add any constructor code after InitializeComponent call
00060                         //
00061                 }
00062
00066                 protected override void Dispose( bool disposing )
00067                 {
00068                         if( disposing )
00069                         {
00070                                 if (components != null)
00071                                 {
00072                                         components.Dispose();
00073                                 }
00074                         }
00075                         base.Dispose( disposing );
00076                 }
00077
00078                 #region Windows Form Designer generated code
00079
00080
00081
00082
00083                 private void InitializeComponent()
00084                 {
00085             this.picPlot = new System.Windows.Forms.PictureBox();
00086             this.buttonFindUsbDevices = new System.Windows.Forms.Button();
00087             this.labelFW6Devices = new System.Windows.Forms.Label();
00088             this.listboxDevices = new System.Windows.Forms.ListBox();
00089             this.buttonRunFW6Tests = new System.Windows.Forms.Button();
00090             this.tabControl1 = new System.Windows.Forms.TabControl();
00091             this.tabStatus = new System.Windows.Forms.TabPage();
00092             this.textStatus = new System.Windows.Forms.TextBox();
00093             this.label5 = new System.Windows.Forms.Label();
00094             this.lblChannels = new System.Windows.Forms.Label();
00095             this.labelPlot = new System.Windows.Forms.Label();
00096             this.tabCfgInit = new System.Windows.Forms.TabPage();
00097             this.textCfgInit = new System.Windows.Forms.TextBox();
00098             this.tabCfgTest = new System.Windows.Forms.TabPage();
00099             this.textCfgTest = new System.Windows.Forms.TextBox();
00100             ((System.ComponentModel.ISupportInitialize)(this.picPlot)).BeginInit();
00101             this.tabControl1.SuspendLayout();
00102             this.tabStatus.SuspendLayout();
00103             this.tabCfgInit.SuspendLayout();
00104             this.tabCfgTest.SuspendLayout();
00105             this.SuspendLayout();
00106             //
00107             // picPlot
00108             //
00109             this.picPlot.BackColor = System.Drawing.SystemColors.Window;
00110             this.picPlot.Location = new System.Drawing.Point(8, 254);
00111             this.picPlot.Name = "picPlot";
00112             this.picPlot.Size = new System.Drawing.Size(424, 256);
00113             this.picPlot.TabIndex = 9;
00114             this.picPlot.TabStop = false;
00115             //
00116             // buttonFindUsbDevices
00117             //
00118             this.buttonFindUsbDevices.Location = new System.Drawing.Point(10, 35);
00119             this.buttonFindUsbDevices.Name = "buttonFindUsbDevices";
00120             this.buttonFindUsbDevices.Size = new System.Drawing.Size(158, 24);
00121             this.buttonFindUsbDevices.TabIndex = 11;
00122             this.buttonFindUsbDevices.Text = "Find RS232/USB Devices";
00123             this.buttonFindUsbDevices.Click += new System.EventHandler(this.buttonFindUsbDevices_Click);
00124             //
00125             // labelFW6Devices
00126             //
00127             this.labelFW6Devices.AutoSize = true;
00128             this.labelFW6Devices.Location = new System.Drawing.Point(8, 99);
00129             this.labelFW6Devices.Name = "labelFW6Devices";
00130             this.labelFW6Devices.Size = new System.Drawing.Size(131, 13);
00131             this.labelFW6Devices.TabIndex = 13;
00132             this.labelFW6Devices.Text = "Select FW6 device to run:";
00133             //
00134             // listboxDevices
00135             //
00136             this.listboxDevices.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
00137                         | System.Windows.Forms.AnchorStyles.Right)));
00138             this.listboxDevices.BackColor = System.Drawing.SystemColors.Info;
00139             this.listboxDevices.FormattingEnabled = true;
00140             this.listboxDevices.Location = new System.Drawing.Point(8, 118);
00141             this.listboxDevices.Name = "listboxDevices";
00142             this.listboxDevices.Size = new System.Drawing.Size(424, 56);
00143             this.listboxDevices.TabIndex = 12;
00144             this.listboxDevices.SelectedIndexChanged += new System.EventHandler(this.listboxDevices_SelectedIndexChanged);
00145             //
00146             // buttonRunFW6Tests
00147             //
00148             this.buttonRunFW6Tests.Enabled = false;
00149             this.buttonRunFW6Tests.Location = new System.Drawing.Point(10, 64);
00150             this.buttonRunFW6Tests.Name = "buttonRunFW6Tests";
00151             this.buttonRunFW6Tests.Size = new System.Drawing.Size(158, 24);
00152             this.buttonRunFW6Tests.TabIndex = 14;
00153             this.buttonRunFW6Tests.Text = "Run FW6 Tests";
00154             this.buttonRunFW6Tests.Click += new System.EventHandler(this.buttonRunFW6Tests_Click);
00155             //
00156             // tabControl1
00157             //
00158             this.tabControl1.Controls.Add(this.tabStatus);
00159             this.tabControl1.Controls.Add(this.tabCfgInit);
00160             this.tabControl1.Controls.Add(this.tabCfgTest);
00161             this.tabControl1.Location = new System.Drawing.Point(438, 10);
00162             this.tabControl1.Name = "tabControl1";
00163             this.tabControl1.SelectedIndex = 0;
00164             this.tabControl1.Size = new System.Drawing.Size(329, 504);
00165             this.tabControl1.TabIndex = 16;
00166             //
00167             // tabStatus
00168             //
00169             this.tabStatus.Controls.Add(this.textStatus);
00170             this.tabStatus.Controls.Add(this.label5);
00171             this.tabStatus.Controls.Add(this.lblChannels);
00172             this.tabStatus.Controls.Add(this.labelPlot);
00173             this.tabStatus.Location = new System.Drawing.Point(4, 22);
00174             this.tabStatus.Name = "tabStatus";
00175             this.tabStatus.Padding = new System.Windows.Forms.Padding(3);
00176             this.tabStatus.Size = new System.Drawing.Size(321, 478);
00177             this.tabStatus.TabIndex = 0;
00178             this.tabStatus.Text = "Test Status";
00179             this.tabStatus.UseVisualStyleBackColor = true;
00180             //
00181             // textStatus
00182             //
00183             this.textStatus.Location = new System.Drawing.Point(6, 8);
00184             this.textStatus.Multiline = true;
00185             this.textStatus.Name = "textStatus";
00186             this.textStatus.ReadOnly = true;
00187             this.textStatus.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
00188             this.textStatus.Size = new System.Drawing.Size(309, 414);
00189             this.textStatus.TabIndex = 15;
00190             //
00191             // label5
00192             //
00193             this.label5.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
00194             this.label5.Location = new System.Drawing.Point(26, 435);
00195             this.label5.Name = "label5";
00196             this.label5.Size = new System.Drawing.Size(52, 16);
00197             this.label5.TabIndex = 14;
00198             this.label5.Text = "Channels";
00199             this.label5.TextAlign = System.Drawing.ContentAlignment.TopRight;
00200             //
00201             // lblChannels
00202             //
00203             this.lblChannels.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
00204             this.lblChannels.Location = new System.Drawing.Point(88, 435);
00205             this.lblChannels.Name = "lblChannels";
00206             this.lblChannels.Size = new System.Drawing.Size(88, 16);
00207             this.lblChannels.TabIndex = 13;
00208             //
00209             // labelPlot
00210             //
00211             this.labelPlot.BackColor = System.Drawing.Color.Transparent;
00212             this.labelPlot.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
00213             this.labelPlot.Location = new System.Drawing.Point(6, 455);
00214             this.labelPlot.Name = "labelPlot";
00215             this.labelPlot.Size = new System.Drawing.Size(96, 16);
00216             this.labelPlot.TabIndex = 12;
00217             this.labelPlot.Text = "Spectrum Plot";
00218             //
00219             // tabCfgInit
00220             //
00221             this.tabCfgInit.AutoScroll = true;
00222             this.tabCfgInit.Controls.Add(this.textCfgInit);
00223             this.tabCfgInit.Location = new System.Drawing.Point(4, 22);
00224             this.tabCfgInit.Name = "tabCfgInit";
00225             this.tabCfgInit.Padding = new System.Windows.Forms.Padding(3);
00226             this.tabCfgInit.Size = new System.Drawing.Size(321, 478);
00227             this.tabCfgInit.TabIndex = 1;
00228             this.tabCfgInit.Text = "DPP Status Display";
00229             this.tabCfgInit.UseVisualStyleBackColor = true;
00230             //
00231             // textCfgInit
00232             //
00233             this.textCfgInit.Location = new System.Drawing.Point(6, 8);
00234             this.textCfgInit.Multiline = true;
00235             this.textCfgInit.Name = "textCfgInit";
00236             this.textCfgInit.ReadOnly = true;
00237             this.textCfgInit.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
00238             this.textCfgInit.Size = new System.Drawing.Size(309, 464);
00239             this.textCfgInit.TabIndex = 4;
00240             //
00241             // tabCfgTest
00242             //
00243             this.tabCfgTest.AutoScroll = true;
00244             this.tabCfgTest.Controls.Add(this.textCfgTest);
00245             this.tabCfgTest.Location = new System.Drawing.Point(4, 22);
00246             this.tabCfgTest.Name = "tabCfgTest";
00247             this.tabCfgTest.Padding = new System.Windows.Forms.Padding(3);
00248             this.tabCfgTest.Size = new System.Drawing.Size(321, 478);
00249             this.tabCfgTest.TabIndex = 2;
00250             this.tabCfgTest.Text = "DPP Test Configuration";
00251             this.tabCfgTest.UseVisualStyleBackColor = true;
00252             //
00253             // textCfgTest
00254             //
00255             this.textCfgTest.Location = new System.Drawing.Point(6, 8);
00256             this.textCfgTest.Multiline = true;
00257             this.textCfgTest.Name = "textCfgTest";
00258             this.textCfgTest.ReadOnly = true;
00259             this.textCfgTest.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
00260             this.textCfgTest.Size = new System.Drawing.Size(309, 464);
00261             this.textCfgTest.TabIndex = 5;
00262             //
00263             // Form1
00264             //
00265             this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
00266             this.ClientSize = new System.Drawing.Size(776, 520);
00267             this.Controls.Add(this.tabControl1);
00268             this.Controls.Add(this.buttonRunFW6Tests);
00269             this.Controls.Add(this.labelFW6Devices);
00270             this.Controls.Add(this.listboxDevices);
00271             this.Controls.Add(this.buttonFindUsbDevices);
00272             this.Controls.Add(this.picPlot);
00273             this.Name = "Form1";
00274             this.Text = "CSharp FW6 Example";
00275             this.Load += new System.EventHandler(this.Form1_Load);
00276             ((System.ComponentModel.ISupportInitialize)(this.picPlot)).EndInit();
00277             this.tabControl1.ResumeLayout(false);
00278             this.tabStatus.ResumeLayout(false);
00279             this.tabStatus.PerformLayout();
00280             this.tabCfgInit.ResumeLayout(false);
00281             this.tabCfgInit.PerformLayout();
00282             this.tabCfgTest.ResumeLayout(false);
00283             this.tabCfgTest.PerformLayout();
00284             this.ResumeLayout(false);
00285             this.PerformLayout();
00286
00287                 }
00288                 #endregion
00289
00293                 [STAThread]
00294                 static void Main()
00295                 {
00296                         Application.Run(new Form1());
00297                 }
00298
00299                 //-------------------------------------------------------------------
00300                 // PlotData
00301                 // Calculates and saves the plot buffer data then calls UpdatePlot
00302                 // OptScaleType = false; //linear
00303                 // OptScaleType = true;  //log
00304                 //-------------------------------------------------------------------
00305                 public void PlotData(int[] DataBuffer, int NumChan, bool OptScaleType)
00306                 {
00307                         int i;
00308                         long YMAX;
00309                         long XPlotMAX;
00310                         long YPlotMAX;
00311                         int[] PlotBuffer = new int[8192];
00312
00313                         XPlotMAX = NumChan - 1;
00314                         if (NumChan > 0)
00315                         {                                               //if number of channels > 0 plot data
00316                                 YMAX = 0;
00317                                 for(i = 0; i < NumChan; i++)
00318                                 {               //get the largest value to be displayed
00319                                         if (OptScaleType)
00320                                         {                               //get the Y maximum value for the select scale
00321                                                 if (Math.Log(1.0 + DataBuffer[i]) > YMAX) { YMAX = (int)Math.Log(1.0 + DataBuffer[i]); }
00322                                         }
00323                                         else
00324                                         {
00325                                                 if (DataBuffer[i] > YMAX) { YMAX = DataBuffer[i]; }
00326                                         }
00327                                 }
00328                                 if (YMAX < 1) { return; }                       //if no y scale exit sub
00329                                 if (OptScaleType)
00330                                 {                                       //adjust plot to include entire high peak
00331                                         YMAX = (YMAX * 10) + 10;
00332                                 }
00333                                 else
00334                                 {
00335                                         if (YMAX < 20)
00336                                         {
00337                                                 YMAX = YMAX + 2;
00338                                         }
00339                                         else
00340                                         {
00341                                                 YMAX = YMAX + 10;
00342                                         }
00343                                 }
00344                                 for (i = 0; i < NumChan;i++ )
00345                                 {               //get the largest value to be displayed
00346                                         if (OptScaleType)
00347                                         {
00348                                                 PlotBuffer[i] = (int)Math.Log(1.0 + DataBuffer[i]) * 10;
00349                                         }
00350                                         else
00351                                         {
00352                                                 PlotBuffer[i] = DataBuffer[i];
00353                                         }
00354                                 }
00355                                 YPlotMAX = YMAX;
00356                                 UpdatePlot(PlotBuffer,XPlotMAX,YPlotMAX);
00357                         }
00358                 }
00359
00360                 //-------------------------------------------------------------------
00361                 // UpdatePlot
00362                 // Draws the plot display with the current plot buffer
00363                 //-------------------------------------------------------------------
00364                 private void UpdatePlot(int[] PlotBuffer, long XPlotMAX, long YPlotMAX)
00365                 {
00366
00367                         picPlot.CreateGraphics().Clear(this.BackColor);
00368                         picPlot.Refresh();
00369                         Graphics picGraphic = this.picPlot.CreateGraphics();
00370                         Pen picPen = new Pen(Color.Red);
00371                         //Pen picPen = new Pen(Color.Black);
00372
00373                         double XScaleFactor = (double) this.picPlot.Width;
00374                         if (XPlotMAX > 0) XScaleFactor /= (double)(XPlotMAX + 1);
00375                         //XScaleFactor *= 2;
00376                         double YScaleFactor = (double) this.picPlot.Height;
00377                         if (YPlotMAX > 0) YScaleFactor /= (double)(YPlotMAX + 1);
00378                         int pH = this.picPlot.Height;
00379                         //YScaleFactor *= -1.0;
00380
00381                         double x0, y0, x1, y1, x2, y2;
00382                         x0 = 0; y0 = 0; y0++;
00383                         for(int X=0; X<=XPlotMAX; X++)
00384                         {
00385                                 x1 = X;
00386                                 y1 = PlotBuffer[X]; if (y1 < 0) { y1 = 0; }
00387                                 y1++;
00388                                 x2 = X + 1;
00389                                 y2 = PlotBuffer[X + 1]; if (y2 < 0) { y2 = 0; }
00390                                 y2++;
00391                                 picGraphic.DrawLine(picPen, (int)x0, pH - (int)y0, (int)(x1 * XScaleFactor), pH - (int)(y1 * YScaleFactor));
00392                                 picGraphic.DrawLine(picPen, (int)(x1 * XScaleFactor), pH - (int)(y1 * YScaleFactor), (int)(x2 * XScaleFactor), pH - (int)(y2 * YScaleFactor));
00393                                 picGraphic.DrawLine(picPen, (int)(x1 * XScaleFactor), pH - 0, (int)(x1 * XScaleFactor), pH - (int)(y1 * YScaleFactor));
00394                                 picGraphic.DrawLine(picPen, (int)(x2 * XScaleFactor), pH - 0, (int)(x2 * XScaleFactor), pH - (int)(y2 * YScaleFactor));
00395                                 x0 = (int)(x2 * XScaleFactor); y0 = (int)(y2 * YScaleFactor); y0++;
00396                         }
00397                 }
00398
00399                 // Gets the data from the DPP and stores it in file
00400         private void SaveMCADataPlotToPath(string strFileName, int[] DataBuffer, int NumChan, FW6DppStatus DppStatus, string strDppConfig)
00401                 {
00402                         int adc;
00403                         int idxChan;
00404             string strStatus = DppStatus.ShowStatusValueStrings();
00405
00406                         switch (NumChan)
00407                         {
00408                                 case 8192:
00409                                 {
00410                                         adc = 5;
00411                                         break;
00412                                 }
00413                                 case 4096:
00414                                 {
00415                                         adc = 4;
00416                                         break;
00417                                 }
00418                                 case 2048:
00419                                 {
00420                                         adc = 3;
00421                                         break;
00422                                 }
00423                                 case 1024:
00424                                 {
00425                                         adc = 2;
00426                                         break;
00427                                 }
00428                                 case 512:
00429                                 {
00430                                         adc = 1;
00431                                         break;
00432                                 }
00433                                 case 256:
00434                                 {
00435                                         adc = 0;
00436                                         break;
00437                                 }
00438                                 default:
00439                                 {
00440                                         adc = 2;
00441                                         break;
00442                                 }
00443                         } //end switch
00444
00445             StreamWriter swSpectrum = new StreamWriter(strFileName, false, Encoding.ASCII);
00446                         swSpectrum.WriteLine("<<PMCA SPECTRUM>>");
00447                         swSpectrum.WriteLine("TAG - DPPAPI");
00448                         swSpectrum.WriteLine("DESCRIPTION - " + strFileName);
00449                         swSpectrum.WriteLine("GAIN - " + (adc).ToString());
00450                         swSpectrum.WriteLine("THRESHOLD - 0");
00451                         swSpectrum.WriteLine("LIVE_MODE - 0");
00452                         swSpectrum.WriteLine("PRESET_TIME - "); // + Strings.Trim(((double)CfgSet.PresetTime /  10).ToString("0.0")));
00453                         swSpectrum.WriteLine("LIVE_TIME - ");
00454                         swSpectrum.WriteLine("REAL_TIME - "); //  + Conversion.Str(StatusLst.AccumulationTime));
00455                         swSpectrum.WriteLine("START_TIME - ");  // + AcqStartTime);
00456                         swSpectrum.WriteLine("SERIAL_NUMBER - "); //  + Conversion.Str(StatusLst.SerialNumber));
00457                         swSpectrum.WriteLine("<<DATA>>");
00458                         for(idxChan=0; idxChan<=(NumChan-1); idxChan++)
00459                         {
00460                                 swSpectrum.WriteLine(DataBuffer[idxChan].ToString());
00461                         } // idxChan
00462                         swSpectrum.WriteLine("<<END>>");
00463
00464                         //MCA File DPP Settings for Amptek configutation and status data
00465             swSpectrum.WriteLine("<<DP5 CONFIGURATION>>");
00466             swSpectrum.Write(strDppConfig);
00467             swSpectrum.WriteLine("<<DP5 CONFIGURATION END>>");
00468                         swSpectrum.WriteLine("<<DPP STATUS>>");
00469             swSpectrum.Write(strStatus);
00470                         swSpectrum.WriteLine("<<DPP STATUS END>>");
00471             swSpectrum.Close();
00472                 }
00473
00474                 private void Form1_Load(object sender, System.EventArgs e)
00475                 {
00476
00477                 }
00478
00479         public void buttonFindUsbDevices_Click(object sender, EventArgs e)
00480         {
00481             List<String> devicePathNames;
00482             string strDevices;
00483             strDevices = "";
00484
00485             buttonRunFW6Tests.Enabled = false;
00486
00487             // Fill an array with the device path names of all attached devices with matching GUIDs.
00488             bool devicesFound = DeviceManagement.FindDeviceFromGuid(winUsbGuid, out devicePathNames);
00489             for (int iDpp = 0; iDpp < devicePathNames.Count; iDpp++)
00490             {
00491                 strDevices += devicePathNames[iDpp] + "\n\r";
00492             }
00493             StartAutodetection();
00494
00495         }
00496
00497         protected void StartAutodetection()
00498         {
00499             ThreadPool.QueueUserWorkItem(DiscoverDevices, null);
00500         }
00501
00502         protected bool detectingDevices = false;
00503
00504         protected void DiscoverDevices(object ThreadContext)
00505         {
00506             // don't allow multiple detection to happen
00507             if (detectingDevices)
00508                 return;
00509
00510             detectingDevices = true;
00511
00512             Invoke(new MethodInvoker(delegate()
00513                 {
00514                     buttonFindUsbDevices.Enabled = false;
00515
00516                     listboxDevices.Enabled = false;
00517                     listboxDevices.Items.Clear();
00518                     listboxDevices.Items.Add("Discovering devices, please wait...");
00519
00520                     // make sure to disable the groupbox and
00521                     // clear out the text boxes since we have no items
00522                     //groupBox1.Enabled = false;
00523                     //currentFirmwareTextbox.Text = string.Empty;
00524                     //currentFpgaTextbox.Text = string.Empty;
00525                 }));
00526
00527             List<DPDevice> devices = DPDevice.PerformDeviceDetection();
00528
00529             Invoke(new MethodInvoker(delegate() { listboxDevices.Items.Clear(); }));
00530
00531             bool foundDevices = true;
00532             if (devices.Count == 0)
00533             {
00534                 foundDevices = false;
00535             }
00536
00537             if (!foundDevices)
00538             {
00539                 Invoke(new MethodInvoker(delegate()
00540                 {
00541                     listboxDevices.Items.Add("No devices found");
00542                 }));
00543             }
00544             else
00545             {
00546                 Invoke(new MethodInvoker(delegate()
00547                 {
00548                     bool ethernetFound = false;
00549                     foreach (DPDevice d in devices)
00550                     {
00551                         if (d.FpgaState == DPDevice.FpgaStates.EncryptionFailure)
00552                         {
00553                             string MessageText = string.Format("Device {0}, S/N {1:D6} failed the Encryption Check, Contact Amptek for further information.",
00554                                                             d.DeviceType, d.SerialNumber);
00555
00556                             MessageBox.Show(MessageText);
00557                         }
00558
00559                         if (!ethernetFound && (d.InterfaceType == DPDevice.InterfaceTypes.ethernet))
00560                         {
00561                             if (listboxDevices.Items.Count > 0)
00562                             {
00563                                 listboxDevices.Items.Add("=================================================================");
00564                             }
00565                             ethernetFound = true;
00566                         }
00567                         listboxDevices.Items.Add(d);
00568                     }
00569
00570                     listboxDevices.Enabled = true;
00571                 }
00572                     ));
00573             }
00574
00575             detectingDevices = false;
00576
00577             // re-enable the refresh device button
00578             Invoke(new MethodInvoker(delegate()
00579                 {
00580                     buttonFindUsbDevices.Enabled = true;
00581                 }));
00582         }
00583
00584         private void listboxDevices_SelectedIndexChanged(object sender, EventArgs e)
00585         {
00586             ListBox lb = (ListBox)sender;
00587             try
00588             {
00589                 DPDevice device = (DPDevice)lb.SelectedItem;
00590                 //MessageBox.Show(device.SerialNumber.ToString());
00591                 //MessageBox.Show(device.InterfaceType.ToString());
00592                 buttonRunFW6Tests.Enabled = true;
00593             }
00594             catch
00595             {
00596                 MessageBox.Show("No Devices Selected");
00597             }
00598         }
00599
00600         public void buttonRunFW6Tests_Click(object sender, EventArgs e)
00601         {
00602             int idxSpectrum;
00603             string strFileName = "";
00604             int idxPlot;
00605             string strAppPath = Environment.CurrentDirectory;
00606             string strCfgFilename = strAppPath + @"\DPP.cfg";
00607             byte[] szCfgFilename = System.Text.Encoding.UTF8.GetBytes(strCfgFilename);
00608             int NumChan=0;
00609             int[] DataBuffer = new int[8192];
00610             int idxData = 0;
00611             int idxChan = 0;
00612             string strStatus = "";
00613             int dblPresetTime = 10;
00614             string strCommands = "";
00615             string strPresetTimeSave = "";
00616             byte[] readBuffer = null;
00617             uint bytesRead = 0;
00618             string strCmdReadback = "";
00619             string strDppConfig = "";
00620             bool bRunTests = false;
00621             int mcaChannels = 0;
00622
00623             textCfgInit.Text = "";
00624             textCfgTest.Text = "";
00625             textStatus.Text = "";
00626
00627             //PRET=10.0;
00628             //PRET=OFF;
00629
00630             //string strDeviceInfo = "";
00631             buttonRunFW6Tests.Enabled = false;
00632             buttonFindUsbDevices.Enabled = false;
00633             listboxDevices.Enabled = false;
00634             DPDevice device = (DPDevice)listboxDevices.SelectedItem;
00635             FW6Device deviceDppIO = null;
00636             FW6DppStatus DppStatus = new FW6DppStatus();
00637
00638             bool success = false;
00639             int channels = 0;
00640             //deviceDppIO.mcaChannels = 1024;
00641
00642             // Get/display Initial Status and Configuration
00643             // send preset or test config, then readback and display
00644
00645             if (device.InterfaceType == DPDevice.InterfaceTypes.usb)
00646             {
00647                 textStatus.Text = "Connecting to USB device...";
00648                 deviceDppIO = (DPDeviceUsb)device;
00649                 bRunTests = true;
00650             }
00651             else if (device.InterfaceType == DPDevice.InterfaceTypes.rs232)
00652             {
00653                 textStatus.Text = "Connecting to RS232 device...";
00654                 deviceDppIO = (DPDeviceSerialFW6)device;
00655                 deviceDppIO.mcaChannels = 1024;     // set default
00656                 bRunTests = true;
00657             }
00658
00659             if (bRunTests) {
00660                 try
00661                 {
00662                     success = deviceDppIO.ConnectForTesting();         // open device for testing
00663                     if (success)
00664                     {
00665                         textStatus.Text = "Connected For Testing";
00666                     }
00667                     else
00668                     {
00669                         textStatus.Text = "Connect Error";
00670                         return;
00671                     }
00672                 }
00673                 catch
00674                 {
00675                     textStatus.Text = "Connect Error";
00676                     return;
00677                 }
00678
00679                 if (device.InterfaceType == DPDevice.InterfaceTypes.rs232)
00680                 {
00681                     strCommands = "MCAC=?;";
00682                     //012345678901
00683                     //"MCAC=?;"
00684                     //012345678901
00685                     //"MCAC=1024;"
00686                     success = deviceDppIO.GetConfiguration(strCommands, ref readBuffer, out bytesRead); // Get the configuration
00687                     if ((!success) || (bytesRead < 7))
00688                     {
00689                         success = deviceDppIO.GetConfiguration(strCommands, ref readBuffer, out bytesRead); // Get the configuration
00690                     }
00691                     if (success)
00692                     {
00693                         byte[] cfgBuffer = new byte[bytesRead];
00694                         for (int idxCfg = 0; idxCfg < bytesRead; idxCfg++)
00695                         {
00696                             cfgBuffer[idxCfg] = readBuffer[idxCfg];
00697                         }
00698                         strDppConfig = ASCIIEncoding.ASCII.GetString(cfgBuffer);
00699                         strDppConfig = strDppConfig.Substring(5, ((int)bytesRead - 6));
00700                         mcaChannels = Convert.ToInt32(strDppConfig);
00701                         if (TestMCAChannels(mcaChannels))
00702                         {
00703                             textStatus.Text = textStatus.Text + "\r\n MCA Channels " + strDppConfig;
00704                             deviceDppIO.mcaChannels = mcaChannels;
00705                         }
00706                     }
00707                 }
00708                 Application.DoEvents();
00709                 Thread.Sleep(1000);
00710                 // get original preset time
00711                 // device is open, get status
00712                 strCommands = "PRET=?;";
00713                 success = deviceDppIO.GetConfiguration(strCommands, ref readBuffer, out bytesRead); // Get the configuration
00714                 if ((!success) || (bytesRead < 7))
00715                 {
00716                     success = deviceDppIO.GetConfiguration(strCommands, ref readBuffer, out bytesRead); // Get the configuration
00717                 }
00718                 //48-90
00719                 if (success)
00720                 {
00721                     byte[] cfgBuffer = new byte[bytesRead];
00722                     for (int idxCfg = 0; idxCfg < bytesRead; idxCfg++)
00723                     {
00724                         cfgBuffer[idxCfg] = readBuffer[idxCfg];
00725                     }
00726                     strPresetTimeSave = ASCIIEncoding.ASCII.GetString(cfgBuffer);
00727                     textStatus.Text = "Saving original preset time: " + strPresetTimeSave;
00728                     Application.DoEvents();
00729                     Thread.Sleep(1000);
00730                 }
00731                 else
00732                 {
00733                     textStatus.Text = "Preset time read Error";
00734                     return;
00735                 }
00736
00737                 // set preset time to 10.0 seconds
00738                 textStatus.Text = "Setting preset time to 10.0 seconds";
00739                 strCommands = "PRET=10.0;";
00740                 success = deviceDppIO.SendConfiguration(strCommands);
00741                 Application.DoEvents();
00742                 Thread.Sleep(1000);
00743                 Application.DoEvents();
00744                 if (!success)
00745                 {
00746                     textStatus.Text = "Preset time set Error";
00747                     return;
00748                 }
00749
00750                 textStatus.Text = "Verifying preset time is 10.0 seconds";
00751                 strCommands = "PRET=?;";
00752                 success = deviceDppIO.GetConfiguration(strCommands, ref readBuffer, out bytesRead); // Get the configuration
00753                 if (!success)
00754                 {
00755                     success = deviceDppIO.GetConfiguration(strCommands, ref readBuffer, out bytesRead); // Get the configuration
00756                 }
00757                 if (!success)
00758                 {
00759                     success = deviceDppIO.GetConfiguration(strCommands, ref readBuffer, out bytesRead); // Get the configuration
00760                 }
00761
00762                 if (success)
00763                 {
00764                     byte[] cfgBuffer = new byte[bytesRead];
00765                     for (int idxCfg = 0; idxCfg < bytesRead; idxCfg++)
00766                     {
00767                         cfgBuffer[idxCfg] = readBuffer[idxCfg];
00768                     }
00769                     strCmdReadback = ASCIIEncoding.ASCII.GetString(cfgBuffer);
00770                     textStatus.Text = "Test preset time: " + strCmdReadback;
00771                     if (strCmdReadback == "PRET=10.0;")
00772                     {
00773                         textStatus.Text += "\r\n ready";
00774                         Application.DoEvents();
00775                         Thread.Sleep(1000);
00776                     }
00777                     else
00778                     {
00779                         textStatus.Text += "\r\n error";
00780                         return;
00781                     }
00782                 }
00783
00784                 textStatus.Text = "Starting Dpp Data Acquisition...";
00785                 for (idxPlot = 1; idxPlot <= 2; idxPlot++)
00786                 {
00787                     labelPlot.Text = "Spectrum Plot " + (idxPlot).ToString();
00788                     deviceDppIO.PauseDppData();
00789                     //textStatus.Text = "Pausing Dpp Data...";
00790                     Application.DoEvents();
00791                     Thread.Sleep(100);
00792                     deviceDppIO.ClearDppData();
00793                     //textStatus.Text = "Clearing Dpp Data...";
00794                     Application.DoEvents();
00795                     Thread.Sleep(100);
00796                     deviceDppIO.StartDppData();
00797                     //textStatus.Text = "Starting Dpp Data Acquisition...";
00798                     Application.DoEvents();
00799                     Thread.Sleep(100);
00800                     for (idxSpectrum = 0; idxSpectrum <= (dblPresetTime + 10); idxSpectrum++)
00801                     {
00802                         Application.DoEvents();
00803                         Thread.Sleep(1000);
00804                         success = deviceDppIO.GetSpectrumData(ref readBuffer, out bytesRead); // Get the spectrum data
00805                         if (success)
00806                         {
00807                             channels = (int)(bytesRead / 3);
00808                             string strChannels = String.Format("Channels {0:d}", channels);
00809                             for (idxChan = 0; idxChan < channels; idxChan++)
00810                             {
00811                                 idxData = idxChan + 6;
00812                                 DataBuffer[idxChan] = (int)(readBuffer[idxData * 3]) + (int)(readBuffer[idxData * 3 + 1]) * 256 + (int)(readBuffer[idxData * 3 + 2]) * 65536;
00813                             }
00814                             for (idxData = 0; idxData < channels * 0.03; idxData++)
00815                             {
00816                                 DataBuffer[(channels - 1) - idxData] = 0;       // do not plot upper 3% of spectrum
00817                             }
00818                             NumChan = channels;
00819                             lblChannels.Text = NumChan.ToString();
00820                             PlotData(DataBuffer, NumChan, false);
00821                         }
00822                         success = deviceDppIO.GetRawStatus(ref readBuffer, out bytesRead);
00823                         if (success)
00824                         {
00825                             if (bytesRead == 64)
00826                             {
00827                                 DppStatus.Process_Status(readBuffer);
00828                                 strStatus = DppStatus.GetStatusValueStrings();
00829                                 textCfgInit.Text = strStatus;
00830                             } else {
00831                                 textCfgInit.Text = "Status bytes less than 72 -> " + bytesRead.ToString();
00832                             }
00833                         } else {
00834                             textCfgInit.Text = " Get Status failed ";
00835                         }
00836                         textStatus.Text = strStatus + "Plot Number: " + (idxPlot).ToString();
00837                         this.textStatus.Refresh();
00838                         if (DppStatus.MCA_EN && (DppStatus.AccumulationTime < dblPresetTime))
00839                         {
00840                             //acquiring data
00841                         }
00842                         else
00843                         {    //saving data
00844                             strFileName = "MCA" + (idxPlot).ToString() + ".mca";
00845                             strCmdReadback = deviceDppIO.GetFullConfiguration(DppStatus.PC5_PRESENT, DppStatus.DEVICE_ID, DppStatus.isDP5_RevDxGains, DppStatus.DPP_ECO);
00846                             strDppConfig = deviceDppIO.DisplayConfiguration(strCmdReadback);
00847
00848                             AsciiCmdUtilities.CommandFilters CmdUtil = new CommandFilters();
00849                             string strMcaCfg = CmdUtil.CreateSpectrumConfig(strDppConfig);
00850
00851                             textCfgTest.Text = strDppConfig;
00852                             SaveMCADataPlotToPath(strFileName, DataBuffer, NumChan, DppStatus, strMcaCfg);
00853                             break;
00854                         }
00855                     }
00856                 }
00857             }
00858
00859             textStatus.Text += "\r\nRestoring preset time to original setting";
00860             //strCommands = "PRET=OFF;";
00861             success = deviceDppIO.SendConfiguration(strPresetTimeSave);
00862             Application.DoEvents();
00863             Thread.Sleep(1000);
00864             if (!success)
00865             {
00866                 textStatus.Text = "Preset time set Error";
00867                 return;
00868             }
00869             textStatus.Text += "\r\nTests Done.";
00870             deviceDppIO.DisconnectForTesting();
00871
00872             buttonRunFW6Tests.Enabled = true;
00873             buttonFindUsbDevices.Enabled = true;
00874             listboxDevices.Enabled = true;
00875         }
00876
00877         private void radioFW6_Test_CheckedChanged(object sender, EventArgs e)
00878         {
00879             buttonFindUsbDevices.Visible = true;
00880             buttonRunFW6Tests.Visible = true;
00881             labelFW6Devices.Visible = true;
00882             listboxDevices.Visible = true;
00883         }
00884
00885         private void radioDPPAPI_Test_CheckedChanged(object sender, EventArgs e)
00886         {
00887             buttonFindUsbDevices.Visible = false;
00888             buttonRunFW6Tests.Visible = false;
00889             labelFW6Devices.Visible = false;
00890             listboxDevices.Visible = false;
00891         }
00892
00893         private bool TestMCAChannels(int NumChan)
00894         {
00895             bool isOK = true;
00896
00897             switch (NumChan)
00898             {
00899                 case 8192:
00900                     {
00901                         break;
00902                     }
00903                 case 4096:
00904                     {
00905                         break;
00906                     }
00907                 case 2048:
00908                     {
00909                         break;
00910                     }
00911                 case 1024:
00912                     {
00913                         break;
00914                     }
00915                 case 512:
00916                     {
00917                         break;
00918                     }
00919                 case 256:
00920                     {
00921                         break;
00922                     }
00923                 default:
00924                     {
00925                         isOK = false;
00926                         break;
00927                     }
00928             }
00929             return isOK;
00930         }
00931     }
00932 }
Generated on Fri Sep 22 2017 10:35:16 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: MiscUtil/Conversion/LittleEndianBitConverter.cs Source File

  • File List
MiscUtil/Conversion/LittleEndianBitConverter.cs
Go to the documentation of this file.
00001
00002 namespace MiscUtil.Conversion
00003 {
00008     public sealed class LittleEndianBitConverter : EndianBitConverter
00009     {
00019         public sealed override bool IsLittleEndian()
00020         {
00021             return true;
00022         }
00023
00027         public sealed override Endianness Endianness
00028         {
00029             get { return Endianness.LittleEndian; }
00030         }
00031
00039         protected override void CopyBytesImpl(long value, int bytes, byte[] buffer, int index)
00040         {
00041             for (int i=0; i < bytes; i++)
00042             {
00043                 buffer[i+index] = unchecked((byte)(value&0xff));
00044                 value = value >> 8;
00045             }
00046         }
00047
00056         protected override long FromBytes(byte[] buffer, int startIndex, int bytesToConvert)
00057         {
00058             long ret = 0;
00059             for (int i=0; i < bytesToConvert; i++)
00060             {
00061                 ret = unchecked((ret << 8) | buffer[startIndex+bytesToConvert-1-i]);
00062             }
00063             return ret;
00064         }
00065     }
00066 }
Generated on Fri Sep 22 2017 10:35:16 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Properties/Resources.Designer.cs Source File

  • File List
Properties/Resources.Designer.cs
Go to the documentation of this file.
00001 ﻿//------------------------------------------------------------------------------
00002 // <auto-generated>
00003 //     This code was generated by a tool.
00004 //     Runtime Version:2.0.50727.3643
00005 //
00006 //     Changes to this file may cause incorrect behavior and will be lost if
00007 //     the code is regenerated.
00008 // </auto-generated>
00009 //------------------------------------------------------------------------------
00010
00011 namespace csDP5.Properties {
00012     using System;
00013
00014
00018     // This class was auto-generated by the StronglyTypedResourceBuilder
00019     // class via a tool like ResGen or Visual Studio.
00020     // To add or remove a member, edit your .ResX file then rerun ResGen
00021     // with the /str option, or rebuild your VS project.
00022     [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")]
00023     [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
00024     [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
00025     internal class Resources {
00026
00027         private static global::System.Resources.ResourceManager resourceMan;
00028
00029         private static global::System.Globalization.CultureInfo resourceCulture;
00030
00031         [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
00032         internal Resources() {
00033         }
00034
00038         [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
00039         internal static global::System.Resources.ResourceManager ResourceManager {
00040             get {
00041                 if (object.ReferenceEquals(resourceMan, null)) {
00042                     global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("csDP5.Properties.Resources", typeof(Resources).Assembly);
00043                     resourceMan = temp;
00044                 }
00045                 return resourceMan;
00046             }
00047         }
00048
00053         [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
00054         internal static global::System.Globalization.CultureInfo Culture {
00055             get {
00056                 return resourceCulture;
00057             }
00058             set {
00059                 resourceCulture = value;
00060             }
00061         }
00062     }
00063 }
Generated on Fri Sep 22 2017 10:35:16 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: WinUsb/SafeNativeMethods.cs Source File

  • File List
WinUsb/SafeNativeMethods.cs
Go to the documentation of this file.
00001 using System;
00002 using Microsoft.Win32.SafeHandles;
00003 using System.Runtime.InteropServices;
00004
00005 namespace WinUsb
00006 {
00017         internal sealed class SafeNativeMethods
00018         {
00019                 internal const UInt32 DEVICE_SPEED = ((UInt32)(1));
00020                 internal const Byte USB_ENDPOINT_DIRECTION_MASK = ((Byte)(0X80));
00021
00022         internal enum POLICY_TYPE
00023         {
00024             SHORT_PACKET_TERMINATE = 1,
00025             AUTO_CLEAR_STALL=2,
00026             PIPE_TRANSFER_TIMEOUT=3,
00027             IGNORE_SHORT_PACKETS=4,
00028             ALLOW_PARTIAL_READS=5,
00029             AUTO_FLUSH=6,
00030             RAW_IO=7,
00031         }
00032
00033                 internal enum USBD_PIPE_TYPE
00034                 {
00035                         UsbdPipeTypeControl,
00036                         UsbdPipeTypeIsochronous,
00037                         UsbdPipeTypeBulk,
00038                         UsbdPipeTypeInterrupt,
00039                 }
00040
00041                 internal enum USB_DEVICE_SPEED
00042                 {
00043                         UsbLowSpeed = 1,
00044                         UsbFullSpeed,
00045                         UsbHighSpeed,
00046                 }
00047
00048                 [StructLayout(LayoutKind.Sequential)]
00049                 internal struct USB_CONFIGURATION_DESCRIPTOR
00050                 {
00051                         internal Byte bLength;
00052                         internal Byte bDescriptorType;
00053                         internal ushort wTotalLength;
00054                         internal Byte bNumInterfaces;
00055                         internal Byte bConfigurationValue;
00056                         internal Byte iConfiguration;
00057                         internal Byte bmAttributes;
00058                         internal Byte MaxPower;
00059                 }
00060
00061                 [StructLayout(LayoutKind.Sequential)]
00062                 internal struct USB_INTERFACE_DESCRIPTOR
00063                 {
00064                         internal Byte bLength;
00065                         internal Byte bDescriptorType;
00066                         internal Byte bInterfaceNumber;
00067                         internal Byte bAlternateSetting;
00068                         internal Byte bNumEndpoints;
00069                         internal Byte bInterfaceClass;
00070                         internal Byte bInterfaceSubClass;
00071                         internal Byte bInterfaceProtocol;
00072                         internal Byte iInterface;
00073                 }
00074
00075                 [StructLayout(LayoutKind.Sequential)]
00076                 internal struct WINUSB_PIPE_INFORMATION
00077                 {
00078                         internal USBD_PIPE_TYPE PipeType;
00079                         internal Byte PipeId;
00080                         internal ushort MaximumPacketSize;
00081                         internal Byte Interval;
00082                 }
00083
00084                 [StructLayout(LayoutKind.Sequential, Pack = 1)]
00085                 internal struct WINUSB_SETUP_PACKET
00086                 {
00087                         internal Byte RequestType;
00088                         internal Byte Request;
00089                         internal ushort Value;
00090                         internal ushort Index;
00091                         internal ushort Length;
00092                 }
00093
00094                 [DllImport("winusb.dll", SetLastError = true)]
00095                 internal static extern Boolean WinUsb_ControlTransfer(IntPtr InterfaceHandle, WINUSB_SETUP_PACKET SetupPacket, Byte[] Buffer, UInt32 BufferLength, ref UInt32 LengthTransferred, IntPtr Overlapped);
00096
00097                 [DllImport("winusb.dll", SetLastError = true)]
00098                 internal static extern Boolean WinUsb_Free(IntPtr InterfaceHandle);
00099
00100         [DllImport("winusb.dll", SetLastError = true)]
00101         internal static extern Boolean WinUsb_Initialize(SafeFileHandle DeviceHandle, ref IntPtr InterfaceHandle);
00102
00103                 //  Use this declaration to retrieve DEVICE_SPEED (the only currently defined InformationType).
00104
00105                 [DllImport("winusb.dll", SetLastError = true)]
00106                 internal static extern Boolean WinUsb_QueryDeviceInformation(IntPtr InterfaceHandle, UInt32 InformationType, ref UInt32 BufferLength, ref Byte Buffer);
00107
00108                 [DllImport("winusb.dll", SetLastError = true)]
00109                 internal static extern Boolean WinUsb_QueryInterfaceSettings(IntPtr InterfaceHandle, Byte AlternateInterfaceNumber, ref USB_INTERFACE_DESCRIPTOR UsbAltInterfaceDescriptor);
00110
00111                 [DllImport("winusb.dll", SetLastError = true)]
00112                 internal static extern Boolean WinUsb_QueryPipe(IntPtr InterfaceHandle, Byte AlternateInterfaceNumber, Byte PipeIndex, ref WINUSB_PIPE_INFORMATION PipeInformation);
00113
00114                 [DllImport("winusb.dll", SetLastError = true)]
00115                 public static extern Boolean WinUsb_ReadPipe(IntPtr InterfaceHandle, Byte PipeID, Byte[] Buffer, UInt32 BufferLength, ref UInt32 LengthTransferred, IntPtr Overlapped);
00116
00117                 //  Two declarations for WinUsb_SetPipePolicy.
00118                 //  Use this one when the returned Value is a Byte (all except PIPE_TRANSFER_TIMEOUT):
00119
00120                 [DllImport("winusb.dll", SetLastError = true)]
00121                 internal static extern Boolean WinUsb_SetPipePolicy(IntPtr InterfaceHandle, Byte PipeID, UInt32 PolicyType, UInt32 ValueLength, ref Byte Value);
00122
00123                 //  Use this alias when the returned Value is a UInt32 (PIPE_TRANSFER_TIMEOUT only):
00124
00125                 [DllImport("winusb.dll", SetLastError = true, EntryPoint = "WinUsb_SetPipePolicy")]
00126                 internal static extern Boolean WinUsb_SetPipePolicy1(IntPtr InterfaceHandle, Byte PipeID, UInt32 PolicyType, UInt32 ValueLength, ref UInt32 Value);
00127
00128                 [DllImport("winusb.dll", SetLastError = true)]
00129                 public static extern Boolean WinUsb_WritePipe(IntPtr InterfaceHandle, Byte PipeID, Byte[] Buffer, UInt32 BufferLength, ref UInt32 LengthTransferred, IntPtr Overlapped);
00130         }
00131 }
Generated on Fri Sep 22 2017 10:35:16 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: FW6/SetADCCalibrationRequest.cs Source File

  • File List
FW6/SetADCCalibrationRequest.cs
Go to the documentation of this file.
00001 ﻿using System;
00002 using System.Collections.Generic;
00003 using System.Text;
00004
00005 namespace csRepeat.FW6
00006 {
00007     class SetADCCalibrationRequest : FW6Packet
00008     {
00009         private byte adcGain;
00010         private byte adcOffset;
00011
00012         public SetADCCalibrationRequest(byte adcGain, byte adcOffset)
00013         {
00014             this.adcGain = adcGain;
00015             this.adcOffset = adcOffset;
00016         }
00017
00018         public override byte PID1
00019         {
00020             get
00021             {
00022                 return 0xF0;
00023             }
00024         }
00025
00026         public override byte PID2
00027         {
00028             get
00029             {
00030                 return 0x0E;
00031             }
00032         }
00033
00034         public override byte[] Data
00035         {
00036             get
00037             {
00038                 byte[] data = new byte[2];
00039                 data[0] = adcGain;
00040                 data[1] = adcOffset;
00041                 return data;
00042             }
00043         }
00044     }
00045 }
Generated on Fri Sep 22 2017 10:35:16 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: FW6/SetDCalRequest.cs Source File

  • File List
FW6/SetDCalRequest.cs
Go to the documentation of this file.
00001 ﻿using System;
00002 using System.Collections.Generic;
00003 using System.Text;
00004
00005 namespace csRepeat.FW6
00006 {
00007     class SetDCalRequest : FW6Packet
00008     {
00009         private ushort dcalValue;
00010
00011         public SetDCalRequest(ushort dcalValue)
00012         {
00013             this.dcalValue = dcalValue;
00014         }
00015
00016         public override byte PID1
00017         {
00018             get
00019             {
00020                 return 0xF0;
00021             }
00022         }
00023
00024         public override byte PID2
00025         {
00026             get
00027             {
00028                 return 0x0A;
00029             }
00030         }
00031
00032         public override byte[] Data
00033         {
00034             get
00035             {
00036                 byte[] data = new byte[2];
00037                 data[0] = (byte)(dcalValue >> 8);
00038                 data[1] = (byte)(dcalValue & 0xFF);
00039                 return data;
00040             }
00041         }
00042     }
00043 }
Generated on Fri Sep 22 2017 10:35:16 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: FW6/SetPZCorrectionRequest.cs Source File

  • File List
FW6/SetPZCorrectionRequest.cs
Go to the documentation of this file.
00001 ﻿using System;
00002 using System.Collections.Generic;
00003 using System.Text;
00004
00005 namespace csRepeat.FW6
00006 {
00007     class SetPZCorrectionRequest : FW6Packet
00008     {
00009         private byte pzCorrection;
00010
00011         public SetPZCorrectionRequest(byte pzCorrection)
00012         {
00013             this.pzCorrection = pzCorrection;
00014         }
00015
00016         public override byte PID1
00017         {
00018             get
00019             {
00020                 return 0xF0;
00021             }
00022         }
00023
00024         public override byte PID2
00025         {
00026             get
00027             {
00028                 return 0x0B;
00029             }
00030         }
00031
00032         public override byte[] Data
00033         {
00034             get
00035             {
00036                 byte[] data = new byte[1];
00037                 data[0] = pzCorrection;
00038                 return data;
00039             }
00040         }
00041     }
00042 }
Generated on Fri Sep 22 2017 10:35:16 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: FW6/SetuCTemperatureCalibrationRequest.cs Source File

  • File List
FW6/SetuCTemperatureCalibrationRequest.cs
Go to the documentation of this file.
00001 ﻿using System;
00002 using System.Collections.Generic;
00003 using System.Text;
00004
00005 namespace csRepeat.FW6
00006 {
00007     class SetuCTemperatureCalibrationRequest : FW6Packet
00008     {
00009         private byte uCTempCalibration;
00010
00011         public SetuCTemperatureCalibrationRequest(byte uCTempCalibration)
00012         {
00013             this.uCTempCalibration = uCTempCalibration;
00014         }
00015
00016         public override byte PID1
00017         {
00018             get
00019             {
00020                 return 0xF0;
00021             }
00022         }
00023
00024         public override byte PID2
00025         {
00026             get
00027             {
00028                 return 0x0C;
00029             }
00030         }
00031
00032         public override byte[] Data
00033         {
00034             get
00035             {
00036                 byte[] data = new byte[1];
00037                 data[0] = uCTempCalibration;
00038                 return data;
00039             }
00040         }
00041     }
00042 }
Generated on Fri Sep 22 2017 10:35:16 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: FW6/SpectrumRequest.cs Source File

  • File List
FW6/SpectrumRequest.cs
Go to the documentation of this file.
00001 ﻿using System;
00002 using System.Collections.Generic;
00003 using System.Text;
00004
00005 namespace csRepeat.FW6
00006 {
00010     public class SpectrumRequest : FW6Packet
00011     {
00012         public SpectrumRequest()
00013         {
00014         }
00015
00019         public override byte PID1
00020         {
00021             get
00022             {
00023                 return 0x2;
00024             }
00025         }
00026
00030         public override byte PID2
00031         {
00032             get
00033             {
00034                 return 0x1;
00035             }
00036         }
00037
00041         public override byte[] Data
00042         {
00043             get
00044             {
00045                 return null;
00046             }
00047         }
00048     }
00049 }
Generated on Fri Sep 22 2017 10:35:16 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: FW6/SpectrumResponse.cs Source File

  • File List
FW6/SpectrumResponse.cs
Go to the documentation of this file.
00001 ﻿using System;
00002 using System.Collections.Generic;
00003 using System.Text;
00004
00005 namespace csRepeat.FW6
00006 {
00012     public class SpectrumResponse : FW6Packet
00013     {
00014         private const byte thisPID1 = 0x81;
00015         private byte thisPID2 = 0x5;
00016         private byte[] packetContent;
00017
00022         public enum SpectrumResponseTypePids : byte
00023         {
00024             Channel256Spectrum = 0x01,
00025             Channel512Spectrum = 0x3,
00026             Channel1024Spectrum = 0x5,
00027             Channel2048Spectrum = 0x7,
00028             Channel4096Spectrum = 0x9,
00029             Channel8192Spectrum = 0xB
00030         }
00031
00032         public override byte PID1
00033         {
00034             get { return thisPID1; }
00035         }
00036
00041         public override byte PID2
00042         {
00043             get
00044             {
00045                 byte returnValue = packetContent[3];
00046                 thisPID2 = packetContent[3];
00047                 return returnValue;
00048             }
00049         }
00050
00051         public override byte[] Data
00052         {
00053             get
00054             {
00055                 byte[] returnValue = new byte[packetContent.Length - (PacketHeaderLength+ChecksumLength)];
00056                 Array.Copy(packetContent, PacketHeaderLength, returnValue, 0, returnValue.Length);
00057                 return returnValue;
00058             }
00059         }
00060
00061         public SpectrumResponse(byte[] packetContent)
00062         {
00063             this.packetContent = packetContent;
00064         }
00065
00066         public static bool IsMatch(byte pid1, byte pid2)
00067         {
00068             // if this is the correct command, check if the sub command is one of the possibilities
00069             if(thisPID1 == pid1)
00070             {
00071                 // see if the value is one of those in the type of spectrum responses that we expect
00072                 if(Enum.IsDefined(typeof(SpectrumResponseTypePids), pid2))
00073                 {
00074                     return true;
00075                 }
00076             }
00077
00078             return false;
00079         }
00080     }
00081 }
Generated on Fri Sep 22 2017 10:35:16 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: FW6/StartFpgaUpload.cs Source File

  • File List
FW6/StartFpgaUpload.cs
Go to the documentation of this file.
00001 ﻿using System;
00002 using System.Collections.Generic;
00003 using System.Text;
00004
00005 namespace csRepeat.FW6
00006 {
00007     class StartFpgaUpload : FW6Packet
00008     {
00009         public override byte[] Data
00010         {
00011             get
00012             {
00013                 byte[] data = new byte[2];
00014                 data[0] = 0x12;
00015                 data[1] = 0x34;
00016                 return data;
00017             }
00018         }
00019
00020         public override byte PID1
00021         {
00022             get { return 0x30; }
00023         }
00024
00025         public override byte PID2
00026         {
00027             get { return 0x1; }
00028         }
00029     }
00030 }
Generated on Fri Sep 22 2017 10:35:16 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: FW6/StartUCUpload.cs Source File

  • File List
FW6/StartUCUpload.cs
Go to the documentation of this file.
00001 ﻿using System;
00002 using System.Collections.Generic;
00003 using System.Text;
00004
00005 namespace csRepeat.FW6
00006 {
00007     class StartUCUpload : FW6Packet
00008     {
00009         public override byte[] Data
00010         {
00011             get
00012             {
00013                 byte[] data = new byte[2];
00014                 data[0] = 0x12;
00015                 data[1] = 0x34;
00016                 return data;
00017             }
00018         }
00019
00023         public override byte PID1
00024         {
00025             get { return 0x30; }
00026         }
00027
00031         public override byte PID2
00032         {
00033             get { return 0x5; }
00034         }
00035     }
00036 }
Generated on Fri Sep 22 2017 10:35:16 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: FW6/StatusRequest.cs Source File

  • File List
FW6/StatusRequest.cs
Go to the documentation of this file.
00001 ﻿using System;
00002 using System.Collections.Generic;
00003 using System.Text;
00004
00005 namespace csRepeat.FW6
00006 {
00007     class StatusRequest : FW6Packet
00008     {
00009         public StatusRequest()
00010         {
00011         }
00012
00013         public override byte PID1
00014         {
00015             get
00016             {
00017                 return 0x1;
00018             }
00019         }
00020
00021         public override byte PID2
00022         {
00023             get
00024             {
00025                 return 0x1;
00026             }
00027         }
00028
00029         public override byte[] Data
00030         {
00031             get
00032             {
00033                 return null;
00034             }
00035         }
00036     }
00037
00038     class ClearSpectrum : FW6Packet
00039     {
00040         public ClearSpectrum()
00041         {
00042         }
00043
00044         public override byte PID1
00045         {
00046             get
00047             {
00048                 return 0xF0;
00049             }
00050         }
00051
00052         public override byte PID2
00053         {
00054             get
00055             {
00056                 return 0x1;
00057             }
00058         }
00059
00060         public override byte[] Data
00061         {
00062             get
00063             {
00064                 return null;
00065             }
00066         }
00067     }
00068
00069     class EnableMCA : FW6Packet
00070     {
00071         public EnableMCA()
00072         {
00073         }
00074
00075         public override byte PID1
00076         {
00077             get
00078             {
00079                 return 0xF0;
00080             }
00081         }
00082
00083         public override byte PID2
00084         {
00085             get
00086             {
00087                 return 0x2;
00088             }
00089         }
00090
00091         public override byte[] Data
00092         {
00093             get
00094             {
00095                 return null;
00096             }
00097         }
00098     }
00099
00100     class DisableMCA : FW6Packet
00101     {
00102         public DisableMCA()
00103         {
00104         }
00105
00106         public override byte PID1
00107         {
00108             get
00109             {
00110                 return 0xF0;
00111             }
00112         }
00113
00114         public override byte PID2
00115         {
00116             get
00117             {
00118                 return 0x3;
00119             }
00120         }
00121
00122         public override byte[] Data
00123         {
00124             get
00125             {
00126                 return null;
00127             }
00128         }
00129     }
00130 }
Generated on Fri Sep 22 2017 10:35:16 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: FW6/StatusResponse.cs Source File

  • File List
FW6/StatusResponse.cs
Go to the documentation of this file.
00001 ﻿using System;
00002 using System.Collections.Generic;
00003 using System.Text;
00004 using MiscUtil.Conversion;
00005
00006 namespace csRepeat.FW6
00007 {
00008     public class StatusResponse : FW6Packet
00009     {
00010         private byte[] packetContent;
00011
00012         private int FwVersionMajorMinorOffset = 24;
00013         public int FwVersionMajor
00014         {
00015             get
00016             {
00017                 return (packetContent[PacketHeaderLength + FwVersionMajorMinorOffset] >> 4) & 0xF;
00018             }
00019         }
00020
00021         public int FwVersionMinor
00022         {
00023             get
00024             {
00025                 return packetContent[PacketHeaderLength + FwVersionMajorMinorOffset] & 0xF;
00026             }
00027         }
00028
00029         private int FwBuildNumberOffset = 37;
00030         public int FwBuildNumber
00031         {
00032             get
00033             {
00034                 return (packetContent[PacketHeaderLength + FwBuildNumberOffset] & 0x0F);
00035             }
00036         }
00037
00038         private int FpgaMajorMinorVersionOffset = 25;
00039         public int FpgaVersionMajor
00040         {
00041             get
00042             {
00043                 return (packetContent[PacketHeaderLength + FpgaMajorMinorVersionOffset] >> 4) & 0xF;
00044             }
00045         }
00046
00047         public int FpgaVersionMinor
00048         {
00049             get
00050             {
00051                 return packetContent[PacketHeaderLength + FpgaMajorMinorVersionOffset] & 0xF;
00052             }
00053         }
00054
00055         private int SerialNumberOffset = 26;
00056         public uint SerialNumber
00057         {
00058             get
00059             {
00060                 return EndianBitConverter.Little.ToUInt32(packetContent, PacketHeaderLength + SerialNumberOffset);
00061             }
00062         }
00063
00064         private int DeviceTypeOffset = 39;
00065         public DeviceTypes DeviceType
00066         {
00067             get
00068             {
00069                 return (DeviceTypes)packetContent[PacketHeaderLength + DeviceTypeOffset];
00070             }
00071         }
00072
00073         private const byte thisPID1 = 0x80;
00074         private const byte thisPID2 = 0x1;
00075
00076         public override byte PID1
00077         {
00078             get { return thisPID1; }
00079         }
00080
00081         public override byte PID2
00082         {
00083             get { return thisPID2; }
00084         }
00085
00086         public override byte[] Data
00087         {
00088             get
00089             {
00090                 byte[] returnValue = new byte[packetContent.Length - (PacketHeaderLength + ChecksumLength)];
00091                 Array.Copy(packetContent, PacketHeaderLength, returnValue, 0, returnValue.Length);
00092                 return returnValue;
00093             }
00094         }
00095
00096         public StatusResponse(byte[] packetContent)
00097         {
00098             this.packetContent = packetContent;
00099         }
00100
00101         public static bool IsMatch(byte pid1, byte pid2)
00102         {
00103             if((thisPID1 == pid1) && (thisPID2 == 0x1))
00104             {
00105                 return true;
00106             }
00107
00108             return false;
00109         }
00110     }
00111 }
Generated on Fri Sep 22 2017 10:35:16 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: WinUsb/WinUsbDevice.cs Source File

  • File List
WinUsb/WinUsbDevice.cs
Go to the documentation of this file.
00001 using System;
00002 using Microsoft.Win32.SafeHandles;
00003 using System.Runtime.InteropServices;
00004
00005 namespace WinUsb
00006 {
00011         public partial class WinUsbDevice
00012         {
00013                 public struct devInfo
00014                 {
00015                         internal SafeFileHandle deviceHandle;
00016                         internal IntPtr winUsbHandle;
00017                         public Byte bulkInPipe;
00018                         internal Byte bulkOutPipe;
00019                         internal Byte interruptInPipe;
00020                         internal Byte interruptOutPipe;
00021                         internal UInt32 devicespeed;
00022                 }
00023
00024                 public devInfo myDevInfo = new devInfo();
00025
00030                 public void CloseDeviceHandle()
00031                 {
00032                         try
00033                         {
00034                 if (myDevInfo.winUsbHandle != null)
00035                 {
00036                     SafeNativeMethods.WinUsb_Free(myDevInfo.winUsbHandle);
00037                     myDevInfo.winUsbHandle = System.IntPtr.Zero;
00038                 }
00039
00040                                 if (!(myDevInfo.deviceHandle == null))
00041                                 {
00042                                         if (!(myDevInfo.deviceHandle.IsInvalid))
00043                                         {
00044                                                 myDevInfo.deviceHandle.Close();
00045                         myDevInfo.deviceHandle = null;
00046                                         }
00047                                 }
00048                         }
00049                         catch (Exception ex)
00050                         {
00051                 string strEx;
00052                 strEx = ex.Message;
00053                                 throw;
00054                         }
00055                 }
00056
00066
00067                 internal Boolean Do_Control_Read_Transfer(ref Byte[] dataStage)
00068                 {
00069                         UInt32 bytesReturned = 0;
00070                         SafeNativeMethods.WINUSB_SETUP_PACKET setupPacket;
00071                         Boolean success;
00072
00073                         try
00074                         {
00075                                 //  Vendor-specific request to an interface with device-to-host Data stage.
00076
00077                                 setupPacket.RequestType = 0XC1;
00078
00079                                 //  The request number that identifies the specific request.
00080
00081                                 setupPacket.Request = 2;
00082
00083                                 //  Command-specific value to send to the device.
00084
00085                                 setupPacket.Index = 0;
00086
00087                                 //  Number of bytes in the request's Data stage.
00088
00089                                 setupPacket.Length = System.Convert.ToUInt16(dataStage.Length);
00090
00091                                 //  Command-specific value to send to the device.
00092
00093                                 setupPacket.Value = 0;
00094
00095                                 // ***
00096                                 //  winusb function
00097
00098                                 //  summary
00099                                 //  Initiates a control transfer.
00100
00101                                 //  paramaters
00102                                 //  Device handle returned by WinUsb_Initialize.
00103                                 //  WINUSB_SETUP_PACKET structure
00104                                 //  Buffer to hold the returned Data-stage data.
00105                                 //  Number of data bytes to read in the Data stage.
00106                                 //  Number of bytes read in the Data stage.
00107                                 //  Null pointer for non-overlapped.
00108
00109                                 //  returns
00110                                 //  True on success.
00111                                 //  ***
00112
00113                                 success = SafeNativeMethods.WinUsb_ControlTransfer(myDevInfo.winUsbHandle, setupPacket, dataStage, System.Convert.ToUInt16(dataStage.Length), ref bytesReturned, IntPtr.Zero);
00114                                 return success;
00115
00116                         }
00117                         catch (Exception ex)
00118                         {
00119                 string strEx;
00120                 strEx = ex.Message;
00121                 throw;
00122                         }
00123                 }
00124
00134
00135                 internal Boolean Do_Control_Write_Transfer(Byte[] dataStage)
00136                 {
00137                         UInt32 bytesReturned = 0;
00138                         ushort index = System.Convert.ToUInt16(0);
00139                         SafeNativeMethods.WINUSB_SETUP_PACKET setupPacket;
00140                         Boolean success;
00141                         ushort value = System.Convert.ToUInt16(0);
00142
00143                         try
00144                         {
00145                                 //  Vendor-specific request to an interface with host-to-device Data stage.
00146
00147                                 setupPacket.RequestType = 0X41;
00148
00149                                 //  The request number that identifies the specific request.
00150
00151                                 setupPacket.Request = 1;
00152
00153                                 //  Command-specific value to send to the device.
00154
00155                                 setupPacket.Index = index;
00156
00157                                 //  Number of bytes in the request's Data stage.
00158
00159                                 setupPacket.Length = System.Convert.ToUInt16(dataStage.Length);
00160
00161                                 //  Command-specific value to send to the device.
00162
00163                                 setupPacket.Value = value;
00164
00165                                 // ***
00166                                 //  winusb function
00167
00168                                 //  summary
00169                                 //  Initiates a control transfer.
00170
00171                                 //  parameters
00172                                 //  Device handle returned by WinUsb_Initialize.
00173                                 //  WINUSB_SETUP_PACKET structure
00174                                 //  Buffer containing the Data-stage data.
00175                                 //  Number of data bytes to send in the Data stage.
00176                                 //  Number of bytes sent in the Data stage.
00177                                 //  Null pointer for non-overlapped.
00178
00179                                 //  Returns
00180                                 //  True on success.
00181                                 //  ***
00182
00183                                 success = SafeNativeMethods.WinUsb_ControlTransfer
00184                                         (myDevInfo.winUsbHandle,
00185                                         setupPacket,
00186                                         dataStage,
00187                                         System.Convert.ToUInt16(dataStage.Length),
00188                                         ref bytesReturned,
00189                                         IntPtr.Zero);
00190                                 return success;
00191                         }
00192                         catch (Exception ex)
00193                         {
00194                 string strEx;
00195                 strEx = ex.Message;
00196                 throw;
00197                         }
00198                 }
00199
00210
00211                 public Boolean GetDeviceHandle(String devicePathName)
00212                 {
00213                         // ***
00214                         // API function
00215
00216                         //  summary
00217                         //  Retrieves a handle to a device.
00218
00219                         //  parameters
00220                         //  Device path name returned by SetupDiGetDeviceInterfaceDetail
00221                         //  Type of access requested (read/write).
00222                         //  FILE_SHARE attributes to allow other processes to access the device while this handle is open.
00223                         //  Security structure. Using Null for this may cause problems under Windows XP.
00224                         //  Creation disposition value. Use OPEN_EXISTING for devices.
00225                         //  Flags and attributes for files. The winsub driver requires FILE_FLAG_OVERLAPPED.
00226                         //  Handle to a template file. Not used.
00227
00228                         //  Returns
00229                         //  A handle or INVALID_HANDLE_VALUE.
00230                         // ***
00231
00232                         myDevInfo.deviceHandle = FileIO.CreateFile
00233                                 (devicePathName,
00234                                 (FileIO.GENERIC_WRITE | FileIO.GENERIC_READ),
00235                                 FileIO.FILE_SHARE_READ | FileIO.FILE_SHARE_WRITE,
00236                                 IntPtr.Zero,
00237                                 FileIO.OPEN_EXISTING,
00238                                 FileIO.FILE_ATTRIBUTE_NORMAL | FileIO.FILE_FLAG_OVERLAPPED,
00239                                 0);
00240
00241                         if (!(myDevInfo.deviceHandle.IsInvalid))
00242                         {
00243                                 return true;
00244                         }
00245                         else
00246                         {
00247                                 return false;
00248                         }
00249                 }
00250
00264
00265                 public Boolean InitializeDevice()
00266                 {
00267                         SafeNativeMethods.USB_INTERFACE_DESCRIPTOR ifaceDescriptor;
00268                         SafeNativeMethods.WINUSB_PIPE_INFORMATION pipeInfo;
00269                         UInt32 pipeTimeout = 2000;
00270                         Boolean success;
00271
00272                         try
00273                         {
00274                                 ifaceDescriptor.bLength = 0;
00275                                 ifaceDescriptor.bDescriptorType = 0;
00276                                 ifaceDescriptor.bInterfaceNumber = 0;
00277                                 ifaceDescriptor.bAlternateSetting = 0;
00278                                 ifaceDescriptor.bNumEndpoints = 0;
00279                                 ifaceDescriptor.bInterfaceClass = 0;
00280                                 ifaceDescriptor.bInterfaceSubClass = 0;
00281                                 ifaceDescriptor.bInterfaceProtocol = 0;
00282                                 ifaceDescriptor.iInterface = 0;
00283
00284                                 pipeInfo.PipeType = 0;
00285                                 pipeInfo.PipeId = 0;
00286                                 pipeInfo.MaximumPacketSize = 0;
00287                                 pipeInfo.Interval = 0;
00288
00289                                 // ***
00290                                 //  winusb function
00291
00292                                 //  summary
00293                                 //  get a handle for communications with a winusb device        '
00294
00295                                 //  parameters
00296                                 //  Handle returned by CreateFile.
00297                                 //  Device handle to be returned.
00298
00299                                 //  returns
00300                                 //  True on success.
00301                                 //  ***
00302                 success = SafeNativeMethods.WinUsb_Initialize
00303                                         (myDevInfo.deviceHandle,
00304                                         ref myDevInfo.winUsbHandle);
00305
00306                                 if (success)
00307                                 {
00308                                         // ***
00309                                         //  winusb function
00310
00311                                         //  summary
00312                                         //  Get a structure with information about the device interface.
00313
00314                                         //  parameters
00315                                         //  handle returned by WinUsb_Initialize
00316                                         //  alternate interface setting number
00317                                         //  USB_INTERFACE_DESCRIPTOR structure to be returned.
00318
00319                                         //  returns
00320                                         //  True on success.
00321
00322                     success = SafeNativeMethods.WinUsb_QueryInterfaceSettings
00323                                                 (myDevInfo.winUsbHandle,
00324                                                 0,
00325                                                 ref ifaceDescriptor);
00326
00327                                         if (success)
00328                                         {
00329                                                 //  Get the transfer type, endpoint number, and direction for the interface's
00330                                                 //  bulk and interrupt endpoints. Set pipe policies.
00331
00332                                                 // ***
00333                                                 //  winusb function
00334
00335                                                 //  summary
00336                                                 //  returns information about a USB pipe (endpoint address)
00337
00338                                                 //  parameters
00339                                                 //  Handle returned by WinUsb_Initialize
00340                                                 //  Alternate interface setting number
00341                                                 //  Number of an endpoint address associated with the interface.
00342                                                 //  (The values count up from zero and are NOT the same as the endpoint address
00343                                                 //  in the endpoint descriptor.)
00344                                                 //  WINUSB_PIPE_INFORMATION structure to be returned
00345
00346                                                 //  returns
00347                                                 //  True on success
00348                                                 // ***
00349
00350                                                 for (Int32 i = 0; i <= ifaceDescriptor.bNumEndpoints - 1; i++)
00351                                                 {
00352                             SafeNativeMethods.WinUsb_QueryPipe
00353                                                                 (myDevInfo.winUsbHandle,
00354                                                                 0,
00355                                                                 System.Convert.ToByte(i),
00356                                                                 ref pipeInfo);
00357
00358                                                         if (((pipeInfo.PipeType ==
00359                                                                 SafeNativeMethods.USBD_PIPE_TYPE.UsbdPipeTypeBulk) &
00360                                                                 UsbEndpointDirectionIn(pipeInfo.PipeId)))
00361                                                         {
00362                                                                 myDevInfo.bulkInPipe = pipeInfo.PipeId;
00363
00364                                                                 SetPipePolicy
00365                                                                         (myDevInfo.bulkInPipe,
00366                                     Convert.ToUInt32(SafeNativeMethods.POLICY_TYPE.IGNORE_SHORT_PACKETS),
00367                                                                         Convert.ToByte(false));
00368
00369                                                                 SetPipePolicy
00370                                                                         (myDevInfo.bulkInPipe,
00371                                     Convert.ToUInt32(SafeNativeMethods.POLICY_TYPE.PIPE_TRANSFER_TIMEOUT),
00372                                                                         pipeTimeout);
00373
00374                                                         }
00375                                                         else if (((pipeInfo.PipeType ==
00376                                 SafeNativeMethods.USBD_PIPE_TYPE.UsbdPipeTypeBulk) &
00377                                                                 UsbEndpointDirectionOut(pipeInfo.PipeId)))
00378                                                         {
00379
00380                                                                 myDevInfo.bulkOutPipe = pipeInfo.PipeId;
00381
00382                                                                 SetPipePolicy
00383                                                                         (myDevInfo.bulkOutPipe,
00384                                     Convert.ToUInt32(SafeNativeMethods.POLICY_TYPE.IGNORE_SHORT_PACKETS),
00385                                                                         Convert.ToByte(false));
00386
00387                                                                 SetPipePolicy
00388                                                                         (myDevInfo.bulkOutPipe,
00389                                     Convert.ToUInt32(SafeNativeMethods.POLICY_TYPE.PIPE_TRANSFER_TIMEOUT),
00390                                                                         pipeTimeout);
00391
00392                                                         }
00393                                                         else if ((pipeInfo.PipeType ==
00394                                 SafeNativeMethods.USBD_PIPE_TYPE.UsbdPipeTypeInterrupt) &
00395                                                                 UsbEndpointDirectionIn(pipeInfo.PipeId))
00396                                                         {
00397
00398                                                                 myDevInfo.interruptInPipe = pipeInfo.PipeId;
00399
00400                                                                 SetPipePolicy
00401                                                                         (myDevInfo.interruptInPipe,
00402                                     Convert.ToUInt32(SafeNativeMethods.POLICY_TYPE.IGNORE_SHORT_PACKETS),
00403                                                                         Convert.ToByte(false));
00404
00405                                                                 SetPipePolicy
00406                                                                         (myDevInfo.interruptInPipe,
00407                                     Convert.ToUInt32(SafeNativeMethods.POLICY_TYPE.PIPE_TRANSFER_TIMEOUT),
00408                                                                         pipeTimeout);
00409
00410                                                         }
00411                                                         else if ((pipeInfo.PipeType ==
00412                                 SafeNativeMethods.USBD_PIPE_TYPE.UsbdPipeTypeInterrupt) &
00413                                                                 UsbEndpointDirectionOut(pipeInfo.PipeId))
00414                                                         {
00415
00416                                                                 myDevInfo.interruptOutPipe = pipeInfo.PipeId;
00417
00418                                                                 SetPipePolicy
00419                                                                         (myDevInfo.interruptOutPipe,
00420                                     Convert.ToUInt32(SafeNativeMethods.POLICY_TYPE.IGNORE_SHORT_PACKETS),
00421                                                                         Convert.ToByte(false));
00422
00423                                                                 SetPipePolicy
00424                                                                         (myDevInfo.interruptOutPipe,
00425                                     Convert.ToUInt32(SafeNativeMethods.POLICY_TYPE.PIPE_TRANSFER_TIMEOUT),
00426                                                                         pipeTimeout);
00427                                                         }
00428                                                 }
00429                                         }
00430                                         else
00431                                         {
00432                                                 success = false;
00433                                         }
00434                                 }
00435                                 return success;
00436                         }
00437                         catch (Exception ex)
00438                         {
00439                 string strEx;
00440                 strEx = ex.Message;
00441                 throw;
00442                         }
00443                 }
00444
00453
00454                 internal Boolean IsWindowsXpOrLater()
00455                 {
00456                         try
00457                         {
00458                                 OperatingSystem myEnvironment = Environment.OSVersion;
00459
00460                                 //  Windows XP is version 5.1.
00461
00462                                 System.Version versionXP = new System.Version(5, 1);
00463
00464                                 if (myEnvironment.Version >= versionXP)
00465                                 {
00466                                         return true;
00467                                 }
00468                                 else
00469                                 {
00470                                         return false;
00471                                 }
00472
00473                         }
00474                         catch (Exception ex)
00475                         {
00476                 string strEx;
00477                 strEx = ex.Message;
00478                 throw;
00479                         }
00480                 }
00481
00485
00486                 internal Boolean QueryDeviceSpeed()
00487                 {
00488                         UInt32 length = 1;
00489                         Byte[] speed = new Byte[1];
00490                         Boolean success;
00491
00492                         // ***
00493                         //  winusb function
00494
00495                         //  summary
00496                         //  Get the device speed.
00497                         //  (Normally not required but can be nice to know.)
00498
00499                         //  parameters
00500                         //  Handle returned by WinUsb_Initialize
00501                         //  Requested information type.
00502                         //  Number of bytes to read.
00503                         //  Information to be returned.
00504
00505                         //  returns
00506                         //  True on success.
00507                         // ***
00508
00509             success = SafeNativeMethods.WinUsb_QueryDeviceInformation
00510                                 (myDevInfo.winUsbHandle,
00511                 SafeNativeMethods.DEVICE_SPEED,
00512                                 ref length,
00513                                 ref speed[0]);
00514
00515                         if (success)
00516                         {
00517                                 myDevInfo.devicespeed = System.Convert.ToUInt32(speed[0]);
00518                         }
00519
00520                         return success;
00521                 }
00522
00534                 public void ReadViaBulkTransfer(Byte pipeID, UInt32 bytesToRead, ref Byte[] buffer, ref UInt32 bytesRead, ref Boolean success)
00535                 {
00536                         try
00537                         {
00538                                 // ***
00539                                 //  winusb function
00540
00541                                 //  summary
00542                                 //  Attempts to read data from a device interface.
00543
00544                                 //  parameters
00545                                 //  Device handle returned by WinUsb_Initialize.
00546                                 //  Endpoint address.
00547                                 //  Buffer to store the data.
00548                                 //  Maximum number of bytes to return.
00549                                 //  Number of bytes read.
00550                                 //  Null pointer for non-overlapped.
00551
00552                                 //  Returns
00553                                 //  True on success.
00554                                 // ***
00555
00556                 success = SafeNativeMethods.WinUsb_ReadPipe
00557                                         (myDevInfo.winUsbHandle,
00558                                         pipeID,
00559                                         buffer,
00560                                         bytesToRead,
00561                                         ref bytesRead,
00562                                         IntPtr.Zero);
00563
00564                                 if (!(success))
00565                                 {
00566                                         CloseDeviceHandle();
00567                                 }
00568                         }
00569                         catch (Exception ex)
00570                         {
00571                 string strEx;
00572                 strEx = ex.Message;
00573                 throw;
00574             }
00575                 }
00576
00588                 internal void ReadViaInterruptTransfer
00589                         (Byte pipeID,
00590                         UInt32 bytesToRead,
00591                         ref Byte[] buffer,
00592                         ref UInt32 bytesRead,
00593                         ref Boolean success)
00594                 {
00595                         try
00596                         {
00597                                 // ***
00598                                 //  winusb function
00599
00600                                 //  summary
00601                                 //  Attempts to read data from a device interface.
00602
00603                                 //  parameters
00604                                 //  Device handle returned by WinUsb_Initialize.
00605                                 //  Endpoint address.
00606                                 //  Buffer to store the data.
00607                                 //  Maximum number of bytes to return.
00608                                 //  Number of bytes read.
00609                                 //  Null pointer for non-overlapped.
00610
00611                                 //  Returns
00612                                 //  True on success.
00613                                 // ***
00614
00615                 success = SafeNativeMethods.WinUsb_ReadPipe
00616                                         (myDevInfo.winUsbHandle,
00617                                         pipeID,
00618                                         buffer,
00619                                         bytesToRead,
00620                                         ref bytesRead,
00621                                         IntPtr.Zero);
00622
00623                                 if (!(success))
00624                                 {
00625                                         CloseDeviceHandle();
00626                                 }
00627                         }
00628                         catch (Exception ex)
00629                         {
00630                 string strEx;
00631                 strEx = ex.Message;
00632                 throw;
00633             }
00634                 }
00635
00646
00647                 public Boolean SendViaBulkTransfer(ref Byte[] buffer, UInt32 bytesToWrite)
00648                 {
00649                         UInt32 bytesWritten = 0;
00650                         Boolean success;
00651
00652                         try
00653                         {
00654                                 // ***
00655                                 //  winusb function
00656
00657                                 //  summary
00658                                 //  Attempts to write data to a device interface.
00659
00660                                 //  parameters
00661                                 //  Device handle returned by WinUsb_Initialize.
00662                                 //  Endpoint address.
00663                                 //  Buffer with data to write.
00664                                 //  Number of bytes to write.
00665                                 //  Number of bytes written.
00666                                 //  IntPtr.Zero for non-overlapped I/O.
00667
00668                                 //  Returns
00669                                 //  True on success.
00670                                 //  ***
00671
00672                 success = SafeNativeMethods.WinUsb_WritePipe
00673                                         (myDevInfo.winUsbHandle,
00674                                         myDevInfo.bulkOutPipe,
00675                                         buffer,
00676                                         bytesToWrite,
00677                                         ref bytesWritten,
00678                                         IntPtr.Zero);
00679
00680                                 if (!(success))
00681                                 {
00682                                         CloseDeviceHandle();
00683                                 }
00684                                 return success;
00685                         }
00686                         catch (Exception ex)
00687                         {
00688                 string strEx;
00689                 strEx = ex.Message;
00690                 throw;
00691             }
00692                 }
00693
00704
00705                 internal Boolean SendViaInterruptTransfer(ref Byte[] buffer, UInt32 bytesToWrite)
00706                 {
00707                         UInt32 bytesWritten = 0;
00708                         Boolean success;
00709
00710                         try
00711                         {
00712                                 // ***
00713                                 //  winusb function
00714
00715                                 //  summary
00716                                 //  Attempts to write data to a device interface.
00717
00718                                 //  parameters
00719                                 //  Device handle returned by WinUsb_Initialize.
00720                                 //  Endpoint address.
00721                                 //  Buffer with data to write.
00722                                 //  Number of bytes to write.
00723                                 //  Number of bytes written.
00724                                 //  IntPtr.Zero for non-overlapped I/O.
00725
00726                                 //  Returns
00727                                 //  True on success.
00728                                 //  ***
00729
00730                 success = SafeNativeMethods.WinUsb_WritePipe
00731                                         (myDevInfo.winUsbHandle,
00732                                         myDevInfo.interruptOutPipe,
00733                                         buffer,
00734                                         bytesToWrite,
00735                                         ref bytesWritten,
00736                                         IntPtr.Zero);
00737
00738                                 if (!(success))
00739                                 {
00740                                         CloseDeviceHandle();
00741                                 }
00742
00743                                 return success;
00744                         }
00745                         catch (Exception ex)
00746                         {
00747                 string strEx;
00748                 strEx = ex.Message;
00749                 throw;
00750                         }
00751                 }
00752
00766                 private Boolean SetPipePolicy(Byte pipeId, UInt32 policyType, Byte value)
00767                 {
00768                         Boolean success;
00769
00770                         try
00771                         {
00772                                 // ***
00773                                 //  winusb function
00774
00775                                 //  summary
00776                                 //  sets a pipe policy
00777
00778                                 //  parameters
00779                                 //  handle returned by WinUsb_Initialize
00780                                 //  identifies the pipe
00781                                 //  POLICY_TYPE member.
00782                                 //  length of value in bytes
00783                                 //  value to set for the policy.
00784
00785                                 //  returns
00786                                 //  True on success
00787                                 // ***
00788
00789                 success = SafeNativeMethods.WinUsb_SetPipePolicy
00790                                         (myDevInfo.winUsbHandle,
00791                                         pipeId,
00792                                         policyType,
00793                                         1,
00794                                         ref value);
00795
00796                                 return success;
00797                         }
00798                         catch (Exception ex)
00799                         {
00800                 string strEx;
00801                 strEx = ex.Message;
00802                 throw;
00803             }
00804                 }
00805
00819                 private Boolean SetPipePolicy(Byte pipeId, UInt32 policyType, UInt32 value)
00820                 {
00821                         Boolean success;
00822
00823                         try
00824                         {
00825                                 // ***
00826                                 //  winusb function
00827
00828                                 //  summary
00829                                 //  sets a pipe policy
00830
00831                                 //  parameters
00832                                 //  handle returned by WinUsb_Initialize
00833                                 //  identifies the pipe
00834                                 //  POLICY_TYPE member.
00835                                 //  length of value in bytes
00836                                 //  value to set for the policy.
00837
00838                                 //  returns
00839                                 //  True on success
00840                                 // ***
00841
00842                 success = SafeNativeMethods.WinUsb_SetPipePolicy1
00843                                         (myDevInfo.winUsbHandle,
00844                                         pipeId,
00845                                         policyType,
00846                                         4,
00847                                         ref value);
00848
00849                                 return success;
00850                         }
00851                         catch (Exception ex)
00852                         {
00853                 string strEx;
00854                 strEx = ex.Message;
00855                 throw;
00856             }
00857                 }
00858
00867
00868                 private Boolean UsbEndpointDirectionIn(Int32 addr)
00869                 {
00870                         Boolean directionIn;
00871
00872                         try
00873                         {
00874                                 if (((addr & 0X80) == 0X80))
00875                                 {
00876                                         directionIn = true;
00877                                 }
00878                                 else
00879                                 {
00880                                         directionIn = false;
00881                                 }
00882
00883                         }
00884                         catch (Exception ex)
00885                         {
00886                 string strEx;
00887                 strEx = ex.Message;
00888                 throw;
00889             }
00890                         return directionIn;
00891                 }
00892
00893
00903
00904                 private Boolean UsbEndpointDirectionOut(Int32 addr)
00905                 {
00906                         Boolean directionOut;
00907
00908                         try
00909                         {
00910                                 if (((addr & 0X80) == 0))
00911                                 {
00912                                         directionOut = true;
00913                                 }
00914                                 else
00915                                 {
00916                                         directionOut = false;
00917                                 }
00918                         }
00919                         catch (Exception ex)
00920                         {
00921                 string strEx;
00922                 strEx = ex.Message;
00923                 throw;
00924             }
00925                         return directionOut;
00926                 }
00927         }
00928 }
Generated on Fri Sep 22 2017 10:35:16 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Class List

Class List
Here are the classes, structs, unions and interfaces with brief descriptions:
csRepeat.FW6.AckResponse |
MiscUtil.Conversion.BigEndianBitConverter | Implementation of EndianBitConverter which converts to/from big-endian byte arrays
csRepeat.FW6.ClearSpectrum |
AsciiCmdUtilities.CommandFilters |
csRepeat.FW6.Configuration | Sends a Text Configuration packet
csRepeat.FW6.ConfigurationReadback | Sends a Text Configuration Readback Request
csRepeat.FW6.ConfigurationResponse | Configuration response that is returned from a configuration readback request
WinUsb.DeviceManagement | Routines for detecting devices and receiving device notifications
WinUsb.WinUsbDevice.devInfo |
csRepeat.FW6.DiagnosticRequest | Diagnostic data request packet
csRepeat.FW6.DiagnosticResponse | Diagnostic data response packet
csRepeat.FW6.DisableMCA |
csRepeat.DisplayVersion |
MiscUtil.Conversion.DoubleConverter | A class to allow the conversion of doubles to string representations of their exact decimal values. The implementation aims for readability over efficiency
csRepeat.DPDevice |
csRepeat.FW6.DPDeviceEthernet |
csRepeat.FW6.DPDeviceSerialFW6 |
csRepeat.FW6.DPDeviceUsb |
csRepeat.FW6.EnableMCA |
MiscUtil.IO.EndianBinaryReader | Equivalent of System.IO.BinaryReader, but with either endianness, depending on the EndianBitConverter it is constructed with. No data is buffered in the reader; the client may seek within the stream at will
MiscUtil.IO.EndianBinaryWriter | Equivalent of System.IO.BinaryWriter, but with either endianness, depending on the EndianBitConverter it is constructed with
MiscUtil.Conversion.EndianBitConverter | Equivalent of System.BitConverter, but with either endianness
WinUsb.FileIO | API declarations relating to file I/O (and used by WinUsb)
csDP5.Form1 | Summary description for Form1
csRepeat.FW6.fpgaDataPacket |
csRepeat.FW6.fpgaDataPacketv2 | V2 uC data packet, requires firmware newer than v6.06.04
csRepeat.FW6.FW6Device |
csRepeat.FW6DppStatus | Parse FW6 Dpp Status data packets
csRepeat.FW6.FW6Packet | Packet layout looks like: [SYNC1][SYNC2][PID1][PID2][LEN1][LEN2][data bytes, length][CHECKSUM MSB][CHECKSUM LSB]
csRepeat.FW6.FW6PacketParser |
MiscUtil.Conversion.LittleEndianBitConverter | Implementation of EndianBitConverter which converts to/from little-endian byte arrays
csRepeat.FW6.MessageHandler |
csDP5.Properties.Resources | A strongly-typed resource class, for looking up localized strings, etc
WinUsb.SafeNativeMethods | These declarations are translated from the C declarations in multiple files in the Windows DDK. The files are:
csRepeat.FW6.SetADCCalibrationRequest |
csRepeat.FW6.SetDCalRequest |
csRepeat.FW6.SetPZCorrectionRequest |
csRepeat.FW6.SetuCTemperatureCalibrationRequest |
csRepeat.FW6.SpectrumRequest | Request device spectrum data
csRepeat.FW6.SpectrumResponse | Encompases the several kinds of spectrum responses that can be returned from a spectrum request NOTE: The spectrum responses with status are handled elsewhere as they have a status field that the responses handled here do not have
csRepeat.FW6.StartFpgaUpload |
csRepeat.FW6.StartUCUpload |
csRepeat.FW6.StatusRequest |
csRepeat.FW6.StatusResponse |
csRepeat.FW6.uCDataPacket |
csRepeat.FW6.uCDataPacketv2 | V2 uC data packet, requires firmware newer than v6.06.04
csRepeat.FW6.uCSwitchToImage | Packet used to perform a uC image switch, also finishes up a uC firmware upload
WinUsb.WinUsbDevice | Routines for the WinUsb driver supported by Windows Vista and Windows XP
Generated on Fri Sep 22 2017 10:35:18 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Member List

  • AsciiCmdUtilities
  • CommandFilters
AsciiCmdUtilities.CommandFilters Member List
This is the complete list of members for AsciiCmdUtilities.CommandFilters, including all inherited members.
CreateFullReadBackCmd(bool PC5_PRESENT, int DppType, bool isDP5_RevDxGains, byte DPP_ECO) | AsciiCmdUtilities.CommandFilters | [inline]
CreateResTestReadBackCmd(bool bSendCoarseFineGain, int DppType) | AsciiCmdUtilities.CommandFilters | [inline]
CreateSpectrumConfig(string strRawCfgIn) | AsciiCmdUtilities.CommandFilters | [inline]
GetCmdDesc(string strCmd) | AsciiCmdUtilities.CommandFilters | [inline]
MakeDp5CmdList() | AsciiCmdUtilities.CommandFilters | [inline]
RemoveCmd(string strCmd, string strCfgData) | AsciiCmdUtilities.CommandFilters | [inline, static]
RemoveCmdByDeviceType(string strCfgDataIn, bool PC5_PRESENT, int DppType, bool isDP5_RevDxGains, byte DPP_ECO) | AsciiCmdUtilities.CommandFilters | [inline]
Generated on Fri Sep 22 2017 10:35:16 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Member List

  • MiscUtil
  • Conversion
  • BigEndianBitConverter
MiscUtil.Conversion.BigEndianBitConverter Member List
This is the complete list of members for MiscUtil.Conversion.BigEndianBitConverter, including all inherited members.
Big | MiscUtil.Conversion.EndianBitConverter | [static]
CopyBytes(decimal value, byte[] buffer, int index) | MiscUtil.Conversion.EndianBitConverter | [inline]
CopyBytes(bool value, byte[] buffer, int index) | MiscUtil.Conversion.EndianBitConverter | [inline]
CopyBytes(char value, byte[] buffer, int index) | MiscUtil.Conversion.EndianBitConverter | [inline]
CopyBytes(double value, byte[] buffer, int index) | MiscUtil.Conversion.EndianBitConverter | [inline]
CopyBytes(short value, byte[] buffer, int index) | MiscUtil.Conversion.EndianBitConverter | [inline]
CopyBytes(int value, byte[] buffer, int index) | MiscUtil.Conversion.EndianBitConverter | [inline]
CopyBytes(long value, byte[] buffer, int index) | MiscUtil.Conversion.EndianBitConverter | [inline]
CopyBytes(float value, byte[] buffer, int index) | MiscUtil.Conversion.EndianBitConverter | [inline]
CopyBytes(ushort value, byte[] buffer, int index) | MiscUtil.Conversion.EndianBitConverter | [inline]
CopyBytes(uint value, byte[] buffer, int index) | MiscUtil.Conversion.EndianBitConverter | [inline]
CopyBytes(ulong value, byte[] buffer, int index) | MiscUtil.Conversion.EndianBitConverter | [inline]
CopyBytesImpl(long value, int bytes, byte[] buffer, int index) | MiscUtil.Conversion.BigEndianBitConverter | [inline, protected, virtual]
DoubleToInt64Bits(double value) | MiscUtil.Conversion.EndianBitConverter | [inline]
Endianness | MiscUtil.Conversion.BigEndianBitConverter |
FromBytes(byte[] buffer, int startIndex, int bytesToConvert) | MiscUtil.Conversion.BigEndianBitConverter | [inline, protected, virtual]
GetBytes(decimal value) | MiscUtil.Conversion.EndianBitConverter | [inline]
GetBytes(bool value) | MiscUtil.Conversion.EndianBitConverter | [inline]
GetBytes(char value) | MiscUtil.Conversion.EndianBitConverter | [inline]
GetBytes(double value) | MiscUtil.Conversion.EndianBitConverter | [inline]
GetBytes(short value) | MiscUtil.Conversion.EndianBitConverter | [inline]
GetBytes(int value) | MiscUtil.Conversion.EndianBitConverter | [inline]
GetBytes(long value) | MiscUtil.Conversion.EndianBitConverter | [inline]
GetBytes(float value) | MiscUtil.Conversion.EndianBitConverter | [inline]
GetBytes(ushort value) | MiscUtil.Conversion.EndianBitConverter | [inline]
GetBytes(uint value) | MiscUtil.Conversion.EndianBitConverter | [inline]
GetBytes(ulong value) | MiscUtil.Conversion.EndianBitConverter | [inline]
Int32BitsToSingle(int value) | MiscUtil.Conversion.EndianBitConverter | [inline]
Int64BitsToDouble(long value) | MiscUtil.Conversion.EndianBitConverter | [inline]
IsLittleEndian() | MiscUtil.Conversion.BigEndianBitConverter | [inline, virtual]
Little | MiscUtil.Conversion.EndianBitConverter | [static]
SingleToInt32Bits(float value) | MiscUtil.Conversion.EndianBitConverter | [inline]
ToBoolean(byte[] value, int startIndex) | MiscUtil.Conversion.EndianBitConverter | [inline]
ToChar(byte[] value, int startIndex) | MiscUtil.Conversion.EndianBitConverter | [inline]
ToDecimal(byte[] value, int startIndex) | MiscUtil.Conversion.EndianBitConverter | [inline]
ToDouble(byte[] value, int startIndex) | MiscUtil.Conversion.EndianBitConverter | [inline]
ToInt16(byte[] value, int startIndex) | MiscUtil.Conversion.EndianBitConverter | [inline]
ToInt32(byte[] value, int startIndex) | MiscUtil.Conversion.EndianBitConverter | [inline]
ToInt64(byte[] value, int startIndex) | MiscUtil.Conversion.EndianBitConverter | [inline]
ToSingle(byte[] value, int startIndex) | MiscUtil.Conversion.EndianBitConverter | [inline]
ToString(byte[] value) | MiscUtil.Conversion.EndianBitConverter | [inline, static]
ToString(byte[] value, int startIndex) | MiscUtil.Conversion.EndianBitConverter | [inline, static]
ToString(byte[] value, int startIndex, int length) | MiscUtil.Conversion.EndianBitConverter | [inline, static]
ToUInt16(byte[] value, int startIndex) | MiscUtil.Conversion.EndianBitConverter | [inline]
ToUInt32(byte[] value, int startIndex) | MiscUtil.Conversion.EndianBitConverter | [inline]
ToUInt64(byte[] value, int startIndex) | MiscUtil.Conversion.EndianBitConverter | [inline]
Generated on Fri Sep 22 2017 10:35:17 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Member List

  • MiscUtil
  • Conversion
  • DoubleConverter
MiscUtil.Conversion.DoubleConverter Member List
This is the complete list of members for MiscUtil.Conversion.DoubleConverter, including all inherited members.
ToExactString(double d) MiscUtil.Conversion.DoubleConverter [inline, static]
Generated on Fri Sep 22 2017 10:35:17 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Member List

  • MiscUtil
  • Conversion
  • EndianBitConverter
MiscUtil.Conversion.EndianBitConverter Member List
This is the complete list of members for MiscUtil.Conversion.EndianBitConverter, including all inherited members.
Big | MiscUtil.Conversion.EndianBitConverter | [static]
CopyBytes(decimal value, byte[] buffer, int index) | MiscUtil.Conversion.EndianBitConverter | [inline]
CopyBytes(bool value, byte[] buffer, int index) | MiscUtil.Conversion.EndianBitConverter | [inline]
CopyBytes(char value, byte[] buffer, int index) | MiscUtil.Conversion.EndianBitConverter | [inline]
CopyBytes(double value, byte[] buffer, int index) | MiscUtil.Conversion.EndianBitConverter | [inline]
CopyBytes(short value, byte[] buffer, int index) | MiscUtil.Conversion.EndianBitConverter | [inline]
CopyBytes(int value, byte[] buffer, int index) | MiscUtil.Conversion.EndianBitConverter | [inline]
CopyBytes(long value, byte[] buffer, int index) | MiscUtil.Conversion.EndianBitConverter | [inline]
CopyBytes(float value, byte[] buffer, int index) | MiscUtil.Conversion.EndianBitConverter | [inline]
CopyBytes(ushort value, byte[] buffer, int index) | MiscUtil.Conversion.EndianBitConverter | [inline]
CopyBytes(uint value, byte[] buffer, int index) | MiscUtil.Conversion.EndianBitConverter | [inline]
CopyBytes(ulong value, byte[] buffer, int index) | MiscUtil.Conversion.EndianBitConverter | [inline]
CopyBytesImpl(long value, int bytes, byte[] buffer, int index) | MiscUtil.Conversion.EndianBitConverter | [protected, pure virtual]
DoubleToInt64Bits(double value) | MiscUtil.Conversion.EndianBitConverter | [inline]
Endianness | MiscUtil.Conversion.EndianBitConverter |
FromBytes(byte[] value, int startIndex, int bytesToConvert) | MiscUtil.Conversion.EndianBitConverter | [protected, pure virtual]
GetBytes(decimal value) | MiscUtil.Conversion.EndianBitConverter | [inline]
GetBytes(bool value) | MiscUtil.Conversion.EndianBitConverter | [inline]
GetBytes(char value) | MiscUtil.Conversion.EndianBitConverter | [inline]
GetBytes(double value) | MiscUtil.Conversion.EndianBitConverter | [inline]
GetBytes(short value) | MiscUtil.Conversion.EndianBitConverter | [inline]
GetBytes(int value) | MiscUtil.Conversion.EndianBitConverter | [inline]
GetBytes(long value) | MiscUtil.Conversion.EndianBitConverter | [inline]
GetBytes(float value) | MiscUtil.Conversion.EndianBitConverter | [inline]
GetBytes(ushort value) | MiscUtil.Conversion.EndianBitConverter | [inline]
GetBytes(uint value) | MiscUtil.Conversion.EndianBitConverter | [inline]
GetBytes(ulong value) | MiscUtil.Conversion.EndianBitConverter | [inline]
Int32BitsToSingle(int value) | MiscUtil.Conversion.EndianBitConverter | [inline]
Int64BitsToDouble(long value) | MiscUtil.Conversion.EndianBitConverter | [inline]
IsLittleEndian() | MiscUtil.Conversion.EndianBitConverter | [pure virtual]
Little | MiscUtil.Conversion.EndianBitConverter | [static]
SingleToInt32Bits(float value) | MiscUtil.Conversion.EndianBitConverter | [inline]
ToBoolean(byte[] value, int startIndex) | MiscUtil.Conversion.EndianBitConverter | [inline]
ToChar(byte[] value, int startIndex) | MiscUtil.Conversion.EndianBitConverter | [inline]
ToDecimal(byte[] value, int startIndex) | MiscUtil.Conversion.EndianBitConverter | [inline]
ToDouble(byte[] value, int startIndex) | MiscUtil.Conversion.EndianBitConverter | [inline]
ToInt16(byte[] value, int startIndex) | MiscUtil.Conversion.EndianBitConverter | [inline]
ToInt32(byte[] value, int startIndex) | MiscUtil.Conversion.EndianBitConverter | [inline]
ToInt64(byte[] value, int startIndex) | MiscUtil.Conversion.EndianBitConverter | [inline]
ToSingle(byte[] value, int startIndex) | MiscUtil.Conversion.EndianBitConverter | [inline]
ToString(byte[] value) | MiscUtil.Conversion.EndianBitConverter | [inline, static]
ToString(byte[] value, int startIndex) | MiscUtil.Conversion.EndianBitConverter | [inline, static]
ToString(byte[] value, int startIndex, int length) | MiscUtil.Conversion.EndianBitConverter | [inline, static]
ToUInt16(byte[] value, int startIndex) | MiscUtil.Conversion.EndianBitConverter | [inline]
ToUInt32(byte[] value, int startIndex) | MiscUtil.Conversion.EndianBitConverter | [inline]
ToUInt64(byte[] value, int startIndex) | MiscUtil.Conversion.EndianBitConverter | [inline]
Generated on Fri Sep 22 2017 10:35:17 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Member List

  • MiscUtil
  • Conversion
  • LittleEndianBitConverter
MiscUtil.Conversion.LittleEndianBitConverter Member List
This is the complete list of members for MiscUtil.Conversion.LittleEndianBitConverter, including all inherited members.
Big | MiscUtil.Conversion.EndianBitConverter | [static]
CopyBytes(decimal value, byte[] buffer, int index) | MiscUtil.Conversion.EndianBitConverter | [inline]
CopyBytes(bool value, byte[] buffer, int index) | MiscUtil.Conversion.EndianBitConverter | [inline]
CopyBytes(char value, byte[] buffer, int index) | MiscUtil.Conversion.EndianBitConverter | [inline]
CopyBytes(double value, byte[] buffer, int index) | MiscUtil.Conversion.EndianBitConverter | [inline]
CopyBytes(short value, byte[] buffer, int index) | MiscUtil.Conversion.EndianBitConverter | [inline]
CopyBytes(int value, byte[] buffer, int index) | MiscUtil.Conversion.EndianBitConverter | [inline]
CopyBytes(long value, byte[] buffer, int index) | MiscUtil.Conversion.EndianBitConverter | [inline]
CopyBytes(float value, byte[] buffer, int index) | MiscUtil.Conversion.EndianBitConverter | [inline]
CopyBytes(ushort value, byte[] buffer, int index) | MiscUtil.Conversion.EndianBitConverter | [inline]
CopyBytes(uint value, byte[] buffer, int index) | MiscUtil.Conversion.EndianBitConverter | [inline]
CopyBytes(ulong value, byte[] buffer, int index) | MiscUtil.Conversion.EndianBitConverter | [inline]
CopyBytesImpl(long value, int bytes, byte[] buffer, int index) | MiscUtil.Conversion.LittleEndianBitConverter | [inline, protected, virtual]
DoubleToInt64Bits(double value) | MiscUtil.Conversion.EndianBitConverter | [inline]
Endianness | MiscUtil.Conversion.LittleEndianBitConverter |
FromBytes(byte[] buffer, int startIndex, int bytesToConvert) | MiscUtil.Conversion.LittleEndianBitConverter | [inline, protected, virtual]
GetBytes(decimal value) | MiscUtil.Conversion.EndianBitConverter | [inline]
GetBytes(bool value) | MiscUtil.Conversion.EndianBitConverter | [inline]
GetBytes(char value) | MiscUtil.Conversion.EndianBitConverter | [inline]
GetBytes(double value) | MiscUtil.Conversion.EndianBitConverter | [inline]
GetBytes(short value) | MiscUtil.Conversion.EndianBitConverter | [inline]
GetBytes(int value) | MiscUtil.Conversion.EndianBitConverter | [inline]
GetBytes(long value) | MiscUtil.Conversion.EndianBitConverter | [inline]
GetBytes(float value) | MiscUtil.Conversion.EndianBitConverter | [inline]
GetBytes(ushort value) | MiscUtil.Conversion.EndianBitConverter | [inline]
GetBytes(uint value) | MiscUtil.Conversion.EndianBitConverter | [inline]
GetBytes(ulong value) | MiscUtil.Conversion.EndianBitConverter | [inline]
Int32BitsToSingle(int value) | MiscUtil.Conversion.EndianBitConverter | [inline]
Int64BitsToDouble(long value) | MiscUtil.Conversion.EndianBitConverter | [inline]
IsLittleEndian() | MiscUtil.Conversion.LittleEndianBitConverter | [inline, virtual]
Little | MiscUtil.Conversion.EndianBitConverter | [static]
SingleToInt32Bits(float value) | MiscUtil.Conversion.EndianBitConverter | [inline]
ToBoolean(byte[] value, int startIndex) | MiscUtil.Conversion.EndianBitConverter | [inline]
ToChar(byte[] value, int startIndex) | MiscUtil.Conversion.EndianBitConverter | [inline]
ToDecimal(byte[] value, int startIndex) | MiscUtil.Conversion.EndianBitConverter | [inline]
ToDouble(byte[] value, int startIndex) | MiscUtil.Conversion.EndianBitConverter | [inline]
ToInt16(byte[] value, int startIndex) | MiscUtil.Conversion.EndianBitConverter | [inline]
ToInt32(byte[] value, int startIndex) | MiscUtil.Conversion.EndianBitConverter | [inline]
ToInt64(byte[] value, int startIndex) | MiscUtil.Conversion.EndianBitConverter | [inline]
ToSingle(byte[] value, int startIndex) | MiscUtil.Conversion.EndianBitConverter | [inline]
ToString(byte[] value) | MiscUtil.Conversion.EndianBitConverter | [inline, static]
ToString(byte[] value, int startIndex) | MiscUtil.Conversion.EndianBitConverter | [inline, static]
ToString(byte[] value, int startIndex, int length) | MiscUtil.Conversion.EndianBitConverter | [inline, static]
ToUInt16(byte[] value, int startIndex) | MiscUtil.Conversion.EndianBitConverter | [inline]
ToUInt32(byte[] value, int startIndex) | MiscUtil.Conversion.EndianBitConverter | [inline]
ToUInt64(byte[] value, int startIndex) | MiscUtil.Conversion.EndianBitConverter | [inline]
Generated on Fri Sep 22 2017 10:35:17 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Member List

  • MiscUtil
  • IO
  • EndianBinaryReader
MiscUtil.IO.EndianBinaryReader Member List
This is the complete list of members for MiscUtil.IO.EndianBinaryReader, including all inherited members.
BaseStream | MiscUtil.IO.EndianBinaryReader |
BitConverter | MiscUtil.IO.EndianBinaryReader |
Close() | MiscUtil.IO.EndianBinaryReader | [inline]
Dispose() | MiscUtil.IO.EndianBinaryReader | [inline]
Encoding | MiscUtil.IO.EndianBinaryReader |
EndianBinaryReader(EndianBitConverter bitConverter, Stream stream) | MiscUtil.IO.EndianBinaryReader | [inline]
EndianBinaryReader(EndianBitConverter bitConverter, Stream stream, Encoding encoding) | MiscUtil.IO.EndianBinaryReader | [inline]
Read() | MiscUtil.IO.EndianBinaryReader | [inline]
Read(char[] data, int index, int count) | MiscUtil.IO.EndianBinaryReader | [inline]
Read(byte[] buffer, int index, int count) | MiscUtil.IO.EndianBinaryReader | [inline]
Read7BitEncodedInt() | MiscUtil.IO.EndianBinaryReader | [inline]
ReadBigEndian7BitEncodedInt() | MiscUtil.IO.EndianBinaryReader | [inline]
ReadBoolean() | MiscUtil.IO.EndianBinaryReader | [inline]
ReadByte() | MiscUtil.IO.EndianBinaryReader | [inline]
ReadBytes(int count) | MiscUtil.IO.EndianBinaryReader | [inline]
ReadBytesOrThrow(int count) | MiscUtil.IO.EndianBinaryReader | [inline]
ReadDecimal() | MiscUtil.IO.EndianBinaryReader | [inline]
ReadDouble() | MiscUtil.IO.EndianBinaryReader | [inline]
ReadInt16() | MiscUtil.IO.EndianBinaryReader | [inline]
ReadInt32() | MiscUtil.IO.EndianBinaryReader | [inline]
ReadInt64() | MiscUtil.IO.EndianBinaryReader | [inline]
ReadSByte() | MiscUtil.IO.EndianBinaryReader | [inline]
ReadSingle() | MiscUtil.IO.EndianBinaryReader | [inline]
ReadString() | MiscUtil.IO.EndianBinaryReader | [inline]
ReadUInt16() | MiscUtil.IO.EndianBinaryReader | [inline]
ReadUInt32() | MiscUtil.IO.EndianBinaryReader | [inline]
ReadUInt64() | MiscUtil.IO.EndianBinaryReader | [inline]
Seek(int offset, SeekOrigin origin) | MiscUtil.IO.EndianBinaryReader | [inline]
Generated on Fri Sep 22 2017 10:35:17 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Member List

  • MiscUtil
  • IO
  • EndianBinaryWriter
MiscUtil.IO.EndianBinaryWriter Member List
This is the complete list of members for MiscUtil.IO.EndianBinaryWriter, including all inherited members.
BaseStream | MiscUtil.IO.EndianBinaryWriter |
BitConverter | MiscUtil.IO.EndianBinaryWriter |
Close() | MiscUtil.IO.EndianBinaryWriter | [inline]
Dispose() | MiscUtil.IO.EndianBinaryWriter | [inline]
Encoding | MiscUtil.IO.EndianBinaryWriter |
EndianBinaryWriter(EndianBitConverter bitConverter, Stream stream) | MiscUtil.IO.EndianBinaryWriter | [inline]
EndianBinaryWriter(EndianBitConverter bitConverter, Stream stream, Encoding encoding) | MiscUtil.IO.EndianBinaryWriter | [inline]
Flush() | MiscUtil.IO.EndianBinaryWriter | [inline]
Seek(int offset, SeekOrigin origin) | MiscUtil.IO.EndianBinaryWriter | [inline]
Write(bool value) | MiscUtil.IO.EndianBinaryWriter | [inline]
Write(short value) | MiscUtil.IO.EndianBinaryWriter | [inline]
Write(int value) | MiscUtil.IO.EndianBinaryWriter | [inline]
Write(long value) | MiscUtil.IO.EndianBinaryWriter | [inline]
Write(ushort value) | MiscUtil.IO.EndianBinaryWriter | [inline]
Write(uint value) | MiscUtil.IO.EndianBinaryWriter | [inline]
Write(ulong value) | MiscUtil.IO.EndianBinaryWriter | [inline]
Write(float value) | MiscUtil.IO.EndianBinaryWriter | [inline]
Write(double value) | MiscUtil.IO.EndianBinaryWriter | [inline]
Write(decimal value) | MiscUtil.IO.EndianBinaryWriter | [inline]
Write(byte value) | MiscUtil.IO.EndianBinaryWriter | [inline]
Write(sbyte value) | MiscUtil.IO.EndianBinaryWriter | [inline]
Write(byte[] value) | MiscUtil.IO.EndianBinaryWriter | [inline]
Write(byte[] value, int offset, int count) | MiscUtil.IO.EndianBinaryWriter | [inline]
Write(char value) | MiscUtil.IO.EndianBinaryWriter | [inline]
Write(char[] value) | MiscUtil.IO.EndianBinaryWriter | [inline]
Write(string value) | MiscUtil.IO.EndianBinaryWriter | [inline]
Write7BitEncodedInt(int value) | MiscUtil.IO.EndianBinaryWriter | [inline]
Generated on Fri Sep 22 2017 10:35:17 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Member List

  • WinUsb
  • DeviceManagement
WinUsb.DeviceManagement Member List
This is the complete list of members for WinUsb.DeviceManagement, including all inherited members.
DBT_DEVICEARRIVAL | WinUsb.DeviceManagement |
DBT_DEVICEREMOVECOMPLETE | WinUsb.DeviceManagement |
DBT_DEVTYP_DEVICEINTERFACE | WinUsb.DeviceManagement |
DBT_DEVTYP_HANDLE | WinUsb.DeviceManagement |
DEVICE_NOTIFY_ALL_INTERFACE_CLASSES | WinUsb.DeviceManagement |
DEVICE_NOTIFY_SERVICE_HANDLE | WinUsb.DeviceManagement |
DEVICE_NOTIFY_WINDOW_HANDLE | WinUsb.DeviceManagement |
FindDeviceFromGuid(System.Guid myGuid, out List< String > devicePathNames) | WinUsb.DeviceManagement | [inline, static]
RegisterForDeviceNotifications(String devicePathName, IntPtr formHandle, Guid classGuid, ref IntPtr deviceNotificationHandle) | WinUsb.DeviceManagement | [inline]
WM_DEVICECHANGE | WinUsb.DeviceManagement |
Generated on Fri Sep 22 2017 10:35:17 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Member List

  • WinUsb
  • FileIO
WinUsb.FileIO Member List
This is the complete list of members for WinUsb.FileIO, including all inherited members.
Generated on Fri Sep 22 2017 10:35:17 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Member List

  • WinUsb
  • SafeNativeMethods
WinUsb.SafeNativeMethods Member List
This is the complete list of members for WinUsb.SafeNativeMethods, including all inherited members.
WinUsb_ReadPipe(IntPtr InterfaceHandle, Byte PipeID, Byte[] Buffer, UInt32 BufferLength, ref UInt32 LengthTransferred, IntPtr Overlapped) | WinUsb.SafeNativeMethods
WinUsb_WritePipe(IntPtr InterfaceHandle, Byte PipeID, Byte[] Buffer, UInt32 BufferLength, ref UInt32 LengthTransferred, IntPtr Overlapped) | WinUsb.SafeNativeMethods
Generated on Fri Sep 22 2017 10:35:18 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Member List

  • WinUsb
  • WinUsbDevice
WinUsb.WinUsbDevice Member List
This is the complete list of members for WinUsb.WinUsbDevice, including all inherited members.
CloseDeviceHandle() | WinUsb.WinUsbDevice | [inline]
GetDeviceHandle(String devicePathName) | WinUsb.WinUsbDevice | [inline]
InitializeDevice() | WinUsb.WinUsbDevice | [inline]
myDevInfo | WinUsb.WinUsbDevice |
ReadViaBulkTransfer(Byte pipeID, UInt32 bytesToRead, ref Byte[] buffer, ref UInt32 bytesRead, ref Boolean success) | WinUsb.WinUsbDevice | [inline]
SendViaBulkTransfer(ref Byte[] buffer, UInt32 bytesToWrite) | WinUsb.WinUsbDevice | [inline]
Generated on Fri Sep 22 2017 10:35:18 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Member List

  • csDP5
  • Form1
csDP5.Form1 Member List
This is the complete list of members for csDP5.Form1, including all inherited members.
buttonFindUsbDevices | csDP5.Form1 |
buttonFindUsbDevices_Click(object sender, EventArgs e) | csDP5.Form1 | [inline]
buttonRunFW6Tests | csDP5.Form1 |
buttonRunFW6Tests_Click(object sender, EventArgs e) | csDP5.Form1 | [inline]
detectingDevices | csDP5.Form1 | [protected]
DiscoverDevices(object ThreadContext) | csDP5.Form1 | [inline, protected]
Dispose(bool disposing) | csDP5.Form1 | [inline, protected]
Form1() | csDP5.Form1 | [inline]
PlotData(int[] DataBuffer, int NumChan, bool OptScaleType) | csDP5.Form1 | [inline]
StartAutodetection() | csDP5.Form1 | [inline, protected]
Generated on Fri Sep 22 2017 10:35:16 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Member List

  • csDP5
  • Properties
  • Resources
csDP5.Properties.Resources Member List
This is the complete list of members for csDP5.Properties.Resources, including all inherited members.
Generated on Fri Sep 22 2017 10:35:17 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Member List

  • csRepeat
  • DPDevice
csRepeat.DPDevice Member List
This is the complete list of members for csRepeat.DPDevice, including all inherited members.
DeviceType | csRepeat.DPDevice |
DPDevice(InterfaceTypes interfaceType, DeviceTypes deviceType, Version firmwareVersion, Version fpgaVersion, string serialNumber) | csRepeat.DPDevice | [inline]
FirmwareVersion | csRepeat.DPDevice |
FpgaEncryptionFailureVersion | csRepeat.DPDevice | [static]
FpgaState | csRepeat.DPDevice |
FpgaStates enum name | csRepeat.DPDevice |
FpgaVersion | csRepeat.DPDevice |
HasFirmwareLoadBeenCancelled | csRepeat.DPDevice |
HasFirmwareLoadBeenCancelledDelegate() | csRepeat.DPDevice |
InterfaceType | csRepeat.DPDevice |
InterfaceTypes enum name | csRepeat.DPDevice |
PerformDeviceDetection() | csRepeat.DPDevice | [inline, static]
SerialNumber | csRepeat.DPDevice |
ToString() | csRepeat.DPDevice | [inline]
UploadProgressUpdateDelegate(long currentByteOffset, long totalBytes) | csRepeat.DPDevice |
Generated on Fri Sep 22 2017 10:35:17 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Member List

  • csRepeat
  • DisplayVersion
csRepeat.DisplayVersion Member List
This is the complete list of members for csRepeat.DisplayVersion, including all inherited members.
VersionString(DPDevice device, Version version, bool isFPGA) csRepeat.DisplayVersion [inline, static]
Generated on Fri Sep 22 2017 10:35:17 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Member List

  • csRepeat
  • FW6
  • AckResponse
csRepeat.FW6.AckResponse Member List
This is the complete list of members for csRepeat.FW6.AckResponse, including all inherited members.
AckResponse(byte[] packetContent) | csRepeat.FW6.AckResponse | [inline]
AckType | csRepeat.FW6.AckResponse |
AckTypes enum name | csRepeat.FW6.AckResponse |
Address | csRepeat.FW6.AckResponse |
AddressLsbOffset | csRepeat.FW6.AckResponse |
AddressMsbOffset | csRepeat.FW6.AckResponse |
Calculate16bitChecksum(byte[] array, int length) | csRepeat.FW6.FW6Packet | [inline, static]
ChecksumLength | csRepeat.FW6.FW6Packet |
Data | csRepeat.FW6.AckResponse |
EncodedPacket | csRepeat.FW6.FW6Packet |
IsMatch(byte pid1, byte pid2) | csRepeat.FW6.AckResponse | [inline, static]
PacketHeaderLength | csRepeat.FW6.FW6Packet |
PID1 | csRepeat.FW6.AckResponse |
PID1Offset | csRepeat.FW6.FW6Packet |
PID2 | csRepeat.FW6.AckResponse |
PID2Offset | csRepeat.FW6.FW6Packet |
RecordTypeOffset | csRepeat.FW6.AckResponse |
SYNC1 | csRepeat.FW6.FW6Packet |
SYNC2 | csRepeat.FW6.FW6Packet |
ToString() | csRepeat.FW6.FW6Packet | [inline]
Generated on Fri Sep 22 2017 10:35:17 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Member List

  • csRepeat
  • FW6
  • ClearSpectrum
csRepeat.FW6.ClearSpectrum Member List
This is the complete list of members for csRepeat.FW6.ClearSpectrum, including all inherited members.
Calculate16bitChecksum(byte[] array, int length) | csRepeat.FW6.FW6Packet | [inline, static]
ChecksumLength | csRepeat.FW6.FW6Packet |
ClearSpectrum() | csRepeat.FW6.ClearSpectrum | [inline]
Data | csRepeat.FW6.ClearSpectrum |
EncodedPacket | csRepeat.FW6.FW6Packet |
PacketHeaderLength | csRepeat.FW6.FW6Packet |
PID1 | csRepeat.FW6.ClearSpectrum |
PID1Offset | csRepeat.FW6.FW6Packet |
PID2 | csRepeat.FW6.ClearSpectrum |
PID2Offset | csRepeat.FW6.FW6Packet |
SYNC1 | csRepeat.FW6.FW6Packet |
SYNC2 | csRepeat.FW6.FW6Packet |
ToString() | csRepeat.FW6.FW6Packet | [inline]
Generated on Fri Sep 22 2017 10:35:17 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Member List

  • csRepeat
  • FW6
  • Configuration
csRepeat.FW6.Configuration Member List
This is the complete list of members for csRepeat.FW6.Configuration, including all inherited members.
Calculate16bitChecksum(byte[] array, int length) | csRepeat.FW6.FW6Packet | [inline, static]
ChecksumLength | csRepeat.FW6.FW6Packet |
Configuration(byte[] data) | csRepeat.FW6.Configuration | [inline]
Data | csRepeat.FW6.Configuration |
EncodedPacket | csRepeat.FW6.FW6Packet |
PacketHeaderLength | csRepeat.FW6.FW6Packet |
PID1 | csRepeat.FW6.Configuration |
PID1Offset | csRepeat.FW6.FW6Packet |
PID2 | csRepeat.FW6.Configuration |
PID2Offset | csRepeat.FW6.FW6Packet |
SYNC1 | csRepeat.FW6.FW6Packet |
SYNC2 | csRepeat.FW6.FW6Packet |
ToString() | csRepeat.FW6.FW6Packet | [inline]
Generated on Fri Sep 22 2017 10:35:17 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Member List

  • csRepeat
  • FW6
  • ConfigurationReadback
csRepeat.FW6.ConfigurationReadback Member List
This is the complete list of members for csRepeat.FW6.ConfigurationReadback, including all inherited members.
Calculate16bitChecksum(byte[] array, int length) | csRepeat.FW6.FW6Packet | [inline, static]
ChecksumLength | csRepeat.FW6.FW6Packet |
ConfigurationReadback(byte[] data) | csRepeat.FW6.ConfigurationReadback | [inline]
Data | csRepeat.FW6.ConfigurationReadback |
EncodedPacket | csRepeat.FW6.FW6Packet |
PacketHeaderLength | csRepeat.FW6.FW6Packet |
PID1 | csRepeat.FW6.ConfigurationReadback |
PID1Offset | csRepeat.FW6.FW6Packet |
PID2 | csRepeat.FW6.ConfigurationReadback |
PID2Offset | csRepeat.FW6.FW6Packet |
SYNC1 | csRepeat.FW6.FW6Packet |
SYNC2 | csRepeat.FW6.FW6Packet |
ToString() | csRepeat.FW6.FW6Packet | [inline]
Generated on Fri Sep 22 2017 10:35:17 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Member List

  • csRepeat
  • FW6
  • ConfigurationResponse
csRepeat.FW6.ConfigurationResponse Member List
This is the complete list of members for csRepeat.FW6.ConfigurationResponse, including all inherited members.
Calculate16bitChecksum(byte[] array, int length) | csRepeat.FW6.FW6Packet | [inline, static]
ChecksumLength | csRepeat.FW6.FW6Packet |
ConfigurationResponse(byte[] packetContent) | csRepeat.FW6.ConfigurationResponse | [inline]
Data | csRepeat.FW6.ConfigurationResponse |
EncodedPacket | csRepeat.FW6.FW6Packet |
IsMatch(byte pid1, byte pid2) | csRepeat.FW6.ConfigurationResponse | [inline, static]
PacketHeaderLength | csRepeat.FW6.FW6Packet |
PID1 | csRepeat.FW6.ConfigurationResponse |
PID1Offset | csRepeat.FW6.FW6Packet |
PID2 | csRepeat.FW6.ConfigurationResponse |
PID2Offset | csRepeat.FW6.FW6Packet |
SYNC1 | csRepeat.FW6.FW6Packet |
SYNC2 | csRepeat.FW6.FW6Packet |
ToString() | csRepeat.FW6.FW6Packet | [inline]
Generated on Fri Sep 22 2017 10:35:17 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Member List

  • csRepeat
  • FW6
  • DPDeviceEthernet
csRepeat.FW6.DPDeviceEthernet Member List
This is the complete list of members for csRepeat.FW6.DPDeviceEthernet, including all inherited members.
ClearDppData() | csRepeat.FW6.DPDeviceEthernet | [inline, virtual]
Connect() | csRepeat.FW6.DPDeviceEthernet | [inline, protected, virtual]
ConnectForTesting() | csRepeat.FW6.DPDeviceEthernet | [inline, virtual]
DataPacketAckTimeoutMS | csRepeat.FW6.DPDeviceEthernet | [protected]
DetectDevices() | csRepeat.FW6.DPDeviceEthernet | [inline, static]
deviceEndPoint | csRepeat.FW6.DPDeviceEthernet |
DeviceType | csRepeat.DPDevice |
Disconnect() | csRepeat.FW6.DPDeviceEthernet | [inline, protected, virtual]
DisconnectForTesting() | csRepeat.FW6.DPDeviceEthernet | [inline, virtual]
DisplayConfiguration(string strCommands) | csRepeat.FW6.DPDeviceEthernet | [inline, virtual]
DPDevice(InterfaceTypes interfaceType, DeviceTypes deviceType, Version firmwareVersion, Version fpgaVersion, string serialNumber) | csRepeat.DPDevice | [inline]
DPDeviceEthernet(DeviceTypes deviceType, Version firmwareVersion, Version fpgaVersion, string serialNumber, IPEndPoint deviceEndPoint) | csRepeat.FW6.DPDeviceEthernet | [inline]
FirmwareVersion | csRepeat.DPDevice |
FpgaEncryptionFailureVersion | csRepeat.DPDevice | [static]
FpgaState | csRepeat.DPDevice |
FpgaStates enum name | csRepeat.DPDevice |
FpgaVersion | csRepeat.DPDevice |
FW6Device(InterfaceTypes interfaceType, DeviceTypes deviceType, Version firmwareVersion, Version fpgaVersion, string serialNumber) | csRepeat.FW6.FW6Device | [inline]
GetConfiguration(string strCommands, ref byte[] readBuffer, out uint bytesRead) | csRepeat.FW6.DPDeviceEthernet | [inline, virtual]
GetDiagnosticResponse | csRepeat.FW6.FW6Device |
GetFullConfiguration(bool PC5_PRESENT, int DppType, bool isDP5_RevDxGains, byte DPP_ECO) | csRepeat.FW6.DPDeviceEthernet | [inline, virtual]
GetRawStatus(ref byte[] readBuffer, out uint bytesRead) | csRepeat.FW6.DPDeviceEthernet | [inline, virtual]
GetSpectrumData(ref byte[] readBuffer, out uint bytesRead) | csRepeat.FW6.DPDeviceEthernet | [inline, virtual]
HasFirmwareLoadBeenCancelled | csRepeat.DPDevice |
HasFirmwareLoadBeenCancelledDelegate() | csRepeat.DPDevice |
InterfaceType | csRepeat.DPDevice |
InterfaceTypes enum name | csRepeat.DPDevice |
mcaChannels | csRepeat.FW6.DPDeviceEthernet |
PauseDppData() | csRepeat.FW6.DPDeviceEthernet | [inline, virtual]
PerformDeviceDetection() | csRepeat.DPDevice | [inline, static]
SendAndGetResponse(FW6Packet packetToSend, int timeoutMS) | csRepeat.FW6.DPDeviceEthernet | [inline, protected, virtual]
SendAndGetResponse(FW6Packet packetToSend, int delayBeforeReadMS, int timeoutMS) | csRepeat.FW6.DPDeviceEthernet | [inline, protected, virtual]
SendAndWaitForAck(FW6Packet packetToSend, int timeoutMS) | csRepeat.FW6.FW6Device | [inline, protected]
SendAndWaitForAck(FW6Packet packetToSend, int delayBeforeReadMS, int timeoutMS) | csRepeat.FW6.FW6Device | [inline, protected]
SendConfiguration(string strCommands) | csRepeat.FW6.DPDeviceEthernet | [inline, virtual]
SerialNumber | csRepeat.DPDevice |
SetAdcCalibration(byte adcGain, byte adcOffset) | csRepeat.FW6.FW6Device | [inline]
SetDCalCalibration(ushort dcalValue) | csRepeat.FW6.FW6Device | [inline]
SetPZCorrection(byte pzCorrection) | csRepeat.FW6.FW6Device | [inline]
SetuCTemperatureCalibration(byte uCTempCalibration) | csRepeat.FW6.FW6Device | [inline]
StartDppData() | csRepeat.FW6.DPDeviceEthernet | [inline, virtual]
ToString() | csRepeat.DPDevice | [inline]
udpClient | csRepeat.FW6.DPDeviceEthernet | [protected]
udpDiscoveryPort | csRepeat.FW6.DPDeviceEthernet |
UploadProgressUpdateDelegate(long currentByteOffset, long totalBytes) | csRepeat.DPDevice |
Generated on Fri Sep 22 2017 10:35:17 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Member List

  • csRepeat
  • FW6
  • DPDeviceSerialFW6
csRepeat.FW6.DPDeviceSerialFW6 Member List
This is the complete list of members for csRepeat.FW6.DPDeviceSerialFW6, including all inherited members.
ClearDppData() | csRepeat.FW6.DPDeviceSerialFW6 | [inline, virtual]
Connect() | csRepeat.FW6.DPDeviceSerialFW6 | [inline, protected, virtual]
ConnectForTesting() | csRepeat.FW6.DPDeviceSerialFW6 | [inline, virtual]
DataPacketAckTimeoutMS | csRepeat.FW6.DPDeviceSerialFW6 | [protected]
DetectDevices() | csRepeat.FW6.DPDeviceSerialFW6 | [inline, static]
DeviceType | csRepeat.DPDevice |
Disconnect() | csRepeat.FW6.DPDeviceSerialFW6 | [inline, protected, virtual]
DisconnectForTesting() | csRepeat.FW6.DPDeviceSerialFW6 | [inline, virtual]
DisplayConfiguration(string strCommands) | csRepeat.FW6.DPDeviceSerialFW6 | [inline, virtual]
DPDevice(InterfaceTypes interfaceType, DeviceTypes deviceType, Version firmwareVersion, Version fpgaVersion, string serialNumber) | csRepeat.DPDevice | [inline]
DPDeviceSerialFW6(DeviceTypes deviceType, Version firmwareVersion, Version fpgaVersion, string serialNumber, string portName) | csRepeat.FW6.DPDeviceSerialFW6 | [inline]
FirmwareVersion | csRepeat.DPDevice |
FpgaEncryptionFailureVersion | csRepeat.DPDevice | [static]
FpgaState | csRepeat.DPDevice |
FpgaStates enum name | csRepeat.DPDevice |
FpgaVersion | csRepeat.DPDevice |
FW6Device(InterfaceTypes interfaceType, DeviceTypes deviceType, Version firmwareVersion, Version fpgaVersion, string serialNumber) | csRepeat.FW6.FW6Device | [inline]
GetConfiguration(string strCommands, ref byte[] readBuffer, out uint bytesRead) | csRepeat.FW6.DPDeviceSerialFW6 | [inline, virtual]
GetDiagnosticResponse | csRepeat.FW6.FW6Device |
GetFullConfiguration(bool PC5_PRESENT, int DppType, bool isDP5_RevDxGains, byte DPP_ECO) | csRepeat.FW6.DPDeviceSerialFW6 | [inline, virtual]
GetRawStatus(ref byte[] readBuffer, out uint bytesRead) | csRepeat.FW6.DPDeviceSerialFW6 | [inline, virtual]
GetSpectrumData(ref byte[] readBuffer, out uint bytesRead) | csRepeat.FW6.DPDeviceSerialFW6 | [inline, virtual]
HasFirmwareLoadBeenCancelled | csRepeat.DPDevice |
HasFirmwareLoadBeenCancelledDelegate() | csRepeat.DPDevice |
InterfaceType | csRepeat.DPDevice |
InterfaceTypes enum name | csRepeat.DPDevice |
mcaChannels | csRepeat.FW6.DPDeviceSerialFW6 |
PauseDppData() | csRepeat.FW6.DPDeviceSerialFW6 | [inline, virtual]
PerformDeviceDetection() | csRepeat.DPDevice | [inline, static]
PortName | csRepeat.FW6.DPDeviceSerialFW6 |
SendAndGetResponse(FW6Packet packetToSend, int timeoutMS) | csRepeat.FW6.DPDeviceSerialFW6 | [inline, protected, virtual]
SendAndGetResponse(FW6Packet packetToSend, int delayBeforeReadMS, int timeoutMS) | csRepeat.FW6.DPDeviceSerialFW6 | [inline, protected, virtual]
SendAndWaitForAck(FW6Packet packetToSend, int timeoutMS) | csRepeat.FW6.FW6Device | [inline, protected]
SendAndWaitForAck(FW6Packet packetToSend, int delayBeforeReadMS, int timeoutMS) | csRepeat.FW6.FW6Device | [inline, protected]
SendConfiguration(string strCommands) | csRepeat.FW6.DPDeviceSerialFW6 | [inline, virtual]
SerialNumber | csRepeat.DPDevice |
SetAdcCalibration(byte adcGain, byte adcOffset) | csRepeat.FW6.FW6Device | [inline]
SetDCalCalibration(ushort dcalValue) | csRepeat.FW6.FW6Device | [inline]
SetPZCorrection(byte pzCorrection) | csRepeat.FW6.FW6Device | [inline]
SetuCTemperatureCalibration(byte uCTempCalibration) | csRepeat.FW6.FW6Device | [inline]
StartDppData() | csRepeat.FW6.DPDeviceSerialFW6 | [inline, virtual]
ToString() | csRepeat.FW6.DPDeviceSerialFW6 | [inline]
UploadProgressUpdateDelegate(long currentByteOffset, long totalBytes) | csRepeat.DPDevice |
Generated on Fri Sep 22 2017 10:35:17 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Member List

  • csRepeat
  • FW6
  • DPDeviceUsb
csRepeat.FW6.DPDeviceUsb Member List
This is the complete list of members for csRepeat.FW6.DPDeviceUsb, including all inherited members.
ClearDppData() | csRepeat.FW6.DPDeviceUsb | [inline, virtual]
Connect() | csRepeat.FW6.DPDeviceUsb | [inline, protected, virtual]
ConnectForTesting() | csRepeat.FW6.DPDeviceUsb | [inline, virtual]
DataPacketAckTimeoutMS | csRepeat.FW6.DPDeviceUsb | [protected]
DetectDevices() | csRepeat.FW6.DPDeviceUsb | [inline, static]
DeviceType | csRepeat.DPDevice |
Disconnect() | csRepeat.FW6.DPDeviceUsb | [inline, protected, virtual]
DisconnectForTesting() | csRepeat.FW6.DPDeviceUsb | [inline, virtual]
DisplayConfiguration(string strCommands) | csRepeat.FW6.DPDeviceUsb | [inline, virtual]
DPDevice(InterfaceTypes interfaceType, DeviceTypes deviceType, Version firmwareVersion, Version fpgaVersion, string serialNumber) | csRepeat.DPDevice | [inline]
DPDeviceUsb(DeviceTypes deviceType, Version firmwareVersion, Version fpgaVersion, string serialNumber, string devicePath) | csRepeat.FW6.DPDeviceUsb | [inline]
FirmwareVersion | csRepeat.DPDevice |
FpgaEncryptionFailureVersion | csRepeat.DPDevice | [static]
FpgaState | csRepeat.DPDevice |
FpgaStates enum name | csRepeat.DPDevice |
FpgaVersion | csRepeat.DPDevice |
FW6Device(InterfaceTypes interfaceType, DeviceTypes deviceType, Version firmwareVersion, Version fpgaVersion, string serialNumber) | csRepeat.FW6.FW6Device | [inline]
GetConfiguration(string strCommands, ref byte[] readBuffer, out uint bytesRead) | csRepeat.FW6.DPDeviceUsb | [inline, virtual]
GetDiagnosticResponse | csRepeat.FW6.FW6Device |
GetFullConfiguration(bool PC5_PRESENT, int DppType, bool isDP5_RevDxGains, byte DPP_ECO) | csRepeat.FW6.DPDeviceUsb | [inline, virtual]
GetRawStatus(ref byte[] readBuffer, out uint bytesRead) | csRepeat.FW6.DPDeviceUsb | [inline, virtual]
GetSpectrumData(ref byte[] readBuffer, out uint bytesRead) | csRepeat.FW6.DPDeviceUsb | [inline, virtual]
HasFirmwareLoadBeenCancelled | csRepeat.DPDevice |
HasFirmwareLoadBeenCancelledDelegate() | csRepeat.DPDevice |
InterfaceType | csRepeat.DPDevice |
InterfaceTypes enum name | csRepeat.DPDevice |
mcaChannels | csRepeat.FW6.DPDeviceUsb |
PauseDppData() | csRepeat.FW6.DPDeviceUsb | [inline, virtual]
PerformDeviceDetection() | csRepeat.DPDevice | [inline, static]
ReadData(ref byte[] readBuffer, out uint bytesRead) | csRepeat.FW6.DPDeviceUsb | [inline]
SendAndGetResponse(FW6Packet packetToSend, int timeoutMS) | csRepeat.FW6.DPDeviceUsb | [inline, protected, virtual]
SendAndGetResponse(FW6Packet packetToSend, int delayBeforeReadMS, int timeoutMS) | csRepeat.FW6.DPDeviceUsb | [inline, protected, virtual]
SendAndWaitForAck(FW6Packet packetToSend, int timeoutMS) | csRepeat.FW6.FW6Device | [inline, protected]
SendAndWaitForAck(FW6Packet packetToSend, int delayBeforeReadMS, int timeoutMS) | csRepeat.FW6.FW6Device | [inline, protected]
SendCommand(FW6Packet packet) | csRepeat.FW6.DPDeviceUsb | [inline]
SendConfiguration(string strCommands) | csRepeat.FW6.DPDeviceUsb | [inline, virtual]
SerialNumber | csRepeat.DPDevice |
SetAdcCalibration(byte adcGain, byte adcOffset) | csRepeat.FW6.FW6Device | [inline]
SetDCalCalibration(ushort dcalValue) | csRepeat.FW6.FW6Device | [inline]
SetPZCorrection(byte pzCorrection) | csRepeat.FW6.FW6Device | [inline]
SetuCTemperatureCalibration(byte uCTempCalibration) | csRepeat.FW6.FW6Device | [inline]
StartDppData() | csRepeat.FW6.DPDeviceUsb | [inline, virtual]
ToString() | csRepeat.DPDevice | [inline]
UploadProgressUpdateDelegate(long currentByteOffset, long totalBytes) | csRepeat.DPDevice |
Generated on Fri Sep 22 2017 10:35:17 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Member List

  • csRepeat
  • FW6
  • DiagnosticRequest
csRepeat.FW6.DiagnosticRequest Member List
This is the complete list of members for csRepeat.FW6.DiagnosticRequest, including all inherited members.
Calculate16bitChecksum(byte[] array, int length) | csRepeat.FW6.FW6Packet | [inline, static]
ChecksumLength | csRepeat.FW6.FW6Packet |
Data | csRepeat.FW6.DiagnosticRequest |
EncodedPacket | csRepeat.FW6.FW6Packet |
PacketHeaderLength | csRepeat.FW6.FW6Packet |
PID1 | csRepeat.FW6.DiagnosticRequest |
PID1Offset | csRepeat.FW6.FW6Packet |
PID2 | csRepeat.FW6.DiagnosticRequest |
PID2Offset | csRepeat.FW6.FW6Packet |
SYNC1 | csRepeat.FW6.FW6Packet |
SYNC2 | csRepeat.FW6.FW6Packet |
ToString() | csRepeat.FW6.FW6Packet | [inline]
Generated on Fri Sep 22 2017 10:35:17 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Member List

  • csRepeat
  • FW6
  • DiagnosticResponse
csRepeat.FW6.DiagnosticResponse Member List
This is the complete list of members for csRepeat.FW6.DiagnosticResponse, including all inherited members.
ADCGainCalibration | csRepeat.FW6.DiagnosticResponse |
ADCOffsetCalibration | csRepeat.FW6.DiagnosticResponse |
Calculate16bitChecksum(byte[] array, int length) | csRepeat.FW6.FW6Packet | [inline, static]
ChecksumLength | csRepeat.FW6.FW6Packet |
Data | csRepeat.FW6.DiagnosticResponse |
DCalSetting | csRepeat.FW6.DiagnosticResponse |
DiagnosticResponse(byte[] packetContent) | csRepeat.FW6.DiagnosticResponse | [inline]
EncodedPacket | csRepeat.FW6.FW6Packet |
FirmwareMajor | csRepeat.FW6.DiagnosticResponse |
FirmwareMinor | csRepeat.FW6.DiagnosticResponse |
FpgaMajor | csRepeat.FW6.DiagnosticResponse |
FpgaMinor | csRepeat.FW6.DiagnosticResponse |
IsMatch(byte pid1, byte pid2) | csRepeat.FW6.DiagnosticResponse | [inline, static]
PacketHeaderLength | csRepeat.FW6.FW6Packet |
PID1 | csRepeat.FW6.DiagnosticResponse |
PID1Offset | csRepeat.FW6.FW6Packet |
PID2 | csRepeat.FW6.DiagnosticResponse |
PID2Offset | csRepeat.FW6.FW6Packet |
pzCorrection | csRepeat.FW6.DiagnosticResponse |
SYNC1 | csRepeat.FW6.FW6Packet |
SYNC2 | csRepeat.FW6.FW6Packet |
ToString() | csRepeat.FW6.FW6Packet | [inline]
uCTemperatureCalibration | csRepeat.FW6.DiagnosticResponse |
Generated on Fri Sep 22 2017 10:35:17 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Member List

  • csRepeat
  • FW6
  • DisableMCA
csRepeat.FW6.DisableMCA Member List
This is the complete list of members for csRepeat.FW6.DisableMCA, including all inherited members.
Calculate16bitChecksum(byte[] array, int length) | csRepeat.FW6.FW6Packet | [inline, static]
ChecksumLength | csRepeat.FW6.FW6Packet |
Data | csRepeat.FW6.DisableMCA |
DisableMCA() | csRepeat.FW6.DisableMCA | [inline]
EncodedPacket | csRepeat.FW6.FW6Packet |
PacketHeaderLength | csRepeat.FW6.FW6Packet |
PID1 | csRepeat.FW6.DisableMCA |
PID1Offset | csRepeat.FW6.FW6Packet |
PID2 | csRepeat.FW6.DisableMCA |
PID2Offset | csRepeat.FW6.FW6Packet |
SYNC1 | csRepeat.FW6.FW6Packet |
SYNC2 | csRepeat.FW6.FW6Packet |
ToString() | csRepeat.FW6.FW6Packet | [inline]
Generated on Fri Sep 22 2017 10:35:17 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Member List

  • csRepeat
  • FW6
  • EnableMCA
csRepeat.FW6.EnableMCA Member List
This is the complete list of members for csRepeat.FW6.EnableMCA, including all inherited members.
Calculate16bitChecksum(byte[] array, int length) | csRepeat.FW6.FW6Packet | [inline, static]
ChecksumLength | csRepeat.FW6.FW6Packet |
Data | csRepeat.FW6.EnableMCA |
EnableMCA() | csRepeat.FW6.EnableMCA | [inline]
EncodedPacket | csRepeat.FW6.FW6Packet |
PacketHeaderLength | csRepeat.FW6.FW6Packet |
PID1 | csRepeat.FW6.EnableMCA |
PID1Offset | csRepeat.FW6.FW6Packet |
PID2 | csRepeat.FW6.EnableMCA |
PID2Offset | csRepeat.FW6.FW6Packet |
SYNC1 | csRepeat.FW6.FW6Packet |
SYNC2 | csRepeat.FW6.FW6Packet |
ToString() | csRepeat.FW6.FW6Packet | [inline]
Generated on Fri Sep 22 2017 10:35:17 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Member List

  • csRepeat
  • FW6
  • FW6Device
csRepeat.FW6.FW6Device Member List
This is the complete list of members for csRepeat.FW6.FW6Device, including all inherited members.
ClearDppData() | csRepeat.FW6.FW6Device | [pure virtual]
Connect() | csRepeat.FW6.FW6Device | [protected, pure virtual]
ConnectForTesting() | csRepeat.FW6.FW6Device | [pure virtual]
DataPacketAckTimeoutMS | csRepeat.FW6.FW6Device | [protected]
DeviceType | csRepeat.DPDevice |
Disconnect() | csRepeat.FW6.FW6Device | [protected, pure virtual]
DisconnectForTesting() | csRepeat.FW6.FW6Device | [pure virtual]
DisplayConfiguration(string strCommands) | csRepeat.FW6.FW6Device | [pure virtual]
DPDevice(InterfaceTypes interfaceType, DeviceTypes deviceType, Version firmwareVersion, Version fpgaVersion, string serialNumber) | csRepeat.DPDevice | [inline]
FirmwareVersion | csRepeat.DPDevice |
FpgaEncryptionFailureVersion | csRepeat.DPDevice | [static]
FpgaState | csRepeat.DPDevice |
FpgaStates enum name | csRepeat.DPDevice |
FpgaVersion | csRepeat.DPDevice |
FW6Device(InterfaceTypes interfaceType, DeviceTypes deviceType, Version firmwareVersion, Version fpgaVersion, string serialNumber) | csRepeat.FW6.FW6Device | [inline]
GetConfiguration(string strCommands, ref byte[] readBuffer, out uint bytesRead) | csRepeat.FW6.FW6Device | [pure virtual]
GetDiagnosticResponse | csRepeat.FW6.FW6Device |
GetFullConfiguration(bool PC5_PRESENT, int DppType, bool isDP5_RevDxGains, byte DPP_ECO) | csRepeat.FW6.FW6Device | [pure virtual]
GetRawStatus(ref byte[] readBuffer, out uint bytesRead) | csRepeat.FW6.FW6Device | [pure virtual]
GetSpectrumData(ref byte[] readBuffer, out uint bytesRead) | csRepeat.FW6.FW6Device | [pure virtual]
HasFirmwareLoadBeenCancelled | csRepeat.DPDevice |
HasFirmwareLoadBeenCancelledDelegate() | csRepeat.DPDevice |
InterfaceType | csRepeat.DPDevice |
InterfaceTypes enum name | csRepeat.DPDevice |
mcaChannels | csRepeat.FW6.FW6Device |
PauseDppData() | csRepeat.FW6.FW6Device | [pure virtual]
PerformDeviceDetection() | csRepeat.DPDevice | [inline, static]
SendAndGetResponse(FW6Packet packetToSend, int timeoutMS) | csRepeat.FW6.FW6Device | [protected, pure virtual]
SendAndGetResponse(FW6Packet packetToSend, int delayBeforeReadMS, int timeoutMS) | csRepeat.FW6.FW6Device | [protected, pure virtual]
SendAndWaitForAck(FW6Packet packetToSend, int timeoutMS) | csRepeat.FW6.FW6Device | [inline, protected]
SendAndWaitForAck(FW6Packet packetToSend, int delayBeforeReadMS, int timeoutMS) | csRepeat.FW6.FW6Device | [inline, protected]
SendConfiguration(string strCommands) | csRepeat.FW6.FW6Device | [pure virtual]
SerialNumber | csRepeat.DPDevice |
SetAdcCalibration(byte adcGain, byte adcOffset) | csRepeat.FW6.FW6Device | [inline]
SetDCalCalibration(ushort dcalValue) | csRepeat.FW6.FW6Device | [inline]
SetPZCorrection(byte pzCorrection) | csRepeat.FW6.FW6Device | [inline]
SetuCTemperatureCalibration(byte uCTempCalibration) | csRepeat.FW6.FW6Device | [inline]
StartDppData() | csRepeat.FW6.FW6Device | [pure virtual]
ToString() | csRepeat.DPDevice | [inline]
UploadProgressUpdateDelegate(long currentByteOffset, long totalBytes) | csRepeat.DPDevice |
Generated on Fri Sep 22 2017 10:35:17 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Member List

  • csRepeat
  • FW6
  • FW6Packet
csRepeat.FW6.FW6Packet Member List
This is the complete list of members for csRepeat.FW6.FW6Packet, including all inherited members.
Calculate16bitChecksum(byte[] array, int length) | csRepeat.FW6.FW6Packet | [inline, static]
ChecksumLength | csRepeat.FW6.FW6Packet |
Data | csRepeat.FW6.FW6Packet |
EncodedPacket | csRepeat.FW6.FW6Packet |
PacketHeaderLength | csRepeat.FW6.FW6Packet |
PID1 | csRepeat.FW6.FW6Packet |
PID1Offset | csRepeat.FW6.FW6Packet |
PID2 | csRepeat.FW6.FW6Packet |
PID2Offset | csRepeat.FW6.FW6Packet |
SYNC1 | csRepeat.FW6.FW6Packet |
SYNC2 | csRepeat.FW6.FW6Packet |
ToString() | csRepeat.FW6.FW6Packet | [inline]
Generated on Fri Sep 22 2017 10:35:17 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Member List

  • csRepeat
  • FW6
  • FW6PacketParser
csRepeat.FW6.FW6PacketParser Member List
This is the complete list of members for csRepeat.FW6.FW6PacketParser, including all inherited members.
FW6PacketParser() | csRepeat.FW6.FW6PacketParser | [inline]
HandleBytes(out HandleStates state, byte[] data, int dataLength) | csRepeat.FW6.FW6PacketParser | [inline]
HandleStates enum name | csRepeat.FW6.FW6PacketParser |
Generated on Fri Sep 22 2017 10:35:17 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Member List

  • csRepeat
  • FW6
  • MessageHandler
csRepeat.FW6.MessageHandler Member List
This is the complete list of members for csRepeat.FW6.MessageHandler, including all inherited members.
MessageHandler() | csRepeat.FW6.MessageHandler | [inline]
WndProc(ref Message msg) | csRepeat.FW6.MessageHandler | [inline, protected]
Generated on Fri Sep 22 2017 10:35:17 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Member List

  • csRepeat
  • FW6
  • SetADCCalibrationRequest
csRepeat.FW6.SetADCCalibrationRequest Member List
This is the complete list of members for csRepeat.FW6.SetADCCalibrationRequest, including all inherited members.
Calculate16bitChecksum(byte[] array, int length) | csRepeat.FW6.FW6Packet | [inline, static]
ChecksumLength | csRepeat.FW6.FW6Packet |
Data | csRepeat.FW6.SetADCCalibrationRequest |
EncodedPacket | csRepeat.FW6.FW6Packet |
PacketHeaderLength | csRepeat.FW6.FW6Packet |
PID1 | csRepeat.FW6.SetADCCalibrationRequest |
PID1Offset | csRepeat.FW6.FW6Packet |
PID2 | csRepeat.FW6.SetADCCalibrationRequest |
PID2Offset | csRepeat.FW6.FW6Packet |
SetADCCalibrationRequest(byte adcGain, byte adcOffset) | csRepeat.FW6.SetADCCalibrationRequest | [inline]
SYNC1 | csRepeat.FW6.FW6Packet |
SYNC2 | csRepeat.FW6.FW6Packet |
ToString() | csRepeat.FW6.FW6Packet | [inline]
Generated on Fri Sep 22 2017 10:35:17 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Member List

  • csRepeat
  • FW6
  • SetDCalRequest
csRepeat.FW6.SetDCalRequest Member List
This is the complete list of members for csRepeat.FW6.SetDCalRequest, including all inherited members.
Calculate16bitChecksum(byte[] array, int length) | csRepeat.FW6.FW6Packet | [inline, static]
ChecksumLength | csRepeat.FW6.FW6Packet |
Data | csRepeat.FW6.SetDCalRequest |
EncodedPacket | csRepeat.FW6.FW6Packet |
PacketHeaderLength | csRepeat.FW6.FW6Packet |
PID1 | csRepeat.FW6.SetDCalRequest |
PID1Offset | csRepeat.FW6.FW6Packet |
PID2 | csRepeat.FW6.SetDCalRequest |
PID2Offset | csRepeat.FW6.FW6Packet |
SetDCalRequest(ushort dcalValue) | csRepeat.FW6.SetDCalRequest | [inline]
SYNC1 | csRepeat.FW6.FW6Packet |
SYNC2 | csRepeat.FW6.FW6Packet |
ToString() | csRepeat.FW6.FW6Packet | [inline]
Generated on Fri Sep 22 2017 10:35:17 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Member List

  • csRepeat
  • FW6
  • SetPZCorrectionRequest
csRepeat.FW6.SetPZCorrectionRequest Member List
This is the complete list of members for csRepeat.FW6.SetPZCorrectionRequest, including all inherited members.
Calculate16bitChecksum(byte[] array, int length) | csRepeat.FW6.FW6Packet | [inline, static]
ChecksumLength | csRepeat.FW6.FW6Packet |
Data | csRepeat.FW6.SetPZCorrectionRequest |
EncodedPacket | csRepeat.FW6.FW6Packet |
PacketHeaderLength | csRepeat.FW6.FW6Packet |
PID1 | csRepeat.FW6.SetPZCorrectionRequest |
PID1Offset | csRepeat.FW6.FW6Packet |
PID2 | csRepeat.FW6.SetPZCorrectionRequest |
PID2Offset | csRepeat.FW6.FW6Packet |
SetPZCorrectionRequest(byte pzCorrection) | csRepeat.FW6.SetPZCorrectionRequest | [inline]
SYNC1 | csRepeat.FW6.FW6Packet |
SYNC2 | csRepeat.FW6.FW6Packet |
ToString() | csRepeat.FW6.FW6Packet | [inline]
Generated on Fri Sep 22 2017 10:35:17 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Member List

  • csRepeat
  • FW6
  • SetuCTemperatureCalibrationRequest
csRepeat.FW6.SetuCTemperatureCalibrationRequest Member List
This is the complete list of members for csRepeat.FW6.SetuCTemperatureCalibrationRequest, including all inherited members.
Calculate16bitChecksum(byte[] array, int length) | csRepeat.FW6.FW6Packet | [inline, static]
ChecksumLength | csRepeat.FW6.FW6Packet |
Data | csRepeat.FW6.SetuCTemperatureCalibrationRequest |
EncodedPacket | csRepeat.FW6.FW6Packet |
PacketHeaderLength | csRepeat.FW6.FW6Packet |
PID1 | csRepeat.FW6.SetuCTemperatureCalibrationRequest |
PID1Offset | csRepeat.FW6.FW6Packet |
PID2 | csRepeat.FW6.SetuCTemperatureCalibrationRequest |
PID2Offset | csRepeat.FW6.FW6Packet |
SetuCTemperatureCalibrationRequest(byte uCTempCalibration) | csRepeat.FW6.SetuCTemperatureCalibrationRequest | [inline]
SYNC1 | csRepeat.FW6.FW6Packet |
SYNC2 | csRepeat.FW6.FW6Packet |
ToString() | csRepeat.FW6.FW6Packet | [inline]
Generated on Fri Sep 22 2017 10:35:17 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Member List

  • csRepeat
  • FW6
  • SpectrumRequest
csRepeat.FW6.SpectrumRequest Member List
This is the complete list of members for csRepeat.FW6.SpectrumRequest, including all inherited members.
Calculate16bitChecksum(byte[] array, int length) | csRepeat.FW6.FW6Packet | [inline, static]
ChecksumLength | csRepeat.FW6.FW6Packet |
Data | csRepeat.FW6.SpectrumRequest |
EncodedPacket | csRepeat.FW6.FW6Packet |
PacketHeaderLength | csRepeat.FW6.FW6Packet |
PID1 | csRepeat.FW6.SpectrumRequest |
PID1Offset | csRepeat.FW6.FW6Packet |
PID2 | csRepeat.FW6.SpectrumRequest |
PID2Offset | csRepeat.FW6.FW6Packet |
SpectrumRequest() | csRepeat.FW6.SpectrumRequest | [inline]
SYNC1 | csRepeat.FW6.FW6Packet |
SYNC2 | csRepeat.FW6.FW6Packet |
ToString() | csRepeat.FW6.FW6Packet | [inline]
Generated on Fri Sep 22 2017 10:35:17 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Member List

  • csRepeat
  • FW6
  • SpectrumResponse
csRepeat.FW6.SpectrumResponse Member List
This is the complete list of members for csRepeat.FW6.SpectrumResponse, including all inherited members.
Calculate16bitChecksum(byte[] array, int length) | csRepeat.FW6.FW6Packet | [inline, static]
ChecksumLength | csRepeat.FW6.FW6Packet |
Data | csRepeat.FW6.SpectrumResponse |
EncodedPacket | csRepeat.FW6.FW6Packet |
IsMatch(byte pid1, byte pid2) | csRepeat.FW6.SpectrumResponse | [inline, static]
PacketHeaderLength | csRepeat.FW6.FW6Packet |
PID1 | csRepeat.FW6.SpectrumResponse |
PID1Offset | csRepeat.FW6.FW6Packet |
PID2 | csRepeat.FW6.SpectrumResponse |
PID2Offset | csRepeat.FW6.FW6Packet |
SpectrumResponse(byte[] packetContent) | csRepeat.FW6.SpectrumResponse | [inline]
SpectrumResponseTypePids enum name | csRepeat.FW6.SpectrumResponse |
SYNC1 | csRepeat.FW6.FW6Packet |
SYNC2 | csRepeat.FW6.FW6Packet |
ToString() | csRepeat.FW6.FW6Packet | [inline]
Generated on Fri Sep 22 2017 10:35:17 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Member List

  • csRepeat
  • FW6
  • StartFpgaUpload
csRepeat.FW6.StartFpgaUpload Member List
This is the complete list of members for csRepeat.FW6.StartFpgaUpload, including all inherited members.
Calculate16bitChecksum(byte[] array, int length) | csRepeat.FW6.FW6Packet | [inline, static]
ChecksumLength | csRepeat.FW6.FW6Packet |
Data | csRepeat.FW6.StartFpgaUpload |
EncodedPacket | csRepeat.FW6.FW6Packet |
PacketHeaderLength | csRepeat.FW6.FW6Packet |
PID1 | csRepeat.FW6.StartFpgaUpload |
PID1Offset | csRepeat.FW6.FW6Packet |
PID2 | csRepeat.FW6.StartFpgaUpload |
PID2Offset | csRepeat.FW6.FW6Packet |
SYNC1 | csRepeat.FW6.FW6Packet |
SYNC2 | csRepeat.FW6.FW6Packet |
ToString() | csRepeat.FW6.FW6Packet | [inline]
Generated on Fri Sep 22 2017 10:35:17 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Member List

  • csRepeat
  • FW6
  • StartUCUpload
csRepeat.FW6.StartUCUpload Member List
This is the complete list of members for csRepeat.FW6.StartUCUpload, including all inherited members.
Calculate16bitChecksum(byte[] array, int length) | csRepeat.FW6.FW6Packet | [inline, static]
ChecksumLength | csRepeat.FW6.FW6Packet |
Data | csRepeat.FW6.StartUCUpload |
EncodedPacket | csRepeat.FW6.FW6Packet |
PacketHeaderLength | csRepeat.FW6.FW6Packet |
PID1 | csRepeat.FW6.StartUCUpload |
PID1Offset | csRepeat.FW6.FW6Packet |
PID2 | csRepeat.FW6.StartUCUpload |
PID2Offset | csRepeat.FW6.FW6Packet |
SYNC1 | csRepeat.FW6.FW6Packet |
SYNC2 | csRepeat.FW6.FW6Packet |
ToString() | csRepeat.FW6.FW6Packet | [inline]
Generated on Fri Sep 22 2017 10:35:17 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Member List

  • csRepeat
  • FW6
  • StatusRequest
csRepeat.FW6.StatusRequest Member List
This is the complete list of members for csRepeat.FW6.StatusRequest, including all inherited members.
Calculate16bitChecksum(byte[] array, int length) | csRepeat.FW6.FW6Packet | [inline, static]
ChecksumLength | csRepeat.FW6.FW6Packet |
Data | csRepeat.FW6.StatusRequest |
EncodedPacket | csRepeat.FW6.FW6Packet |
PacketHeaderLength | csRepeat.FW6.FW6Packet |
PID1 | csRepeat.FW6.StatusRequest |
PID1Offset | csRepeat.FW6.FW6Packet |
PID2 | csRepeat.FW6.StatusRequest |
PID2Offset | csRepeat.FW6.FW6Packet |
StatusRequest() | csRepeat.FW6.StatusRequest | [inline]
SYNC1 | csRepeat.FW6.FW6Packet |
SYNC2 | csRepeat.FW6.FW6Packet |
ToString() | csRepeat.FW6.FW6Packet | [inline]
Generated on Fri Sep 22 2017 10:35:17 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Member List

  • csRepeat
  • FW6
  • StatusResponse
csRepeat.FW6.StatusResponse Member List
This is the complete list of members for csRepeat.FW6.StatusResponse, including all inherited members.
Calculate16bitChecksum(byte[] array, int length) | csRepeat.FW6.FW6Packet | [inline, static]
ChecksumLength | csRepeat.FW6.FW6Packet |
Data | csRepeat.FW6.StatusResponse |
DeviceType | csRepeat.FW6.StatusResponse |
EncodedPacket | csRepeat.FW6.FW6Packet |
FpgaVersionMajor | csRepeat.FW6.StatusResponse |
FpgaVersionMinor | csRepeat.FW6.StatusResponse |
FwBuildNumber | csRepeat.FW6.StatusResponse |
FwVersionMajor | csRepeat.FW6.StatusResponse |
FwVersionMinor | csRepeat.FW6.StatusResponse |
IsMatch(byte pid1, byte pid2) | csRepeat.FW6.StatusResponse | [inline, static]
PacketHeaderLength | csRepeat.FW6.FW6Packet |
PID1 | csRepeat.FW6.StatusResponse |
PID1Offset | csRepeat.FW6.FW6Packet |
PID2 | csRepeat.FW6.StatusResponse |
PID2Offset | csRepeat.FW6.FW6Packet |
SerialNumber | csRepeat.FW6.StatusResponse |
StatusResponse(byte[] packetContent) | csRepeat.FW6.StatusResponse | [inline]
SYNC1 | csRepeat.FW6.FW6Packet |
SYNC2 | csRepeat.FW6.FW6Packet |
ToString() | csRepeat.FW6.FW6Packet | [inline]
Generated on Fri Sep 22 2017 10:35:17 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Member List

  • csRepeat
  • FW6
  • fpgaDataPacket
csRepeat.FW6.fpgaDataPacket Member List
This is the complete list of members for csRepeat.FW6.fpgaDataPacket, including all inherited members.
Calculate16bitChecksum(byte[] array, int length) | csRepeat.FW6.FW6Packet | [inline, static]
ChecksumLength | csRepeat.FW6.FW6Packet |
Data | csRepeat.FW6.fpgaDataPacket |
EncodedPacket | csRepeat.FW6.FW6Packet |
fpgaDataPacket(byte[] data) | csRepeat.FW6.fpgaDataPacket | [inline]
PacketHeaderLength | csRepeat.FW6.FW6Packet |
PID1 | csRepeat.FW6.fpgaDataPacket |
PID1Offset | csRepeat.FW6.FW6Packet |
PID2 | csRepeat.FW6.fpgaDataPacket |
PID2Offset | csRepeat.FW6.FW6Packet |
SYNC1 | csRepeat.FW6.FW6Packet |
SYNC2 | csRepeat.FW6.FW6Packet |
ToString() | csRepeat.FW6.FW6Packet | [inline]
Generated on Fri Sep 22 2017 10:35:17 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Member List

  • csRepeat
  • FW6
  • fpgaDataPacketv2
csRepeat.FW6.fpgaDataPacketv2 Member List
This is the complete list of members for csRepeat.FW6.fpgaDataPacketv2, including all inherited members.
Calculate16bitChecksum(byte[] array, int length) | csRepeat.FW6.FW6Packet | [inline, static]
ChecksumLength | csRepeat.FW6.FW6Packet |
Data | csRepeat.FW6.fpgaDataPacketv2 |
EncodedPacket | csRepeat.FW6.FW6Packet |
fpgaDataPacketv2(byte[] data) | csRepeat.FW6.fpgaDataPacketv2 | [inline]
PacketHeaderLength | csRepeat.FW6.FW6Packet |
PID1 | csRepeat.FW6.fpgaDataPacketv2 |
PID1Offset | csRepeat.FW6.FW6Packet |
PID2 | csRepeat.FW6.fpgaDataPacketv2 |
PID2Offset | csRepeat.FW6.FW6Packet |
SYNC1 | csRepeat.FW6.FW6Packet |
SYNC2 | csRepeat.FW6.FW6Packet |
ToString() | csRepeat.FW6.FW6Packet | [inline]
Generated on Fri Sep 22 2017 10:35:17 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Member List

  • csRepeat
  • FW6
  • uCDataPacket
csRepeat.FW6.uCDataPacket Member List
This is the complete list of members for csRepeat.FW6.uCDataPacket, including all inherited members.
Calculate16bitChecksum(byte[] array, int length) | csRepeat.FW6.FW6Packet | [inline, static]
ChecksumLength | csRepeat.FW6.FW6Packet |
Data | csRepeat.FW6.uCDataPacket |
EncodedPacket | csRepeat.FW6.FW6Packet |
PacketHeaderLength | csRepeat.FW6.FW6Packet |
PID1 | csRepeat.FW6.uCDataPacket |
PID1Offset | csRepeat.FW6.FW6Packet |
PID2 | csRepeat.FW6.uCDataPacket |
PID2Offset | csRepeat.FW6.FW6Packet |
SYNC1 | csRepeat.FW6.FW6Packet |
SYNC2 | csRepeat.FW6.FW6Packet |
ToString() | csRepeat.FW6.FW6Packet | [inline]
uCDataPacket(byte[] data) | csRepeat.FW6.uCDataPacket | [inline]
Generated on Fri Sep 22 2017 10:35:17 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Member List

  • csRepeat
  • FW6
  • uCDataPacketv2
csRepeat.FW6.uCDataPacketv2 Member List
This is the complete list of members for csRepeat.FW6.uCDataPacketv2, including all inherited members.
Calculate16bitChecksum(byte[] array, int length) | csRepeat.FW6.FW6Packet | [inline, static]
ChecksumLength | csRepeat.FW6.FW6Packet |
Data | csRepeat.FW6.uCDataPacketv2 |
EncodedPacket | csRepeat.FW6.FW6Packet |
PacketHeaderLength | csRepeat.FW6.FW6Packet |
PID1 | csRepeat.FW6.uCDataPacketv2 |
PID1Offset | csRepeat.FW6.FW6Packet |
PID2 | csRepeat.FW6.uCDataPacketv2 |
PID2Offset | csRepeat.FW6.FW6Packet |
SYNC1 | csRepeat.FW6.FW6Packet |
SYNC2 | csRepeat.FW6.FW6Packet |
ToString() | csRepeat.FW6.FW6Packet | [inline]
uCDataPacketv2(byte[] data) | csRepeat.FW6.uCDataPacketv2 | [inline]
Generated on Fri Sep 22 2017 10:35:17 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Member List

  • csRepeat
  • FW6
  • uCSwitchToImage
csRepeat.FW6.uCSwitchToImage Member List
This is the complete list of members for csRepeat.FW6.uCSwitchToImage, including all inherited members.
Calculate16bitChecksum(byte[] array, int length) | csRepeat.FW6.FW6Packet | [inline, static]
ChecksumLength | csRepeat.FW6.FW6Packet |
data | csRepeat.FW6.uCSwitchToImage |
Data | csRepeat.FW6.uCSwitchToImage |
EncodedPacket | csRepeat.FW6.FW6Packet |
PacketHeaderLength | csRepeat.FW6.FW6Packet |
PID1 | csRepeat.FW6.uCSwitchToImage |
PID1Offset | csRepeat.FW6.FW6Packet |
PID2 | csRepeat.FW6.uCSwitchToImage |
PID2Offset | csRepeat.FW6.FW6Packet |
SYNC1 | csRepeat.FW6.FW6Packet |
SYNC2 | csRepeat.FW6.FW6Packet |
ToString() | csRepeat.FW6.FW6Packet | [inline]
uCSwitchToImage(UInt16 uploadChecksum) | csRepeat.FW6.uCSwitchToImage | [inline]
Generated on Fri Sep 22 2017 10:35:17 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Member List

  • csRepeat
  • FW6DppStatus
csRepeat.FW6DppStatus Member List
This is the complete list of members for csRepeat.FW6DppStatus, including all inherited members.
AccumulationTime | csRepeat.FW6DppStatus |
DEVICE_ID | csRepeat.FW6DppStatus |
DPP_ECO | csRepeat.FW6DppStatus |
dppDP5 | csRepeat.FW6DppStatus |
dppDP5G | csRepeat.FW6DppStatus |
dppDP5X | csRepeat.FW6DppStatus |
dppMCA8000D | csRepeat.FW6DppStatus |
dppPX5 | csRepeat.FW6DppStatus |
dppTB5 | csRepeat.FW6DppStatus |
GetDeviceNameFromVal(int DeviceTypeVal) | csRepeat.FW6DppStatus | [inline]
GetStatusValueStrings() | csRepeat.FW6DppStatus | [inline]
GetULong(int ulStart, byte[] buffer) | csRepeat.FW6DppStatus | [inline]
isDP5_RevDxGains | csRepeat.FW6DppStatus |
MCA_EN | csRepeat.FW6DppStatus |
OnOffStr(bool bOn) | csRepeat.FW6DppStatus | [inline]
PC5_PRESENT | csRepeat.FW6DppStatus |
PRECNT_REACHED | csRepeat.FW6DppStatus |
PresetLtDone | csRepeat.FW6DppStatus |
PresetRtDone | csRepeat.FW6DppStatus |
Process_Status(byte[] buffer) | csRepeat.FW6DppStatus | [inline]
PX5_OPTION_HPGe_HVPS | csRepeat.FW6DppStatus |
PX5_OPTION_NONE | csRepeat.FW6DppStatus |
PX5_OPTION_TEST_AMP | csRepeat.FW6DppStatus |
PX5_OPTION_TEST_MODE_1 | csRepeat.FW6DppStatus |
PX5_OPTION_TEST_MODE_2 | csRepeat.FW6DppStatus |
PX5_OPTION_TEST_MOX | csRepeat.FW6DppStatus |
PX5_OPTION_TEST_TEK | csRepeat.FW6DppStatus |
PX5_OptionsString() | csRepeat.FW6DppStatus | [inline]
ShowStatusValueStrings() | csRepeat.FW6DppStatus | [inline]
VersionToStr(byte bVersion) | csRepeat.FW6DppStatus | [inline]
Generated on Fri Sep 22 2017 10:35:17 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Class Index

Class Index
A | B | C | D | E | F | L | M | R | S | U | W
A
WinUsbDevice::devInfo (WinUsb) EndianBitConverter (MiscUtil.Conversion)
R
StatusResponse (csRepeat.FW6)
DiagnosticRequest (csRepeat.FW6)
F
U
AckResponse (csRepeat.FW6) DiagnosticResponse (csRepeat.FW6) Resources (csDP5.Properties)
B
DisableMCA (csRepeat.FW6) FileIO (WinUsb)
S
uCDataPacket (csRepeat.FW6)
DisplayVersion (csRepeat) Form1 (csDP5) uCDataPacketv2 (csRepeat.FW6)
BigEndianBitConverter (MiscUtil.Conversion) DoubleConverter (MiscUtil.Conversion) fpgaDataPacket (csRepeat.FW6) SafeNativeMethods (WinUsb) uCSwitchToImage (csRepeat.FW6)
C
DPDevice (csRepeat) fpgaDataPacketv2 (csRepeat.FW6) SetADCCalibrationRequest (csRepeat.FW6)
W
DPDeviceEthernet (csRepeat.FW6) FW6Device (csRepeat.FW6) SetDCalRequest (csRepeat.FW6)
ClearSpectrum (csRepeat.FW6) DPDeviceSerialFW6 (csRepeat.FW6) FW6DppStatus (csRepeat) SetPZCorrectionRequest (csRepeat.FW6) WinUsbDevice (WinUsb)
CommandFilters (AsciiCmdUtilities) DPDeviceUsb (csRepeat.FW6) FW6Packet (csRepeat.FW6) SetuCTemperatureCalibrationRequest (csRepeat.FW6)
Configuration (csRepeat.FW6)
E
FW6PacketParser (csRepeat.FW6) SpectrumRequest (csRepeat.FW6)
ConfigurationReadback (csRepeat.FW6)
L
SpectrumResponse (csRepeat.FW6)
ConfigurationResponse (csRepeat.FW6) EnableMCA (csRepeat.FW6) StartFpgaUpload (csRepeat.FW6)
D
EndianBinaryReader (MiscUtil.IO) LittleEndianBitConverter (MiscUtil.Conversion) StartUCUpload (csRepeat.FW6)
EndianBinaryWriter (MiscUtil.IO)
M
StatusRequest (csRepeat.FW6)
DeviceManagement (WinUsb)
MessageHandler (csRepeat.FW6)
A | B | C | D | E | F | L | M | R | S | U | W
Generated on Fri Sep 22 2017 10:35:18 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: File List

  • File List
File List
Here is a list of all files with brief descriptions:
AssemblyInfo.cs [code]
Form1.cs [code]
FW6/AckResponse.cs [code]
FW6/AsciiCmdUtilities.cs [code]
FW6/Configuration.cs [code]
FW6/ConfigurationReadback.cs [code]
FW6/ConfigurationResponse.cs [code]
FW6/DeviceTypes.cs [code]
FW6/DiagnosticRequest.cs [code]
FW6/DiagnosticResponse.cs [code]
FW6/DisplayVersion.cs [code]
FW6/DPDevice.cs [code]
FW6/DPDeviceEthernet.cs [code]
FW6/DPDeviceSerialFW6.cs [code]
FW6/DPDeviceUsb.cs [code]
FW6/fpgaDataPacket.cs [code]
FW6/fpgadatapacketv2.cs [code]
FW6/FW6Device.cs [code]
FW6/FW6DppStatus.cs [code]
FW6/FW6Packet.cs [code]
FW6/FW6PacketParser.cs [code]
FW6/SetADCCalibrationRequest.cs [code]
FW6/SetDCalRequest.cs [code]
FW6/SetPZCorrectionRequest.cs [code]
FW6/SetuCTemperatureCalibrationRequest.cs [code]
FW6/SpectrumRequest.cs [code]
FW6/SpectrumResponse.cs [code]
FW6/StartFpgaUpload.cs [code]
FW6/StartUCUpload.cs [code]
FW6/StatusRequest.cs [code]
FW6/StatusResponse.cs [code]
FW6/uCDataPacket.cs [code]
FW6/ucdatapacketv2.cs [code]
FW6/uCSwitchToImage.cs [code]
MiscUtil/Conversion/BigEndianBitConverter.cs [code]
MiscUtil/Conversion/DoubleConverter.cs [code]
MiscUtil/Conversion/EndianBitConverter.cs [code]
MiscUtil/Conversion/Endianness.cs [code]
MiscUtil/Conversion/LittleEndianBitConverter.cs [code]
MiscUtil/IO/EndianBinaryReader.cs [code]
MiscUtil/IO/EndianBinaryWriter.cs [code]
Properties/Resources.Designer.cs [code]
WinUsb/DeviceManagement.cs [code]
WinUsb/DeviceManagementApi.cs [code]
WinUsb/FileIOApi.cs [code]
WinUsb/SafeNativeMethods.cs [code]
WinUsb/WinUsbDevice.cs [code]
Generated on Fri Sep 22 2017 10:35:18 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: FW6/fpgaDataPacket.cs Source File

  • File List
FW6/fpgaDataPacket.cs
Go to the documentation of this file.
00001 ﻿using System;
00002 using System.Collections.Generic;
00003 using System.Text;
00004
00005 namespace csRepeat.FW6
00006 {
00007     class fpgaDataPacket : FW6Packet
00008     {
00009         public override byte PID1
00010         {
00011             get { return 0x30; }
00012         }
00013
00014         public override byte PID2
00015         {
00016             get { return 0x2; }
00017         }
00018
00019         private byte[] data;
00020         public override byte[] Data
00021         {
00022             get { return data; }
00023         }
00024
00025         public fpgaDataPacket(byte[] data)
00026         {
00027             this.data = data;
00028         }
00029     }
00030 }
Generated on Fri Sep 22 2017 10:35:16 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: FW6/fpgadatapacketv2.cs Source File

  • File List
FW6/fpgadatapacketv2.cs
Go to the documentation of this file.
00001 ﻿using System;
00002 using System.Collections.Generic;
00003 using System.Text;
00004
00005 namespace csRepeat.FW6
00006 {
00010     class fpgaDataPacketv2 : FW6Packet
00011     {
00012         public override byte PID1
00013         {
00014             get { return 0x30; }
00015         }
00016
00017         public override byte PID2
00018         {
00019             get { return 0xB; }
00020         }
00021
00022         private byte[] data;
00023         public override byte[] Data
00024         {
00025             get { return data; }
00026         }
00027
00028         public fpgaDataPacketv2(byte[] data)
00029         {
00030             this.data = data;
00031         }
00032     }
00033 }
Generated on Fri Sep 22 2017 10:35:16 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: 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 Fri Sep 22 2017 10:35:18 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Class Hierarchy

Class Hierarchy

Go to the graphical class hierarchy

This inheritance list is sorted roughly, but not completely, alphabetically:
  • AsciiCmdUtilities.CommandFilters
  • WinUsb.DeviceManagement
  • WinUsb.WinUsbDevice.devInfo
  • csRepeat.DisplayVersion
  • MiscUtil.Conversion.DoubleConverter
  • csRepeat.DPDevice
    • csRepeat.FW6.FW6Device
      • csRepeat.FW6.DPDeviceEthernet
      • csRepeat.FW6.DPDeviceSerialFW6
      • csRepeat.FW6.DPDeviceUsb
  • MiscUtil.IO.EndianBinaryReader
  • MiscUtil.IO.EndianBinaryWriter
  • MiscUtil.Conversion.EndianBitConverter
    • MiscUtil.Conversion.BigEndianBitConverter
    • MiscUtil.Conversion.LittleEndianBitConverter
  • WinUsb.FileIO
  • csDP5.Form1
  • csRepeat.FW6DppStatus
  • csRepeat.FW6.FW6Packet
    • csRepeat.FW6.AckResponse
    • csRepeat.FW6.ClearSpectrum
    • csRepeat.FW6.Configuration
    • csRepeat.FW6.ConfigurationReadback
    • csRepeat.FW6.ConfigurationResponse
    • csRepeat.FW6.DiagnosticRequest
    • csRepeat.FW6.DiagnosticResponse
    • csRepeat.FW6.DisableMCA
    • csRepeat.FW6.EnableMCA
    • csRepeat.FW6.fpgaDataPacket
    • csRepeat.FW6.fpgaDataPacketv2
    • csRepeat.FW6.SetADCCalibrationRequest
    • csRepeat.FW6.SetDCalRequest
    • csRepeat.FW6.SetPZCorrectionRequest
    • csRepeat.FW6.SetuCTemperatureCalibrationRequest
    • csRepeat.FW6.SpectrumRequest
    • csRepeat.FW6.SpectrumResponse
    • csRepeat.FW6.StartFpgaUpload
    • csRepeat.FW6.StartUCUpload
    • csRepeat.FW6.StatusRequest
    • csRepeat.FW6.StatusResponse
    • csRepeat.FW6.uCDataPacket
    • csRepeat.FW6.uCDataPacketv2
    • csRepeat.FW6.uCSwitchToImage
  • csRepeat.FW6.FW6PacketParser
  • csRepeat.FW6.MessageHandler
  • csDP5.Properties.Resources
  • WinUsb.SafeNativeMethods
  • WinUsb.WinUsbDevice
Generated on Fri Sep 22 2017 10:35:18 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Class Hierarchy

Class Hierarchy

Go to the textual class hierarchy

Generated on Fri Sep 22 2017 10:35:18 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Package AsciiCmdUtilities

  • Namespace List
  • Namespace Members
Classes
Package AsciiCmdUtilities

Classes

class CommandFilters
Generated on Fri Sep 22 2017 10:35:16 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: MiscUtil Namespace Reference

  • Namespace List
  • Namespace Members
Namespaces
MiscUtil Namespace Reference

Namespaces

package | Conversion
package | IO
Generated on Fri Sep 22 2017 10:35:17 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Package MiscUtil.IO

  • Namespace List
  • Namespace Members
  • MiscUtil
  • IO
Classes
Package MiscUtil.IO

Classes

class | EndianBinaryReader
Equivalent of System.IO.BinaryReader, but with either endianness, depending on the EndianBitConverter it is constructed with. No data is buffered in the reader; the client may seek within the stream at will. More...
class | EndianBinaryWriter
Equivalent of System.IO.BinaryWriter, but with either endianness, depending on the EndianBitConverter it is constructed with. More...
Generated on Fri Sep 22 2017 10:35:17 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Package WinUsb

  • Namespace List
  • Namespace Members
Classes
Package WinUsb

Classes

class | DeviceManagement
Routines for detecting devices and receiving device notifications. More...
class | FileIO
API declarations relating to file I/O (and used by WinUsb). More...
class | SafeNativeMethods
These declarations are translated from the C declarations in multiple files in the Windows DDK. The files are: More...
class | WinUsbDevice
Routines for the WinUsb driver supported by Windows Vista and Windows XP. More...
Generated on Fri Sep 22 2017 10:35:17 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Package csDP5

  • Namespace List
  • Namespace Members
Namespaces | Classes
Package csDP5

Namespaces

package | Properties

Classes

class | Form1
Summary description for Form1. More...
Generated on Fri Sep 22 2017 10:35:16 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Package csDP5.Properties

  • Namespace List
  • Namespace Members
  • csDP5
  • Properties
Classes
Package csDP5.Properties

Classes

class Resources
A strongly-typed resource class, for looking up localized strings, etc. More...
Generated on Fri Sep 22 2017 10:35:16 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Package csRepeat.FW6

  • Namespace List
  • Namespace Members
  • csRepeat
  • FW6
Classes
Package csRepeat.FW6

Classes

class | AckResponse
class | Configuration
Sends a Text Configuration packet. More...
class | ConfigurationReadback
Sends a Text Configuration Readback Request. More...
class | ConfigurationResponse
Configuration response that is returned from a configuration readback request. More...
class | DiagnosticRequest
Diagnostic data request packet. More...
class | DiagnosticResponse
Diagnostic data response packet. More...
class | DPDeviceEthernet
class | DPDeviceSerialFW6
class | MessageHandler
class | DPDeviceUsb
class | fpgaDataPacket
class | fpgaDataPacketv2
v2 uC data packet, requires firmware newer than v6.06.04 More...
class | FW6Device
class | FW6Packet
Packet layout looks like: [SYNC1][SYNC2][PID1][PID2][LEN1][LEN2][data bytes, length][CHECKSUM MSB][CHECKSUM LSB]. More...
class | FW6PacketParser
class | SetADCCalibrationRequest
class | SetDCalRequest
class | SetPZCorrectionRequest
class | SetuCTemperatureCalibrationRequest
class | SpectrumRequest
Request device spectrum data. More...
class | SpectrumResponse
Encompases the several kinds of spectrum responses that can be returned from a spectrum request NOTE: The spectrum responses with status are handled elsewhere as they have a status field that the responses handled here do not have. More...
class | StartFpgaUpload
class | StartUCUpload
class | StatusRequest
class | ClearSpectrum
class | EnableMCA
class | DisableMCA
class | StatusResponse
class | uCDataPacket
class | uCDataPacketv2
v2 uC data packet, requires firmware newer than v6.06.04 More...
class | uCSwitchToImage
Packet used to perform a uC image switch, also finishes up a uC firmware upload. More...
Generated on Fri Sep 22 2017 10:35:17 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Namespace List

  • Namespace List
  • Namespace Members
Namespace List
Here is a list of all namespaces with brief descriptions:
AsciiCmdUtilities
csDP5
csDP5.Properties
csRepeat
csRepeat.FW6
MiscUtil
MiscUtil.Conversion
MiscUtil.IO
WinUsb
Generated on Fri Sep 22 2017 10:35:18 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: readme.txt File Reference

  • File List
readme.txt File Reference
Generated on Fri Sep 22 2017 10:35:16 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: Member List

  • WinUsb
  • WinUsbDevice
  • devInfo
WinUsb.WinUsbDevice.devInfo Member List
This is the complete list of members for WinUsb.WinUsbDevice.devInfo, including all inherited members.
bulkInPipe | WinUsb.WinUsbDevice.devInfo
bulkOutPipe | WinUsb.WinUsbDevice.devInfo
deviceHandle | WinUsb.WinUsbDevice.devInfo
devicespeed | WinUsb.WinUsbDevice.devInfo
interruptInPipe | WinUsb.WinUsbDevice.devInfo
interruptOutPipe | WinUsb.WinUsbDevice.devInfo
winUsbHandle | WinUsb.WinUsbDevice.devInfo
Generated on Fri Sep 22 2017 10:35:18 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: FW6/uCDataPacket.cs Source File

  • File List
FW6/uCDataPacket.cs
Go to the documentation of this file.
00001 ﻿using System;
00002 using System.Collections.Generic;
00003 using System.Text;
00004
00005 namespace csRepeat.FW6
00006 {
00007     class uCDataPacket : FW6Packet
00008     {
00009         public override byte PID1
00010         {
00011             get { return 0x30; }
00012         }
00013
00014         public override byte PID2
00015         {
00016             get { return 0x07; }
00017         }
00018
00019         private byte[] data;
00020         public override byte[] Data
00021         {
00022             get { return data; }
00023         }
00024
00025         public uCDataPacket(byte[] data)
00026         {
00027             this.data = data;
00028         }
00029     }
00030 }
Generated on Fri Sep 22 2017 10:35:16 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: FW6/uCSwitchToImage.cs Source File

  • File List
FW6/uCSwitchToImage.cs
Go to the documentation of this file.
00001 ﻿using System;
00002 using System.Collections.Generic;
00003 using System.Text;
00004
00005 namespace csRepeat.FW6
00006 {
00010     class uCSwitchToImage : FW6Packet
00011     {
00012         public override byte PID1
00013         {
00014             get { return 0x30; }
00015         }
00016
00020         public override byte PID2
00021         {
00022             get { return 0x9; }
00023         }
00024
00025         public byte[] data;
00026         public override byte[] Data
00027         {
00028             get { return data; }
00029         }
00030
00031         public uCSwitchToImage(UInt16 uploadChecksum)
00032         {
00033             data = new byte[4];
00034             data[0] = 0xA5; // firmware unlock code
00035             data[1] = 0xF1; // firmware unlock code
00036             data[2] = (byte)(uploadChecksum >> 8);
00037             data[3] = (byte)(uploadChecksum & 0xFF);
00038         }
00039     }
00040 }
Generated on Fri Sep 22 2017 10:35:16 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1


DPP csDP5 WinUSB RS232: FW6/ucdatapacketv2.cs Source File

  • File List
FW6/ucdatapacketv2.cs
Go to the documentation of this file.
00001 ﻿using System;
00002 using System.Collections.Generic;
00003 using System.Text;
00004
00005 namespace csRepeat.FW6
00006 {
00010     class uCDataPacketv2 : FW6Packet
00011     {
00012         public override byte PID1
00013         {
00014             get { return 0x30; }
00015         }
00016
00017         public override byte PID2
00018         {
00019             get { return 0x0C; }
00020         }
00021
00022         private byte[] data;
00023         public override byte[] Data
00024         {
00025             get { return data; }
00026         }
00027
00028         public uCDataPacketv2(byte[] data)
00029         {
00030             this.data = data;
00031         }
00032     }
00033 }
Generated on Fri Sep 22 2017 10:35:16 for DPP csDP5 WinUSB RS232 by doxygen 1.7.6.1