beautypg.com

Teledyne LeCroy WaveExpert 100H Operators Manual User Manual

Page 200

background image

Operator’s Manual

198

WE-OM-E Rev A

double horInterval; // scale factor that relates integer sample indices to the horizontal units of
the waveform.

double horOffset; // horizontal offset (in horizontal units, e.g. seconds) of the waveform

double horResolution; // horizontal resolution of the measurement system (also in horizontal
units)

lecTimeStamp trigTime; // trigger time, units of 1ns since 00:00:00 on Jan 1st 2000, 64-bit
unsigned integer

char verUnit[48]; // vertical units of the waveform ("V" for example)

char horUnit[48]; // horizontal units of the waveform ("s" for example)

};

#pragma pack(pop) // restore packing

//------------------------------------------------------------------------------------------

// The buffer size is 80MB (40,000,000 samples, stored as short integers) plus 0x1000 bytes for the
header.

const unsigned long HEADER_SIZE = 0x1000

const unsigned long MEM_MAP_FILE_SIZE = 80000000 + HEADER_SIZE; // = 40MSamples, or
80MBytes

int main(int argc, char* argv[])

{

// names based on 'FastWavePort1' name defined in Processor setup.

char szMapFileName[] = "FastWavePort1File";

char szMutexDataAvailableName[] = "FastWavePort1MutexDataAvailable";

char szMutexProcessingCompleteName[] = "FastWavePort1MutexProcessingComplete";

// Associate shared memory file handle value.

HANDLE m_hMMFile = CreateFileMapping ((HANDLE)0xffffffff, NULL, PAGE_READWRITE,
0, MEM_MAP_FILE_SIZE, szMapFileName);

if(m_hMMFile == 0)

{

printf("Unable to create file mapping\n");

return 0;

}