23.11.2014 Views

CompuScope SDK Manua.. - Egmont Instruments

CompuScope SDK Manua.. - Egmont Instruments

CompuScope SDK Manua.. - Egmont Instruments

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

gage_transfer_buffer_2<br />

Syntax<br />

C:<br />

void far* GAGEAPI gage_transfer_buffer_2 (int32 ta, int16 channel, void far *buffer, int32 nsamples);<br />

Visual BASIC:<br />

This routine is currently not supported under Visual BASIC.<br />

Remarks<br />

gage_transfer_buffer_2 is used to copy nsamples points from the specified channel to the supplied<br />

buffer beginning from address ta. The channel can be either GAGE_CHAN_A or GAGE_CHAN_B. The<br />

relevant addresses can be obtained by calling gage_calculate_addresses routine. The buffer should be<br />

typecast to the appropriate size before accessing it. The <strong>CompuScope</strong> PCI boards will use bus-mastering if<br />

available, otherwise this routine is the same as gage_transfer_buffer.<br />

Because bus-mastering requires the buffer to be dword-aligned, the driver may have to change its starting<br />

address. The return value is a pointer that points to where the actual data begins. The difference between<br />

the buffer address passed to the routine and the one returned will be 0, 1, 2 or 3 addresses.<br />

Note: The buffer that the calling program allocates should be 4 samples larger than the requested size.<br />

For all <strong>CompuScope</strong> boards with two channels, single channel mode uses both of the channels. The<br />

captured data must be transferred one channel at a time. The even addresses will be from channel A and the<br />

odd addresses will be from channel B. The data must then be interleaved by the application when using<br />

gage_transfer_buffer, gage_trigger_view_transfer, gage_transfer_buffer_2 and<br />

gage_trigger_view_transfer_2 routines.<br />

Please see the Sample Programs section in the <strong>CompuScope</strong> <strong>SDK</strong> <strong>Manua</strong>l for further details.<br />

Return Value<br />

Returns a pointer that points to where the actual data begins.<br />

See also<br />

gage_transfer_buffer, gage_transfer_buffer_3 and Appendix B: Comparison of Various Data Transfer<br />

Routines.<br />

Examples<br />

C:<br />

ptr = gage_transfer_buffer_2(current_address, GAGE_CHAN_A, (uInt8 far *)(buffer), 512);<br />

first_value = ptr[0];<br />

<strong>CompuScope</strong> API Reference <strong>Manua</strong>l<br />

85

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

Saved successfully!

Ooh no, something went wrong!