SDA Operator’s Manual
SDA-OM-E Rev H
193
};
#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 = 80 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;
}
// Map a view of this file for writing.
short *m_lpMMFile = (short *)MapViewOfFile (m_hMMFile, FILE_MAP_ALL_ACCESS, 0, 0,
0);
if(m_lpMMFile == 0)
{
printf("Unable to map view of file\n");
return 0;
}
// create/open events used for synchronization
// if the client app. was run before the scope then these events will be created, if the scope was
run first then these events
// will just be opened
HANDLE m_hDataAvailable = CreateEvent(NULL, FALSE, FALSE /* initial state */,
szMutexDataAvailableName);
HANDLE m_hProcessingComplete = CreateEvent(NULL, FALSE, FALSE /* initial state */,
szMutexProcessingCompleteName);
if(m_hDataAvailable == 0 || m_hProcessingComplete == 0)
{
printf("Unable to open events\n");
return 0;
}
// main loop
Summary of Contents for SDA
Page 1: ...SERIAL DATA ANALYZER OPERATOR S MANUAL December 2007 ...
Page 223: ...SDA Operator s Manual Example 6 SDA OM E Rev H 223 ...
Page 225: ...SDA Operator s Manual SDA OM E Rev H 225 ...
Page 246: ...246 SDA OM E Rev H ...
Page 247: ...SDA Operator s Manual Excel Example 5 Using a Surface Plot SDA OM E Rev H 247 ...
Page 279: ...SDA Operator s Manual Convolving two signals SDA OM E Rev H 279 ...
Page 310: ...The jitter wizard is accessed from the Analysis drop down menu 310 SDA OM E Rev H ...
Page 327: ...SDA Operator s Manual SDA OM E Rev H 327 ...
Page 328: ...328 SDA OM E Rev H ...
Page 394: ...394 SDA OM E Rev H ...