13.07.2015 Views

CompuScope SDK Manua.. - Egmont Instruments

CompuScope SDK Manua.. - Egmont Instruments

CompuScope SDK Manua.. - Egmont Instruments

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

oarddef, srtable and irtype StructuresThree important structure types, boarddef, srtype and irtype, are defined in the file STRUCTS.H andinitialized in the file STRUCTS.C. The boarddef, srtype and irtype structure types are used by the sampleprograms and are reproduced here. The boarddef structure type defines all of the settings that may bechanged on the <strong>CompuScope</strong> card. The srtable structure type defines all of the possible sample ratesettings that any of the <strong>CompuScope</strong> cards may use. The top 16 bits of the flag are used to specify if thesample rate is available single channel and the bottom 16 bits are used to specify that the sample rate isavailable when acquiring data in the dual channel mode. The irtype structure type similarly defines whichinput ranges are available for the installed <strong>CompuScope</strong> hardware. These three structure types areprovided as a convenience and are used by Gage C sample programs. The definition of these types maychange in future as additional Gage hardware and functionality is released. The changes, however, willalways be documented within the README.TXT file that comes with the <strong>CompuScope</strong> C/C++ <strong>SDK</strong>Boarddef Structuretypedef struct {int32 sample_rate; /* For gage_capture-mode. */int16 opmode, srindex; /* For gage_capture_mode. */int16 range_a, couple_a, range_b, couple_b; /* For gage_input_control. */int16 imped_a, imped_b; /* For gage_input_control. */int16 source, slope, level, range_e, couple_e; /* For gage_trigger_control. */int16 source_2, slope_2, level_2; /* For gage_trigger_control_2. */int32 depth; /* For gage_trigger_control. */} boarddef;extern boarddef board;srtable Structuretypedef struct {int16 rate; /* rate and mult are used together to set thesample rate in gage_capture_moderoutine. */int16 mult; /* rate and mult are used together to set thesample rate in gage_capture_moderoutine. */uInt32 sr_flag; /* Board supports sample rate. */uInt32 rt_sr_flag; /* Board supports sample rate in real timemode. */uInt32 rts_sr_flag; /* Board supports sample rate in real timemode and is safe to use. */float sr_calc; /* Time between samples (in ns). */char *sr_text; /* Sample rate text. */} srtype;irtype Structuretypedef struct {int16 constant; /* For gage_input_control. */uInt32 ir_flag; /* Flag to see if board supports inputrange*/double ir_calc; /* Voltage amplitude. */char *ir_text; /* Input range text. */} irtype;<strong>CompuScope</strong> <strong>SDK</strong> <strong>Manua</strong>l Appendix A Page 61

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!